4 ms·
I'm working on a programming language that has builtin support for reloading code at runtime. It'll also support various ways of modifying code at runtime, like
by barrybe 17y ago
I'm working on a programming language that has builtin support for reloading code at runtime. It'll also support various ways of modifying code at runtime, like with visual interfaces. The primary usage is for making interactive graphical apps, like games.
Intro is here:
http://andyfischer.github.com/circa/intro.html http://andyfischer.github.com/circa/intro.html
code is here:
http://github.com/andyfischer/circa/tree/master http://github.com/andyfischer/circa/tree/master
- bsaunder 17y agoI've prototyped a similar concept in Perl (still a bit rough). I think this is a powerful concept.
- cool-RR 17y agoWouldn't it be better to modify an existing, popular language to support this feature?
- barrybe 17y agoIt would be better, but I want to do some cool things that I'm not sure if I can support in an existing language. One thing is automatically preserving state across a reload. This is really hard if I allow the programmer to store state any way that they want- I can't tell which things I should preserve. So the language forces the programmer to declare their stateful things in a special way. Another thing is introspecting on code. I want to be able to click an image and then see all of the calculations that went in to that image's position (maybe so that I can change them). But this is pretty hard in most languages. Aliasing makes it hard. So this language discourages operations which are hard to introspect. So I could theoretically support Ruby or something, but it would turn out to be "not really Ruby", because there would be a lot of stuff you wouldn't be allowed to do.
- matthew-wegner 17y agoUnity is a game engine that uses Mono as its scripting languages. You can recompile on the fly (you frequently play the game in-IDE during development). All public variables are exposed to its inspector and survive this recompilation. It's a great engine in general: http://unity3d.com http://unity3d.com
- aaronblohowiak 17y agoMono is not a scripting language. The Unity Scripting language is similar to ECMAscript, but is not standard and does not have comprehensive documentation. It is true that you can interact with the mono / .net 2.0 system libraries. ... and you have about a 1/3 chance of it crashing if you are using the recompile on the fly as you edit.. command p, alt+tab, save, alt+tab, command p...
- hboon 17y agoDid you check out Smalltalk?
- carterschonwald 17y agosounds like you should look at haskell for a few design ideas about reifying state
- bokonist 17y agoDon't most dynamic languages already allow this? I know in python you can reload code.
- Zak 17y agoLooks like a cool little project. You should, however take a look at how most Lisps do something similar. You appear to be trying to take it farther than most Lisps do, but do have a look so as to not reinvent the wheel.