Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dminik
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
14 ms
·
301.
▲
by
dminik
1y ago
I find these two statements to be contradictory > Sure, but that's abstracted away from you > Mixing futures from any two different `Io` implementations will typically result in Illegal Behavior Thinking about it more, you'v
302.
▲
by
dminik
1y ago
> in Zig that's just ... Well, no. In zig that's `const x = foo(io)`. The moment you take or even know about an io, your function is automatically "generic" over the IO interface. Using stackless coroutines and green
303.
▲
by
dminik
1y ago
Yes, the main character of that article really is mostly JavaScript. The main issue there is that some things must be async, and that doesn't mesh well with things that can't be. If you're writing a game, and you need to rend
304.
▲
by
dminik
1y ago
Sure. Let's do an imaginary scenario. Let's say that you are the author of a http request library. Async hasn't been added yet, so you're using `std::net::TcpStream`. All is well until async comes along. Now, you have a
305.
▲
by
dminik
1y ago
It's funny, but I do actually like it. It's just that it walks like a duck, swims like a duck and quacks like a duck. I don't have a problem with IO conceptually (but I do have a problem with Zig ergonomics, allocator include
306.
▲
by
dminik
1y ago
Conceptually, there's not much of a difference. If you have a sync/non-IO function that now needs to do IO, it becomes async/IO. And since IO and async are viral, it's callers must also now be IO/async and call it w
307.
▲
by
dminik
1y ago
I'm not skipping anything. And in fact acknowledge this exact point: > That being said, I don't think Zig's implementation here is bad. If anything, it does a great job at abstracting the usage from the implementation. Thi
308.
▲
by
dminik
1y ago
Well, it's not really a joke. That's a valid strategy that languages use. In Go, every function is "async". And it basically blocks you from doing FFI (or at least it used to?). I wonder if Zig will run into similar issu
309.
▲
by
dminik
1y ago
> It's quite rare for a function to unexpectedly gain a dependency on ... If this was true in general, the function coloring problem wouldn't be talked about. However, the second point is more interesting. I think there's
310.
▲
by
dminik
1y ago
> but most modern apps rely on some form of dependency injection Does Zig actually do anything here? If anything, this seems to be anti-Zig, where everything must be explicit.
311.
▲
by
dminik
1y ago
To me, there's no difference between the IO param and async/await. Adding either one causes it to not be callable from certain places. As for the second thing: You can do that, but... You can also do this in Rust. Yet nobody would
312.
▲
by
dminik
1y ago
I feel that I have to point this out once again, because the article goes so far as to state that: > With this last improvement Zig has completely defeated function coloring. I disagree with this. Let's look at the 5 rules reference
313.
▲
by
dminik
1y ago
Well, unfortunately I don't have an exact answer for you, but I do have the next best thing: speculation. I had a quick look and found this article that compares a partial port of a C++ codebase (at around 17kloc). https://q
314.
▲
by
dminik
1y ago
One aspect that I find interesting is that Rust projects often seem deceivingly small. First, dependencies don't translate easily to the perceived size. In C++ dependencies on large projects are often vendored (or even not used at all)
315.
▲
by
dminik
1y ago
There's a thousand milliseconds in a second. If your VSCode is taking +10 seconds to display a single character, it might be time to upgrade from your Commodore 64.
316.
▲
by
dminik
1y ago
For Counter-Strike 1.6, source and GO your crosshair would change and indicate that you are aiming at a player. Not sure about CS2, but wouldn't rule it out either. It's a bit slow, but you could grab the player ID, then check if
317.
▲
by
dminik
1y ago
I mean, that's a whole lot of words and no history. You're right that it is a gotcha. Especially after you use line like > Why would anybody what strangers think of them Well, I for one am interested in your porn browsing histo
318.
▲
by
dminik
1y ago
Would you be willing to share your full name and your porn browsing habits? Here, to everyone reading this thread?
319.
▲
by
dminik
1y ago
Yes, it's called Drop in rust: https://doc.rust-lang.org/std/ops/trait.Drop.html
320.
▲
by
dminik
1y ago
It doesn't really seem worth it. https://web.ist.utl.pt/nuno.lopes/pubs/ub-pldi25.pdf > The results show that, in the cases we evaluated, the performance gains from exploiting UB are minimal. Furthermore,
321.
▲
by
dminik
1y ago
React hooks came out in 2019. That's 6 years ago. And they are still the way to write client components. Unless you're moving everything to server components (which you most likely can't and shouldn't anyways) you would
322.
▲
by
dminik
2y ago
Well, that may be, but it's entirely possible that this outlook might change. In the worst case he's poisoned an entire generation. If ChatGPT doctors, architects and engineers are anything like ChatGPT "vibe-coders" we&
323.
▲
by
dminik
2y ago
I'm not sure I agree. Having multiple middlewares is a standard feature in many libraries/frameworks. Express (Node) has many middleware libraries to do a ton of stuff. Axum (in rust) also makes use of middlewares. You can argue t
324.
▲
by
dminik
2y ago
Tbh the entire middleware system in Next is awful and everyone would be better off if it was scrapped and reimplemented from scratch. For starters, there's no official way to chain multiple middlewares. If you want to do multiple thing
325.
▲
by
dminik
2y ago
I don't have anything to say in regards to DuckDB or this UI. But, I do find it funny that their homepage animation causes google to index the description as: DuckDB is a fast ana| database system.
326.
▲
by
dminik
2y ago
They keep saying this about crypto too and yet there's still no legitimate use in sight.
327.
▲
by
dminik
2y ago
To mirror some of the other comments here: I've had decent success in using podman for my local dev setup (postgres, redis, ...). I did run into one issue though. Rootless mode isn't supported (or at least easy to setup) when the
328.
▲
by
dminik
2y ago
CRA existed to remove the setup/maintenance burden of webpack (software straight out of hell ...). It's biggest issue was that it was entirely unconfigurable. You took what was offered in CRA, or you ejected and now had to maintai
329.
▲
by
dminik
2y ago
Ah yes, Web Components. Famous for having exactly zero tradeoffs and excellent dev experience.
330.
▲
by
dminik
2y ago
Yeah, same. I originally had a very positive nix experience. I had to fix some docker build issue at work. This particular dockefile needed the buildx command. Except for whatever reason I just couldn't install the needed component for
More ›