10 ms·
26 or so data points, but still interesting. I myself have become enamored with Zig's relative simplcity and straightforwardness, although some of my friends ke
by rcarmo 4y ago
26 or so data points, but still interesting. I myself have become enamored with Zig's relative simplcity and straightforwardness, although some of my friends keep telling me to do Rust instead.
- eggy 4y agoYeah, 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 some of this into Rust, but it's not there yet. So for me, Zig is my C replacement, and SPARK2014 is my C++/Rust replacement. You can go low-level with SPARK2014 too, and IMHO, it is far easier to understand than Rust, yet it already has all the high concepts of software integrity, safety, and verifiability. Excited about cross-platform graphics and performance with Zig and Mach.
- pryelluw 4y agoThanks for sharing. Going to enjoy some time with Spark2014. OT: Searching for Spark2014 brings up a lot of results about the 2014 Chevrolet Spark. A shit box of a car of there ever was one.
- eggy 4y agoHah, Chevy Spark, and it's a gasoline car! I usually put "SPARK2014 programming" or "SPARK2014 Ada" in my searches. I used to get annoyed by all of the Apache Spark stuff that came up, but that seems to have waned a bit this past year or two. Vermont Technical College (VTC) used SPARK2014 to program their CubeSat and the book, "Building High Integrity Applications with SPARK"[1] is a great intro to it in a nice context of practical use. There was also an article on the AdaCore site about someone who rewrote some drone firmware in SPARK2014, which is another nice real-world application. [2] [1] https://www.amazon.com/Building-High-Integrity-Applications-SPARK/dp/1107040736/ref=sr_1_5?crid=3OQW9ZYPSM71A&keywords=high+integrity+software&qid=1662723880&sprefix=high+integrity+sloftware%2Caps%2C60&sr=8-5 https://www.amazon.com/Building-High-Integrity-Applications-... [2] https://blog.adacore.com/how-to-prevent-drone-crashes-using-spark https://blog.adacore.com/how-to-prevent-drone-crashes-using-...
- unwind 4y agoGasoline cars have sparkplugs, so it's not really a strange association. At least not in my opinion. In fact, I guess in gas cars sparks are "better" since they are engineered in, and doing useful work.
- eggy 4y agoI didn't say it was strange. I found it amusing that this is what came up during the other person's search for SPARK2014, and yes, thinking it sounded like a suitable electric vehicle name. Chevy called their electric offering Volt, and Volts are in the battery in a gas car too, but I think you get the picture.
- pcwalton 4y agoHow 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/language_restrictions.html#memory-ownership-policy https://docs.adacore.com/spark2014-docs/html/ug/en/source/la...
- eggy 4y agoPerhaps "understand" was the wrong word given I meant for me to understand. I have a C background and Pascal as well as assembler back in the day (late 70s/early 80s). I dove into Ada/SPARK2014 and picked it up much quicker than Rust. Ada has been around a lot longer than Rust, so I think it's syntax allows for a clearer readability even if they have similar borrowing rules. If I had my druthers I'd be programming in APL or J all the time, so take what I find clearer with a grain of salt. There wasn't as much tribalism around PLs as there is nowadays. I guess people stake a lot of emotion on what they have chosen as their main language or programming paradigm they may have committed so much of their time learning. I still recommend Ada/SPARK2014 to anyone who asks me about verifiable or high-inegrity software with a follow on comment to keep an eye on Rust especially with Adacore and Ferrous Systems teaming up to help Rust get there. Zig does not have a major sponsor like Rust, but it appeals to the low-level hacker, former C programmer. I love playing with Hexops' Mach game engine and graphics toolkit in Zig! I tried Bevy and Rust, but it just doesn't flow as quickly for me. Maybe it does for others.
- cardanome 4y agoFor 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 compiler error (curse you golang for making that popular) which is super annoying for prototyping.
- vanderZwan 4y agoI never understood this attitude, it's not like commenting out variables is difficult.
- simion314 4y ago>it's not like commenting out variables is difficult. But if you comment var A that uses var B now B is unused and you need to commnet B, but now B was using a function parameter C and this param is unused now so you need to update the function signature (I do not use Go,Zig so maybe they did not forced you to also use all the function params my experience is with linters where ehwn you comment something then more unused warnings appear)
- vanderZwan 4y agoWow sounds like you really need to clean up your codebase. Seriously, I have never had this problem while coding in Go, and I'm a very very sloppy coder.
- spoiler 4y agoWhat are you talking about? I don't understand how you've never encountered variables depending on each other. In any moderately complex function you'll have more than one expression, and those can depend on each other. And you want them to be named and assigned; it makes it easier to read and decode intent and debug things (unless you're one of those wizards who get it right on the first try every time, kudos to you then). I'd not approve a PR that inlines/embeds complex concepts within larger expressions just to avoid creating variables... Edit: typos
- newaccount2021 4y ago