Recent submissions

Comment · 6 days ago
isn't that basically QML?
Comment · 11 days ago
Most exchanges don't use a single wallet per user, but have a small pool of wallets that all their customers share, and they just do the bookkeeping of the balances of each account. That lets them group many transactions together into a single larger transaction, or avoid a transaction entirely if it's between two users on their exchange.

So that pool of wallets that stores all their customers funds needs to be managed by the exchange somehow, meaning there's going to be some sysadmins/devs/etc that have access to parts of the system that deal with those wallets, and possibly also the keys to those wallets (which it looks like was the case here).

Comment · 28 days ago
Comment · 1 month ago
They could also just be creating all the html elements using javascript (i.e. document.createElement, document.body.appendChild, etc) and streaming that into a repl line by line.
Comment · 1 month ago
A 1 square meter solar panel that weighs around 10kg contains under half a kg of actual doped silicon photovoltaic cells, with the remaining >95% being mainly aluminium framing, glass to cover the cells, and some backing material and wiring, all of which are trivially recyclable. So even if the doped silicon wasn't recyclable (which it is with a little more effort than the other materials) that's hardly the majority of the material that goes into making a solar panel.
Comment · 1 month ago
I agree it's a bit annoying, but a better solution than using `as` is just telling reduce what its generic type should be:

tasks.reduce<Record<string, (t: typeof tasks[number]) => boolean>>((acc, item) => ..., {})

Also imo it's cleaner to reduce to an object with something like this as the callback:

(acc, item) => ({ ...acc, [item.label]: t => t.label === item.label })

Comment · 3 months ago
Comment · 3 months ago
Comment · 6 months ago
In my experience it makes even more sense in functional programming languages, not less, since they usually also have more powerful type systems that help with actually representing parsed vs unparsed data.
Comment · 6 months ago
DEL is unicode codepoint U+007F, which is the byte 0x7F in UTF-8, not 0xFF. Perhaps you were thinking of ÿ which is codepoint U+00FF, which encodes to the bytes 0xC3 0xBF in UTF-8.
Comment · 6 months ago
Here's an equivalent shell script that only uses bash builtins, so no other software required:

  #!/bin/bash 
  mac="\\x${1//:/\\x}" 
  wol="\xFF\xFF\xFF\xFF\xFF\xFF" 
  for i in {1..16}; do wol+="$mac"; done 
  printf "$wol" > "/dev/udp/$2/9"

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton