4 ms·
Show HN: Luakernel – Lua + SQLite + musl libc running on x86
- allan_s 12y agoPretty interesting, just a pity he didn't specified an actual license, as "disclaims all copyright" has no legal value and even if it had, it would certainly mean different things from one country to an other (for example in France you can't, even yourself, put something you've produced in the public domain as you can't cede your paternity 'right')
- gojomo 12y agoSurely, a formal license or public-domain-dedication (such as 'CC0') would be better – and perhaps especially better for the author, who could then clearly disclaim other implied warranties. But the "disclaims copyright" language probably has some legal value, in many jurisdictions. It might be interpreted as a public-domain dedication, where those have meaning. Or, as a promise which was relied upon, preventing a later copyright-enforcement claim by estoppel doctrines. A lawyer could say, and of course the advantage of existing licenses/dedications is that they've already been legally reviewed for clarity across many jurisdictions. But this sort of overt declaration may still protect many re-users if push ever came to legal shove. And it might even be useful to establish such a precedent – that sharing is safe with only such a small, clear, plain, blanket statement.
- th0br0 12y agoNot in a fair number of European countries (France, Germany, ...) - as the op stated you can not cede your copyright which is granted by law. You can't even sign it away (instead have to grant an unlimited + exclusive license to your employer for example)
- gojomo 12y agoGood to know! (That's why I included the qualifier "in many jurisdictions".) Here, also, Creative Commons' "CC0" declaration is a friend of authors who want to be universally open. CC0 was designed with multiple fallback clauses, intended to also handle copyright systems like those of France or Germany.
- cpach 12y agoThe ISC license is much simpler: https://www.isc.org/downloads/software-support-policy/isc-license/ https://www.isc.org/downloads/software-support-policy/isc-li... But perhaps not as universal?
- vertex-four 12y agoCC0 doesn't even necessarily require that you distribute the license text or copyright notice. You can use it as you'd use a public domain work - do anything with it.
- vidarh 12y agoIn France at least you can cede what in English would be called copyright. What you can not sell are the moral rights, and this is the case or a bunch of European countries. I'm not aware of any European countries where you can not cede reproduction rights / proprietary rights?
- ers35 12y agoI took inspiration from SQLite: https://www.sqlite.org/copyright.html https://www.sqlite.org/copyright.html https://github.com/ers35/luakernel/blob/master/dep/sqlite3/sqlite3.h#L4 https://github.com/ers35/luakernel/blob/master/dep/sqlite3/s... I agree that the licensing terms need clarification.
- tjaerv 12y agoSQLite does seem to have that effect of inspiring other public domain works: http://unlicense.org http://unlicense.org
- bch 12y agoRichard Hipp went on to say he wishes he didn't use public domain, because of its ambiguity. see: https://web.archive.org/web/20120510151444/http://methodlogic.net/BSDFossil.html https://web.archive.org/web/20120510151444/http://methodlogi...
- ers35 12y agoI added CC0: https://github.com/ers35/luakernel/commit/6047b1e44bc60ce4eaf830f6475f918c43e1dfb6 https://github.com/ers35/luakernel/commit/6047b1e44bc60ce4ea...
- metafex 12y agoIt would be very interesting if this could be combined with snabbswitch for some truly awesome bare-metal lua networking.
- easytiger 12y agoI've never seen snabbswitch before, are there any lua extensions to get it to emulate tcp/ip stack and present the data stream to your lua code??
- metafex 12y agoIt basically talks to certain network-cards directly, bypassing the TCP/IP stack. AFAIK it presents raw ethernet packets to the lua code which have to be parsed by the application (i don't know exactly if there isn't some code present in the repo to deal with sockets and such directly). The repo: https://github.com/SnabbCo/snabbswitch https://github.com/SnabbCo/snabbswitch Under src/apps there are some examples.
- srcmap 12y agois it a .ko or an user space app?
- justincormack 12y agoUserspace, it mmaps that PCI space itself.
- nl 12y agoSince there is nothing obvious on the page: This is Lua+SQLite running on bare metal x86. Lots of questions: does it actually have any performance benefits? A network stack? How do the mechanics of getting/editing files work?
- hwh 12y agoThe codebase is so small that it's quite easy to take a look to answer the questions: * no networking at all * performance - doing what? * file primitives are implemented purely in Lua, and what is currently there resembles a pre-initialized ramfs. Closing a file is a NOP, the concept of numerical file descriptors is not fully implemented yet. So - no block devices yet. * aside from file primitives, you have lua coroutines as the core of the scheduling, inb()/outb() (bytewise port I/O), and putpixel/clearscreen in the API implemented in C, as well as basic keyboard handling (using inb/outb wrappers) and graphics primitives (using putpixel/clearscreen) implemented in Lua. I suggest to take a quick peek at luakernel.c and luakernel.lua in the codebase.
- justincormack 12y agoIf you want Lua running on bare metal with a network stack you can use the rump kernel[1]. [1] http://rumpkernel.org/ http://rumpkernel.org/
- vidarh 12y agoConsider this somewhat similar to booting up an 8-bit home-computer and get thrown into a BASIC prompt. It's a fun toy and a great experiment. It's not a "product". Play with it if you want to experiment with Lua and/or experiment with a simple OS built around a higher level language. Don't play with it if you want something to build your next app on.
- kator 12y agoDownloaded the iso and ran under a vm but it crashes as soon as I try any command. I'm curious what's the easiest way to test this? [1] https://github.com/ers35/luakernel/blob/master/bin/luakernel.iso https://github.com/ers35/luakernel/blob/master/bin/luakernel...
- cdawzrd 12y agoTry running it under qemu[1] or bochs[2]. A "virtual machine" software such as VMWare or Virtualbox is not the same as a low-level "bare metal" CPU emulator such as the two I suggested. The latter programs make assumptions about how the guest OS will behave that probably aren't valid for this project. I suggest starting with bochs since this project has a bochsrc.txt in the git root that will be automatically picked up if you just run "bochs" in that directory. [1] http://wiki.qemu.org/Main_Page http://wiki.qemu.org/Main_Page [2] http://bochs.sourceforge.net/ http://bochs.sourceforge.net/
- ers35 12y agoWhat command did you try? I am able to run the iso in QEMU, VirtualBox, Bochs, and on real hardware. This is still in the early stages of development, and much is not yet implemented. One way to trigger a crash is to call an unimplemented system call.
- marktangotango 12y agoWhat does this need to be useful for real work? Ie serve html? A network stack, file system, process mgmt?