fwlr

Joined 3 years ago

Karma
6,057
Submissions
1,180
Member since
Jan 29
software craftsman; professional polyglot (particular to rust, typescript, lisp); open to talk or work [email protected] (re: employment - remote/office agnostic, right to work australian citizen)
View on Hacker News

Recent submissions

Comment · 3 hours ago
The fact that these corporations don’t spontaneously collapse from the sheer weight of irony is a continuing disappointment for me.
Comment · 3 hours ago
There’s no way the sandbox is just “only GET, no POST”…
Comment · 3 hours ago
Ah, the perils of programming in plain text.

I couldn’t tell you if AI code assistants would write this, or catch it - ironically enough, “the perils of programming in plain text” is one of my stated reasons for eschewing AI assistance.

Given that the succinctness just bit me, I’m inclined to sacrifice it and go with

  // over the range 0..23, +1 gives the same result%2 as -1, and also handles edge case of 0
  const lastHour = new Date().getUTCHours() + 1
  …
  env.QUEUES[lastHour % 2]

Fundamentally I guess I was just objecting to doing arithmetic in the time domain to achieve negating a boolean.
Comment · 4 hours ago
Much like Vim, it is exhausting to read a description. But it’s like a second of muscle memory that happens instinctively.
Comment · 4 hours ago
Oh no little piglet, you’re not supposed to be eating at the dinner table with us. Your place is at the trough. Make sure you eat all your slop to grow up big and fat. Do that and I’m sure you’ll find yourself on the dinner table in no time.
Comment · 6 hours ago
Blueprints and construction bots, plus the well-thought-out and extensively battle-tested set of keyboard commands for them, are basically a brain-game interface for Factorio on the level that Vim is for text. For the grandparent’s “rip and replace coal burners” I am hitting mod-D and dragging a selection box over the offending area, then hover-Q on a nearby element I want to use and shift-click to plan it, once I have planned one instance of a subpattern its mod-C select, click hold and walk in a direction to tile it in one dimension, mod-C select, click hold walk to extend this over the other direction. It is now done, the bots will handle everything else - because Wube are an incredible bunch of UX engineers, I can place the new building before the old buildings are even removed, leave, and trust that everything will be done correctly. Highly recommend getting a “Starter Bots” mod that feels appropriately balanced.
Comment · 22 hours ago
This decision is about so many things except the code that it deserves some kind of award.

Demonstrates fanatical devotion to capital’s golden idol - “yes, all of the code; yes, unlimited budget”. Doesn’t actually cost the company anything - only one engineer off task, any nuggets of value can be harvested as it progresses but any costs or big changes can be deferred until completion of the impossibly large open-ended mandate (ie never), one guy won’t have the personal bandwidth to spend so much that the “unlimited” part actually matters, and in case of emergency it only costs six months severance to make it all go away. It even rescues a fellow national from the ignominy of being employed so far below his previous station, there’s so much to like about it. Hmm? The code? What about it?

Comment · 23 hours ago
Cool pattern. Critics will say “falsehoods programmers believe about time” but it’s a cloud service, any time oddity that would break this would also break a lot more important stuff, so it’s fine.

Ugly code though.

  // env
  QUEUES = [EVEN_QUEUE, ODD_QUEUE]

  // producers
  env.QUEUES[hour % 2].send …

  // consumer
  env.QUEUES[1 + hour % 2]
Comment · 2 days ago
I must admit that it became extremely difficult to feel sympathy for the guy when, after extensively describing how AI systematically took from him every means he had of creating value, his conclusion was “AI is still great, the problem is that government and charities aren’t doing enough to cover the costs AI is imposing on me”.
Comment · 2 days ago
If economics says the definition of a consumer is a human person, well, so much the worse for economics when the entities-funding-UBI build a better UBI-recipient-entity.
Comment · 2 days ago
When presented with this bleak potential future, it is natural and easy to reject it: it’s undesirable, so people will not do it, so it won’t happen, QED.

But we don’t get to the future by making one big choice of which future we desire, whereupon we are transported there instantly. We get there slowly, at a rate of one day per calendar day, by making innumerable microscopic daily choices. These choices will be endless, it will often be unclear which option avoids the bad future, they will accost you when you are tired and hungry… and several corporations have collectively trillions of dollars riding on you ending up with the bad future and the legal right to tilt the playing field.

Comment · 2 days ago
Who’s to say the consumers are humans? Agents would be more predictable consumers (no day/night cycle, just consume 24/7), electricity is cheaper than food, and a GPU doesn’t (yet) cost as much a house.

The reason we must not do UBI is that UBI turns consuming into a product, and humans will very rapidly be outcompeted and obsoleted by more efficient consumers. It would wrap the invisible hand of the market tight around our species’ throats.

Comment · 3 days ago
I misread the comment I was replying to, thinking it was about using Zig to port something, when it was actually about porting something that uses Zig.
Comment · 4 days ago
And I think this community is better off without advertisements littering the top of the page simply because it’s associated with someone’s favorite zero-effort thought substitute, but I choose to channel my distaste into cheap jokes instead of sour replies.
Comment · 4 days ago
From https://ziglang.org/intro/overview/

  Zig is also a C compiler

  Here’s an example of Zig building some C code:

  hello.c
  > #include <stdio.h>
  >
  > int main(int argc, char **argv) {
  >   printf("Hello world\n");
  >   return 0;
  > }
  

  $ zig build-exe hello.c -lc
  $ ./hello
  > Hello world

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton