HNHacker News
TopNewBestAskShowJobs

gwenzek

251 karma · joined November 6, 2015

submissionscomments
gwenzek··on Rewriting Bun in Rust
That's not what the article says though. The size reduction was from extra linker flag for deduping code, and the speed gains from LTO.

They could have done the same in Zig, even though it probably shows cargo is better at this than build.zig.

gwenzek··on Zig 0.16.0 Release Notes
https://ziglang.org/download/0.16.0/release-notes.html#Loop-...

Seems like a big one! I wonder how it will impact real code performance

gwenzek··on As Android developer verification gets ready to go, a new reason to be worried
I really don't like this move. I always rooted for Android because of its openness. It was also a reason why I was proud to work at Google.

The PlayStore is full of crapware, and I'm using a lot of apps from Fdroid, including basics like keyboard and text.

If you're at Google try to push back on this please.

gwenzek··on Unexpected productivity boost of Rust
Andrew actually agrees with the general sentiment. And this will be made into a compile error.

What's happening is that compiler knows the two errors come from disjoint error set, but it promotes them both to anyerror

Details at https://github.com/ziglang/zig/issues/25046

gwenzek··on Implementing a Struct of Arrays
Interesting to see the new C++ at work. But also I'm sure it's easier to learn Zig full language that just the new C++ metaprogramming
gwenzek··on Zig 0.14.0 Release Notes
Really liking the promotion of "Unmanaged" containers. It's the ones I'm using everywhere already
gwenzek··on Show HN: CLR, POC borrow checker for Zig
Nice write up ! I think it would be nice for Zig to try to catch some of those errors like return of stack pointers, Cause it's painful for beginners
gwenzek··on Why is C the safest language? [pdf]
If you think this paper is pro-C++, read it again:

> many languages like C++ or Java are now old enough that if they would have > offered significant advantage over C, they should have supplanted C by now, > this clearly hasn’t happened.

I don't agree with all the points though and the rhetoric is pretty weak IMO, like the point about cars being safe for pedestrians.

But I agree with the points about C being simple and having great tooling (thanks to being simple).

gwenzek··on ZML - High performance AI inference stack
ZML the zig library is mostly a wrapper of StableHLO/pjrt. But it's a high quality wrapper, and the tagged tensor syntax is really helpful to write complex ops like dot, or gather.

And ZML the framework also resolve issues with the complex dependency graph of stablehlo/pjrt.

