6 ms·
Luna Programming Language – a small, elegant VM implemented in C
- bogomipz 11y agoNeat! Out of curiosity how long did this take you to write?
- riscy 11y agoIt doesn't look like this project has gotten past parsing, since all it appears to do is dump an AST.
- dmytrish 11y agoIt has some opcodes implemented, but at a quick glance I found no signs of any memory management and no way to actually execute opcodes.
- wmccullough 11y agoAnother language that's basically Python 1.5...
- wallacoloo 11y agoI never dealt with Python until the 2.x series, but hasn't Python always been dynamically typed? Also, the coroutine business seems a significant difference, as Python's concurrency model has always (to my knowledge) been limited by the GIL.
- kelvin0 11y agoCoroutines != Multithreading. Also as I understand it, GIL places limitations on Python multithreading. Please correct me if I'm wrong.
- smilekzs 11y agoName clash with https://news.ycombinator.com/item?id=11144828 https://news.ycombinator.com/item?id=11144828
- EddieRingle 11y agoFWIW, this repository is nearly 5 years old.
- startling 11y agoName clash with https://en.wikipedia.org/wiki/Luna_(goddess) https://en.wikipedia.org/wiki/Luna_(goddess)
- vortico 11y agoLuna looked great a year ago, since its syntax it ever-so-close to ideal. If it has momentum now, I'd invest a lot of time writing bindings to popular C libraries, an event loop, and a web framework. But it's not functional yet, or probably ever unless someone adopts it. I'm a fan of tj's other work though. I don't see how he can pump out so many quality npm packages and the like.
- gunn 11y agohttp://crystal-lang.org/ http://crystal-lang.org/ might be a good fit for you then. Or http://nim-lang.org/ http://nim-lang.org/ if you're flexible on syntax.
- vortico 11y agoThose languages are too big, so I might as well use Ruby or the Node environment when I need a full-featured language with lots of libraries. I'd like something dead simple that I can statically link into my C programs, with a syntax I can completely explain to someone in 15 minutes. I currently use duktape/Coffeescript or Lua/Moonscript for that, since hosting it in C is about ~5 lines of boilerplate code. Edit: Does anyone know of any other languages similar to the syntax of Coffeescript and Moonscript?
- Marwes 11y agoI am working on a language with goals similar to this which is much farther along though still not quite ready for practical use. For example, there it does not currently have a C API. It is written in Rust so it shouldn't be to difficult to provide once I feel it is usable. https://github.com/Marwes/embed_lang https://github.com/Marwes/embed_lang
- datashaman 11y agohttp://elixir-lang.org/ http://elixir-lang.org/ looks quite similar, although it is functional (and backed by the Erlang VM BEAM).
- mikegioia 11y ago
- tjholowaychuk 11y agoAuthor here. Not sure why it was posted, but this (really old) project is basically defunct. I gave github.com/luna/* to the people creating the visual Luna language that was on HN recently. Moving it to my account must have caught someone's eye. Anyway it was just a toy project that I never had enough time/motivation to complete. I was inspired by the size of Lua's VM, but deterred by its obscurity (and lack of inline documentation), so my original goal was to create a very clean and minimal VM.
- naasking 11y agoThe code looks nice and straightforward, and kudos on actually producing a typed language. IMO, there's too little of that these days. Too bad you didn't get around to implementing context threading, because I would have liked to see a clean and portable implementation, particularly if you had also planned to support TCO. Is the design you had planned documented anywhere?
- rurban 11y agoIt's very similar to _why's potion, for which I'm the maintainer now. I added lot's of internal documentation there, but haven't got to add type support (easy, but lof of work) and multi-threading (not easy with this GC). coros, exceptions however are there.
- munificent 11y ago> I was inspired by the size of Lua's VM, but deterred by its obscurity (and lack of inline documentation), so my original goal was to create a very clean and minimal VM. Me too, so I created Wren: https://github.com/munificent/wren https://github.com/munificent/wren It's about the same size as Lua, significantly faster, and much more thoroughly documented. I also like the language itself more — it's object model is more familiar to someone coming from Java/C++/C#/etc. — but that's personal preference. ... heh and then I scroll down and see two people have already mentioned Wren. I guess I'm doing a good job of branding it as the "better documented Lua". :)
- naasking 11y ago
- Ace17 11y agoIn the same vein: https://github.com/munificent/wren https://github.com/munificent/wren