4 ms·
Aceto: A programming language based on a 2D Hilbert curve grid
- convivialdingo 7y agoThis is just fabulous.
- kazinator 7y ago> Without knowing the corresponding Hilbert curve, this can be hard to read. I would say that without knowing the Hilbert curve, it's rather impossible to read; it becomes merely hard to read if we are following the correct path.
- jackyinger 7y agoYeah.. I was really hoping there was something to see here beyond a unique form of mandatory obfuscation. For instance, Hilbert curves have some interesting properties like the very roughly linear distance along the curve to near neighbors. (Sorry looked for citations but nothing good and succinct popped up quickly.)
- L3viathan 7y agoThis was kind of the idea of it; that you are always close to your neighbors, and can therefore reduce the pain of jumping somewhere, using the directional/mirror commands `<>v^|_` etc.
- daef 7y agosince I've read it a few times latey: this is the sh*t _I_ come to HN for...
- kazinator 7y agoThough, I have a feeling you will be leaving this one here.
- ginko 7y agoFeels like the first thing I'd do when coding with this would be a hilbert curve <-> linear form converter script. edit: ah, right there's some commands that can move in 2D and depend on the position in the hilbert curve, so that'd probably be harder than expected.
- Fellshard 7y agoThe fact that the Hilbert Curve denotes the default path means you could shape your program to pack jump targets very near to their sources, reducing the control flow these grid-based languages usually require.
- not_a_cop75 7y agoYou forgot to mention the obvious use of reverse polish notation.
- azhenley 7y agoAnother 2d esoteric language that recently got my attention is Wumpus: https://esolangs.org/wiki/Wumpus https://esolangs.org/wiki/Wumpus
- mrcactu5 7y agowhat motivates all these esolangs? these fractals tend to be coding exercises. https://en.wikipedia.org/wiki/Hilbert_curve https://en.wikipedia.org/wiki/Hilbert_curve https://en.wikipedia.org/wiki/Dragon_curve https://en.wikipedia.org/wiki/Dragon_curve
- fapjacks 7y agoI wanted to hate this, because it seems like it's trying really hard to be nerd-hip. But dammit this is cool, and there is going to be some really cool executable ASCII art made with it. I swear, though, if I see one single talk by someone wearing a logo-shirt and slacks at some street-level corporate HQ in SoMa posted on Youtube...
- tsumnia 7y agoTrue, but Piet [1] already does that without Hilbertizing code. Also, humble flex for calling this 7 months ago [2] [1] http://www.dangermouse.net/esoteric/piet.html http://www.dangermouse.net/esoteric/piet.html [2] https://news.ycombinator.com/item?id=18496566 https://news.ycombinator.com/item?id=18496566
- klyrs 7y agoTo be fair, Piet doesn't really do ascii art. But all you really need (hold my beer I'm gonna attempt a [2]) is a text representation. File format: ascii, with lines of characters corresponding to lines of pixels. The longest line sets the image width, ragged lines should be padded according to implementation. Special characters: Line feed: ignored Carriage return: end of line Tab or space: #ffffff #: #000000 All other printing characters (0x21, 0x22, [0x24-0x7f]): ordinal is taken mod 18 and converted to pixel values, 0 -> #c00000 1 -> #ff0000 2 -> #ffc0c0 3 -> #c0c000 ... 17 -> #ffc0ff
- tsumnia 7y agoWhile it doesn't do ASCII art, [1] does show some of the programs people have built where they've included space for artwork [1] http://www.dangermouse.net/esoteric/piet/samples.html http://www.dangermouse.net/esoteric/piet/samples.html
- klyrs 7y agoI know. I've written some of the programs on that page