5 ms·
(Not a lisp guy). What is an image and why would I want to run one? My best guess is that an image would be platform independent bytecode vs compiled executabl
by db65edfc7996 5y ago
(Not a lisp guy).
What is an image and why would I want to run one? My best guess is that an image would be platform independent bytecode vs compiled executable?
- mumblemumble 5y agoIt's a dump of the state of the run-time environment, including data. Probably the easiest use case is using it as a savegame feature when you're working in the REPL. It's not necessarily portable. Some lisps will use machine-independent bytecode, others use native code. I'm not sure which one Janet does.
- ianthehenry 5y agoI think of it as one of the defining features of Smalltalk, not Lisp, although there is plenty of cross-pollination. https://en.wikipedia.org/wiki/Smalltalk#Image-based_persistence https://en.wikipedia.org/wiki/Smalltalk#Image-based_persiste... Janet's object system seems to be modeled after ideas first popularized in the Self language -- a Smalltalk derivative -- so there could be some direct inspiration there. https://en.wikipedia.org/wiki/Self_(programming_language) https://en.wikipedia.org/wiki/Self_(programming_language)
- pjmlp 5y agoLisp systems had it first, specially Lisp Machines, that is where Smalltalk got its idea from. Xerox PARC was pursuing three workstation based OSes in parallel, based on Lisp, Smalltalk and Mesa (later evolved into Cedar). So the ideas regarding images, REPL with typo suggestions, OS wide debugging, code browser,.... were available across them all.
- lispm 5y agoLISP I from 1960. http://bitsavers.org/pdf/mit/rle_lisp/LISP_I_Programmers_Manual_Mar60.pdf http://bitsavers.org/pdf/mit/rle_lisp/LISP_I_Programmers_Man... page 67: SET card '...the state of the memory as it stands is read out onto tape 8 as the new "base" image for the memory...'
- coldtea 5y agoDamn, why don't we have programming environments with such capabilities today? (the kind @pjmlp mentioned "images, REPL with typo suggestions, OS wide debugging, code browser", etc." and so on) Not in the @pjmlp kind of availability ("Why you say that? There's this commercial language envinronment from a company in rural Austria that all of 100 companies use and all of 1000 people ever heard of that gives you exactly that! A 2-person department in the basement, right across the toilets in Jane Street uses it for something. And somebody made a weather balloon controller with it. Plus some mid-90s research team had this in some research language that has these features, that over 10K students have installed!"). Not even in the Pharo, SBCL, etc. kind of availability. It would nice to have it in the "competes with Java, C#, Python, Javascript, PHP" or at least Go and Rust, for popularity, adoption, libraries, websites and sources devoted to it, job opportunities, vendor support, enterprise adoption, and such" kind of availability...
- igouy 5y ago> Damn, why don't we have programming environments with such capabilities today? Do you use any of the image based programming environments that we do have? Pharo? VM Smalltalk?
- pjmlp 5y agoBecause those features cost money to develop, and plenty of developers nowadays want to be paid, while refusing to pay for the work of others. So you get what is possible with long nights, weekends and abandoned university thesis after graduation, instead.
- coldtea 5y ago>Because those features cost money to develop, and plenty of developers nowadays want to be paid, while refusing to pay for the work of others. Yes, but v8, Grail, the JVM, .NET takes lots of money to develop as well. Even Swift (despite Apple being stingy, so that is probably just a 5 person team force-fed Jolt Cola) costs a lot. But companies seem to pay for those, but not for those other styles/features. To be frank, even if we had this technology, but it was a closed source, proprietary affair, I wouldn't want it anyway. That's another must-have feature in 2021 - and it's not just about "not wanting to pay" (I pay for IDEA subscription, for example). It's about what such a license would mean for corporate adoption, ability to tinker with it, reliance on a single vendor, and so on.
- cellularmitosis 5y agoWhen folks run emacs, they aren’t actually starting it entirely from scratch. They are booting up a similar “image”, which allows for much faster startup. The lack of image support is what prevents Clojure from competing on startup time (but see also grallvm and babashka)
- pjmlp 5y agoThere are also the JIT caches on HotSpot, OpenJ9 and Azul.
- fithisux 5y agoR for example allows to save state on exit. I wish R supported an alternative lispy syntax.