[HN Gopher] Source code art in the Rivulet language
___________________________________________________________________
Source code art in the Rivulet language
Author : cranbor
Score : 143 points
Date : 2025-03-27 11:55 UTC (11 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| QuadmasterXLII wrote:
| Is this what it feels like to learn to program as an adult? I can
| brainfuck and APL with the best of them, and this is the most
| alien language specification I've ever read
| kibwen wrote:
| You'll have fun/existential horror with the esolangs wiki then,
| which describes thousands of languages (almost all
| unimplemented) in this vein:
| https://esolangs.org/wiki/Main_Page
|
| For languages like Rivulet, see the non-textual category
| https://esolangs.org/wiki/Category:Non-textual or the two-
| dimensional category https://esolangs.org/wiki/Category:Two-
| dimensional_languages
| aa-jv wrote:
| Truly beautiful code.
|
| Looking forward to seeing this in graffiti form, sprayed all over
| some government building, giving the OCR-using hackers code to
| enter the (physical) backdoors that these scribbles are
| inevitably going to be indicating ..
| vorbits wrote:
| I would like to know how to even begin building an intuition for
| writing something in this. I read the entire README and the only
| thing I understand is glyph start and end | |.
| doodpants wrote:
| Agreed; needs a tutorial.
| thechao wrote:
| I think each "line" is a stack expression, where one
| direction marks what value the stack pushes at that point,
| and the other direction (or index on the canvas? it's really
| unclear) marks the operation? So, maybe going down two lines
| is the number "two", then going right "one" pushes; now if we
| continue "right" three steps that means "add"?
|
| There's no conditional operator on a single line. Instead, if
| two lines come "near" each other there's an alternate
| denotation that compares the values and either terminates (or
| rolls back?) the line's behavior to some earlier point
| (perhaps dependent on the value in the stack?)
| rottytooth wrote:
| The glyph start marker | also marks a block of code; if
| several consecutive glyphs start with the same number of
| them, they are part of the same block.
|
| When the question strand executes, it looks at whether a
| list element (or entire list) is zero or below. If so, the
| entire block is rolled back to its previous state.
|
| So all branching is done as rollbacks. And loops end by
| rolling back their last iteration.
| metalliqaz wrote:
| It needs some fully commented programs as examples.
| mrbluecoat wrote:
| The Mayans would be proud
| rob74 wrote:
| Not enough knots though...
| psychoslave wrote:
| Probably because it skip loops
| jloganolson wrote:
| That's where my head went, as well
| samchon wrote:
| This is interesting, take my star
| rottytooth wrote:
| Hi, I created this language as part of a series of experiments
| with bringing aspects of natural language into code. My previous
| language, Valence (https://danieltemkin.com/Esolangs/Valence),
| dealt with semantic ambiguity -- this one with calligraphy. It
| avoids an overly logical syntax in favor of compactness and
| expressiveness.
|
| I'm completing a book of these esolangs for MIT Press this fall
| including this; not much info yet online yet but here's the link:
| https://mitpress.mit.edu/9780262553087/forty-four-esolangs/
| Esras wrote:
| This is beautiful, genuinely (the SVGs are lovely bits of
| artwork) and it's a fun puzzle to read, and I've shared with
| friends that like esolangs, including your book (good luck on
| publishing!).
|
| In the "Data Strands" -> "Value Strands" section, you describe
| it as "Value strands (and other data strands), begin with a
| hook that points up (as in the third strand below) or to the
| left (as in the first two)" for the following example:
| 1 |+--++--+-+ 2 -++- +-+ 3
| 5 |
|
| but the way I was parsing it was that the hook is '+' or '+',
| in which case both of those are hooks pointing up? It looks
| like a fairly innocuous typo, but I'm never sure with an
| esolang so wanted to ask.
| rottytooth wrote:
| Yes, that's a typo: the first two strands have hooks pointing
| up, the third to the left.
|
| I forgot to mention that you can run the interpreter with -p
| to convert the program to pseudo-code. This makes it much
| easier to tweak the examples and experiment. I'll add that to
| the readme, along with more pseudo-code for the example
| programs.
|
| And thanks so much!! Very excited to publish (Sept 2025).
| aredox wrote:
| This is an interesting take on visual programming...
| nathan_douglas wrote:
| use a theremin as an input device
| rob74 wrote:
| ...or one of these things:
| https://en.wikipedia.org/wiki/Wire_loop_game#/media/File:Wir...
| ge96 wrote:
| That could be a cool piece to print out/put on a wall framed
| memhole wrote:
| Nice to see some experiments with languages. I really like the
| way it looks.
|
| With all the AI focus on coding, it feels like we're going to end
| up sticking with a few languages because that's what it's good at
| or trained on.
| marmalar wrote:
| Would love to see what a quine looks like
| layer8 wrote:
| If there ever was a language to write spaghetti code in...
___________________________________________________________________
(page generated 2025-03-27 23:01 UTC)