Live data from Hacker News

Game Jam 2 Results

wasm4.org

81–90 of 193 posts

Re: Game Jam 2 Results

#81
post #31

From the perspective that development time is a big constraint in a game jam it's no wonder zig is more popular than rust

I never got my rust wasm build to work without needing JS.

Then you will enjoy WASM-4 since it handles the glue code for you. There's no JS in you game but the web emulator is written in JS

Re: Game Jam 2 Results

#82
post #15

So.. good for prototyping, like Ruby?

I've continued to code on my game submitted to the last WASM-4 jam for months and thoroughly enjoyed improving my messy game-jam code. So I'd disagree with the statement that Zig is only good for prototyping.

Re: Game Jam 2 Results

#83
post #71

Earlier quoted context omitted.

How long till we start complaining that Zig followers are cult like? Asking as Rustecean.

I've noticed people that like writing code in Zig are fans the language and the people that like writing code in Rust center their identity around the language. The former leads to people saying they enjoy writing code in Zig, the later leads to religious zealotry and moral condemnation for using anything other than Rust.

Which language is the one where you make sweeping generalizations?

Re: Game Jam 2 Results

#84

Earlier quoted context omitted.

> It isn't difficult, but it is friction. Only until getting rid of unused variables becomes a habit before you hit the compiler. Which is a good habit to have anyway.

Good habit, maybe, but it shouldn't cause a compilation failure. Add to that the snowball effect: you comment out a variable, compile, and you get another error because commenting out variable a made variable b unused. Rinse and repeat. It's a huge and totally unnecessary time sink. It should be opt-in, so that it's a warning by default, and then, when I'm ready to push my code, I could run some --strict mode that wo…

One of the features in go that makes it workable is you can assign it away via: _ = somevar

That eliminates the unused chain problem. Not sure if zig included that part of the feature as well.

Generally I agree though. The main problem with forcing unused variables, imo, is that it forces you to think a certain way. When I'm exploring the solution space on something, those constraints feel inhibiting.

Re: Game Jam 2 Results

#85
post #37

Earlier quoted context omitted.

Arguably Zig is a better fit for game dev. At the high end game dev is all about memory layouts and cache optimization, and that goal can run counter to Rust's approach to memory safety.

Memory safety isn't in conflict with low-level control over memory layout.

It can just be limiting in terms of ergonomics. Like I've implemented a couple of ECS's and what you want to do is dispatch a bunch of threads over big swaths of structured memory. One of the main things the borrow checker doesn't want you to do is use the same memory on multiple threads. You can do that in rust, and people have, but you have to put a lot of effort into convincing the borrow checker that what you're doing is ok, or else find ways to side-step the borrow checker.

So basically rust imposes a lot of limitations on how you can structure your program relative to something like Zig or C.

Re: Game Jam 2 Results

#86

Earlier quoted context omitted.

I've noticed people that like writing code in Zig are fans the language and the people that like writing code in Rust center their identity around the language. The former leads to people saying they enjoy writing code in Zig, the later leads to religious zealotry and moral condemnation for using anything other than Rust.

Which language is the one where you make sweeping generalizations?

It's funny you say that when a rustacean just posted below that it is irresponsible to use unsafe languages.

Instead of focusing on tradeoffs they chose to call others irresponsible.

Re: Game Jam 2 Results

#87

Earlier quoted context omitted.

Zig is the new HN clickbait, taking over Rust's spot. That's a good sign for the language, honestly

Good sign for the language, bad sign for HN. I totally get it's nicer than C, I love it too, but it's completely irresponsible to push a language without a memory safety story, in 2022, this hard. From that relatively obvious conclusion it devolves into tedious nerdsnipes. Yes there are edge cases.

That's a rather extreme position.

Re: Game Jam 2 Results

#88

Earlier quoted context omitted.

That's the one thing keeping me from considering Zig for new projects right now. If some enterprising young developer is reading this and wants to make a name for themselves, you should fork the Zig compiler and change those errors to warnings. It would be an extremely popular project. EDIT: I'll even give you a catchy project name. Wig: Zig with Warnings

You should also consider that optimizing for incorrectness and prototyping speed might not be the professionally responsible choice in 2022.

Unused variables don't make a program incorrect. When you comment out unused variables to prevent Zig's compiler error you don't remove the dead code, you in fact make it more likely to stay in the codebase because now it's only visible to humans. While almost every other language will print out a clearly visible warning without disrupting the workflow.

I can only see downsides and no upside in this design. Why would you slow down the development workflow for something any decent compiler will discard as basic optimization step? It's an error about something that has absolutely no impact on the resulting program and its execution, you can probably find a dozen better reasons for Zig to throw errors where it doesn't.

Re: Game Jam 2 Results

#89
post #86

Earlier quoted context omitted.

Which language is the one where you make sweeping generalizations?

It's funny you say that when a rustacean just posted below that it is irresponsible to use unsafe languages. Instead of focusing on tradeoffs they chose to call others irresponsible.

It's perfectly reasonable to take the position that it's deeply problematic for a language aiming for wide use in 2022 to not be memory safe. There's no requirement that you "focus on tradeoffs", especially since real people get hurt by memory safety problems.

Re: Game Jam 2 Results

#90
post #71

Earlier quoted context omitted.

How long till we start complaining that Zig followers are cult like? Asking as Rustecean.

I've noticed people that like writing code in Zig are fans the language and the people that like writing code in Rust center their identity around the language. The former leads to people saying they enjoy writing code in Zig, the later leads to religious zealotry and moral condemnation for using anything other than Rust.

Not sure which lens you are using for coming to this conclusion. In my experience, most people writing Rust code have no "moral superiority" and treat Rust as a "better tool", not as a religion per se.

However, what I've seen in the discourse of several programmers that claim to prefer Zig is the assumption that Rust is "not really that big of a deal". There's a constant minimization of the advancements both the ownership system and the safety approach provide, and a lack of recognition for the fact that the language is a "game changer" in the industry.

Overall, this looks a lot like rationalization of an emotional choice, which for me is much more close to religious zealotry.

Post reply on HN