gwenzek··on ZML - High performance AI inference stack
Zig has been relatively stable for the past few years for the main Zig code. What has changed the most is the `build.zig` build system (which we aren't using).

We are also looking ahead at Zig roadmap, and trying to anticipate upcoming breaking changes, and isolate our users from that.

gwenzek··on ZML - High performance AI inference stack
It' s a bit early to compare directly to TensorRT because we don't have a full-blown equivalent.

Note that our focus is being platform agnostic, easy to deploy/integrate, good performance all-around, and ease of tweaking. We are using the same compiler than Jax, so our performances are on par. But generally we believe we can gain on overall "tok/s/$" by having shorter startup time, choosing the most efficient hardware available, and easily implementing new tricks like multi-token prediction.

gwenzek··on ZML - High performance AI inference stack
Hi co-author here. Zig is way simpler than C++. Simple like in an afternoon I was able to onboard in the language and rewrote the core meat of a C++ algorithm and see speed gains (fastBPE for reference).

Coming from Python, the hardest part is learning memory management. What helps with ZML is that the model code is mostly meta programming, so we can be a bit flexible there.

We have a high level API, that should feel familiar to Pytorch user (as myself), but improves in a few ways

gwenzek··on Zig and Emulators
Very nice read.

I agree with the author that Zig should improve a bit the readability of integer and vector arithmetics.

Small tips is to use more lines.

  fn addOffset(base: u16, off: u8) u16 {
    const ibase: i16 = @bitcast(base);
    const ioff: i8 = @bitcast(off);
    return @bitCast(ibase +% ioff);
}
gwenzek··on It's Time to Tax Billionaires
Why do we tax income though? Especially for billionaire in a globalized world, it's easy to hide incomes. Wealth is harder to hide.
gwenzek··on Great Male Renunciation
Graphic 5.2 in http://piketty.pse.ens.fr/files/Piketty2019GraphiquesTableau...

In France it was down to less than 1% at the time of Revolution, but some countries like Spain that had centuries long wars, was closer to 6-8% range.

gwenzek··on Problems of C, and how Zig addresses them
I wrote a similar article but focused on how Zig design enable better optimizations than C. https://zig.news/gwenzek/zig-great-design-for-great-optimiza...
gwenzek··on The Precipitation Problem
Hard question. Probably because we were in a sweet spot without realizing it. And that lands are also pretty damaged. Swamp are a key part of regulating water flow, but humanity have been destroying those for hundreds of years. Also grounds are probably over-plowed, which make them less permeable. See "dust bowl".
gwenzek··on Japanese biomass venture using microorganisms to tackle waste disposal
I know farmers that are using city compost to replace chemical fertilizers for their vegetables. There is probably an over supply of compost in some places, but it feels this will probably reverse over time as farmers adapt their techniques.
gwenzek··on Using mmap to make LLaMA load faster
It's indeed a very different world. This model was trained on thousands of GPUs. The weird file format corresponds to the train time sharding of the weights. And really nobody is doing CPU inference with all the GPU we have. And also the "CLI" use case seems contrieved to me. If you plan to interact several times with the model and want to keep the weights in RAM, why don't you start a REPL or spin up a server?
gwenzek··on Pypi.org is running a survey on the state of Python packaging
I feel Zig could help here. The binaries ship with LLVM statically linked. You could rely on them to provide binaries for a variety of architecture / OS, and use it to compile code on the target machine. I'll probably explore this at some point for Pip.
gwenzek··on CudaText: Open-source, cross-platform text editor, written in Lazarus
On the github.io landing page there is a link to https://wiki.freepascal.org/CudaText#Advantages_over_Sublime...
gwenzek··on CudaText: Open-source, cross-platform text editor, written in Lazarus
How does it compare to Sublime Text? This seems to be a FAQ but the link appears to be broken, and I didn't find a corresponding entry in the Wiki.
gwenzek··on WebAssembly: The New Kubernetes?
The thing I'm not understanding is why WASM runtime is that fundamentally different from an OS? Isn't the OS already supposed to securely isolate the different programs? Shouldn't we try to fix that instead?
gwenzek··on GitHub Copilot as open source code laundering?
A number of company, including Google and probably Microsoft forbid copying code from Stack Overflow because there is no explicit license
gwenzek··on Show HN: MarkShow – Create Slideshows with Markdown
Personally I'm a very keen on Markdeep: https://casual-effects.com/markdeep/
gwenzek··on Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
Honestly don't wait on all the web Dev to fix their app. Buy yourself a programmable keyboard that tells the computer they are a "normal US layout keyboard".

Now when you press "shift+7" on your keyboard it only sends "regular US keycode for /"

As a benefit you'll maybe also realize that Azerty or Qwertz are pretty bad layout for typing French/German, and you'll come up with something better.

gwenzek··on Improving Shell Workflows with Fzf
Can you tell us more about your setup? Sounds quite cool
gwenzek··on Icecream: Never use print() to debug again in Python
OTOH if you're able to write `if bug_will_happen_on_next_line(): breakpoint()` you're pretty much done debugging.
gwenzek··on Why I rewrote my Rust keyboard firmware in Zig: consistency, mastery, and fun
IIUC the line of thoughts is that the current compiler is too slow, and that it doesn't show on a small project. But if you imagine a big project with 100 dependencies, you'll be really slowed done. The new compiler is faster (I think there are benchmarks in the repo) and can compile debug builds without going through LLVM.
gwenzek··on Facial recognition can predict person’s political orientation with 72% accuracy
I'm not sure this is enough. If you classify all old white men as Republican you can have 69% accuracy. I'd even argue the more such factors you control the less it means something.
Page 1 of 5Next →