Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
moldavi
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
moldavi
5y ago
Thank you for the beautiful explanation! I understand now, and am kind of excited to try this out in my next gamejam.
32.
▲
by
moldavi
5y ago
I've never heard this, but it seems so obvious now! Just to be sure, can I get an example? Is it like: we want to group a spaceship's fuel tank and engine together, because theyll be accessed at the same time?
33.
▲
by
moldavi
5y ago
Would love to hear more about that kind of compressing, how does that go?
34.
▲
by
moldavi
5y ago
When you say vectorize, are you referring to loop unrolling? Or SIMD or something?
35.
▲
by
moldavi
5y ago
I've seen a lot of ECS implementations that store components in hash maps, keyed by entity ID. They iterate over one hash map in a linear way which is fast, but then they do a bunch of slow lookups like GP is saying. In those situation
36.
▲
by
moldavi
5y ago
The article rang true for me. I heard the same FP promises that the author did, and eventually ran into the same issues in my FP programs, and left disillusioned. The article captured the experience perfectly.
37.
▲
by
moldavi
5y ago
That's reasonable; one's threshold of "safe enough" factors in. If one is just designing a game, or a command line tool for internal use, one needn't make it completely rock solid, and C++ has the better learning cu
38.
▲
by
moldavi
5y ago
Let's keep this on track; we're only talking about the learning curve here. Nobody here is saying c/c++ or rust is better after their respective learning curves. No need to be defensive, they're just languages, and every
39.
▲
by
moldavi
5y ago
So it's okay if rust does shared ownership, but not okay for c++? I'm not attacking rust, btw. We all know c/c++ isn't great. Theres plenty of aspects where rust is better, and plenty where c++ is better. But we're
40.
▲
by
moldavi
5y ago
To be fair, people coming from other languages lean heavily on Rc/RefCell too, and sometimes (uh oh) unsafe blocks. In both cases, one benefits from input from those experienced in the language. (not saying c/c++ is better than ru
41.
▲
by
moldavi
5y ago
I've often wondered about this. Does this technique (a type safe wrapper around an interface{}ing class) kind of accomplish the same thing that generics do for Java? It would result in the same kind of type-erasure in the end, I'd
42.
▲
by
moldavi
5y ago
That sounds pretty promising. Does taking turns work well in practice?
43.
▲
by
moldavi
5y ago
How do you let go of the things you want to do? I like to think that my side project is something only I could do, that the world needs but doesnt know it yet... so the thought of giving it up sends chills through me. You seem to have a rea
44.
▲
by
moldavi
5y ago
Why would concatenating strings be an antipattern?
45.
▲
by
moldavi
5y ago
I'm not sure that's correct. I've heard that high CO2 levels trigger the parasympathetic nervous system which calms us down. One could get the same effect from breathing into a paper bag, I think.
46.
▲
by
moldavi
6y ago
Yes, Rust lacks a runtime-sized array. I think the rest of these replies are presenting a false dichotomy; having a compile-time sized array doesn't change that. Rust could easily have all three (compile-time-sized, runtime-sized, and
47.
▲
by
moldavi
6y ago
I'd imagine given another language (e.g. Python), they'd learn a lot faster and be a lot more prodictive throughout the course.
48.
▲
by
moldavi
6y ago
Announcing it loudly puts more pressure on Google to improve, which is the whole point. I don't see any reason to disparage this guy for being public about this.
49.
▲
by
moldavi
6y ago
Raw pointers and raw references are non-owning, shared_ptr and unique_ptr are owning. Ownership is solved in modern C++.
50.
▲
by
moldavi
6y ago
Knowing who owns an object is a solved problem in C++, most codebases I've seen use unique_ptr. Rust isn't the only language with ownership.
51.
▲
by
moldavi
6y ago
I don't see the problem. Rust made some explicit choices that meant it couldn't do something. Doesn't change the fact that it couldn't do something. No need to get so defensive, lots of languages have things they can
52.
▲
by
moldavi
6y ago
Rust is more performant, but Java is actually much more ergonomic, since you dont need to worry about borrow checking concerns and its frequent refactoring. Still, the tradeoff is good for a game like this.
53.
▲
by
moldavi
6y ago
Do you mean we should have OS-specific methods in languages' standard libraries? Or that we should add cross-platform frameworks to languages' standard libraries?
54.
▲
by
moldavi
6y ago
That sounds incredible. What kind of patterns does it enable? Have you seen it used well?
55.
▲
by
moldavi
6y ago
Either Rust improved dramatically while I wasn't looking the last few days, or that's some of the most beautiful trolling I've ever seen. Someone needs to be congratulated, either way ;) I love Rust. It's like a beautifu
56.
▲
by
moldavi
6y ago
Shouldnt they be about the same? (At least until the LLVM immutability optimizations happen) I suspect surprising factors are in play.
57.
▲
by
moldavi
6y ago
What's involved in learning to use the GC correctly? I'm very experienced in Rust, and so skeptical when anyone says Rust is easier than something.
58.
▲
by
moldavi
6y ago
Your comment, while true, is too pedantic to be useful. No language I've ever seen can prevent that broader definition of memory leaks, so it's not a useful distinction to make when comparing languages.
59.
▲
by
moldavi
6y ago
vlang uses Lobster's memory management model: RC, eliminating as many increments and decrements as possible with some static analysis. Lobster was able to eliminate 95% RC ops with some extra monomorphization, so I'm guessing vlan
60.
▲
by
moldavi
6y ago
vlang uses Lobster's memory model, so the tradeoffs are: * It falls back on RC when it can't guarantee something's lifetime, so it still does some RC. * Can't store objects on the stack. (Lobster mitigates this with othe
More ›