HNHacker News
TopNewBestAskShowJobs

eduction

2,405 karma · joined June 22, 2022

submissionscomments
eduction··on Clojure: Transducers
Canonical example is rewriting a non transducing set of collection transformations like

   (->> posts
      (map with-user)
      (filter authorized?)
      (map with-friends)
      (into []))
That’s five collections, this is two, using transducers:

    (into []
          (comp
            (map with-user)
            (filter authorized?)
            (map with-friends))
          posts)
A transducer is returned by comp, and each item within comp is itself a transducer. You can see how the flow is exactly like the double threading macro.

map for example is called with one arg, this means it will return a transducer, unlike in the first example when it has a second argument, the coll posts, so immediately runs over that and returns a new coll.

The composed transducer returned by comp is passed to into as the second of three arguments. In three argument form, into applies the transducer to each item in coll, the third argument. In two argument form, as in the first example, it just puts coll into the first argument (also a coll).

eduction··on Clojure: Transducers
The key insight behind transducers is that a ton of performance is lost not to bad algorithms or slow interpreters but to copying things around needlessly in memory, specifically through intermediate collections.

While the mechanics of transducers are interesting the bottom line is they allow you to fuse functions and basic conditional logic together in such a way that you transform a collection exactly once instead of n times, meaning new allocation happens only once. Once you start using them you begin to see intermediate collections everywhere.

Of course, in any language you can theoretically do everything in one hyperoptimized loop; transducers get you this loop without much of a compromise on keeping your program broken into simple, composable parts where intent is very clear. In fact your code ends up looking nearly identical (especially once you learn about eductions… cough).

eduction··on F-35 is built for the wrong war
Bizarre to call this an F-35 problem, it's with the entire US supply chain and the F-35 is the least of it.

The F-35 at least has been produced in quantity and the unit cost has come down and they're finally rolling out some decent upgrades. Yes it's a messed up program in so many ways as its literal decades of history shows but:

The bigger issues is our industrial base cannot replace our many missile systems quickly enough, including surface to air, antiship, and surface to surface. We can't build ships or planes very quickly, either.

We are woefully low on stocks and can't meet commitments in NATO, mideast, and against China and N Korea. Taiwan is and has been waiting years on billions in backorders.

The other issues is everything is as expensive as f-ck. We're shooting down dirt cheap drones costing in the thousands with missiles costing in the millions. The article at least mentions this.

And what is the proposed solution to this? A giant, expensive, long range fighter that will coordinate expensive drone buddies (google NGAD). Because we think it's realistic to try and defeat Chinese forces when we're thousands of miles from base and they're at home.

First off we need to replenish systems we already know how to make and that are effective. We need to learn to build sh-t quickly, at home and with allies, and it's bizarre no politician has taken the lead on this because it involves popular stuff like spending government money, creating blue collar manufacturing jobs, growing small businesses with more reliable gov contracts, and so forth.

Then we need to develop cheaper systems including lots of drones, anti drone stuff, and low cost interceptors and antisurface missiles.

Then we need to reform contracting infrastructure and rules to move much much faster and with less cost to experiment and iterate more rapidly going forward like the Ukrainians (and even the Iranians) are doing.

We need to do all of this and quickly and no one from either party is providing leadership. This is the biggest reason the US and west are at risk of becoming paper tigers - we have cut our infrastructure and defense spending and microoptimized inventory to the point where we can't restock quickly enough to be a credible deterrent force.

eduction··on Slop Cop
What you say makes no sense by your own logic. 200 words can be wonderfully filled with wisdom or devoid of insight depending how much work and experience went into those words. So it is not appropriate to judge an author by the length of their text. You need length/wisdom but you can’t objectively or quickly determine the denominator.
eduction··on Official Clojure Documentary page with Video, Shownotes, and Links
I'm probably not the sort of person you're referring to, but I do regularly restart the REPL because

