Tumgik
#esoteric programming language
lavenderhorns · 1 year
Text
Every now and then I remember that Malbolge exists and I get to spend the better part of an hour cry-laughing at the world’s worst programming language
Tumblr media
already starting off strong, but it gets worse
Tumblr media
Wow! Sounds easy and intuitive to use! What’s the “crazy operation” you ask? We’ll get to that later. For now let’s see what a program in this language looks like :)
Tumblr media
Thanks! I hate it!
Tumblr media
it’s so difficult to work with that the first program was written by another brute force search program
Tumblr media
mmmmm delicious base-3 arithmetic, what could go wrong? (For reference, that means this program forgoes the usual “0/1″ values of binary code in favor of a much more fun “0/1/2″ set of values)
Tumblr media
ah.
Tumblr media
Here’s how the language actually figures out what to do. It’s got 8 “simple” commands that can be executed easily by *checks notes* running the code itself through the modulo operation and taking the result.
Tumblr media
As a bonus, on top of all that every single character in your code will now alter what every single other character does. So I hope you’re alright with cracking a cipher every time you add a new letter to your program!
Tumblr media
oh god oh fuck.
Tumblr media
behold, Malbolge’s primary arithmetic operation and what you’ll be using for most of your math while programming with it :)
This looks specifically designed to be the least logical math operation you could make, and knowing what the rest of Malbolge is I’d wager that’s precisely what happened. I never want to ever use this and it’s my favorite thing I’ve ever seen.
https://en.wikipedia.org/wiki/Malbolge
Anyways here’s the wiki page if you wanna read through it more deeply, I’m gonna sit here holding in my laughter staring at the hello world program again.
12K notes · View notes
aeolids-zenith · 1 year
Text
esolangs in Minecraft
Tumblr media
I've been playing around with implementing esoteric programming languages as Minecraft data packs
for a bit I've had the idea of implementing BackFlip, a 2d language which is vaguely similar to the Langton's Ant cellular automaton and based on arrows and mirrors, the two of which conveniently resemble magenta and pink glazed terracotta
in figuring out how best to do output (I used tellraw with the "interpret" option for an NBT list, though I've since discovered this doesn't necessarily work for broader character sets than BackFlip's), I discovered that the new 1.19.4 "string" option for the /data command allows taking substrings; this (and the /data command in general) gave me the idea of implementing a more complex text-based language, which could be written in a book and quill
Tumblr media Tumblr media
as a very basic proof-of-concept of text processing, I made an interpreter for the joke language Deadfish (which just has commands for incrementing, decrementing, squaring, and outputting a counter)
I was able to do it with a single function file, which made it convenient to add to the esolangs wiki page for Deadfish
Tumblr media Tumblr media
finally, as a more complete example, I made an interpreter for the popular esolang brainfuck, with the program and input being read from books
unfortunately I used the same output method that I did for BackFlip, which it turns out doesn't work with the double-quote character, so I may have to make a fix sometime here..... (EDIT: it's now fixed -- somehow I had missed the very convenient option of selecting every item of the NBT list and setting the separator to empty string)
in any case though the data packs I've made so far can be found on GitHub
another esolang I've thought in the past about implementing in Minecraft is Piet, since it's pixel-based and that translates fairly well to Minecraft blocks; the main challenge is figuring out how to efficiently parse and represent the program, since NBT lists can't be indexed by variables and I might want to avoid creating an entity for every pixel? (though IDK maybe marker entities wouldn't be an issue for performance)
3 notes · View notes
quantummechanist · 9 months
Text
My Esoteric Programming Language Synopsis
Been looking into esoteric programming languages, or programming languages whose purpose is NOT to make a programmer's life easier, but rather to be weird and often confusing. Here are my reviews:
<>< (Fish): This language revolves around the moving a pointer around the program itself, which is read as a 2 dimensional grid of characters. The pointer moves to the right by default, but you can change its direction with the arrow-looking characters (<,>,^,v). You can also reflect the instruction pointer with the mirror-looking characters (|,_,/,\\), which reflect the arrow the direction that makes sense based on what way it is going and the geometry of the characters. On top of this, the language is stack-based. For those who don't recall the first few pages of Homestuck, a stack is a data structure that stores a list of values like an array, except the only accessible datum in the stack is the most recently entered one. Programmers have no business using stacks in the year 2023. Other neat details include the trampoline instruction (!) which jumps over a spot in the grid, and because you need to use a stack, to print a value from code, you need to write it in the code backwards. Also when you get an error, the compiler says "Something smells fishy..." Difficulty 3/10
Brainfuck: Brainfuck was made by a man trying to make the smallest programming language compiler he could. The program instructions rely on an arbitrarily large 1 dimensional array of numbers. Brainfuck has 8 single-character commands, and all other characters are treated as comments. This is a brainfuck program to write "Hello World":
+[-->-[>>+>-----<<]<--<---]>-.>>>+.>>..+++[.>]<<<<.+++.------.<<-.>>>>+.[<->-]<-.>
Difficulty 9/10
Hexagony: Like <><, Hexagony works by sending a pointer along the program, treating it like a grid of characters. The difference is that Hexagony programs are on a hexagonal grid. This is Hello World in Hexagony:
Tumblr media
Difficulty 8/10 (I cannot wrap my head around this one)
INTERCAL: Compiler Language With No Pronounceable Acronym, or INTERCAL, was one of the first esoteric programming languages, created in 1972. The language was designed to make common operations needlessly difficult, while adding keywords for other operations to make the whole thing unpleasant to look at. There is a keyword “PLEASE” that doesn’t do anything, although if you don’t include enough “PLEASE” commands, the compiler will give an error stating your program is not polite enough. Unlike most of the programming languages on this list, INTERCAL is too slow when compiled to be used practically. In 1992 a journalist tested the speed of Intercal against C. In C, it took less than a second to compute all the prime numbers up to 65536. In INTERCAL, it took over 17 hours. Difficulty: 8/10 LOLCODE: The syntax of LOLCODE is inspired by “lolspeak,” the English dialect of lolcat captions. Every LOLCODE program begins with “HAI” and ends with “KTHXBYE”. To import library STDIO, use the command “CAN HAZ STDIO?” The underlying structure of LOLCODE is actually fairly standard, which makes this esolang pretty accessible.
Difficulty: 1/10
Malbolge: How do you print “Hello, World” in Malbolge?
(=<`#9]~6ZY327Uv4-QsqpMn&+Ij"'E%e{Ab~w=_:]Kw%o44Uqp0/Q?xNvL:`H%c#DD2^WV>gY;dts76qKJImZkj
Malbolge was designed to be the most difficult programming language in existence. The language determines which of the eight available instructions to execute by adding the current instruction to the current instruction’s index in memory, modulo 94. There are no arithmetic operators except for the *crazy operator*, a Malbolge original that takes two numbers in their ternary form and determines the result digit by digit using an unintuitive table. The crazy operator is not commutative, and is your only arithmetic operation. Whenever an instruction is executed, it is encrypted so that it will not do the same thing next time. Due to the complexity of Malbolge, a turing complete version does not currently exist, limited by the size of programs allowable.
Difficulty: 20/10
1 note · View note
lily-of-the-code · 13 days
Text
What's your favorite esoteric programming language? I've never used one, but I've done rese on them and there are some funny ones. For example, there's one where code is written like Shakespeare.
31 notes · View notes
notnotamathblog · 1 year
Text
youtube
This video was on my Watch Later for the longest time since I have a problem and hardly ever go trough those. But just gave it a watch and had a really good time, learning about all those languages that seem very productive (lying).
I do suggest it if you are remotely interested in programming, since they do go into some of the concepts and how the compiler works, but I especially recommend if you are into esoteric languages and obscure stuff.
8 notes · View notes
thewertsearch · 2 years
Text
Tumblr media
You don't know how he does stuff like this. What does this even mean? It's nonsense. Is it even syntactically viable?? Are you allowed to color text like that??? ARGH. Maybe you should ask him about it some time.
...hm.
You see, at first glance, this code does look syntactically viable, but only if we don’t pair the brackets in the way the coloring implies. If we write the code like this:
Tumblr media
Then it’s a loop bound to the lifespan of Universe 1. Inside that main loop, it’s running a loop bound to the inverse of Universe 2′s lifespan - my guess being that this loop only runs while Universe 2 is dead.
If Universe 2 is ever registered as ‘alive’, the program waits for the blue THIS to die, and then continues. And when the main Universe 1 loop ends, it will wait for the red THIS to die, and finally exits. 
In other words: This program will exit when U1 is dead, U2 is alive, and both ‘bifurcated’ iterations of THIS are dead. 
However, the red/blue coloring implies that the brackets are paired in a completely nonsensical way. 
Tumblr media
I’m with Karkat here, this is nonsense. You can’t put the top half of one code block inside another - at least, not in any language I’ve worked with. I’m sure there are weird, esoteric languages that do it, but it’s definitely not the syntax du jour.
This ‘merged bracket’ interpretation is probably the correct one, though, since the colors match up. The reason this compiles at all is probably due to the special behavior of bifurcate THIS[], which we’re not privy to. 
I do have a theory about what bifurcate is doing here, but... oh my god , guys, this is so silly. Will I post it? I’m going to post it. 
TA wears 3D glasses, right?
Tumblr media
What if we’re meant to do the same?
If we view these two loops as not inside each other, but adjacent to each other in 3D space, then this code makes a lot more sense. Suddenly we’re just looking at two simple death loops - one which exits when U1 dies, and one which exits when U2 lives. 
They’re not blocking each other, because they’re probably executing on different threads, which may be the true function of bifurcate. Viewed like this, this code becomes a simple, multithreaded script that works similarly to my original interpretation - the difference being that now, the colors match up properly. It’s kind of beautiful, to be honest. 
Tumblr media
Now that I’m viewing this program as two threads, it seems as if the blue loop waits for the red thread to die before it can exit, and vice versa. 
If I’m right about this, it means that this program is deadlocked - neither thread can exit, because it’s waiting for the other one. The two threads are back to blocking each other, and this program will never exit.  
This code, when executed, immediately causes the user's computer to explode, and places a curse on the user forever, along with everyone he knows, and everyone he'll ever meet.
Not surprisingly, later on you would run this code in a fit of stupidity.
None of this, however, explains why it curses the user. 
I think I need to borrow Karkat’s ~ATH manual. 
7K notes · View notes
Note
Hey! One of my favorite hobbies is trying to find niche retro games when I go to garage sales and estate auctions, and a couple days ago I found a relatively normal if not bland SNES cartridge with a homemade label at a sale. It was a pretty simple horror puzzle game, but now I find I'm... in it when I dream? Is there any way to fix this? I thought it was just my brain doing it but now I can barely nap without it happening, I haven't slept in a couple days. It's mainly really long and disorienting empty mazes with a shadowy figure slowly chasing you, if that helps.
We can get the Oneirology Office on it, but first off you're going to want to put the cartridge in a homemade faraday cage, if possible.
Extranormal games like this are pretty rare. A lot of times they happen when someone dabbles in esoteric programming languages like Wand+ without the proper code sanitation or optimization, tiny errors compact on each other, it gets worse and worse until instead of just crashing the program or corrupting the data, sometimes it'll "stabilize" into something like what you're seeing.
In these cases a faraday cage does help most of the time.
76 notes · View notes
patricia-taxxon · 4 months
Note
have you done code golf before? it's still regular programming, but you focus on optimizing your code's size instead of actual efficiency. plus there's a lot of esoteric programming languages (brainfuck, ><>, etc) that add the same sort of restrictions or weird aspects that programming games have
i haven't done any coding before
39 notes · View notes
minecraft · 2 years
Text
My headcanons for minecraft as a whole is that it wasn’t actually written in Java originally but a leaked esoteric programming language called WorldCurve+ and slowly ported over to java and this is a very secret fact since WorldCurve+ became something that got outlawed and banned/erased from history by the United States shadow government in late 2009 because it was found to have various anomalous effects. As for Herobrine, within the world of minecraft, they’re an entity kinda a ghost but more physical but not like in the normal sense, but like a Nazgûl almost. and he’s actually Steve’s great grandfather in a sense, because he was created by leaving in a sort of prototype framework that lays out a very loose set of core guidelines for players in minecraft in the game’s code between many different versions in the early unconverted WC+ builds; sort of like leaving a man-shaped depression in the ground and then waiting until it rains. Herobrine is just a puddle of stray electrons and bits from the universe shaped crudely into the profile of a player but completely freed from physical limitations. and when cave game and java minecraft became a thing Herobrine jumped along over for the ride. And ever since this has happened Herobrine has been trying to communicate with Steve to tell him about the past and figure out what his place in the world is but due to the nature of the game itself it’s very hard to get the player, aka the real Steve, to talk with him because Steve doesn’t really develop a true machine-spirit until much later.
180 notes · View notes
nitewrighter · 9 months
Note
tbh the only way I could see a Dramatic Confrontation™ happen between Clark and Lois happen is if both Clark and Lois put off actually talking to each other when they both clearly want to be open about Clark's big secret with each other to the point where one or both of them assume the worst. But aside from all that, I'd laugh my ass off if Jimmy's esoteric alien "knowhow" all comes together in such a way that it allows the trio to understand Jor-El despite the language barrier.
I'd also accept Jor-El's engram just... I dunno, speed-reading the entirety of Earth's internet offscreen in an attempt to learn English... only to engage in the most cringeworthy "How do you do fellow kids/Earthlings" type of dialogue possible to the point it circles back to endearing.
Gooodddd yes the fact that Jimmy's been firing off straight up DC lore while sounding certifiably insane is such a good gag but I would love love love if it really came in clutch. Heck, he already indirectly helped Lois figure out Clark's identity because they went the "Weekly World News" route.
Also yes, I'm also really curious as to how they're going to breach the Kryptonian language gap with Jor-El. I like my Jor-El being a liiiiiittle bit of an asshole, because it's not actually Jor-El, it's more of a Kryptonian AI mapping of him and AI's are only as good as their inputs and, like all algorithms, without consistent data input they can heavily skew over time. Like the "so close and yet so far" tragedy of Kandor, I love the Jor-El AI hitting its limitations, because this isn't a flesh and blood person, but rather everything a flesh and blood person jammed into a computer program in the last days of a dying world, and once that AI starts taking in data from Clark's world, you can't actually say this is how the real Jor-El would react to Earth, because it's an AI built for a specific purpose, you know what I'm saying?
Clark: I was trying to save him! I really was! But now he has those burns and he hates me and he says I undid years of his scientific research! Did I do the right thing?
AI Jor-El: Hm. Was his brain at risk?
Clark: What?
AI Jor-El: Does this world not... preserve its scientists' brains after death and keep them in suspended animation with a thought-recorder continuing to take down all of their ideas?
Clark: N-no?
AI Jor-El: Oh. Well, I've got nothin'.
25 notes · View notes
aokozaki · 6 months
Text
I like Esoteric Programming Languages. What if programming was worse.
13 notes · View notes
polyamships · 1 year
Text
Tumblr media
This is the second of six posts to help expand on the prompts for anyone who needs a little more to go on than just one word. We hope these ideas help inspire people, but they are only a jumping-off point and there will of course be plenty more interpretations we didn’t think of! March 6th - Pets - This could be about your ship getting a pet together; is it a choice they make together, or does one of them bring home a rescue pet/stray they couldn't resist adopting? Or perhaps one of them already has a pet and their partners have to adjust to interacting with pets they are not used to. Does pets damaging possessions or their home cause conflict? They could have a meetcute related to their pets, like when walking their dogs or going to the vets. This could also be less literal and meant in a more kinky sense. March 7th - Language - Do any of your ship speak or sign more than one language? How does it make the others in the ship/polycule feel when they do - impressed, jealous, amorous, relieved to share a language? Are the languages they speak practical or esoteric or nerdy? This could also be about other types of languages, such as programming languages. Or you could focus on body language; are they great at reading each other without words or do they find it hard to figure out or recognize each other's tells. This could also be about love languages and how they communicate with each other, whether that's going well, or not, if you want some relationship drama. March 8th - Sick - Taken literally it's good for whump, hurt/comfort, or a milder illness for a fluffier sickfic where a character is being looked after. Does one of your ship deny they're hurt or do they worry over any signs of illness? How do they react to someone they know being sick and how does their polycule support them? This could also be sick as in throwing up, from a hangover, morning sickness, fairground rides, or witnessing something awful. Perhaps they're a medical professional. They could also be sick of someone or something. Or retro with sick as in the slang. For a little darker, it could be villainous actions/plans that others consider sick. March 9th - Declarations - For something overtly shipping there's declarations of love, or announcements of engagements, moving in together, or anything else important to your ship they want to make others specifically aware of. This could be political instead, declarations during election processes, as well as declarations of war or of independence. Or law related, having to make a declaration of intentions for a contract or a formal statement as a witness. This could also be about a character deciding to make something clearer to others by declaring it in no uncertain terms to avoid any confusion. March 10th - Convenience - What do the characters do that makes life easier? Habits, good or bad, that they slip into. Perhaps migrating possessions into a partner's place because of how often they're there. Or carpooling with others, doing group meals, sharing items with the polycule, asking metamours to help babysit on date nights. Maybe the relationship is useful in some way, or just going so well that it makes everything feel effortless. Also, this could be going to a convenience store or using public conveniences. Or for angst, a marriage of convenience that may or may not evolve into more.
-
The rest of the prompts can be found in the full prompts post here.
41 notes · View notes
tokinanpa · 9 months
Note
are you aware of toki pi ilo nanpa?
Tumblr media
I was not!
it seems like an interesting esoteric programming language, though it's probably incredibly unwieldy in actual use
12 notes · View notes
the-typing-dragon · 7 months
Text
by the way if youre making a youtube video on esoteric programming languages, decide to cover Brainfuck, and then decide to still censor fuck, i am coming to your house and reprogramming all your devices with Brainfuck equivalent programs. Dont be a coward. Say it's name.
12 notes · View notes
ashlidev · 22 days
Text
I wonder how ""viable"" an esoteric programming language based around imbalanced brackets would be? I think I remember seeing an incomplete language with the idea long ago but couldn't find it again.
For example: something like {[}] would be valid, and important to the language functionality.
Maybe the language could only use brackets, and then each symbol type has a different purpose? (ie: [] could be some kind of IF, {} could be a loop, etc?) The idea sounds completely horrible but I can't stop thinking about it.
2 notes · View notes
ataraxianascendant · 7 months
Text
I was never book smart I'm esoteric programming language smart
5 notes · View notes