Post 9miOLF73EKsOOC9rJQ by grainloom@cybre.space
(DIR) More posts by grainloom@cybre.space
(DIR) Post #9miOKCEET4zz9e1Ayu by grainloom@cybre.space
2019-09-08T10:39:30Z
0 likes, 0 repeats
possibly terrible idea:what if a pure language that allows you to use some impure state to control otherwise pure functionsmotivation:could be used to provide a way to explicitly manage memoizationthe neat thing would be if one could check that whatever impurity that introduces only changes speed and memory usage but otherwise keeps the function pure
(DIR) Post #9miOKCTTYPBxuv9Lk0 by alva@beach.city
2019-09-08T10:50:23Z
1 likes, 0 repeats
@grainloom Only tangentially related, but do you have any thoughts on Carp? Claims like "ownership tracking enables a functional programming style while still using mutation of cache-friendly data structures under the hood" and "no garbage collector or VM" make it sound more appealing than other FPs I know. https://github.com/carp-lang/Carp
(DIR) Post #9miOLF73EKsOOC9rJQ by grainloom@cybre.space
2019-09-08T10:51:30Z
0 likes, 0 repeats
@alva heccc i really wish i hadevery time i hear about i'm like "oh yea, i should try that out" and then i completely forget to do so :blobsad:
(DIR) Post #9miOLFQu2WkvNlRiFs by alva@beach.city
2019-09-08T10:52:36Z
1 likes, 0 repeats
@grainloom Yeah me too and I got distracted by packaging a more recent version than the ancient one in Nix https://github.com/NixOS/nixpkgs/pull/68155
(DIR) Post #9miOMTfkaDn3poydwu by janneke@octodon.social
2019-09-08T11:22:46Z
0 likes, 0 repeats
@grainloom you're not talking about something like scheme's fluids/parameters (or lisps dynamic binding)?
(DIR) Post #9miOMU4D7HM93gQB4i by grainloom@cybre.space
2019-09-08T11:23:31Z
0 likes, 0 repeats
@janneke idk, maybe?but neither of those are pure
(DIR) Post #9miOMURxgyM4FLX960 by janneke@octodon.social
2019-09-08T11:26:46Z
0 likes, 0 repeats
@grainloom this will show my ignorance, but can't lisp and scheme be used to write pure code, by avoiding or even disabling imperative procedures and macros?
(DIR) Post #9miOMUmsRD5LIDJqhE by grainloom@cybre.space
2019-09-08T11:28:30Z
1 likes, 0 repeats
@janneke if you need to avoid it, it's not really pureevery language has a pure subset, that's not really what I'm interested inif you have impure operations, you can just use those to implement memoization
(DIR) Post #9miOg5YLy4Oop0ruF6 by grainloom@cybre.space
2019-09-08T11:29:40Z
1 likes, 0 repeats
@janneke what I'm curious about is if one could implement explicitly controlled memoization in something like Haskell or maybe even Idris, without changing the surface level syntax of the function call