If you're interested in a programming that reads like a natural language check out Lingua Romana Perligata (Perl in Latin). Interestingly, it uses the Latin case system to map the various uses of an identifier (as a scalar, array or hash) to Perl sigils.
https://metacpan.org/dist/Lingua-Romana-Perligata/view/lib/L...
I recommend replacing "hi chat" in the test spell with "Mortal plane, I greet thee".
Add this to an open ended Morrowind sequel- with a tint of Minecraft and LLM driven narrative - and you would have caught the 18yo me in an infinite loop. Danger stuff, pure alchemy in fact…
If you really wanna scramble the language grammar, incorporate Enochian tables somehow:
https://archive.org/details/JohnDeesFiveBooksOfMysterJosephH...
I have a strong feeling you may like this, OP.
College would have been a lot more fun if we had implement this in our intro CS course instead of a scheme interpreter in scheme that added infix operators. :)
(but I will admit to this day 30 years later I still remember scheme because of that project)
Put it in all caps and drop the definite articles, and you could almost convince people that it's COBOL.
Why no "break" equivalent in loops as "thou shall not pass" ?
Fantastic idea. Now I'm in the mood of implementing this scripting language for a game builder.
A while back I built a magic-themed game to solve the problem of getting younger kids past visual block-coding tools(scratch etc) and into real programming. It's called Lambda Spellcrafting Academy. Kids craft spells using logic and function composition, learning core concepts like conditionals, functions, and recursion in a fun way. If you’re a technical parent and want your child to have a strong foundation, consider taking a look.
Free demo: https://www.bittwiddlegames.com/lambda-spellcrafting-academy...
Another one around spells as invocations is Mystical - a programming language that's intended to look like magical summoning circles.
https://suberic.net/~dmm/projects/mystical/README.html
If you're interested in the idea of treating programming with an air of mysticism, Daniel Suarez's scifi novel "Daemon" is a highly recommended read.
Reminds of Rockstar[1] and The Art of Code[2], a great talk by its creator.
haha this great! I have made something similar for myself but its a tool to manage shell scripts for my projects. I create a grimoire for a given project and add reagents and recipes (shell scripts) those can be mixed individually or brewed together to form a recipe. I also have a concept of spells which are more akin to utility scripts for managing/scaffolding the grimoire.
here’s the tool: https://github.com/globz/witchesbrew
and here’s a grimoire which manage everything related to my emacs config and dependencies:
Bewitch that repo with a clone incantation!
summon a Thing named x with essence of value
would be a little bit better styled as you can define the class of the var x. Thus defining it descriptively as a Thing. You can group similar Things in a collection or you can throw them all in a bag.
I feel invited by the light-hearted nature of this project (and the beauty of this particular Sunday) to make a light-hearted observation of my own. The idea of a programming language that reads like a spell book...but what about a programming language that reads like Principia Mathematica[0]? How would that work, and would it make sense?
Flipping through it just now I was struck with several observations. First, it has a very formal structure (Proposition N Theorem M Phenomena P etc). And also the sheer amount of work he did in (Euclidian) geometry prior to even discussing gravity or calculus. But most remarkably of all, how little a computer would have helped Newton in his work. Oh sure, a computer would have helped Kepler a great deal! And even Newton is not without his tables. Newton would have really enjoyed Mathematica, but even it would have been useless since it assumes what Newton sought to prove.
In any event, this all leads me to realize what a narrow place traditional computation has within the entire field of human communication. The optimist in me sees this as affirming the unique power of the human mind; the pessimist notes that there are always more ways to get a problem wrong than to get it right.
P.S. The Principia is as often a philosophical work as a scientific one. Consider this excerpt:
RULE I. We are i’o admit no more causes of natural things than such as are both true and sufficient to explain their appearances.
To this purpose the philosophers say that Nature does nothing in vain, and more is in vain when less will serve; for Nature is pleased with simplicity, and affects not the pomp of superfluous causes.
RULE II. Therefore to the same natural effects we must, as far as possible, assign the same causes.
As to respiration in a man and in a beast; the descent of stones in Europe and in America ; the light of our culinary fire and of the sun; the reflection of light in the earth, and in the planets.
RULE III. The qualities of bodies, which admit neither intension nor remission of degrees, and which are found to belong to all bodies within the reach of our experiments, are to be esteemed the universal qualities of all bodies whatsoever.
These Rules of Newton have become so far subsumed into the zeitgeist that we hardly ever repeat them. (It reminds me of the feeling I got reading Descartes math papers). Indeed, most modern physicists scoff at philosophy for just this reason, because to them it's been "solved" and remains only as a jobs program for verbally talented charlatans. This is deeply unfortunate for at least two reasons: first, it is dangerous to assume the basics will always be in place; civilizational drift is quite real. Second, you give up using those same tools to advance human knowledge further - if Newton was able to use philosophy to clarify his point and purpose, surely another scientist might as well.
0 - https://archive.org/details/IsaacNewtonPrincipiaEnglish1846/...
> essence 0 of through ritual amplify with power
Should this not be "(essence of (0 through (ritual amplify with power)))?
very silly indeed … to max out the silliness, you could implement this as a Raku grammar
> summon the result with essence of through ritual amplify with power
This is not natural language.
How do you call a library function from a spell? Like something from numpy.
You've got the basis of an entire alternative programming culture - locate a strong and understanding marketing partner, and you've got something potentially as big as Pokemon.
I like the idea, but obviously it's a bit verbose, you must be aware.
But I enjoy the idea so much that I'd like to see a useful version of it. When you think about it, most programming languages already read in your head like language, even if you're using operators.
So there's no need to be that verbose, if you want to print something just go whisper "hello", or even just wh "hello".
When a programmer reads a spellscript it will still sound like a spell in their head, it doesn't have to look like a spell to non-coders.
To expand further on that. Declare is already a great spell word, just use declare for variables.
I think summon should be used for importing libraries.
Just imagine if you wrote a game in this. "Summon orc from creatures".
And now imagine the future where code is embedded in the world all around. No one knows it’s there, except… the magicians! They’re the only ones who managed to RTFM before it was lost in the mists of time…
This reads like a vague idea of a spellbook from someone who has never even looked at a caricature of a grimoire, let alone a real one.
I think you should read some actual grimoires before developing this further. I suggest the Picatrix or the PGM as starting points. Maybe a copy of 777 as well.
Love it.
This is the true value of AI.
More such creative projects please.
That's very silly. I like it. :-D
I was expecting to see Haskell.
These grimoires seem to open with long list of entreaties to various deities… seems kind of like an import statement.
“O mighty jsonparse, he who calls forth structure from the chaos; O clever urllib, ethereal messenger who weaves between worlds; O wise flogger, who scribes our deeds in the book of names that they shall never be forgotten…”
If you fail to heap sufficient praise on the libraries, they refuse to help you run your program.