[HN Gopher] Show HN: I made an esoteric programming language tha...
___________________________________________________________________
Show HN: I made an esoteric programming language that's read like a
spellbook
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/...
Author : sirbread
Score : 124 points
Date : 2025-10-12 05:31 UTC (17 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| jzellis wrote:
| That's very silly. I like it. :-D
| fpsvogel wrote:
| Reminds of Rockstar[1] and The Art of Code[2], a great talk by
| its creator.
|
| 1: https://codewithrockstar.com
|
| 2: https://youtu.be/6avJHaC3C2U
| thaumasiotes wrote:
| > summon the result with essence of through ritual amplify with
| power
|
| This is not natural language.
| throwingrocks wrote:
| Literal eye roll. It's close enough.
| sirbread wrote:
| there may be some parts that read like really, really broken
| English like the one you just said, but for the most part I
| feel like it's okayishly readable. and again, this was just an
| end-of-the-week side project that I made because a random
| person in school gave me the idea to do so, so it won't be too
| polished :P
| wewewedxfgdf wrote:
| Love it.
|
| This is the true value of AI.
|
| More such creative projects please.
| tempodox wrote:
| Bewitch that repo with a clone incantation!
| bsenftner wrote:
| 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.
| CaptainOfCoit wrote:
| > and you've got something potentially as big as Pokemon.
|
| Huh? Granted, anything is "potentially as big as Pokemon" but
| care to share why this project in particular makes you feel
| that way? It's a fun project, I'll give you that, but
| "programming as magic incantations" feels like a niche within a
| niche within a niche, which would make me believe it cannot
| ever be "as big as Pokemon". It doesn't need to be either,
| nothing wrong with fun projects made for fun.
| sirbread wrote:
| i've gotta agree with you on this one </3
| bsenftner wrote:
| Before Cyberpunk became the darling that is has become, there
| was another sci-fi future with a few authors that imagined a
| virtual world with magic and sorcery being software, and
| software developers writing programs that read like
| incantations. That alternative view of a future chose to
| construct VR worlds in a medieval style simply because it all
| fit a theme of fantasy with magic (software.) That version,
| or school of sci-fi was active in the 70's; which is when I
| read some of it. It's rich, it's engaging; with good
| marketing that could all be reimagined.
| librasteve wrote:
| very silly indeed ... to max out the silliness, you could
| implement this as a Raku grammar
| christophilus wrote:
| I was expecting to see Haskell.
| mckirk wrote:
| The ancient tongue of the IO Nomads...
| Avicebron wrote:
| The monaditic order..
| jfadfwddas wrote:
| Or Scheme.
| lokimedes wrote:
| 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...
| sjclemmy wrote:
| 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...
| simpaticoder wrote:
| 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/...
| DarkContinent wrote:
| How do you call a library function from a spell? Like something
| from numpy.
| sim7c00 wrote:
| *perform rituals to summon external logic entites
| lyu07282 wrote:
| I hearken to me the powers smarter than me I summon SCIPY!
| reactordev wrote:
| _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.
| rnhmjoj wrote:
| 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...
| egypturnash wrote:
| 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.
| megatech1337 wrote:
| things are heating up in the grimoire community...
| poolhead45 wrote:
| Abstraction is at the core of programming. I get your point --
| but obsessive adherence to baroque complexity has rarely been
| the M.O. of computer science in rational circles. More often,
| an elegant simplification that captures the essence has
| sufficed.
|
| That said, perhaps something like this would be more
| thematically appropriate:
|
| 'O Master of sublime name and great power, O Saturn: Cold,
| Sterile, Mournful, Pernicious; Sage and Solitary, Impenetrable
| and Sure; Thou who knowest no joy, bringest prosperity or ruin,
| deceivest wisely, judgest truly-- I conjure thee, Supreme
| Father, by thy bounty and ancient cunning, to do as I ask:
| print("hello world")'
| popalchemist wrote:
| Fellow occultist here. Yep! Still a cool idea worth pursuing,
| though.
| b_e_n_t_o_n wrote:
| Absolutely incredible to see a snarky nit on a project like
| this. Hackernews never fails haha.
| shakna wrote:
| The project is a carricature of real world religions that are
| still active today.
|
| Where is the surprise that it raises ire?
| b_e_n_t_o_n wrote:
| Is it? I figured it was halloween themed.
| dang wrote:
| I appreciate your intention, of course, but please don't
| respond by breaking the site guidelines yourself. It only
| makes things worse.
|
| Besides " _Please don 't sneer, including at the rest of the
| community._"
| (https://news.ycombinator.com/newsguidelines.html), this
| guideline is relevant:
|
| " _Please respond to the strongest plausible interpretation
| of what someone says, not a weaker one that 's easier to
| criticize. Assume good faith._"
|
| I doubt that egypturnash intended a "snarky nit". More likely
| this is someone who's passionate about the underlying topic
| (grimoires!), naturally got excited when seeing the OP, and
| then was disappointed when it didn't go as deep as someone
| with their level of knowledge would expect.
|
| It's bad, of course, to express that by putting down the OP
| or their work; much better to respond by sharing some of what
| one knows, as I explained at
| https://news.ycombinator.com/item?id=45561740.
| dang wrote:
| Can you please make your substantive comments without putting
| down others?
|
| If you know more than someone else does, that's great! Please
| do share some of what you know so the rest of us can learn. But
| don't put down the other person. That never helps, and it
| tarnishes your positive contribution in a way that is bad for
| the community.
|
| https://hn.algolia.com/?dateRange=all&page=0&prefix=true&sor...
|
| https://news.ycombinator.com/newsguidelines.html
| nunobrito wrote:
| 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.
| jedberg wrote:
| 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)
| amacbride wrote:
| "From the depths of the WEB in Castle Evans, I summon thee, oh
| car, oh cdr; may thine parentheses ever match!"
| jedberg wrote:
| I see you too are a scholar in the ways of Harvey and
| Hilfinger.
| diegoperini wrote:
| I recommend replacing "hi chat" in the test spell with "Mortal
| plane, I greet thee".
| vunderba wrote:
| 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.
|
| https://en.wikipedia.org/wiki/Daemon_(novel)
| starkparker wrote:
| Mystical on HN: https://news.ycombinator.com/item?id=44016037
| gavmor wrote:
| > essence 0 of through ritual amplify with power
|
| Should this not be "(essence of (0 through (ritual amplify with
| power)))?
| hrimfaxi wrote:
| I have a strong feeling you may like this, OP.
|
| https://aphyr.com/posts/341-hexing-the-technical-interview
| pavlov wrote:
| Put it in all caps and drop the definite articles, and you could
| almost convince people that it's COBOL.
| titanomachy wrote:
| 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.
| INTPenis wrote:
| 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".
| CapricornNoble wrote:
| If you really wanna scramble the language grammar, incorporate
| Enochian tables somehow:
|
| https://archive.org/details/JohnDeesFiveBooksOfMysterJosephH...
___________________________________________________________________
(page generated 2025-10-12 23:01 UTC)