Why potion language




















This means she's a speedy one. Who integrates very well with C extensions. Intermediate bytecode format and VM. Load and dump code. Decent speed and cross- architecture.

Heavily based on Lua's VM. Bootstrapped "id" object model, based on Ian Piumarta's soda languages. This means everything in the language, including object allocation and interpreter state are part of the object model. Interpreter is thread-safe and reentrant. I hope this will facilitate coroutines, parallel interpreters and sandboxing. Under 10kloc. Right now we're like 6, or something. Install sloccount and run: make sloc.

Reified AST and bytecode structures. This is very important to me. By giving access to the parser and compiler, it allows people to target other platforms, write code analysis tools and even fully bootstrapped VMs. Memory-efficient classes. Stored like C structs. Although the method lookup table can be used like a hash for storing arbitrary data. The JIT is also used to speed up some other bottlenecks. For example, instance variable and method lookup tables are compiled into machine code.

Limited platform support for coroutines. This affects exceptions. I'm and feeling rather uninspired on the matter. Let's hear from you. The parser is not GC safe. This affects eval. Do not waste too much memory inside eval.

It's 16 pages, and is a quick - but quite thought-provoking - read. I agree that it has a bunch of novel ideas, but I wouldn't list the register-based VM and table optimizations among them; register-based VMs go back to the s, depending on how you want to count, and using different representations for tables used as arrays and tables used as hashes that's what you mean by "table optimizations", right?

I'm not saying it isn't a great engineering achievement; I never would have predicted that those things would have been worth the cost in Lua's context, and they were, brilliantly so. I would instead list their one-pass-compiler implementation of flat closures and their approach to continuations, and especially integrating continuations with C code calling back into Lua.

I second the recommendation of the paper. To my understanding, stack-based VMs are more common than register-based VMs, and the Lua VM is noteworthy for being both well-implemented and small enough to read.

Then again, it looks like you're quite a bit ahead of me in reading about VMs. You've got a lot of good links. Yes, I agree that stack-based VMs are more common than register-based VMs, and it was an unusual decision on the part of the Lua folks to choose a register-based VM, particularly given their emphasis on implementation simplicity.

And it appears to have paid off, which is pretty cool! I'm glad you've enjoyed the various links. I meant the way it behaves as both a dict and a table You mean, a dict and an array? I'm not sure I agree with their decision to unify those structures, but it does seem not to have cost them much implementation complexity or performance.

Dict and an array, yes. Also, Lua had a stack-based VM until Lua 5. GHFigs on Jan 9, parent prev next [—]. Lua has been cited as one of the major influences on WebKit's JavaScript interpreter SquirrelFish, which has seen about a 10x performance boost in the past 18 months. Thank you. Excellent article. I had always suspected register VMs to be faster from my days as a compiler writer. All of this is straight forward code optimization and generation.

If anyone out there is contemplating a new language, I suggest looking at this. Lua the impl is awesome, Lua the language is very pleasent, but the arrays using position instead of offset start at 1, not 0 thing I still love it Great tips, thanks for taking time to post them! The source for that is almost certainly a goldmine too it's a cutting-edge JIT compiler, after all , but I haven't really looked at its internals yet.

Also, should be "simple-but-efficient garbage collect ion " above. I'd like to do that with a Forth or a Lisp one of these days, time permitting. LogicHoleFlaw on Jan 8, prev next [—]. This is really slick. It's an infectious virus that works rather brilliantly with the presentation, and quality of work this guy puts together.

Home PC. Potion Craft: How to change the language? September 22, Next Post. We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. Do not sell my personal information. Close Privacy Overview This website uses cookies to improve your experience while you navigate through the website.

Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent.

You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.



0コメント

  • 1000 / 1000