Still trying to get my head around the (Clojure, Javascript) concept of 'Transducers' (composable reducers) and this seems like a pretty good article because it brings in a lot of that good juicy 1960s dataflow-programming history that the webdev folks don't talk about because they mostly don't even know it existed

@natecull webdev folks don't talk about many good things because they don't know shit.

@ekaitz_zarraga this is true, and yet, Javascript seems to be this decade's Lisp.... all of the functional programming ideas seem to be ported to it, only with live, huge, real datasets to work on.

So Javascript (and especially Node) has become this insane Petri dish of functional hacking. In a language that's not amazingly good at it, but is just sufficiently meta-programmable to make it possible.

@natecull yes, but i've been playing with scheme these days and I feel all that stuff is already implemented there and it's much better supported.
In JS (also in python) I always feel frustrated. It's like the language lets do anything but then you start doing it and NOPE.

@ekaitz_zarraga It's implemented in the Lisp world yes, but the community around it is mostly academic rather than commercial.

Which means that even though they invented all this stuff decades ago, the examples are often stuck in that decade. Or are toys and not explained at all well , the plumbing to connect to the real world is often missing or in really bad state of repair, and it's all just... not immediately accessible.

But yeah. JS is too clumsy. I wish web browsers had included a Lisp.


@ekaitz_zarraga The reason coders are working on functional stuff for JS is that *JS is where actual real world massive big data hits real world real-time user interfaces*.

It's terrible, but it's the situation we have, and it just seems better to let people do functional in JS than say 'well you should be using Lisp/Scheme, but you don't have that available to use in a web browser, so sorry, you can't do functional at all, goodbye'.

@ekaitz_zarraga but I dunno when the JS people will discover macros. I don't think they *can* discover them, given JS's syntax.

That's the reason I've been thinking a lot about syntax for the last 15 years.

I had the idea of transducers in my head in about 2006, but I didn't know what they were called, and at the time it was just super hard to make any kind of contact between functional people and real-world data processing.

JS at least gives us a venue for that discussion to happen.

@ekaitz_zarraga The next step, I hope, after enough people start thinking 'hey this functional stuff really works, I can actually do real data querying and stream processing and make real-time UIs in it and it's easier than OOP/imperative thinking'...

.. is that the browser might evolve to allow a Lispy language instead of JS. And then we can get back to what we had in the 1950s-1970s and thnk about macros, etc

But I dunno how or even if browsers will make that tiny but crucial leap.



At this point the “but it has to run in a browser” argument is pretty much moot; if you can compile it to wasm, you can write code for the browser in it.

I was an early advocate for Node.js because many web programmers resisted using more than one language, but at this point JavaScript is so complex that it’s not the casual coders language it used to be.


@requiem @natecull yeah, you can for instance compile Chibi Scheme to WebAssembly via LLVM. :D

I started coding in node.js too but now I realized I was wrong. Maybe not wrong, maybe it was the time for it and now it's the time for me to go further.

Sign in to participate in the conversation

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!