this post was submitted on 10 Jan 2025
2 points (100.0% liked)

Concatenative Programming

156 readers
2 users here now

Hello!

This space is for sharing news, experiences, announcements, questions, showcases, etc. regarding concatenative programming concepts and tools.

We'll also take any programming described as:


From Wikipedia:

A concatenative programming language is a point-free computer programming language in which all expressions denote functions, and the juxtaposition of expressions denotes function composition. Concatenative programming replaces function application, which is common in other programming styles, with function composition as the default way to build subroutines.

For example, a sequence of operations in an applicative language like the following:

y = foo(x)
z = bar(y)
w = baz(z)

...is written in a concatenative language as a sequence of functions:

x foo bar baz


Active Languages

Let me know if I've got any of these misplaced!

Primarily Concatenative

Concatenative-ish, Chain-y, Pipe-y, Uniform Function Call Syntax, etc.


Cheat Sheets & Tutorials

Discord

IRC

Wikis

Wikipedia Topics

Subreddits

GitHub Topics

Blogs

Practice

founded 2 years ago
MODERATORS
 

Discussion on lobsters

top 1 comments
sorted by: hot top controversial new old
[–] Andy 1 points 2 weeks ago

The given Uiua example (mercifully given using words rather than the symbols):

[3 4 5 10 23]
divide length on /+

For all the talk about "forward" it's uncomfortable to me how the Uiua evaluation within a line happens backward.

An equivalent in Factor, where keep is close to on:

{ 3 4 5 10 23 }
[ sum ] keep length /

But this pattern of doing two things in sequence to the same item is common enough that bi is handy:

{ 3 4 5 10 23 }
[ sum ] [ length ] bi /