bkovitz
2018-10-17 12:03:04

@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.


samth
2018-10-17 12:04:22

More generally Typed Racket can’t do anything that you can’t do yourself, it just does it automatically and correctly


bkovitz
2018-10-17 12:05:05

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.


samth
2018-10-17 12:05:57

Yes, that’s what it does


samth
2018-10-17 12:06:26

But it does that by expanding into code that you could have written yourself with more effort and care


bkovitz
2018-10-17 22:06:02

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:


bkovitz
2018-10-17 22:08:55

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?