HNHacker News
TopNewBestAskShowJobs

sakras

729 karma · joined September 15, 2019

Programmer interested in performance, new pieces of metal, compilers for them. Twitter: bztree Email: krassovskysasha@gmail.com Blog: https://save-buffer.github.io/
submissionscomments
sakras··on Wow, is Apple’s Vision Pro loaded with pixels
It has a feature called Mac Virtual Display, which I guess creates a large screen in space that mirrors your MacBook. But I’m not sure about a more general-purpose input than that.
sakras··on Royal Navy says quantum navigation test a success
That’s hilarious, I did actually write “pawned” intentionally, but while writing it I thought, “Haven’t heard this one before, but I guess it makes sense, it treated them like pawns in chess”
sakras··on Royal Navy says quantum navigation test a success
> Also AlphaStar can teach absolutely nothing to the army tacticians.

This is the only sentence of your summary that accurately portrays my comment.

I do think they are investing in tactical AIs, you even see it with those new loyal wingman UAVs. But the notion that AlphaStar proves that we already have tactical AIs that outperform humans is absurd.

sakras··on Royal Navy says quantum navigation test a success
AlphaStar hardly pawned GMs in any meaningful way. It mainly won on mechanics, even when Deepmind tried to nerf its mechanics. Probably the most important thing is that the “200 APM limit” is way higher than any human can do, because it made use of each one of its actions. Humans can reach 400+ APM by spamming, but their EPM will stay much lower than 200. The result is that it had god-tier micro that changed the game completely: zergling runby’s are normally good for Zerg and bad for Protoss. With alphastar, it was the opposite, because it could micro to avoid losing any workers. Its disruptor micro was again unmatched.

Now, my last argument for why alphastar wasn’t some sort of brilliant tactician was that eventually people figured out that it’s susceptible to all the same problems a normal bot is: you can dart a warp prism in and out of its vision and it will send its army back and forth, you can confuse it by going mass raven/PF etc. and it’s completely unable to adapt. So in conclusion, no: AlphaStar doesn’t say anything one way or another about military AIs.

sakras··on A not-so-quick introduction to the C++ allocator model
Wow I was literally reading the docs last night and didn’t notice operator[]! Good to know
sakras··on A not-so-quick introduction to the C++ allocator model
I was recently faced with this (luckily I realized it before coming across any strange bugs), and realized std::deque works great for this if you don’t need random access (which was fine for my use-case because I just grabbed references immediately after insertion).
sakras··on Health officials delayed report linking fluoride to brain harm
So is the person you replied to.
sakras··on X-59 supersonic aircraft
Given that it’s 14ft tall, I’d say no, though I agree they could’ve made it clearer. It says 99’7 In, or 99 feet and 7 inches (ideally, it would be 99’7”).
sakras··on How much memory do you need to run 1M concurrent tasks?
> Notably, at 1 million tasks, I observed that the overhead of launching tasks became evident, and most programs required more than 12 seconds to complete.

I didn’t quite get this part. Even if your runtime has no overhead, the fastest way you can execute 1 million 10-second tasks is 10 * 1 million / num_cores, right? Why would these million tasks only take 12 sec?

sakras··on “Considered Harmful” Essays Considered Harmful (2002)
Or: How I Learned to Stop Worrying and Love The Tropes
sakras··on A collection of lock-free data structures written in standard C++11
Parallel reductions are more heavy-weight synchronizations than locks. Say we have 64 partitions, then we need to perform 6 levels of tree reduction, or avoid parallelism completely and perform the reduction on a single thread. Either way it was slower.

The locking strategy very rarely had any reduction in parallelism due to the randomized lock-taking.

There were also other reasons, such as not wanting to replicate the filter per-thread.

sakras··on A collection of lock-free data structures written in standard C++11
Here's one I had: I was trying to build a Bloom filter in parallel. Each thread had large-ish batches of hashes it wanted to insert into the filter. Naively, you'd just have each thread iterate through the batches and do __sync_fetch_and_or for each of the hashes (this was a register-blocked Bloom filter so we only needed to perform one 8-byte or operation per hash).

What ended up being MUCH faster was to partition the filter, and to have a lock per partition. Each thread would attempt to grab a random lock, perform its inserts into that partition, then release the lock and try to grab another random lock that it hasn't grabbed yet. Granted, these locks were just atomic booleans, not std::mutex or anything like that. But I think this illustrates that partitioning+locking can be better for throughput. If you want predictable latency for single inserts, then I'd imagine the __sync_fetch_and_or strategy would work better. Which maybe brings up a broader point that this whole discussion relies a lot on exactly what "faster" means to you.

sakras··on Automakers are starting to admit that drivers hate touchscreens
> All of my environment controls are on buttons and knobs beneath the screen.

Indeed people aren’t complaining about stuff like this. My friend just bought a new Subaru that has 0 buttons. It now takes two presses on the not-very-responsive touch screen to change the power of the seat warmer. Same with all of the other environmental controls. It’s not just less tactile, it’s much slower.

Personally I appreciate having a screen of some sort for music and navigation, but for things that I’ll be changing often while driving such as environmental controls buttons are the way to go.

