

Show HN: a hash-based Lua code snippet store - ay

http://www.luabits.com:7777/help - a key-value store with a naive editor on top, which allows you to reduce your app to a single SHA-1 hash value if the app is pure Lua - the hash for the initial snippet that you can retrieve from the web.<p>e.g. if I tell you to give a shot to 5f564ee0eca0ce524ea094e73c3056454948fa37 I can with some level of confidence say that if you run it, it will do what I expect it will do - print a string, call another bit, which in turn will print a string and grab another bit, which in turn print "hello world".<p>One other idea is that if this were to talk with a DHT, one could run a "web of code" - where deploying the code would mean just distributing a SHA-256/SHA-512 hash to the target that will run the code...<p>Will appreciate any feedback.<p>p.s. the idea is obviously not unique to Lua - you can do the same way with any other dynamic language, just that I personally prefer Lua.<p>p.p.s. The stack is mongrel2 + lua + redis running on a VPS, so I am very curious how it performs performance-wise.
======
mycroftiv
Great idea! I think the idea of building distributed systems using
cryptographic hashes to navigate the universe of available code (and other
information) is very powerful. I've spent some time prototyping systems with a
similar concept using the sha1 indexed Venti deduplicative data server created
for Plan 9. One challenge for the acceptance of such systems is building a web
of trust so that a given hash-referenced object can be relied upon to do what
it is described as doing.

~~~
ay
Thanks a lot! My thinking was that it would be the same as now we rely on e.g.
jquery website that the code is working as advertized. The key in my case is
that the code is available in the form ready for inspection - so that rather
just trust, one can verify.

Another application of this would be to take the backend redis data file and
use it as an "image" (somewhat similar to Lisp/Smalltalk approach).

The biggest problem I thought of would be the pollution of the "start" page
and the management of the links between as well as hiding the unused files
from navigation. That's still an area for experimentation.

------
ay
<http://www.luabits.com:7777/help> \- a clickable link.

