HNHacker News
TopNewBestAskShowJobs

noctune

186 karma · joined January 8, 2020

submissionscomments
noctune··on I/O is no longer the bottleneck
That is true, but assuming file I/O is blocking you also have to pay for a context switch to take advantage of that.

But I guess you could avoid that using eg. io_uring.

noctune··on We Are Changing the License for Akka
Akka's new license is highly likely incompatible with the Apache Software Foundation requirements for third party licenses. "Additional use grant" might mean a OSS project does not have to pay, but it still puts heavy restrictions on forking that project.

So Apache projects depending on Akka, like Flink or Spark, will probably have to fork it or be stuck on the current version.

noctune··on Go’s major versioning sucks – From a fanboy
I think it's a difference in what one considers to be "the API". Linux is very much to the de facto API side, whereas some other project might be more one the de jure API side with a rigid specification and allowing any change within that. Most things are probably somewhere between the two.
noctune··on Make the “semantic web” web 3.0 again – with the help of SQLite
What if you have something like (relatee_a_id, relatee_b_id, [rest of relation fields ...]) with the constraint that relatee_a_id < relatee_b_id?

Granted, it might not be very nice to query.

noctune··on It's not what programming languages do, it's what they shepherd you to (2020)
>High-performance Java is indeed basically writing C in Java, including using you own byte array for memory.

Oh, I wish. For example, in C you can easily return multiple values through pointers. In Java, you have no such luxury without allocating so it's even less flexible if you can't allocate.

noctune··on Go Fuzzing
IMO, it's much the same and pretty much only a question of API. Property-based testing (like QuickCheck) generates randomness using a PRNG, creates a structure from that, and checks that some property holds for that structure. A fuzzer generates some arbitrary input and usually checks that the program returns successfully (i.e. doesn't crash).

The reason I think they are the same is that we can rather easily turn one into the other and vice versa:

- A PBT test can be turned into a fuzzer-test by sourcing the randomness from the input instead of a PRNG and failing the program if the property does not hold.

- A fuzz-test can be turned into a PBT by sourcing the input from a PRNG.

The real difference is that fuzzers tend to be coverage-guided, i.e. a fuzzer will use what part of your code is executed to guide its mutations and thus steer it towards more "interesting" inputs.

noctune··on Ontario bans non-competes and creates right to disconnect from work
It's similar in Denmark. I basically got three months pay in compensation when I changed jobs while under a non-compete - which ironically incentivizes finding a new job.
noctune··on Does the Bronze Garbage Collector Make Rust Easier to Use?
Both those situations are race conditions, but neither are data races. Rust only prevents data races, which is a specific kind of race condition, but it does not prevent race conditions in general.
noctune··on Letting users tick a ‘none’ checkbox
Nice site. I'm not sure the dropdown looks great on OS X though. On OS X, the selected option is prepended with √, so it looks like

  √ Feature
    √ Feature
    √ No Feature
Selecting the second element then shows

    Feature
  √ √ Feature
    √ No Feature
It ends up looking somewhat odd.
noctune··on The LZ4 introduced in PostgreSQL 14 provides faster compression
I did something similar to this and saw a significant performance boost. It was OLAP though - so very read heavy and few to no random writes.
noctune··on A terrible schema from a clueless programmer
I especially feel the proposed solution could be problematic given that the data is supposed to be transient. How are keys deleted from the "id | value" tables when rows are deleted from the main table? Does it just keep accumulating rows or is there something like a GC query running occasionally that deletes all unreferenced values?
noctune··on Optimizations Enabled by -ffast-Math
>Calculating the average value for some observation in a time bucket, where some buckets may have no observation (resulting in 0/0=nan)

But there are many ways such a calculation could result in NaN besides a division. For example, intermediate sums could result in something like inf - inf. I find it rare that you can definitely conclude that a NaN means some specific thing.

noctune··on Cryptocurrency is something people tell lies about in hopes of getting richer
> - The cost associated with purchasing tokens needed to initialize an account on the blockchain would serve as a spam prevention mechanism; an alternative to SIM cards which most centralized services rely on today as a cost barrier to limit the creation of spam accounts.

