Newest at the top
2024-12-21 16:10:49 +0100 | <probie> | ski: yes, but it since it's also inspired by APL and therefore everything important needs to be a single character, they're most commonly spelled `:`, `◌` and `.` respectively |
2024-12-21 16:07:37 +0100 | youthlic | (~Thunderbi@user/youthlic) (Quit: youthlic) |
2024-12-21 16:07:14 +0100 | <enikar> | ski: thanks, I didn't know that, but I wrote a simple calculator that used threaded code. |
2024-12-21 16:06:22 +0100 | <ski> | probie : does it have `swap',`drop' and `dup' ? |
2024-12-21 16:05:55 +0100 | <ski> | that's interesting |
2024-12-21 16:05:48 +0100 | wootehfoot | (~wootehfoo@user/wootehfoot) wootehfoot |
2024-12-21 16:05:33 +0100 | <probie> | I'm not sure if I'd call it a truly concatenative language, but Uiuia is stack based language in which Haskell's `f . g` is written as `f g`. However `f\ng` (where \n is a literal newline) is the same as `g f`. |
2024-12-21 16:04:33 +0100 | <enikar> | never mind :) |
2024-12-21 16:04:27 +0100 | <ski> | enikar : <https://en.wikipedia.org/wiki/Threaded_code> is also interesting |
2024-12-21 16:03:42 +0100 | <ski> | (er, sorry, that was probie who said that) |
2024-12-21 16:02:30 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds) |
2024-12-21 16:02:20 +0100 | <enikar> | yes it is |
2024-12-21 16:01:59 +0100 | <ski> | enikar : .. which may be unexpected/surprising (re your comment about `f . g' above) |
2024-12-21 16:01:30 +0100 | <ski> | probie : *nod* (re Smalltalk) |
2024-12-21 16:01:28 +0100 | <enikar> | oh! I see! |
2024-12-21 15:59:51 +0100 | <ski> | (btw, note how `foo . bar' does the word `foo' first, and then the word `bar', not the other way around) |
2024-12-21 15:58:54 +0100 | <enikar> | yes :) |
2024-12-21 15:58:44 +0100 | <ski> | enikar : like that ^ |
2024-12-21 15:58:37 +0100 | <lambdabot> | 9 |
2024-12-21 15:58:36 +0100 | <ski> | > run (lit 3 . dup . mult) -- `3 * 3' |
2024-12-21 15:58:19 +0100 | <lambdabot> | -1 |
2024-12-21 15:58:17 +0100 | <ski> | > run (lit 3 . lit 2 . swap_ . sub) -- `2 - 3' |
2024-12-21 15:58:08 +0100 | <lambdabot> | 1 |
2024-12-21 15:58:06 +0100 | <ski> | > run (lit 3 . lit 2 . sub) -- `3 - 2' |
2024-12-21 15:58:03 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-12-21 15:57:57 +0100 | <lambdabot> | 7 |
2024-12-21 15:57:39 +0100 | <ski> | > run (lit 1 . lit 3 . lit 2 . mult . add) -- `1 + 3 * 2' |
2024-12-21 15:57:33 +0100 | wootehfoot | (~wootehfoo@user/wootehfoot) (Ping timeout: 246 seconds) |
2024-12-21 15:57:25 +0100 | <lambdabot> | 7 |
2024-12-21 15:57:24 +0100 | <ski> | > run (lit 3 . lit 2 . mult . lit 1 . add) -- `3 * 2 + 1' |
2024-12-21 15:56:59 +0100 | <enikar> | when I discovered forth it was a great moment :) |
2024-12-21 15:54:52 +0100 | <probie> | In a concatenative programming language, If I have a function `f` and a function `g`, their composition (written in Haskell as `f . g`) is just `g f` |
2024-12-21 15:53:30 +0100 | <enikar> | I found that: https://en.wikipedia.org/wiki/Concatenative_programming_language |
2024-12-21 15:52:40 +0100 | <probie> | languages like Forth and Factor |
2024-12-21 15:52:21 +0100 | <enikar> | ski: concatenative languages? |
2024-12-21 15:50:22 +0100 | meritamen | (~user@user/meritamen) (Remote host closed the connection) |
2024-12-21 15:50:19 +0100 | <probie> | Re smalltalk: That's right, because x+k*y is (using pseudo-Java syntax) `x.Plus(k).Mult(y)` |
2024-12-21 15:48:21 +0100 | <ski> | enikar : then there's the concatenative languages |
2024-12-21 15:47:22 +0100 | <ski> | iirc, Smalltalk also does this (although to the left, not to the right) |
2024-12-21 15:46:45 +0100 | <probie> | ski: Pretty much all the APL descendants (APL itself, K, J, Q, BQN) already do this, and their users seems satisfied with how `y*k+x` is parsed |
2024-12-21 15:46:06 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
2024-12-21 15:41:05 +0100 | <ski> | yea, that too |
2024-12-21 15:41:01 +0100 | <ski> | it would get interpreted as `y * (k + x)' |
2024-12-21 15:40:34 +0100 | <probie> | ski: That's not annoying at all. The annoying operator is `-`, because `3 - 4 - 5 - 6` is `3 - (4 - (5 - 6))` |
2024-12-21 15:38:56 +0100 | <ski> | `y * k + x' would be awkward |
2024-12-21 15:38:28 +0100 | <enikar> | there is liskell, if many parentheses don't afraid you ;) |
2024-12-21 15:34:00 +0100 | <probie> | Personally, I wouldn't hate a version of Haskell where all infix operators have the same precedence as `$` |
2024-12-21 15:31:14 +0100 | Guest78 | (~Guest78@37.228.252.73) (Quit: Client closed) |
2024-12-21 15:30:19 +0100 | <zzz> | then again, function composition would get awkward |
2024-12-21 15:29:40 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |