Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
nemo1618
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
91.
▲
by
nemo1618
3y ago
I'm skeptical that QWERTY causes RSI (or at least, causes more RSI than any other layout). I struggled with RSI for over a year and tried all sorts of things. Today I'm typing this comment on a QWERTY laptop keyboard in a position
92.
▲
by
nemo1618
3y ago
I've seen these programs discussed on 4chan and reddit -- try "GATE conspiracy"
93.
▲
by
nemo1618
3y ago
IIRC you are correct, there are one or two spots in the Knuth division algorithm where having a power-of-2 dividend lets you eliminate a shift or an addition or something -- but nothing (nothing obvious, at least!) that yields a significant
94.
▲
by
nemo1618
3y ago
Here's an example from my own work: I had a function that performed a 256-bit division. I thought there was a good chance it could be optimized, because the dividend was fixed: the function computed 2^256 / d. Surely, if the divid
95.
▲
by
nemo1618
3y ago
It's a rather notorious HN comment, pretty much our equivalent of "No wireless. Less space than a Nomad. Lame."
96.
▲
by
nemo1618
4y ago
Do you ever feel a burning desire to just solve the hell out of a particular problem? Usually this happens in the context of performance optimization, but it can be anything. Maybe you're supposed to be working on something else, but
97.
▲
by
nemo1618
4y ago
This kinda blew my mind, thanks!
98.
▲
by
nemo1618
4y ago
This is a gripe I have about Go -- a very minor gripe, to be sure, but it's still there. If you want to iterate over two arrays/slices that have the same length, you have to choose between: for i := 0; i < n; i++ {
99.
▲
by
nemo1618
4y ago
Sure, in general you want to use the narrowest possible interface. But in this particular case, I think `net.Conn` communicates intent better than `io.ReadWriter` -- the former implies that two distinct parties are involved, whereas `io.Rea
100.
▲
by
nemo1618
4y ago
> Developers have decided to conflate actual entropy with "hard to compute," which is simply not true. True, they are different, but there is no meaningful distinction between a value that is "truly random" and a valu
101.
▲
by
nemo1618
4y ago
Interesting, though AFAIK a secure tunnel is only useful for a net.Conn, not an io.ReadWriter. What's the usecase for a "secure tunnel" over a bytes.Buffer? btw, I noticed that the decrypt function reads a 32-bit message leng
102.
▲
by
nemo1618
4y ago
> There's not an infinite amount of crypto secure randomness available for all processes to go nuts sucking it up In fact, there is! The idea that your kernel has some finite amount of entropy that can be "used up" is a pe
103.
▲
by
nemo1618
4y ago
My whole point is that cryptographically-secure should be the default, as there are many scenarios where a PRNG leads to a security vulnerability where a CSPRNG would not. It is precisely new programmers who should be using CSPRNGs for ev
104.
▲
by
nemo1618
4y ago
Pseudo- random! A new programmer reading this article would come away with the impression that, if they need random numbers, they should use xorshift or PCG, when in reality they should be calling getentropy(), or, if a syscall is too expe
105.
▲
by
nemo1618
4y ago
Nice! Your 'fixed' package is wild btw. I've been looking for a good 256-bit division algorithm, might have to copy yours. :)
106.
▲
by
nemo1618
4y ago
If you want a fun little project, try porting ASCON to your language of choice! Shouldn't take more than a couple hours. Here's mine (in Go): https://github.com/lukechampine/ascon I suppose if Ascon is widely
107.
▲
by
nemo1618
4y ago
You might be able to use https://pkg.go.dev/runtime#SetFinalizer for that. Another option is https://pkg.go.dev/lukechampine.com/freeze -- not exactly what you want, but if the object is mutated after
108.
▲
by
nemo1618
4y ago
> CTRL + ALT + Down to flip the Windows screens. Again caused issues for a lot of people who didn't know this shortcut. Oh man, that brings me back. We always went the extra mile by taking a screenshot of the desktop, rotating it 18
109.
▲
by
nemo1618
4y ago
Very cool. I also made a language specifically for AoC, with some similarities: https://github.com/lukechampine/slouch Example of solving a (non-AoC) problem: https://youtu.be/i_zDbInYOpQ One of my b
110.
▲
by
nemo1618
4y ago
After playing a lot of Tetris Friends, I started getting deja vu. Sometimes, after starting a new game and placing maybe 10-20 pieces, I would think, "Haven't I seen this exact board before?" Eventually I tested my theory t
111.
▲
by
nemo1618
4y ago
tl;dr: A ghost is the opposite of a capability. Use capabilities.
112.
▲
by
nemo1618
4y ago
You can also use any fair dN as a fair dN+X, by rolling ceil(log_N(N+X)) times and interpreting the result as a base-N number. (This is commonly done in D&D: instead of rolling a d100, you roll two d10s.) For example, say you want to ro
113.
▲
by
nemo1618
4y ago
I'm still "jet lagged" after returning from Europe -- I wake up at 6 or 7 now instead of 11 or 12, and I love it! I imagine I will eventually slide back; guess I'll have to keep flying west? :)
114.
▲
by
nemo1618
4y ago
I recently learned that home burials are legal in most U.S. states. Gravedigging is hard work, but I think burying a loved one on their own property (with the help of some friends/family) is a nice alternative to a cemetery/gravey
115.
▲
by
nemo1618
4y ago
Presumably this is for performance reasons: if a `Read` call involves, say, a network request, then returning "800, EOF" in one roundtrip is certainly nicer than "800, nil" -> "0, EOF" in two roundtrips. In
116.
▲
by
nemo1618
4y ago
> Most of Nim’s standard library collections are based on hashing and only offer O(1) behavior on the average case. Usually this is not good enough for a hard real-time setting and so these have to be avoided. In fact, throughout Nim’s h
117.
▲
by
nemo1618
4y ago
> When the water boils, pour in your pasta. Why even wait for the water to boil? I always pour my pasta into the cold water right from the start, and it doesn't seem to make any difference.
118.
▲
by
nemo1618
4y ago
I wish! After I met my (now-)wife on OkCupid, we deactivated our accounts so that we'd stop getting notifications. A few months later we wanted to revisit our first messages to each other -- only to find that OkC had already deleted th
119.
▲
by
nemo1618
4y ago
This is being considered for Go 2: https://github.com/golang/go/issues/19623 Personally I'm wary of it: it's not hard to think of adversarial scenarios where this could lead to OOM. On the other han
120.
▲
by
nemo1618
4y ago
Whoops, I forgot! Yeah, no weird intercom noises, sadly.
More ›