sakras··on Play on BSD
This is very cool and I like the idea of gaming on BSD a lot, but this site seems to be Under Construction on most of the pages I click on. Maybe wait for it to be more complete before submitting?
sakras··on It's not only you, there's an explosion of ChatGPT on HN
Maybe this is a bit too shameless of a plug, but I created EXACTLY this sort of thing: https://news.ycombinator.com/item?id=35458826

It's just a regex that filters out "GPT", "AI", "LLM", and "LLaMA" :)

sakras··on Better Together: Unifying Datalog and Equality Saturation
UW’s PL group has been focusing lately on this notion of E-Graphs and a technique called Equality Saturation. An E-Graph is a structure that efficiently represents equivalent rewrites of a program (exponentially many rewrites in polynomial space iiuc). Equality saturation is the process of generating an e-graph that represents all possible rewrites by inserting rewrites until the e-graph doesn’t change (is saturated). After the graph is created, you can use some heuristic to pick a good rewrite.

This paper applies E-graphs to augment Datalog's reasoning/constraint solving.

sakras··on GNU toolchain for RISC-V including GCC
Can anyone in the know explain the significance of this toolchain? Haven’t we been able to compile for RISC-V for years now? At the very least I was doing it ~4 years ago for my undergrad research
sakras··on Why Janet?
I can really feel the author’s excitement in every sentence. Reading his work is great fun, and really does make me want to use Janet
sakras··on Switching to C over 'Modern' Programming Languages
> There’s just so much “magic” happening in each that it’s difficult to figure out what’s going on. When I’m writing code in these languages, I realize my brain is effectively writing psuedo-C code and then transpiling to whatever language I’m working with.

I feel the same way about these other languages, but for kind of the opposite reason! I write some code in the new language and then transpile it to C in my head just to see what I expect the CPU to be doing. I'm going through SICP right now and I find myself fighting the urge to imagine `cdr` as dereferencing the `next` pointer of a linked list. I spend a lot of time worrying about this stuff when writing other languages, probably to the detriment of my productivity.

sakras··on Show HN: AI-Less Hacker News
That would be pretty cool, but I'm not sure how much money I'd need to pay per request for something like that. Maybe I can train a model offline and bundle it with the webpage somehow
sakras··on Show HN: AI-Less Hacker News
Bah, I typed the regex match as "LLaMa" instead of "LLaMA". Just pushed a fix :)

For crypto, what keywords would be good to filter? I haven't seen much crypto spam so maybe it's not a huge deal.

sakras··on Launch HN: Type (YC W23) – AI-powered document editor
I went ahead and threw one together: https://save-buffer.github.io/no_ai/
sakras··on Launch HN: Type (YC W23) – AI-powered document editor
> Things are going to get boring, old and non-original very quickly.

I’d say they already have. I have half a mind to write a HN front end that filters out any posts with the phrases “GPT”, “LLM”, and “AI”.

sakras··on Microsoft's Software Is Malware
I think it's difficult on Intel to be fully free because of Intel ME. As far as I know, it's not possible to fully be rid of it, so you'll always have some proprietary blob running a possible backdoor.

If you want to be fully free, you may be interested in the Raptor Talos II, which is based on OpenPOWER and has free firmware. It is pretty pricey however.

sakras··on Your reading should be messy
People who write in books: what do you write? I remember being forced to write on sticky notes in high school, and trying several times afterwards, and I just don’t get it. I see the phrase “engaging with the writing” thrown around by proponents. What does “engaging” mean here?

In regards to letting books get scuffed up, I must say I disagree as well. I like to keep all of my things shiny and new, and my books are no exception.

sakras··on Suing to protect right of incarcerated people to receive physical mail
I could be wrong, but doesn’t that violate the supremacy clause, since opening letters is a federal offense?
sakras··on Building a new functional programming language
I definitely agree. I think somewhere along the way we went from solving problems to bickering about _how_ to solve problems. I feel there are now plenty of languages now that exist purely for aesthetic reasons (C++, Swift, etc) rather than having some deep technical reason for existing (C, Rust).

I guess I get it though, designing your own language is great fun and I’ve definitely made a couple myself in my spare time.

sakras··on “Clean” code, horrible performance
> To me the article read as if our job was to make every bit of code as fast as possible.

My interpretation was that he thinks the baseline for performance is too low. There are kind of two parts to performance: non-pessimization and optimization. He’s mostly harping on the former point, that you don’t have to go tuning anything. Just by writing code without following the clean code rules you can get a huge speed up for free, without any tuning at all. It’ll be free of obvious overheads, even if it doesn’t do anything special to fully utilize the hardware.

sakras··on Time to get the Posix elephant off our necks?
I’m afraid I don’t understand. If you want one process to signal to another that data is available, you have the receiver block on a condition variable. When the sender writes its data it signals the condition variable. This is all handled by the kernel, no signal/interrupt is required. Or if you don’t want blocking, you can have a shared ring buffer, with the two processes interacting with it atomically.
sakras··on Time to get the Posix elephant off our necks?
> With shared memory in particular, the issue gets tricky around signalling and locking aka indicating to other processes when new info is available, and when another process is accessing the data.

POSIX has mutex and condition variable, is this not enough to do those things?

← PreviousPage 5 of 8Next →