Hacker News new | past | comments | ask | show | jobs | submit login

There is a valid point lurking in there.

The instant evaluation model doesn't play nicely with side-effects. Exactly where side-effects occur can be difficult to determine, there's no simple way to work around this.

This is less of a problem in Clojure, thanks to its immutable data structures, but they're not a panacea. I'm also not sure how well this would work in JS and Python, the other languages that Light Table intends to initially target.

One possible solution is to have hooks into side-effects: you could display console output or logging alongside the instant evaluation. The real difficulty is network communication: even if you're okay with actually sending requests over the wire, there's an awkward balance between visibility and generality. Something like libpcap [1] is very general, but gives minimal insight into the content. Hooking into a particular HTTP client library gives you a lot more visibility into what's going on, but you'll need to do this every time you want to use a new library.

[1] http://www.tcpdump.org/




you could mitigate side-effects by running all of lighttable in a VM, assuming no files and creating all the ones you need. Network requests could be intercepted. The key to make this workable would be sensible defaults, allowing you to just open it up and start a new project instantly, and allowing custimization for complicated projects.


All you need is a VM, a good standard library with mostly functions with minimal side deffects, a way to save all runtime state, and a way to log every change and replay them in case of a crash.


The side-effect could also just be updating a mutable hash-map, which has much of the same issues, and isn't something that you can sandbox.


In Smalltalk, this isn't a problem. Our Dictionary instances are mutable. Usually, we realize it while continuing the debugging/editing (they happen at the same time) and we either rewind the stack a little further to get a new instance of the dictionary, or we can easily undo the side effect. It usually happens in less than the amount of time you took to read the previous sentence.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: