esolangs | Collection of interpreters for esoteric programming | Interpreter library
kandi X-RAY | esolangs Summary
kandi X-RAY | esolangs Summary
This is a collection of interpreters for esoteric programming languages. Number of languages: 80.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of esolangs
esolangs Key Features
esolangs Examples and Code Snippets
Community Discussions
Trending Discussions on esolangs
QUESTION
I was recently playing with problem 14 of the Euler project
: which number in the range 1..1_000_000
produces the longest Collatz sequence?
I'm aware of the issue of having to memoize to get reasonable times, and the following piece of Python
code returns an answer relatively quickly using that technique (memoize to a dict):
ANSWER
Answered 2020-Nov-16 at 03:56I think the majority of the extra time is because Raku has type checks, and they aren't getting removed by the runtime type specializer. Or if they are getting removed it is after a significant amount of time.
Generally the way to optimize Raku code is first to run it with the profiler:
QUESTION
Important context: Dig on the esolang wiki
I am making an compiler for a esoteric programming language, using a 2d list to account for the language’s 2d nature. The problem comes when I need all the lists in the one mega list to be of same length.
This:
[[“#”,”#”],[“#”,”#”,”#”]]
Needs be this:
[[“#”,”#”,” “],[“#”,”#”,”#”]]
Thanks!
...ANSWER
Answered 2020-May-19 at 19:25To apply fillvalues to uneven lists, use the itertools.zip_longest function.
QUESTION
Today I tried to make an account on Esolangs.org, the esoteric programming languages wiki. I'd contributed to a few wikis before, and I had one or two minor page edits I wanted to contribute.
...that is, until I saw the CAPTCHA verification puzzle used to create a new account.
Using an obscure language for the CAPTCHA was most likely intended as a silly in-joke. However, I spent nearly half an hour trying to understand the language so I could create a new account.
Eventually I gave up and used an online Befunge interpreter, which gave me the answer 52256370
.
What I don't understand is why the output of 9332682811>\#+:#*9-#\_$.@
is 52256370
.
I've seen a few comments suggesting it's a conversion from base-10 to base-9. However, when I tried to verify by converting 9332682811
with an online base converter, I got a result of 26072072027
.
ANSWER
Answered 2017-Jul-20 at 23:36This program parses 332682811
as a little-endian base-9 integer and prints it in base-10.
Befunge interprets instructions on a 2D grid (or torus, depending on version), with an instruction pointer that can move freely in two dimensions. This program is a one-liner, so the instruction pointer only moves forward and backward.
9332682811
pushes those digits individually onto Befunge's value stack, and then the following instructions perform a simple loop. In a normal iteration of the loop, things look like this:
QUESTION
Long time ago (probably circa 2005), I've encountered an esolang that had two separate 'instruction wheels', and two possible instructions, and a brainfuck-like array with pointer as memory. The instructions were 'rotate the given wheel' and 'execute instruction and switch wheels' - kind of what Braincrash does to brainfuck, but with more instructions. The only instruction common to both wheels was NOOP. I think the language was turing-complete (possibly by a trivial reduction to BF).
Does anyone here remember such a language and has any resources on it?
...ANSWER
Answered 2018-Mar-20 at 13:03This sounds a lot like you're remembering Whirl.
probably circa 2005
Plausible, Whirl was created in 2004.
two separate 'instruction wheels'
There's an Operations Ring and a Math Ring.
a brainfuck-like array with pointer as memory
It has "An 'infinite' supply of data memory" (which is used like a BF tape). It also has a register for each ring though.
The instructions were 'rotate the given wheel' and 'execute instruction and switch wheels
Sort of, the second instruction is a bit more complicated and is really two different instructions. 0
reverses the direction of the current ring. 00
does the same but also executes the current command and switches the rings.
The only instruction common to both wheels was NOOP.
Sort of. Both wheels also have a Load and Store command, but they work with different registers.
I think the language was turing-complete (possibly by a trivial reduction to BF).
Indeed. I can't find an actual reduction anywhere, but we can easily see that <>
can be implemented with DAdd, []
with PAdd and If and +-
with Add and Neg (in all cases with Load and Store thrown in for good measure).
QUESTION
I'm trying to wrap my head around the programming language Hexagony. I've looked at a few sample programs and have tried writing a simple program to read input and print Hey [input]!
. Here's what I have.
ANSWER
Answered 2018-Jan-16 at 11:54Here's a diagram for how the memory movement commands work:
The memory pointer (MP) has a position (which is an edge of the memory grid) and an orientation along that edge. In the diagram, the initial position of the MP is marked with the red arrow, so it currently points north.
The MP movement commands are always relative to the current position and orientation of the MP. I've annotated the four adjacent edges based on which command gets you there. So {
moves the MP forward and to left, and '
moves it backward and to the right, for example.
To figure out its new orientation, you can think of this movement as rotating the MP by 60 degrees about one of the adjacent hexagons. So depending on the chosen command, the MP would point in the following directions for the above diagram:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install esolangs
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page