5 ms·
The real deal, or is it yet another one of those Potemkin REPLs that append code to a temporary file, compile it and diff standard output?
by pwdisswordfishc 3y ago
The real deal, or is it yet another one of those Potemkin REPLs that append code to a temporary file, compile it and diff standard output?
- rany_ 3y agoWrites to a temporary file and compiles it: https://github.com/alexandru-dinu/igcc/blob/84f68c7056d0d99623e7f0c81cc7cb9bc2a0963a/libigcc/run.py#L186 https://github.com/alexandru-dinu/igcc/blob/84f68c7056d0d996...
- codeflo 3y agoThe ethics discussion in the neighboring threads aside, this approach has some nasty surprises, and I think it's borderline deceptive that they aren't mentioned more prominently. It's not that rare that my REPL sessions e.g. in Node are > perform expensive computation ... result ... > transform result ... transformed result ... With this approach, the REPL slows down quadratically with session length, and any expensive command at the beginning is executed over and over again. Also, better don't do any file I/O and then continue the session unless you're prepared for the consequences.
- guyrap 3y agoCompiling diffs - but if the user experience is REPL-ish and it can help some people learn the _basics_ of the language, what's wrong with that? (Wrong as in "murdering puppies" wrong, not as in "here are the downsides of X" which I believe exist for every X.)
- pwdisswordfishc 3y agoThe inefficiency of that process increases electricity usage, the carbon footprint, and therefore contributes to climate change. Which, eventually, murders puppies. Good enough for your arbitrary standard? I would have thought the fact that all preceding side effects will be re-executed each time a new line is written is bad enough, but whatever.
- jack_pp 3y agoPenny wise, pound foolish. By this logic computer games are a genocide in which millions participate every second
- d-lisp 3y agoThe true question this types of discussion evoke to me is : Are we able to live ethically ? (Which leads to "What is ethics ?", which eventually leads to " Ethics is nonsensical".)