@Bubbler question is fine, title can be cover the floor tiles with dominoes or something like that, if you do want to change it. I don't mind it much, it isn't inaccurate.
i'd rather not push 20 of my answers to the recent list on main in what is basically a message of "oops i finally realized you can write null bytes if you try hard enough"
i'll give you the honest answer: the inputs are STX-terminated because i can't use Alt+0000 to write null bytes in Notepad++, and i decided STX, which i can write, would be a nice one to choose
i really should have switched back to vim a long time ago now, that can do it easy
ending it with STX means i can store 2 in a variable, then while looping over the input file, check if the register is equal to that variable after every byte i read
if it is, i immediately goto a different function, therefore avoiding reading a byte that isn't there and getting input string not long enough
i think if i'm understanding you correctly i'm doing that anyway?
the input file is read until EOF using fs, the contents are stored as a string in a variable called input, and characters are popped from that
i thought that immediately throwing when you index out of range was the sensible thing to do, because naz sets the register equal to the character code at the index whenever you index correctly, and NaN isn't a character code, so you can't (shouldn't) do the same when you index incorrectly
NaN can't be coerced to a number by doing arithmetic on it, so unless you load another variable into the register your program can't do anything meaningful anymore
Inspired by this OEIS entry.
Background
A saturated domino covering is a placement of dominoes over an area such that
the dominoes are completely inside the area,
the dominoes entirely cover the given area,
the dominoes may overlap, and
removal of any domino reveals an uncovered cell (thus faili...
@Razetime Tbf the list of commands in Levels do all have basic descriptors of what they do (e.g.), but there aren't any full docs detailed how the language works and what commands are available
@Lyxal It gets even better if you understand how it works: P outputted with a newline, and no command didn't, so & takes x, converts to a character and concatenates it to the "string". If the "string" wasn't empty when P is run, it outputted that rather than x
Add++ was like the first proper language I made, so as I've got more and more experience with language design, it's had more and more additions to it. Reading the versions' source code is literally like watching me learn to code in real time :P
When using functions? Personally I never use verbose coding (and IIRC its super buggy because of that), so I just write it shorthand and use the commands dict ti get what commands I need
Let us be honest, you do know all about the BF language! If you do not, you may read the actual article.
Task
The task is a quite simple one!
You have to write a program which takes in input, and the outputs a valid BF program that outputs the input string. (ANY valid brainfuck program satisfies)...
I'm looking for an esoteric programming language I could write a compiler for. I'd want the language to be able to randomly access and mutate an array-like data structure in O(log n) or better, preferably without any significant trickery in the implementation. I'd guess that there are many people more knowledgeable in esoteric languages than me in here, so - any ideas on the top of your mind?
I've considered Shakespeare Programming Language, random access requires shuffling data between stacks. Mornington Crescent is only turing complete because of bignums and string munching. Chef allows you to access elements deep into its stacks, but the ROLL requires a large memcpy, and restoring the state is also not trivial, so one would probably end up simply copying entire stacks.
Seriously exposes Python's eval, which is not ideal. In general, the large "standard library" is not something I'm keen on here. I couldn't find anything that would let me mutate a list.
Befunge is actively hostile to compilation. Hexagony requires executing O(n) instructions to get to a specific place in memory.