Better HN
topnewbestaskshowjobs
Log inSign up

gwenzek

251 karma · joined Nov 6, 2015 (11y ago) · 138 submissions

Submissions

comment 4mo ago · link · parent

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.

comment 7mo ago · link · parent

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

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

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

comment 1y ago · link · parent

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

comment 1y ago · link · parent

Really liking the promotion of "Unmanaged" containers. It's the ones I'm using everywhere already

comment 1y ago · link · parent

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

comment 1y ago · link · parent

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).

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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);
}

comment 3y ago · link · parent

Why do we tax income though? Especially for billionaire in a globalized world, it's easy to hide incomes. Wealth is harder to hide.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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...

17.

Zig: Great Design for Great Optimizations(zig.news ↗)

11 points · by gwenzek · 3y ago · 3 comments

comment 3y ago · link · parent

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".

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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?

21.

On the value of going deep, or How a broken keyboard led me to fix bugs in Zig(zig.news ↗)

2 points · by gwenzek · 3y ago · discuss

comment 4y ago · link · parent

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.

comment 4y ago · link · parent

On the github.io landing page there is a link to https://wiki.freepascal.org/CudaText#Advantages_over_Sublime...

comment 4y ago · link · parent

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.

comment 4y ago · link · parent

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?

comment 5y ago · link · parent

A number of company, including Google and probably Microsoft forbid copying code from Stack Overflow because there is no explicit license

comment 5y ago · link · parent

Personally I'm a very keen on Markdeep: https://casual-effects.com/markdeep/

comment 5y ago · link · parent

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.

comment 5y ago · link · parent

Can you tell us more about your setup? Sounds quite cool
12345