HNHacker News
TopNewBestAskShowJobs

zachrose

2,837 karma · joined June 23, 2010

submissionscomments
zachrose··on Ruby 3.4.0
Does `it` conflict with Rspec's `it`? Surely they've thought of this, but to my eye it looks like it would get confusing.
zachrose··on California is torn between clashing Anglo traditions?
Yes, that’s exactly the connection that American Nations makes and the OP ignores
zachrose··on California is torn between clashing Anglo traditions?
My read of Albion’s Seed and American Nations is that they’re more about how a regional culture was germinated and founded, under the idea that the culture (including legal and economic systems) is even more durable than a specific group. So it’s not exactly connected to current demographics.
zachrose··on California is torn between clashing Anglo traditions?
Applying Albion’s Seed to California misses out on Spanish missionary culture and the shipping merchants who came from New York City, which does not have the same puritan roots as New England.

American Nations is a more recent book that describes more of the United States, though with less depth.

zachrose··on The Lego Great Ball Contraption
Reading that the GBC standard specifies 1 ball per second, it’s fun to imagine a module that puts 1,000 balls in slow moving storage, taking 15 minutes to warm up and cool down
zachrose··on An approach to optimizing TypeScript type checking performance
I’ve worked on several TS projects that don’t type check but still “compile” (emit non-TS JavaScript). To me that’s the difference between a linter and a compiler, and I wish those projects had stopped compiling when they could no longer type check.
zachrose··on Software galaxies
Perhaps it's the versioning? Like in the way that libraries for Elm 0.18 are often (mostly? always?) incompatible with 0.19.

(N.B. 0.19 has been the latest version for almost six years.)

zachrose··on Embeddings are a good starting point for the AI curious app developer
Maybe the idea is to order your vocabulary into some kind of “semantic rainbow”? Like a one-dimensional embedding?
zachrose··on Ask HN: Where are all the touch-based art forms?
I think it has to do with what you’re considering as artwork! There’s a traditional distinction between “fine arts” and “applied arts.”

Fine art, like painting, is almost definitionally not supposed to be touched.

Applied arts include fibers (knitting, weaving), ceramics, jewelry and metalwork, etc. Stuff that’s meant to be pleasing and functional.

Whether something should be touched is almost _the thing_ that moves a field from one category to the other.

Applied artists, and their product designer cousins, will spend a lot of time exploring and pursuing tactile qualities.

zachrose··on Why don't schools teach debugging, or, more fundamentally, fundamentals?
> "How to program" isn't something the academy understands, so they generally can't teach it

This was my (limited) experience with (introductory) formal CS.

Which is sort of amazing to me as art schools seem in broad agreement that “how to draw” can be taught, albeit in many different ways.

zachrose··on Ask HN: What cool desk ideas do you have for a home office?
I've been happily hacking on my Ikea Bekant for three years. I replaced the top, replaced the buttons with a double throw rocker switch (1), built a Mac Mini/laptop shelf on the back half, a KVM switch on a little shelf in the front.

Cable management isn't horrible but there's a lot of room for improvement. I'd like to replace all the AC adapters with one big one that can supply everything.

I've built some outlandish and unsatisfying desks in the past, the gradual approach has been better.

1. This is unsafe for children, as they might figure out a way to flip the switch and crush themselves. Please take this consideration into account.

zachrose··on The 1986 Paris-Dakar rally (2021)
Not sure, but the Dakar Rally hasn’t involved Dakar, Senegal since 2007. Most recently it takes place within Saudi Arabia.
zachrose··on Google’s water use is soaring, consume more than 25% of water used in The Dalles
Where does the water go after being used for cooling?
zachrose··on Software horror show: SAP Concur
Sometimes they work together! I submitted an email receipt and it kept getting rejected because Concur only shows the first page of a multi-page PDF unless you go through some very non-obvious navigation to see the whole thing.
zachrose··on American society is so focused on race that it is blind to class
The audiobooks are also good.
zachrose··on Alaska snow crab season canceled after disappearance of an estimated 1B crabs
Stop using them so much?
zachrose··on Startup is selling tech to make call center workers sound like white Americans
William F. Buckley: https://www.youtube.com/watch?v=lTyZAul60ok

Mr. Burns: https://www.youtube.com/watch?v=othBTFk_W1Y

zachrose··on Learn Postgres at the Playground – Postgres compiled to WASM running in browser
Imagine wanting to learn Postgres but not knowing how to use a package manager, for example
zachrose··on Ask HN: Why does this 90-degree USB adapter have a chip in it?
I guess what I’m wondering though is: what is being negotiated over what looks to me like 8 connectors? Why can’t they just be simple conductors?
zachrose··on ‘Solar tower’ system produces jet fuel from CO2, water, and sunlight
About the same amount of land.

In North America alone, 30,000 square kilometers for all oil and gas[0].

For a rough approximation, the US produced 14% of oil in the world in 2021[1] and this guy on Quora[2] says that 12% of the world's oil and gas goes into aviation fuel.

[0] https://www.science.org/content/article/thirty-thousand-squa...

[1] https://en.wikipedia.org/wiki/List_of_countries_by_oil_produ...

