3 ms·
This kind of hot-swapping can be achieved on quite a few languages; certainly Perl and Ruby in addition to JS, and I'm sure there's a dozen more languages that
by gamache 14y ago
This kind of hot-swapping can be achieved on quite a few languages; certainly Perl and Ruby in addition to JS, and I'm sure there's a dozen more languages that allow you to redefine at runtime. The difference is that Smalltalk made hot-editing
the default.
SmallTalk is an uncommon language these days, with the exception of its half-descendant, Objective-C.
Ruby borrows Smalltalk's OO semantics pretty much completely. Just sayin'
- norswap 14y agoYou can even do it in Java with Eclipse (Notch did it during his screencast), although I don't know the specifics.
- seanmcdirmid 14y agoNotch used a special programming framework to get their. Many game engines support similar features; the ability to modify the game world while its running, and can even do that with C++. The problem is you don't get it for free (framework transparent hot swapping isn't good enough), and its only because of special compromises made in the framework that you can get liveness at all.
- drakeandrews 14y agoIntellij keeps telling me it has the feature. Although I've never managed to use it on purpose.
- martinced 14y ago"...I'm sure there's a dozen more languages that allow you to redefine at runtime" Indeed. There are all the Lisp dialects to start with. And it's no surprise that hence SmallTalk had this feature too: Alan Kay (+), one of the key creator of SmallTalk, acknowledged the heavy influence of Lisp on SmallTalk: http://www.franz.com/services/conferences_seminars/lisp_50th-birthday.lhtml http://www.franz.com/services/conferences_seminars/lisp_50th... (+) Famous quote attributed to Alan Kay: "I coined the term "object oriented". I can tell you I didn't have C++ in mind."
- nicolaus 14y agoThis exactly. Tim Berners Lee and Roy Fielding both conceived of the web as a giant Lisp machine oriented around the URL / Hypermedia concept. HTML and the subsequent XML is a crippled form of an s-expression. If you change the tags into parens, map the functions into visual structure, you have a Lisp. TBL's first web browser in 1991 was a two-way client: you could edit the page and submit it back to the server and it would publish it. ReST is how distributed computing was meant to work in a homoiconic language. And JSON? C'mon, change the colon, bang, it's a Lisp. Lisp is fundamental; the AST is the avatar of all languages.
- ericbb 14y agoSmall rant ahead. You have been warned. My favorite system that supports hot-swapping is Linux. It works with every language, there is an excellent scheduler, processes are protected from each other, there are all kinds of interprocess communication techniques available, you can choose between files and databases for persistence. I think the lame workflows people have while working within a conventional OS are a failure of imagination and a lack of understanding about how operating systems work. In particular, I suspect that a lot of people overestimate the cost of exec and IPC. Or, for example, do you really appreciate the fact that the operating system keeps file system data in RAM even if you exit the program and start up another one accessing the same file a microsecond later? Image-based persistence is not necessary for responsiveness. Use exec(), use a database, create the editors that make you productive. I've used Lisp and Smalltalk and I've created a miniature VM/OS running in the browser with processes and persistence and all that. These days I'm more excited about old fashioned Unix techniques.