News for hackers. Stuff that matters.
Re:Retina: A regex-based recreational programming language by lifthrasiir on Sunday March 29, 2020 @07:39AM (#22718166)
If you find Retina interesting, you may be also interested in a plothera of esoteric programming languages with the general string-rewriting paradigm [1], which is---as Thue [2] or /// [3] demonstrates---enough for Turing completeness.

[1] https://esolangs.org/wiki/Category:String-rewriting_paradigm

[2] https://esolangs.org/wiki/Thue

[3] https://esolangs.org/wiki////

Re:Retina: A regex-based recreational programming language by JadeNB on Sunday March 29, 2020 @11:54AM (#22719958)
I can't find any page by Colagioia about Thue, so I can't say if he was the originator of this trend, but it's a shame not to see any mention of the origin of the name Thue on the esolang page. He was quite a mathematician; he originated the systematic study of string-rewriting systems (https://en.wikipedia.org/wiki/Semi-Thue_system and https://en.wikipedia.org/wiki/Thue–Morse_sequence), which is why this name is appropriate, but made lots of other contributions, too—as a number theorist, I know him from https://en.wikipedia.org/wiki/Roth%27s_theorem (which Wikipedia calls Roth's theorem, but which I think most number theorists call the Thue–Siegel–Roth theorem).
Re:Retina: A regex-based recreational programming language by wvlia5 on Sunday March 29, 2020 @12:48PM (#22720418)
Examples: https://github.com/m-ender/retina/tree/master/Examples

More didactic than a language reference

Re:Retina: A regex-based recreational programming language by dsun180 on Sunday March 29, 2020 @06:15AM (#22717745)
Please add a screenshot of code to the readme and also fill your online editor with a block of example code.
Re:Retina: A regex-based recreational programming language by mbue on Sunday March 29, 2020 @08:00AM (#22718270)
Hi, author here! Thanks for the feedback. I'm not in charge of Try It Online, so I can't do anything about filling it with code by default, but as someone else noted, there is a Hello World button, which fills in a (very trivial) snippet.

There also a bunch of examples with tutorial-like explanation in the Examples folder.

I'll think about adding one example to the main README though, just to really put people off of looking further into the language. ;)

While I'm here, in case anyone does actually use the language and find it to be useful, I also wrote a VS Code extension that lets you use it as a powerful search-and-replace alternative: https://github.com/m-ender/vscode-retinate

Re:Retina: A regex-based recreational programming language by aloisdg on Sunday March 29, 2020 @09:03AM (#22718647)
I know you from codegolf. I love reading your solutions especially in Retina. Keep golfing!
Re:Retina: A regex-based recreational programming language by capableweb on Sunday March 29, 2020 @06:34AM (#22717822)
There seems to be a couple of examples but the UX for discovering them is a bit poor. Author could do a better job surfacing them up front instead.

In the meantime, here is where you can find them:

- Online editor has a "Hello World" button that loads a very basic example

- https://github.com/m-ender/retina/tree/master/Examples has a bunch of more example, linked from the landing page

- https://github.com/m-ender/retina/wiki/The-Language shows the entire language (AFAIK), but it's a reference.

Re:Retina: A regex-based recreational programming language by kitotik on Monday March 30, 2020 @12:43AM (#22725317)
I’m enamored with the term ‘recreational programming language’.

Not sure I’d ever use one, but it’s a useful categorization nonetheless!

Re:Retina: A regex-based recreational programming language by mbue on Monday March 30, 2020 @03:42AM (#22725993)
FWIW, they're usually called esoteric programming languages/esolangs, but I'm not a fan of that term. That's why I've been using "recretional" instead. :)
Re:Retina: A regex-based recreational programming language by black_thoughts on Sunday March 29, 2020 @09:58AM (#22719028)
Out of all the quines I've seen, that's my favourite.

https://github.com/m-ender/retina/blob/master/Examples/quine...

So elegant.

Re:Retina: A regex-based recreational programming language by evgeniysharapov on Sunday March 29, 2020 @02:23PM (#22721281)
somewhat reminds me of 'sed', but with less history and less power.
Re:Retina: A regex-based recreational programming language by schoen on Monday March 30, 2020 @01:15AM (#22725449)
It looks to me like it's very similar to a subset of sed, but with a more powerful regex library. But many programs in this language probably have near line-for-line translations into sed if they don't use newer regex features.

A lot of people (including me) have basically only learned the s command in sed and don't usually think about all of the more sophisticated sed features.

Re:Retina: A regex-based recreational programming language by mbue on Monday March 30, 2020 @03:44AM (#22726006)
Yeah, it really is surprisingly similar to sed. "Surprisingly", because when I first designed the language I knew nothing about sed, and I still know very little (but I've seen people convert programs between both languages in a fairly straightforward manner).
Re:Retina: A regex-based recreational programming language by jsilence on Sunday March 29, 2020 @06:00AM (#22717679)
For more audiovisual fun you could also try IBNIZ.
Re:Retina: A regex-based recreational programming language by JadeNB on Sunday March 29, 2020 @11:55AM (#22719961)
Re:Retina: A regex-based recreational programming language by zelienople on Monday March 30, 2020 @10:52AM (#22728463)
Example Retina code:

K`0¶1

{\G0`

)`(\d+)\n(\d+)

$2$n$.($1_$2*_)

...you got somethin' severely wrong with you, boy.

Re:Retina: A regex-based recreational programming language by mbue on Monday March 30, 2020 @03:51PM (#22731617)
Appreciate the compliment. :)
Re:Retina: A regex-based recreational programming language by durpkingOP on Monday March 30, 2020 @02:21AM (#22725681)
so this is a programming language for when we aren't working? please elaborate
Re:Retina: A regex-based recreational programming language by mbue on Monday March 30, 2020 @03:46AM (#22726016)
Yeah, that was the idea. Just a language for fun and specifically for code golf (solving programming problems in as small a program as possible). In the case of Retina, it turned out the language is actually pretty useful for throwaway scripts for string manipulation, so I actually am using the language while working occasionally, but that was definitely not a design goal. :D
Re:Retina: A regex-based recreational programming language by ThreeFx on Monday March 30, 2020 @03:43AM (#22725996)
Exactly. The author is active on the Code Golf Stack Exchange and wrote this programming language with code golding in mind, which is viewed as relaxing by some.