@samth Ah, thanks for letting me know. There is a lot of floating-point arithmetic in the spreading activation, but not in the code that creates the graph. I’ll keep poking around.
More generally Typed Racket can’t do anything that you can’t do yourself, it just does it automatically and correctly
Ohhhh. I was thinking that the static types would enable a lot more compiler optimizations, because it can assume the types of values without checking.
Yes, that’s what it does
But it does that by expanding into code that you could have written yourself with more effort and care
I still haven’t read carefully about either contracts or Typed Racket. Hopefully I’ll find some gain from skipping contract-checking. For now, though, I’m just going to use a smaller graph. :slightly_smiling_face:
RACKET IDIOM QUESTION: If you have a hash whose values are themselves hashes (and maybe more levels than that), and you want to hash-update one of the inner hashes, is there a conventional easy way to write that? Or do you usually just roll your own function like this? Or are nested hashes a “code smell” in Racket, suggesting that the data would be better organized some other way?