←back to thread

176 points sirbread | 1 comments | | HN request time: 0.209s | source

i made an esoteric programming language which i call spellscript. every program is a "spell" written in a "grimoire," and you have to use keywords like summon, enchant, inscribe, and conjure.

it's literally read like a spellbook because the syntax consists of all natural language, and newlines are optional. your code can now be an essay, like everybody wants!

for example, if you want to print something, you'd write: `begin the grimoire. inscribe whispers of "hello, world!". close the grimoire.`

it has variables, dynamic typing, arrays, functions, conditionals, loops, string manipulation, array manipulation, type conversion, and user input, among other (listed in the docs!)

but why? i wanted to see how far you could push natural language syntax while still being parseable. most esolangs are intentionally obtuse (BF, Malbolge), but i wanted something that's weird but readable, like you're reading instructions from a spellbook, which makes it incredibly easy to read and understand. like an anti-esolang? hmm...

github: https://github.com/sirbread/spellscript

docs: https://github.com/sirbread/spellscript/blob/main/resources/...

1. INTPenis ◴[] No.45560778[source]
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".