4 ms·
I wrote a stack based, concatenative, operator language. I demoed it live at a tech talk in Italy on the future of programming and databases. Its core feature
by marknadal 10y ago
I wrote a stack based, concatenative, operator language. I demoed it live at a tech talk in Italy on the future of programming and databases.
Its core feature is emergence/composition, to demonstrate its power, let me show you a SCARY example of a factorial function:
factorial : [ = ] ? 1 | [ - 1 factorial * [
Now, let me show you the exact same program using an EVEN SCARIER "language pack" (note, this is the exact same program, nothing is different) here:
Define the factorial function to be that if the left parameter is equal to the right parameter then return 1 else wise please take the left parameter , subtract one , recursively calling the factorial function again multiplied by the right parameter .
That terrible "english" is the EXACT SAME program as the first line, the interpreter doesn't know there was any english. I do not recommend ever coding with plain english, but it demonstrates the power of emergence/composition/currying with the language.
If anybody is curious, I'd love to explain more / chat with people / show demos. I'm ultimately going to switch the programming language's interpreter to be built with a database (the one I'm working on, http://gun.js.org/ http://gun.js.org/ ) so that way I can have a Turing Complete database system. Once that is working I will then be able to evaluate programs across multiple machines simultaneously and modify programs dynamically on the fly, as well as reduce O(N) operations to O(1) by spinning up N number of machines (for large enough data sets that make it worth the overhead of splitting up the load).
I wish they recorded the talk, I'll have to do it again and post it. It had a lot of other interesting ideas, like combining it with Machine Learning to sample inputs and outputs of functions to see if the computer could optimize algorithms and then issue a pull-request to its own code, becoming a contributor. :)