[2] https://www.quora.com/What-percentage-of-the-world-s-crude-o...

zachrose··on Ask HN: What are some cool but obscure data structures you know about?
A list and an index creates the possibility that the index is out of bounds, and then your code probably has to check for that scenario and figure out how to handle it.

With a zipper such a scenario isn’t possible.

zachrose··on Ask HN: Why can't await be used from non-async functions?
There are two options for doing things in JavaScript: 1) do it now, or 2) start it now and get back to me when you're done.

JavaScript makes (1) the default. For any kind of object access (dog.legs[1].paw), assignment (const q = 5), math (Math.floor(4.2)), or DOM access in a browser (document.write('yay')), the interpreter will run each statement in sequence, completing each one before running the next.

Historically, the way ask the interpreter to "get back to me when you're done" was to use the "callback pattern," which was little more than passing in a function:

  setTimeout(4000, () => console.log('second'));
  setTimeout(5000, () => console.log('third'));
  setTimeout(3000, () => console.log('first'));
When it came time to construct sequential-looking programs that involved lots of these calls, things could quickly get messy:

  http.get(catalogUrl, (err, catalog) => {
    if(err) {
      handleError(err);
    }
    http.get(catalog.products[0].url, (err2, product) => {
      if(err) {
        handleError(err);
      }
      document.write(product.name);
    });
  });
Promises flipped this callback style into an object. Async/await morphed those promise objects and methods into language syntax that looks like one thing happening after another:

  catalog = await fetch(catalogUrl).catch(handleError)
  product = await fetch(catalog.products[0].url).catch(handleError)
  document.write(product.name)
If the original question were "why are some APIs async and some not?" the answer would be: "JavaScript engine authors (web browsers, node) have decided that some things like network access are inherently too slow to pretend they happen instantly, and waiting on them would mean that the UI would have to become unresponsive, which would make users think something is broken. Other APIs like DOM access are fast enough to get away with freezing the UI and nobody notices."

But the question was, "why can't you call an async function from a synchronous (non-async) function?" The answer there is more like, "Because synchronous functions are expected to return a result without waiting, and if you could call an async function but pretend you didn't, there's not a good solution for what should happen in composition with other non-async functions. Would you proceed without having a result? Would you force a wait anyways? None of those are acceptable answers because they break the model of 1) some things are nearly instantaneous and 2) some things take longer. We still need a mechanism to work with things that take a long or unknown amount of time, without making the UI freeze."

As lolinder points out in a sibling comment, this decision to split things into 1) fast and 2) not fast was ultimately a semantic decision of JavaScript engine/API designers. The downside of this decision is that it takes programmers some time to be comfortable with the unintuitive model. The upside is that it enables programs to be written by (fallible, mortal) programmers and not freeze up all the time.

zachrose··on 38% of remote workers work from bed
You’re really on to something here about systems thinking and the relative power of tools. I feel similarly about big IDEs and stateful, long-running test runners.
zachrose··on Farmers always worked from home
Unbelievable. It’s only five in the morning and I’m right where I work. And while the other poor sods struggle in on the tube, I’m going to get some milk out of a cow!

https://m.youtube.com/watch?v=_pDTiFkXgEE

zachrose··on Why won’t Americans get vaccinated?
How about a meta-analysis of several studies?

Respiratory function in patients post-infection by COVID-19: a systematic review and meta-analysis

DOI: 10.1016/j.pulmoe.2020.10.013

zachrose··on [dead]
Have I got this right? 8 K (8°C) is terrifying, but 1,200 ppm is almost 3x where we are now.
zachrose··on Treat Kubernetes clusters as cattle, not pets
I’d like to see a vegan alternative to the pets/cattle meme.
zachrose··on Micro APIs for Everyday Use
Because not everything is a reliable business? Sometimes it’s nice to make something for fun or practical.

I teach front end web development to a total beginner who is only just becoming aware that programming a web app with persistent state shared amongst users requires separate technologies than HTML/CSS/JS. The table API could be ideal for her. The alternatives: shared hosting with PHP/MySQL, anything AWS, or even Google Sheets/Airtable are all much bigger cans of worms that just slow down her cycle of getting things out there and learning the whole of the SLDC.

zachrose··on He Spent 6 Days in Feces Covered Cell. Supreme Court Says He Can Sue His Jailers
One has to wonder if they could then find enough people to staff such an institution.
zachrose··on He Spent 6 Days in Feces Covered Cell. Supreme Court Says He Can Sue His Jailers
> In that case, in 2002, a man named Larry Hope sued Alabama prison officials for chaining him, shirtless, to a hitching post designed for livestock. For seven hours in the hot Southern sun, Hope had minimal water and no bathroom breaks. At one point, Hope alleged, a guard taunted him by giving water to the dogs from the prison’s K-9 unit. When Hope conceded he was thirsty enough that he would drink it after the dogs, the guard kicked it over so it spilled onto the ground.

Wild that Justices Thomas, Rehnquist and Scalia dissented with the court, finding that the hitching post was not obviously cruel.

https://en.wikipedia.org/wiki/Hope_v._Pelzer#Dissenting_opin...

Page 1 of 31Next →