Doesn't seem like that to me. If I get banned I can just move my cash to another account and start again, and assuming multiple services does this I can amortize the cost over all of them.

The rest seems to me like something mTLS could solve better.

noctune··on DoD Awards $1B Contract to Peraton to Counter Misinformation
You should check their MH17 coverage.
noctune··on New ‘mirror’ fabric can cool wearers by nearly 5°C
It's the same dilemma though. Now you are raising the humidity around you, making other peoples' sweat less effective at cooling them.

Although lowering humidity can be more easily done with just ventilation.

noctune··on Apple's DocC is excellent, but unusable for open source projects
IMO, search is a pretty significant part of docs and I haven't seen a good way doing that without either javascript or a web server.

But other than that, yeah, you don't really need JS.

noctune··on Unicode sorting is hard and why browsers added special emoji matching to regexp
This leads to fun things like the regex [a-z][a-z] not matching the string "aa" in SQL Server when using the Danish collation.
noctune··on Sorted Integer Compression
The entropy of 1e6 sorted 32 bit integers is log2((2*32+1e6-1) choose 1e6) bits or about 1.61 MiB, so it should be possible. Really difficult, obviously, but possible.
noctune··on CSS Turing Machine
It is Turing complete if you access the tape using something like fread/fwrite.
noctune··on How Tail Call Optimization Works
You could change the drop semantics to drop as soon as a variable is no longer used/borrowed (as opposed to now when it goes out of scope).

But IMO that does not seem like it's worth it considering how less predictable it would make drop.

noctune··on Russian opposition leader Navalny dupes spy into revealing how he was poisoned
Until Russia starts catching the leakers using something like a canary trap [1].

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

noctune··on Common Expression Language
Just write JSON and pretend it's YAML. YAML is a superset of JSON so there's no need to generate "nice" YAML if there isn't a human reading or writing it.
noctune··on Does C++ still deserve a bad rap?
> * Try implementing an on-disk hash table in Python and you're stuck manually packing ints and longs in an out of arrays. In C++ it could a simple template used with a memory-mapped file.

This is only simpler if you don't need to handle read failures. If you want to handle read failures, memory mapping can quickly become way more complicated. You have to install signal handlers and do a complicated dance to correctly handle not having data in some range.

noctune··on C++ the Good Parts (2014)
`using` composes badly. It won't work with eg. a list of Disposables or Linq.
noctune··on On modern hardware the min-max heap beats a binary heap
And if you only need a monotone priority queue (i.e. priority queue where the popped elements are monotonically increasing/decreasing) you should consider using a radix heap. This monotone requirement can be satisfied more than you would expect when eg. using time as key or in pathfinding. I have a simple radix heap implementation here: https://github.com/mpdn/radix-heap
noctune··on Russia opposition leader poisoned with Novichok
>if he is really rigging elections, would he really go for such unrealistic number

You are assuming someone has an overview of the rigging being done. It's probably more chaotic than that. If 1000 different people are chucking opponents' votes into furnaces, how do you coordinate hitting that number?

noctune··on Boeing yanks eight 787s from service over structural issue
Bizarre - the site has javascript that disables selecting text on the article because "Content is protected".
noctune··on When Asbestos Was a Gift Fit for a King
My uncle spent some weeks doing DIY projects with asbestos. Hes has mesothelioma now. Turns out he has (along with many in our family) a genetic disorder that makes certain cancers like mesothelioma much more likely.
noctune··on Rust 1.46
>And deeply nested object hierarchies are a no-go, too, because of the inability to do "partial borrows" of just a single field of a struct.

I'm not totally sure if this is what you mean, but FYI you can borrow multiple fields mutably using destructuring:

    struct Foo(u8, u8);
    
    fn main() {
        let mut bar = Foo(1, 2);
        let Foo(ref mut x, ref mut y) = &mut bar;
        *x += 1;
        *y -= 1;
        println!("{} {}", bar.x, bar.y);
    }
noctune··on Math.min(Math.max(num, min), max)
> Both min and max should return NaN, if any of their parameters is NaN.

That's not a given, though. IEEE 754-2008 defined min and max as returning the non-NaN parameter. They have been removed in IEEE 754-2019 though.

← PreviousPage 2 of 3Next →