Live data from Hacker News

ClojureScript from First Principles [video]

youtube.com

21–30 of 31 posts

Re: ClojureScript from First Principles [video]

#22
post #18
post #17

isn't google closure sunset ?

The [Closure Compiler]( https://github.com/google/closure-compiler ) is still active. The [Closure Library]( https://github.com/google/closure-library ) is done. Very confusing, I know

ClojureScript still uses both? If so, what is going to replace the Closure library?

Re: ClojureScript from First Principles [video]

#23
post #18

Earlier quoted context omitted.

The [Closure Compiler]( https://github.com/google/closure-compiler ) is still active. The [Closure Library]( https://github.com/google/closure-library ) is done. Very confusing, I know

ClojureScript still uses both? If so, what is going to replace the Closure library?

We forked Google Closure Library. This is mostly a good thing as GCL started introducing frustrating breaking changes around 2018/2019. We've backed everything out and now ClojureScript libraries from 14 years ago work again.

Re: ClojureScript from First Principles [video]

#24
It's rare I have to do anything client side, but I'm so grateful for Clojurescript when I do. I used to dread native Javascript and the crazy tooling, but Clojurescript makes building client side functionality an absolute joy. It's just a shame it's not all that popular

Re: ClojureScript from First Principles [video]

#25
post #9

Earlier quoted context omitted.

Right? I'm waiting for that vscode with a browser built in to making crud apps a bit easier. Not yet another stochastic parrot which adds nothing to the heap.

a problem with a repl-centric approach to crud apps is that the repl is not reactive. It is a good fit for request/response pure function backend programming. But UIs are not pure functions, they have a deeply effectful nature, and being reactive all those effects are highly “situated” if you will (to use Rich Hickey’s word). IMO this is a severe impedance mismatch at the core of Clojure’s design. We simultaneously w…

what great answers could look like here?

A one way to address that is via tooling (e.g. to visualize state across time) but maybe there’s something more fundamental to be solved here? Or is it more about current tooling capabilities?

Re: ClojureScript from First Principles [video]

#26
post #9

The way he shows off his REPL in VS code that controls the browser just reminds me how absurd this workflow of constantly switching between the browser and the IDE is, and it's even more absurd since VS code is an electron app, so you're really switching between chrome and chrome.

Right? I'm waiting for that vscode with a browser built in to making crud apps a bit easier. Not yet another stochastic parrot which adds nothing to the heap.

Vscode already has js debugging

Re: ClojureScript from First Principles [video]

#27
Early cljs/react adopter here. Found "the next react" in Hyperfiddle's Electric Clojure — it eliminates the client/server boundary entirely. Write one function that spans both sites, compiler handles the network automatically. The amount of plumbing code that just disappears is staggering.

Re: ClojureScript from First Principles [video]

#28
post #9

Earlier quoted context omitted.

Right? I'm waiting for that vscode with a browser built in to making crud apps a bit easier. Not yet another stochastic parrot which adds nothing to the heap.

a problem with a repl-centric approach to crud apps is that the repl is not reactive. It is a good fit for request/response pure function backend programming. But UIs are not pure functions, they have a deeply effectful nature, and being reactive all those effects are highly “situated” if you will (to use Rich Hickey’s word). IMO this is a severe impedance mismatch at the core of Clojure’s design. We simultaneously w…

> But UIs are not pure functions, they have a deeply effectful nature, and being reactive all those effects are highly “situated” if you will (to use Rich Hickey’s word).

Oh, but we do this in ClojureScript the whole time.

You can express events and actions in pure functions as data and then take care of the effects outside of the core of your application.

A great example of how to do this is the "re-frame" framework [1] [2]. The documentation is also a joy to read.

> An example of this impedance surfacing in backend programming is a nontrivial map/reduce pipeline. What is the shape of the document at stage six?

There's many ways to find that out in Clojure/Script. There's the built-in `tap>` function [3] which can be used for debugging. You can use that to visualize complex data with Portal. [4]

    (defn inspect
      [coll]
      (doto coll tap>))
    
    (->> coll
         (map this)
         (inspect)
         (filter that))

[1] The framework: https://github.com/day8/re-frame

[2] A library with HTTP-Effects for your re-frame applications: https://github.com/Day8/re-frame-http-fx

[3] https://clojuredocs.org/clojure.core/tap%3E

[4] https://github.com/djblue/portal

Re: ClojureScript from First Principles [video]

#29
As someone who rarely does front-end but occasionally needs to hack something together, ClojureScript is a godsend. I get to hijack the react ecosystem for nice UI components while also getting to use a pleasant language and avoiding JSX (I hate anything XML-y).

Re: ClojureScript from First Principles [video]

#30
post #19

The way he shows off his REPL in VS code that controls the browser just reminds me how absurd this workflow of constantly switching between the browser and the IDE is, and it's even more absurd since VS code is an electron app, so you're really switching between chrome and chrome.

That's IntelliJ with Cursive

For whoever needs to know: you can get almost the same in vscode/cursor with Calva. Quite a nice piece of work!
Post reply on HN