3 ms·
+1. I'm reminded of a tweet of yours from a few years back! https://twitter.com/chrisgseaton/status/619885182104043520 https://twitter.com/chrisgseaton/status/
by nickysielicki 8y ago
+1. I'm reminded of a tweet of yours from a few years back!
https://twitter.com/chrisgseaton/status/619885182104043520 https://twitter.com/chrisgseaton/status/619885182104043520
Try doing something like that at compile time.
- TeMPOraL 8y agoCommon Lisp does that for breakfast :).
- bjoli 8y ago... I am not sure I am impressed. The rules for partially evaluating eval are the same for partially evaluating any code. I am just not sure anybody else bothered something like that with eval. Edit: I have seen Guile's optimizer/peval turn 30 lines of messy (to human eyes) code to a single atom result. This is actually rather simple as long as you van reason enough about the code and it has no side effects. The hard part is developing heuristics to not have it impact compile time too much
- chrisseaton 8y ago> I am not sure I am impressed My PhD defence committee was impressed, so that was good enough for me. In Ruby almost no code is refentially transparent so just simple PE is not enough. You need to speculate in some complex ways and writing that to be practical is not easy.
- bjoli 8y agoThen I am impressed :) I don't know enough ruby to know exactly why, though. I am just used to seeing this kind of behaviour in guile, and for guile I don't really see why that would be hard, at least if you have enough visibility. I might have gotten it wrong for guile as well :) sorry to sound so dismissive. I would love to read your thesis!