News for hackers. Stuff that matters.
Re:Concatenative Programming; the Free Monoid of Programming... by carapace on Monday October 05, 2020 @12:28PM (#24689218)
I was playing with Joy ( http://joypy.osdn.io/ ) and got nerd-sniped by Prolog and wound up messing around with Joy-in-Prolog ( https://git.sr.ht/~sforman/Thun/tree/master/source/thun.pl ) and, uh, it's really neat.

Something about Conal Elliott's Compiling to Categories ( http://conal.net/papers/compiling-to-categories/ ) ...

New paradigm... hand wave...

Re:Concatenative Programming; the Free Monoid of Programming... by Kednicma on Monday October 05, 2020 @01:09PM (#24689669)
You're not wrong. Categories have an inherent monoid on their arrows which composes them, and so concatenative programming is extremely close to categorical programming.

The two main ingredients that are missing in the ecosystem are (1) a good intermediate compiler target, and (2) a way to write programs categorically so that we don't have to retype them in each different programming system's syntax.

Re:Concatenative Programming; the Free Monoid of Programming... by carapace on Monday October 05, 2020 @01:37PM (#24689971)
Cheers!

> concatenative programming is extremely close to categorical programming

How do they differ? (I'm a newbie at CT. Sorry if that's a dumb question.)

FWIW, I suspect that Joy is as good way as any to provide (2). You could implement a basis set of primitive functions and combinators in each different programming system.

As for (1) part of what got me into Prolog was the work done on compiling using it. I've actually come to believe that syntax is a macguffin, a kind of blind alley. I have no idea what to use though, C?, LLVM IR?, etc. I've been toying with Prof. Wirth's Oberon RISC CPU as a target.

I'd like to go the other way too: translate existing code into categorical forms. (Then do fun things like refactoring, etc...)

Re:Concatenative Programming; the Free Monoid of Programming... by agambrahma on Monday October 05, 2020 @03:47PM (#24691291)
This is going to sound silly, but I _love_ the comment blocks in the code for Thun, how did you make them?

(Edit: I tried copy-pasting an example here, but it didn't render. Example: https://git.sr.ht/~sforman/Thun/tree/master/source/thun.pl#L...)

Re:Concatenative Programming; the Free Monoid of Programming... by mcaruso on Monday October 05, 2020 @04:28PM (#24691648)
The ASCII art text? There's a link in the top comment there: http://www.patorjk.com/software/taag/#p=display&f=ANSI%20Sha...
Re:Concatenative Programming; the Free Monoid of Programming... by carapace on Monday October 05, 2020 @05:17PM (#24692165)
Yah, that. It's a SaaS Figlet service.

https://en.wikipedia.org/wiki/FIGlet

In addition to a cool old school feel it helps me with navigation as the big headers are clearly visible in editor "minimaps".

Re:Concatenative Programming; the Free Monoid of Programming... by a1369209993 on Monday October 05, 2020 @09:28PM (#24693936)
> I tried copy-pasting an example here, but it didn't render.

Is this any better?:

  ◙◙◙◙◙◙◙◙╗◙◙╗  ◙◙╗◙◙╗   ◙◙╗◙◙◙╗   ◙◙╗
  ╚══◙◙╔══╝◙◙║  ◙◙║◙◙║   ◙◙║◙◙◙◙╗  ◙◙║
     ◙◙║   ◙◙◙◙◙◙◙║◙◙║   ◙◙║◙◙╔◙◙╗ ◙◙║
     ◙◙║   ◙◙╔══◙◙║◙◙║   ◙◙║◙◙║╚◙◙╗◙◙║
     ◙◙║   ◙◙║  ◙◙║╚◙◙◙◙◙◙╔╝◙◙║ ╚◙◙◙◙║
     ╚═╝   ╚═╝  ╚═╝ ╚═════╝ ╚═╝  ╚═══╝
Edit: No, no it is not. (HN drops U+2588 '' for some reason.)

Edit: But U+25D9 '◙' works.

@mods: I assume no one has commit access to fix this bug, but on the off chance they do: bug report: HN deletes U+2588 character at some point in the path from submitting a comment to that comment being displayed; not sure exactly what part's going wrong there.

Re:Concatenative Programming; the Free Monoid of Programming... by cultus on Monday October 05, 2020 @01:50PM (#24690132)
I hope someday there will be a Compiling to Categories-esque language. When it comes down to it, the essence of all of this is just keeping a rigorous separation of implementation and interface. Just build a language with that in mind, and you can have purity and never have to know what a monad is.