HN user

robto

985 karma

robto@idle.horse

Posts21
Comments153
View on HN

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.

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

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

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.

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.

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.

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

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.

That looks pretty nice - my youngest lost interest once the stories started, and I think that was partly because the stories weren't particularly engaging. But overall I was extremely impressed with the pedagogy, it was so easy it felt like cheating!

Now I need to figure out a fun way to do spelling, since both of the kids like to write but English is really tricky to spell.

For what it's worth, the oldest got all the way through on his own power, asking to do it each day. The next kid petered out around day 45 and we didn't try to force it, but she's even more advanced than the first one was at her age now. Not stressing about it seems to be a good approach : )

I taught my kids how to read pretty early (4, not 2) using the Teach Your Child to Read in 100 Easy Lessons book, which was astoundingly easy.

Both kids are now in school and reading significantly above grade level and I have different concern - their ability far outstrips their experience. So even though they can read large unfamiliar words, the subject matter of the stories that are challenging enough to be interesting to them deal with themes and experiences that are pretty foreign. Books that deal more with their experiences and interests are written at a much more basic reading level and are not interesting to them.

They seem to really enjoy reading but sometimes I wonder if early reading is really beneficial in the long run. On the other hand, I certainly read some books too young, but I don't really regret that, so maybe I'm just making up problems to worry about.

They say naming is one of the hard problems of computer science, but there's not much concrete work addressing it.

I'd recommend Elements of Clojure[0].

Don't be fooled by the title, it's not really about Clojure, it just uses Clojure as an illustration as it discusses a very subtle general problem. From the website:

The first chapter, Names, explains why names define the structure of our software, and how to judge whether a name is any good.

The second chapter, Idioms, provides specific, syntactic advice for writing Clojure which is clean and readable.

The third chapter, Indirection, looks at how code can be made simpler and more robust through separation.

The final chapter, Composition, explores how the constituent pieces of our code can be combined into an effective whole.

I find it a thoughtful and considerate overview of an area that everybody has some implicit knowledge of, and something that leads to a more abstract concept of quality.

[0]https://elementsofclojure.com/

The list of text links is basically what https://pinboard.in is, basically - social bookmarking. I only use it privately, but it does have the exact function you're talking about as well. I don't think I would use it with thumbnail previews, since I like how lightweight it is, but it wouldn't be difficult to build something like that.

The books weren't actually destroyed, there is a shot of Rey with them on Millenium Falcon at the end of the movie when they pick up all the survivors. I was actually really excited about this foreshadowing a Jedi reformation - a rediscovery of true orthodoxy a la Luther and a rejection of the corrupt ediface of the Jedi Order, as seen by its fruits. This was further paralleled by the stable boy at the end using the force to summon his broom - a parallel to turning over of interpretational authority of scripture from the ecclesiastics to the laity.

Of course, all this was thrown away in the next installment, so it turns out I'm the fool!

I worked on implementing this last summer in Clojure, is this the same URDNA2015 specification? I got all but three of the tests in the test suite working, but in the end ditched it for a java library that already had it.

This is really useful for signing json-ld, it goes a bit further then regular normalization schemes like JCS by allowing different arrangements of the same data graph to hash to the same thing.

Falling Free is a great place to start, as it has a stand-alone plot and introduces the setting very well. If you like it then I'd also recommend the Vorkosigan saga.

When lispers talk about lists, they are usually speaking about a very specific type of data structure - a linked list of cons cells[0]. Clojure's lists are not actual chains of cons, they are immutable hash array map tries. This means that Common Lisp code can't interoperate with Clojure code.

The precise/pedantic lisper may insist that since Lisp stands for List Processing and Lists are chains of cons cells and since Clojure doesn't have cons cells for the built-in lists, then Clojure is not a Lisp.

If, however, you view lisp (lower case) as a family of homo-iconic languages that use s-expressions, then Clojure happily fits under that umbrella.

The trick is to pay close attention to whether the person is talking about a Lisp (ANSI Common Lisp implementation) or a lisp (the family). Sometimes people say "lisp" when they are talking about "Lisp", which can cause some confusion.

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

I imagine the advantage is mainly in cost - getting a chunk of walnut that large is going to be many times more expensive than getting the boards necessary to laminate the same shape.

This may be a lost cause, but I don't think a beginner language should have mutable data at all. The only reason we really need mutability is for speed - our programs have to run on actual machines and for a long time we didn't have efficient ways of working with immutable data structures. It's a lot easier to reason about immutable data. And any non-programmer is not going to expect mutable data - from the beginning when they started learning math all the way up to MS Excel wizards, all the data has been immutable.

Mutation is a deep magic that learners shouldn't start with. It's pure premature optimization. Also everything should be expressions, no statements, why force people to learn extra syntax? Thank you for listening to my TED Talk.

...but thank you for making this tool! I love the IDE - simple, clear, and self-documenting!

It's not hard to learn the basics of another operating system, and it's something they're going to have to do no matter what. They'll be learning new software their whole lives. And how would using software that respects their privacy and agency hurt them? I don't particularly want to them to be software devs, I want to empower them to use tools to accomplish their goals, and Linux is great for that.

One thing I'm considering is getting my kid a laptop when they start asking for a smartphone. They'll be able to engage socially for the most part, but it won't have the "with you every moment of every day" problem. And instead of a device that's mainly geared towards consumption, they'll at least have tool that's designed to to empower its user.

And it will run Linux! No kid of mine will grow up thinking proprietary software is normal! The source is yours to command!

This article doesn't address the most salient argument in the free trade -> peace syllogism, which is that free trade between two countries reduces the chance of war between them only to the extent in which cutting that trade off (which is what would happen in a war) would cause domestic pain. So it's an incentive, not an absolute.

Take the China example - China as of this September holds $3.055 trillion in foreign currency reserves. This makes the US and China mutually interdependent - if China stopped selling products to the US then it would cause a massive recession in China. If the US couldn't find buyers to finance its spending, it would default on its debt. If the US defaults, the entire international economy would likely go up in flames.

So it's like mutually assured destruction, but instead of stockpiling nukes (though we do that, too), we're actually producing useful goods and services. And it doesn't make war impossible, but it does mean that war won't happen on a whim - it will be an utter last resort, with millions of wage earners and business owners wanting to try to make any other solution work, lest they lose their livelihood.

It's hard to take the article seriously without this sort of analysis.