1. multimethods, if you change the dispatch fn you can't get it just with a recompile, there are tools to help with this but i'm not yet in the hang of using them after several years. (Many people don't hit this because they don't use multimethods. I love multimethods for the use cases I've hit so far with clojure.)

2. interceptors (pedestal) - I love this pattern and lib, and they've made moves toward improving repl friendliness, but I find I need to recompile two NSes typically to get a true reload even in dev mode (the one where my routes are defined and the one where a particular interceptor chain is defined). sometimes i lose track of what i've reloaded, and I dont know if a bug is "real" or just an artifact of forgetting to recompile - "f it, just restart the repl"

eduction··on Codex for almost everything
"We’re also releasing more than 90 additional plugins"

but there is no link, why would you not make this a link.

boggles my mind that companies make such little use of hypertext

eduction··on I run multiple $10K MRR companies on a $20/month tech stack
It scales right up.
eduction··on I run multiple $10K MRR companies on a $20/month tech stack
> What features postgres offers over sqlite in the context of running on a single machine with a monolithic app

The same thing SQL itself buys you: flexibility for unforeseen use cases and growth.

Your SQLite benchmark is based in having just one write connection for SQLite but all eight writable connections for Postgres. Even in the context of a single app, not everyone wants to be tied down that way, particularly when thinking how it might evolve.

If we know our app would not need to evolve we could really maximize performance and use a bespoke database instead of an rdbms.

It seems a little aggressive for you to jump on a comment about how it’s reasonable to run Postgres sometimes with “SQLite smokes it in performance.” That’s true, when you can accept its serious constraints.

As a wise man once said, “Postgres is great and there's nothing wrong with using it!”

eduction··on Subscription bombing and how to mitigate it
I did Ctrl-F on "proof-of-work" in this thread to see if anyone had tried this, you seem to be the only one. Seems like a good precaution before sending even a verification email.

Did you have to roll your own or was there some proof of work library you were able to use?

Update: Ah, found the code - https://withinboredom.info/posts/how-this-blog-actually-work...

eduction··on Bringing Clojure programming to Enterprise (2021)
The latest clojure still works with Java 8 fwiw... Although I believe they are looking at moving to 17 soon as minimum.
eduction··on Clojure: The Documentary, official trailer [video]
Yea, this book worked like a charm for me too.

The author recently weighed in on what he’d cut and add to a future version - could be useful to anyone reading today, if they want to skip some things. https://www.reddit.com/r/Clojure/comments/1rxknpj/quick_ques...

eduction··on Is it a pint?
Your pubs kindly return the favor when we order whiskey. As Hunter S Thompson is reported to have quipped in a bar your side of the Atlantic: "What is this, a sample?"
eduction··on The 12" chef knife, a humble plea
And

- learn to sharpen it

The place where I bought my knife offered a sharpening class and sold stones. It’s meditative to sharpen, keeps your knife in good condition (vs mechanized commercial sharpeners) and saves money (vs outsourcing it). But I don’t see these classes offered much. There are good tutorials on YouTube, if that works for you.

I’ll also say, “big” is not so important past a certain point. I have a 10 and am generally very happy with it but you do need to clear more space /above/ your cutting board the longer your blade is.

And if someone is buying their first chefs knife they generally (as you correctly note!) will want a larger cutting board than they likely have now. So having a super sized blade (vs a more reasonable 8) amplifies the extent you will need to learn to tidy up and clear space before and while prepping (chopping).

eduction··on OVH forgot they donated documentation hosting to Pandas
Whatever you call it, it’s plainly calling repeatedly to the server once loaded. You couldn’t just throw it on GitHub or cloudflare as is.
eduction··on OVH forgot they donated documentation hosting to Pandas
Wrong. Ajax requests to server triggered when using either. Nice try.
eduction··on OVH forgot they donated documentation hosting to Pandas
Probably because your assumption is wrong - they host a live shell and documentation search.

https://web.archive.org/web/20260220092649/https://pandas.py...

https://web.archive.org/web/20260225185816/https://pandas.py...

(I don't know anything about pandas, incidentaly, I just did some basic research before posting.)

eduction··on Is legal the same as legitimate: AI reimplementation and the erosion of copyleft
Despite the tech layoffs and rise of AI, programmer hubris is alive and well, that is heartening.

Here we see three engineers writing — at length! — about a hugely complicated matter of law.

No one outside your bubble cares what you think. You are unqualified and your opinions irrelevant. You might as well be debating open heart surgery techniques.

eduction··on Where things stand with the Department of War
> they have to couch it in language clarifying that they would love to support war, actually,

Yes they do because they are trying to sell to the Department of War.

No one made Anthropic try to be a military contractor. It’s pretty much the definition of being a military contractor that your product helps to kill people.

eduction··on Neocaml – Rubocop Creator's New OCaml Mode for Emacs
For context for those not aware, CIDER is probably the #1 Clojure repl in terms of popularity for day to day work.
eduction··on Our Agreement with the Department of War
Anthropic is free to set its own boundaries and military is free to say that’s absurd and we’re not buying things we cant control.

Are you going to tell a farmer they are violating John Deere’s rights for boycotting their enshittified tractors?

eduction··on Our Agreement with the Department of War
Yes that’s precisely what I’m saying. The government should fully control the systems it buys.
eduction··on Our Agreement with the Department of War
Calm down, reactionary.

Yes our democratically appointed government gets to tell contractors what to do not vice versa. I’d much rather that than have the contractors run things. You think Blackwater, Lockheed, Mark Zuckerberg should dictate how our military works? Who is the fascist here?

eduction··on Our Agreement with the Department of War
Democracy doesn’t work so we should let a tech oligarchy run things? No thanks. I think it works better than that would.
eduction··on Why XML tags are so fundamental to Claude
Obsolete enterprise shit I guess includes podcasting. Impressive for the enterprise.

I’d be very curious what lasting open formats JSON has been used to build.

eduction··on Our Agreement with the Department of War
So why would we want them setting policy for the DoD? Laws are enacted through a fundamentally democratic process defined over hundreds of years. Why wouldn’t that be the way to govern use of tools?

Why would we want to trade our constitution for, effectively, “rules Sam Altman came up with”?

eduction··on An AI agent published a hit piece on me – more things have happened
Slow down. If you read my comment it’s about an aggregate trend, not you or even your comment, which I don’t mention. Plenty of native speakers are slipping. (Fwiw the quality of your writing is pretty native feeling, so good work)
eduction··on I am directing the Department of War to designate Anthropic a supply-chain risk
This will likely be deeply unpopular but: Good!

The place to set policies on the use of hammers and police enforcement is not at the counter of the hardware store. “You want a hammer but don’t have a contractors license? Are you in a training program? Oh you just want to hang framed art - can I see your lease, does it allow hammering metal into the walls?”

We govern these things through laws and a democratic process. Police enforce the laws.

I don’t want some overconfident Silicon Valley engineering firm telling me how to use my digital tools, and you shouldn’t either.

Whatever you think of this administration, our military should not have to ask contractors permission for their operations.

To stop mass surveillance and autonomous lethality, pass laws. Asking unelected tech executives to do this is asking for trouble. They have no business doing it.

eduction··on An AI agent published a hit piece on me – more things have happened
I confess I find the growing prevalence of these sorts of errors on HN dispiriting. Programming requires precision in code; I’d argue software engineering requires precision in language, because it involves communicating effectively with people.

In any single instance I don’t get very exercised - we tend to be able to infer what someone means. But the sheer volume of these malapropisms tells me people are losing their grip on our primary form of communication.

Proper dictionaries should be bundled free with smartphones. Apple even has some sort of license as you can pull up definitions via context menus. But a standalone dictionary app you must obtain on your own. (I have but most people will not.)

eduction··on An AI agent published a hit piece on me – more things have happened
“Fantastical” means based on fantasy: not real. A fantastical journalism source is one filled with lies.

You seem to think it means “extra fantastic.” Not correct.

eduction··on Show HN: OpenWhisper – free, local, and private voice-to-text macOS app
Requiring microphone access is a dealbreaker. I transcribe audio files I’ve recorded on other equipment. You don’t need my mic for that.

I clicked hoping it would leverage whisper’s translation capabilities as well, since MacWhisper does not do that (it leverages Apple’s subpar built in translation). It doesn’t do that either.

(Maybe you’re using this for dictation? That’s a very specific subset of transcription. I’d suggest using a name that leans into that.)

← PreviousPage 3 of 24Next →