Earlier quoted context omitted.
> We've been through that. Those are syntactically delineated unsafe features for C interop. Rust has them, too. And again we're assuming that the ones we went over in the previous thread are all there is. I found some more: @intToPtr, @bitCast, @alignCast. Some of those @ functions are spatially-memory-safe, and some are not: the differences are not clearly called out. (I'm going to charitably assume that taking a p…
> Again, "struggling to get 1% of the market" is a weird way to describe a language that's serving billions of users right now. Which language and which project is this referring to?
Game Jam 2 Results
131–140 of 193 posts
Re: Game Jam 2 Results
#132Earlier quoted context omitted.
Yeah, not a lot of data points, and a niche subject, game dev, but I am playing with the Mach game and graphics engine, and so far so good. I started programming in 1978 in CPM Basic, C, 6502 assembler, etc. I play with Rust, but if I am really looking for high-integrity software, I am currently using SPARK2014 (the subset of Ada), that has some legs beneath it. Rust and AdaCore are starting to work together to bring…
How is Spark2014 easier to understand than Rust? The borrowing rules [1] are more or less the same. [1]: https://docs.adacore.com/spark2014-docs/html/ug/en/source/la...
Re: Game Jam 2 Results
#133Re: Game Jam 2 Results
#134Earlier quoted context omitted.
You have chance to prevent it. It's not going to be perfect but use huge lesson learned from js ecosystem "mess" (I found this triggers some (many) js folks, it's quite ridiculous). Javascript "mess" in browsers could be reduced by dividing into two parts. DOM stuff, and pure language stuff. The first part can stay as is. Probably wrapped into thin API for new lang interop. The second part is a completely new lang th…
IMHO most software problem are social or caused by wider economic incentives. People come and go either because of life or work, and complexity piles up. I don't think there are any silver bullets. There is a reason Worse is Better. It's quicker to ship and spread.
Re: Game Jam 2 Results
#135Earlier quoted context omitted.
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 owne…
> 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. I think you have inadvertently worded this in a way that sil…
Re: Game Jam 2 Results
#136Earlier quoted context omitted.
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.
If one suggested this in any other language to suppress "unused variable" warnings it would be considered a lazy way to avoid fixing the issue.
Meanwhile the developer of Zig himself recommended doing this[0] which only shows what a bad idea it is to make this a compiler error imho. It encourages workarounds and enforces something we automated long ago in the form of dead code elimination.
[0] https://github.com/ziglang/zig/issues/335#issuecomment-43526...
Re: Game Jam 2 Results
#137Earlier quoted context omitted.
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…
I don't see it imposing that much of a limit. If there is code you know is correct and Rust can't reason about it, do it in unsafe block.
And ECS is not just possible in Rust, but due to mutability guarantees you can make your ECS schedule systems in such way to maximize multi threading. See Bevy ECS.
Re: Game Jam 2 Results
#138Earlier 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're not alone. Fridays are my live streaming day and I've chosen today's topic to be the user experience of unused variable errors. I have an idea to solve this that can satisfy both parties - those who don't want to be bothered by such errors, and those who want the premise upheld that if Zig code compiles, it does not have any unused variables. In approximately 60 minutes I'll go live on https://www.twitch.tv/an…
If you're talking about the `zig fmt` idea, I'd like to draw your attention to a possible pitfall -- Silencing the errors with _ increases the risk that unused vars will be committed to the repo. https://news.ycombinator.com/item?id=32753079
I normally add the equivalent of `-Werror` to pre-commit and CI. But if those warnings are silenced directly in the source code, I can no longer rely on the compiler's guidance to clean up the code, and I would have to hope I could remember all the places I need to clean up before committing. In that way, solving this in the formatter could have the opposite effect on code quality than you intended. I _do_ want the compiler to yell at me... just not yet. Only when it comes time to commit.
Overall I've been impressed reading about Zig's design. You clearly have good engineering taste and I respect you challenging the status quo and trying unconventional ideas, even if I may disagree from time to time. I'm itching to start using the language once this is solved!
Re: Game Jam 2 Results
#139Earlier quoted context omitted.
> 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. I think you have inadvertently worded this in a way that sil…
I think the issue is memory safety is reachable. Correctness is either extremely hard (proof program satisfied specifications) to nigh impossible (make sure all icon pointy things are aligned).
Re: Game Jam 2 Results
#140Earlier quoted context omitted.
For me Rust is a language that I would absolutely love to work with in a professional context. The type system and borrow checker have your back and help you make changes to the code without fear of accidentally introducing any regressions. For private lone-hacking projects though it feels way too complex and opinionated. Here Zig definitely gets closer to what I need, though sadly it made unused variables an compile…
I never understood this attitude, it's not like commenting out variables is difficult.
In Zig, I find that I put a whole litany of "_ = varname;" at the bottom of my functions (starting with the function arguments) and they stay there permanently. This is NOT an improvement.
However, it's not really enough to stop me from using the language as that's an easy thing to evantually fix.