Readit News logoReadit News
robto commented on Functional Flocking Quadtree in ClojureScript   lbjgruppen.com/en/posts/f... · Posted by u/lbj
robto · 3 months ago
I think the flocking behavior of birds is one of the most entrancing natural phenomena, it's great to see it play out in such an intuitive way here. Is a quadtree generalizable to three dimensions? This looks like so much fun, thank you for sharing, I'm looking forward to playing with this over the holiday.
robto commented on Clojure Async Flow Guide   clojure.github.io/core.as... · Posted by u/simonpure
robto · 7 months ago
I've been meaning to try this out, from my read it's a declarative way to get some structured concurrency. I work in a codebase that heavily uses core.async channels to manage concurrency and you really need to pay close attention to error handling. When you're spawning new threads you need to set up your own custom machinery to re-throw errors on a chans, close chans, and it looks like core.async.flow is a way to do all of this declaratively.

Just like `core.async` itself was a frontrunner of Virtual Threads on the JVM, I view `core.async.flow` as the Clojure version of the upcoming [0]Structured Concurrency JEP. I do wonder if it will use that under the hood once it becomes stable, the same way `core.async` is planning to move away from the `go` macro to just have it dispatch a virtual thread.

[0]https://openjdk.org/jeps/453

robto commented on Join the W3C Exploration Interest Group: where standards start   w3.org/blog/2025/join-the... · Posted by u/pentagrama
bryanlarsen · a year ago
AFAICT, the W3C produces 2 types of standards:

- standards they write themselves that everyone ignores - standards they copy from the WHATWG

robto · a year ago
I think the RDF standards have produced many useful tools for those that work with graph data. And the W3C is a useful coordination place for new standards like Verifiable Credentials[0] and Decentralized identifiers[1] and JSON Linked Data[2], which are all being used in ActivityPub, Bluesky, and a lot of other decentralizing projects.

[0]https://en.wikipedia.org/wiki/Verifiable_credentials [1]https://en.wikipedia.org/wiki/Decentralized_identifier [2]https://en.wikipedia.org/wiki/JSON-LD

robto commented on Concurrency in Haskell: Fast, Simple, Correct   bitbashing.io/haskell-con... · Posted by u/ingve
eduction · a year ago
That’s incorrect. Only refs+dosync use stm. https://clojure.org/reference/refs

Not atoms.

From Hickey’s History of Clojure paper:

“ Taking on the design and implementation of an STM was a lot to add atop designing a programming language. In practice, the STM is rarely needed or used. It is quite common for Clojure programs to use only atoms for state, and even then only one or a handful of atoms in an entire program. But when a program needs coordinated state it really needs it, and without the STM I did not think Clojure would be fully practical.”

https://dl.acm.org/doi/pdf/10.1145/3386321

Atoms do an atomic compare and swap. It’s not the same thing.

robto · a year ago
Haha, I read The Joy of Clojure way back in 2013 and conflated the different reference types with STM. So thanks for mentioning that, I always thought it weird that you'd need STM for vars and atoms too.

That said, I have never used a ref, nor seen one in use outside of a demo blogpost.

robto commented on Concurrency in Haskell: Fast, Simple, Correct   bitbashing.io/haskell-con... · Posted by u/ingve
eduction · a year ago
My impression at least watching chatter over the last several years isn’t that it has a bad reputation but rather that people haven’t found a need for it, atoms are good enough for vast bulk of shared mutable state. Heck even Datomic, an actual bona fide database, doesn’t need STM it’s apparently all just an atom.

But I’ve never heard someone say it messed up in any way, that it was buggy or hard to use or failed to deliver on its promises.

robto · a year ago
Clojure atoms use STM, though. I've been writing Clojure for almost a decade now, it's not that STM isn't great, it's just that immutable data will carry you a very long way - you just don't need coordinated mutation except in very narrow circumstances. In those circumstances STM is great! I have no complaints. But it just doesn't come up very often.
robto commented on Functors, Applicatives, and Monads   thecoder.cafe/p/functors-... · Posted by u/abhi9u
rebeccaskinner · a year ago
> A function a->b is a container for bs

Anecdotally, this is one of those things that's trivially true to some people, but really hard for other people to internalize. I think it's why the "container" can lead people astray- if you haven't internalized the idea of functions as being indexed by their argument, it's a really mind twisting thing to try to make that leap.

robto · a year ago
One of the fun things about Clojure that reinforces this "trivially true" perspective is that maps and sets are functions:

    ;; "maps" the keys to the values
    (map {1 "a" 2 "b"} (take 5 (cycle 1 2))) ;;=> '("a" "b" "a" "b" "a")
    ;; acts as a predicate that tests for membership
    (filter #{"a" "b" "c"} ["a" "b" "c" "d" "e" "f"]) ;;=> '("a" "b" "c")
Once you get used to this idiom you naturally start thing of other functions (or applicative functors) the same way. The syntax sugar makes for some very concise and expressive code too.

robto commented on Age Verification Laws: A Backdoor to Surveillance   eff.org/deeplinks/2025/03... · Posted by u/hn_acker
robto · a year ago
I wonder if there's any chance of technology like Verifiable Credentials[0] getting any adoption because of these laws. I think there are legitimate use cases where you would want to say, "hey, some third-party authority can vouch for me that ____", and not reveal to the third party who's asking for verification and not reveal to the party requiring verification any other claim besides the specific one that they need (say, age in this case).

[0]https://en.wikipedia.org/wiki/Verifiable_credentials

robto commented on Show HN: TideCloak – Decentralized IAM for security and user sovereignty   github.com/tide-foundatio... · Posted by u/SaltNHash
SaltNHash · a year ago
Thanks. The ideal end game is for the Cybersecurity Fabric to become a de-facto standard for best practice security inside the biggest platforms in the world (Entra, Okta, AWS, Google etc). So individuals can login with Tide (i.e. with their own authority). The protectionism only works until one plucky provider decides to use an open standard and starts winning business from the others... But let's assume that's years down the track, if we're right about that.

For now we're quite happy to provide an alternative for platform developers not bound to the big end of town.

The TideCloak (Keycloak) component does provide for options like federating or synchronizing with other IAMs in greyfield enterprise environments, to stage the integration.

robto · a year ago
Is the Cybersecurity Fabric an open standard? I didn't see any licenses in the Github repository. Is Tidecloak just an implementation of an open protocol? Or is it entirely proprietary?
robto commented on A Simple open-source Phone programmable with Arduino   wiphone.io... · Posted by u/guerrilla
robto · a year ago
I could see using one of these as a landline replacement. I was lamenting with another parent the expense of a landline and how difficult it is for kids to call each other to arrange a park meetup or other games - this could fill that gap perfectly.

u/robto

KarmaCake day985April 30, 2015
About
robto@idle.horse
View Original