Recent submissions

Comment · 5 months ago
If this is your article, you have a typo in learns_priority/3, "move_priority #> 0" should be "P #> 0".
Comment · 10 months ago
Comment · 1 year ago
Hung explicitly refers to every usage of the word but a hanging. Meat is hung, people are hanged.
Comment · 3 years ago
This seems to work.

table:has(> tbody > tr > td > div > span > a[href="user?id=USERNAME"])

Comment · 4 years ago
Comment · 4 years ago
There are few easier ways built in to do some of the file functions you've made, instead of `open(f -> read(f, String), "input")` you can use `readchomp("input")`. There's also `readlines` which is equivalent to `open(f -> read(f, String), "input") |> f -> split(f, "\n")`, and `eachline` which is like `readlines` but returns a generator instead of an array.

There are curried forms of the operators that might make it easier to write functional code, like instead of `x -> x == "0"` you can write `==("0")`. Another useful thing is you can broadcast pipes, so instead of `x |> xs -> f.(xs)` or `x |> Map(f)`, you can write `x .|> f`.

It's funny that the first section is about everything loading as a matrix and not knowing the easy way to load things as a vector, I had the opposite problem and every problem that has a matrix I've ended up making a giant vector then reparsing the first line to figure out what dimensions to reshape it to. I'll have to try `readdlm`, I'm currently working through the older AoC years in Julia.

Comment · 5 years ago
Comment · 5 years ago
Oh yeah, you're right, they've been added since I last looked into it. Nice!
Comment · 5 years ago
Most of the Web Audio stuff has already been present in all major browsers for a little while, this mostly standardises what's already there. The main thing that this brings in that up until now was just a feature of Chrome is the AudioWorklet, so real-time low-level audio processing in JS worklets will work cross-browser when its implemented in the other browsers. It's very difficult to implement low-level audio processing off of the main thread in non-Chromium browsers at the moment.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton