Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
cztomsik
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
121.
▲
by
cztomsik
3y ago
The point was typical, typical Rust code is using Vec<>, typical Zig code is using arenas. Typical Rust code is using smart pointers, typical Zig/C code prefers plain, copyable structs. It is 100% possible to use such style in Ru
122.
▲
by
cztomsik
3y ago
I don't need any data to say that Zig is typically faster than Rust because I know that Vec<T> will do a shitload of useless work when it leaves the scope, even if the T does not implement Drop. You can do vec.set_len() but that&
123.
▲
by
cztomsik
3y ago
I don't need to prove you anything. Go and give it a try yourself.
124.
▲
by
cztomsik
3y ago
1. It's typically at least as fast as C, unlike C++/Rust 2. You can do type introspection (and switching) during compile-time, and it's not just some stupid TokenStream transformer, you really have type information available,
125.
▲
by
cztomsik
3y ago
The question is: Who needs to abtract over 10 lines of code?
126.
▲
by
cztomsik
3y ago
There were other frameworks before React: AngularJS, Knockout.JS, Backbone.JS, ExtJS, and I'm probably missing few others... Most of them had a concept of props/dirty-checking/retained-mode and they were definitely faster tha
127.
▲
by
cztomsik
3y ago
I am not an expert, but from what I've seen, PyTorch is mostly a thin wrapper over the C++ libtorch. The same is true for DOM as well, but nobody uses DOM directly, whereas everybody uses PyTorch. The big shift is Jupyter, but that
128.
▲
by
cztomsik
3y ago
You're not entirely wrong but pretty much everything you use from python is written in C++ anyway, so what's your point?
129.
▲
by
cztomsik
3y ago
In my case, Zig was super-simple to pickup, I've been using rust for few years so I was already in the systems programming (as a hobby), and I also had to read some C/C++ during that time, that probably helped me too. Other than t
130.
▲
RWKV for Node.js (Using Zig and GGML)
(github.com)
2 points
by
cztomsik
3y ago
|
0 comments
131.
▲
by
cztomsik
4y ago
This is using N-API rather than WASM or process piping. So theoretically, it should be more efficient. It's just a working PoC right now. My next step is to rewrite some GGML examples in JS, and refine where it feels rough. Only macos
132.
▲
Show HN: JavaScript Bindings for the GGML
(github.com)
1 points
by
cztomsik
4y ago
|
1 comments
133.
▲
by
cztomsik
4y ago
feeling better?
134.
▲
by
cztomsik
4y ago
Or Erlang... oh wait, that would actually work. We don't want that.
135.
▲
by
cztomsik
4y ago
It's accidental complexity. There's an artificial limitation which you need to work around. What you get back is very questionable, I certainly don't remember when it was last time I've messed up the scoping, if ever.
136.
▲
by
cztomsik
4y ago
You could, but it's not idiomatic in C. Zig is basically built around this.
137.
▲
by
cztomsik
4y ago
> Programming RJIT in Ruby is going to make this problems worse. Not only will it be hard to be more memory-efficient, you're going to increase the workload of the Ruby GC Or it could be a win. Java went that way too.
138.
▲
LLaMA 65B endlessly writing Star Trek fanfics
(twitter.com)
3 points
by
cztomsik
4y ago
|
0 comments
139.
▲
by
cztomsik
4y ago
that is much better point, but erlang gives you reliable system by default and you have to try really hard to make it crash, whereas go is just regular compiled language and such programs typically crash more easily/often.
140.
▲
by
cztomsik
4y ago
It's not immutable, there is no messaging, no hot-swap, no supervisors, it's not FP, and it doesn't have transparent support for clustering. Also, it's not memory-safe, 30ys old, and battle-tested pretty much everywhere.
141.
▲
by
cztomsik
4y ago
I believe it's because you train it in GPT-mode and then only use RNN-mode for inference.
142.
▲
by
cztomsik
4y ago
Give it at least few examples. ~1B networks are not good in zero-shot. Also, don't expect to get answers for things it was not trained on. the_pile is not programming dataset. RWKV is important because it's fast, it can be trained
143.
▲
by
cztomsik
4y ago
IMHO the biggest advantage is the RAM->GPU VRAM pipeline, or at least, that was my experience before - whatever you want to send to the VRAM, it has to be in RAM first, and you have to wait until it gets copied, before you can use that R
144.
▲
by
cztomsik
4y ago
core algo is simple, the complexity goes from everything else, which still needs to work with flexbox (min/max, relative/absolute/fixed, relative units everywhere, calcs, and the concept of min-content or whatever that is, fo
145.
▲
by
cztomsik
4y ago
Not in the original scope, but truffle has a way to generate interpreter from a java annotated switch case. And it also generates the bytecode format/length, and if you do changes in the interpreter it can change the bytecode format ag
146.
▲
by
cztomsik
4y ago
I don't have a much else to add: I open the github codesearch at https://cs.github.com/ and I type there something like `"someMethod(" lang:zig`, then I open several results in a new tab and quickly skim thro
147.
▲
by
cztomsik
4y ago
what's wrong with discord? the community there is awesome and very helpful.
148.
▲
by
cztomsik
4y ago
BTW: if anyone wants to jump into Zig, for me the most efficient way was reading the stdlib and also using github codesearch - just type a function name with suffix lang:zig and you get a real-world usage.
149.
▲
by
cztomsik
4y ago
Awesome, thank you for your work, all of you. I am not easily impressed but I think Zig is THE next big thing.
150.
▲
by
cztomsik
4y ago
ShadowRealm + Object.freeze() could be enough to create safe env for untrusted code.
More ›