Tell me if I'm being stupid...
-
dandy72 wrote:
IMO, the risk with a "young" language is that the original team behind it gets tired of it and the rest of the community isn't large or committed enough to keep it going, and it becomes an unsupported dead-end. It's a Catch-22, it's gotta have the traction to keep going, but you need to have enough people with a vested interest to do so.
100% agree. That's why I've ignored most newfangled languages. Zig is different. Yeah they're young (compared to old farts), but the peeps behind it are serious and pretty smart. There's already an established foundation behind it that just got $21.1m in their series B and a community that's really growing. I'm completely confident this language will continue to grow and mature.
dandy72 wrote:
That's the first question I'd ask myself. Do you get a feeling that if the entire team suddenly died in a plane crash, the project would go on?
I think so. Been wrong before, but this one is different than languages like [Odin](https://odin-lang.org/) (these kids watch too many cartoons I swear). I could be wrong again, but I'm not sure the Odin project would survive without the one dude behind it.
dandy72 wrote:
Without a contingency plan, the risk is entirely on you. Cool syntax and all technical wizardry under the hood seem entirely irrelevant without that.
100% agree buddy. Dang, this should be easy to choose. :wtf:
Jeremy Falcon
Do you have time/energy to do both Zig and C, side-by-side? Could be some useful results from that, both for you and others, and if you start seeing problems on the Zig side, you've got a fallback.
-
Please no zealot type replies. Looking for intellectual discourse amongst those not afraid of change, based on real life experience, etc. I also realize the target audience here will always lean towards C-style languages, so please be objective. But, I'm torn. For this project I'm about to embark on, I have two mandatory requirements. Everything is optional. 1) It's gotta be able to do web requests. 2) I gotta be able to know I can do regex... should I need it. Regex has saved my butt so many times I will never use a language without. Just won't happen. So, back in the day, in C at least, for these two solves I would just use [libcurl](https://curl.se/libcurl/) and [libpcre2](https://github.com/PCRE2Project/pcre2). I don't know about you guys, but that got old. It's a hell of a lot easier to handle these requirements in higher level languages. But, I need the speed here because I want this application to represent the best of what I can do... not half arse it because it's easy. I wanna be proud of this; otherwise, I'd just use JavaScript/Node.js. So, that brings me to Zig (yes, I said it :laugh:). If I were to give a 2 second overview, Zig is to C as Rust is to C++. And that really, really got me interested. I'm an old fart, and this is a new smell. Cool. However... Despite all the niceties of Zig, it's still young with 1.0 being years away I'm sure. It can do web requests, but that just came out months ago and it cannot connect to some [TLS servers](https://github.com/ziglang/zig/issues/17446). Which means, I'd still be using `libcurl` anyway to be able to reliably do web requests... just in Zig. I'm sure it'll improve in time, but that may be a couple years from now. It's still so young. Same thing goes with regex, there are _some_ regex libraries by people, but nothing official as part of the language yet. And, the ok "zig style" third party ones I've seen don't support UTF-8 for instance. So, for now, I'd still be using `libpcre2` as well. Edit: There is POSIX regex, but ideally this app would be cross platform and that would still be C-style anyway. I want something new (a lot); I'm not afraid of moving on from C if I can find something that has the same philosophy of it (KISS). But, I also want things to work reliably. And unfortunately, it may be that Zig is still too young for this for the next couple of years. There's absolutely nothing preventing me from using C libraries in Zig. So, I can use these libraries and just eventually migrate over to the "zig way" in
Jeremy Falcon wrote:
Zig is to C as Rust is to C++
The main point of using Zig is that according to the author of the language it should encourage the DOD style, i.e., Data Oriented Design. As you rightly said, Zig is comparable with C. Since this “practice” tends to produce “cache-friendly” code, using Zig might be even better than using C, from the point of view of pure computational power. Even with C (and C++) you can write “cache-friendly” code, but you have to be careful how you write it. That said, I don't use Zig, so I may be talking rubbish.
-
Please no zealot type replies. Looking for intellectual discourse amongst those not afraid of change, based on real life experience, etc. I also realize the target audience here will always lean towards C-style languages, so please be objective. But, I'm torn. For this project I'm about to embark on, I have two mandatory requirements. Everything is optional. 1) It's gotta be able to do web requests. 2) I gotta be able to know I can do regex... should I need it. Regex has saved my butt so many times I will never use a language without. Just won't happen. So, back in the day, in C at least, for these two solves I would just use [libcurl](https://curl.se/libcurl/) and [libpcre2](https://github.com/PCRE2Project/pcre2). I don't know about you guys, but that got old. It's a hell of a lot easier to handle these requirements in higher level languages. But, I need the speed here because I want this application to represent the best of what I can do... not half arse it because it's easy. I wanna be proud of this; otherwise, I'd just use JavaScript/Node.js. So, that brings me to Zig (yes, I said it :laugh:). If I were to give a 2 second overview, Zig is to C as Rust is to C++. And that really, really got me interested. I'm an old fart, and this is a new smell. Cool. However... Despite all the niceties of Zig, it's still young with 1.0 being years away I'm sure. It can do web requests, but that just came out months ago and it cannot connect to some [TLS servers](https://github.com/ziglang/zig/issues/17446). Which means, I'd still be using `libcurl` anyway to be able to reliably do web requests... just in Zig. I'm sure it'll improve in time, but that may be a couple years from now. It's still so young. Same thing goes with regex, there are _some_ regex libraries by people, but nothing official as part of the language yet. And, the ok "zig style" third party ones I've seen don't support UTF-8 for instance. So, for now, I'd still be using `libpcre2` as well. Edit: There is POSIX regex, but ideally this app would be cross platform and that would still be C-style anyway. I want something new (a lot); I'm not afraid of moving on from C if I can find something that has the same philosophy of it (KISS). But, I also want things to work reliably. And unfortunately, it may be that Zig is still too young for this for the next couple of years. There's absolutely nothing preventing me from using C libraries in Zig. So, I can use these libraries and just eventually migrate over to the "zig way" in
I'd answer your question in a language agnostic manner. You're not being stupid, but being cautious. To me, whether you need to be that cautious or not is entirely up to you. You mention that it's a 'personal' project with no time constraints. In the pure sense of that, you can throw caution to the wind and have fun! But, if the definition of personal means that you might hope that it turns into an MVP down the road, I'd stay with the tried and true. Aside from being the shiny object, would Zig get you where you want to be that much faster? Along with realizing that it may never get to 1.0. Sometimes the back of your head has the right answer even though your eyes may see it another way :)
-
Please no zealot type replies. Looking for intellectual discourse amongst those not afraid of change, based on real life experience, etc. I also realize the target audience here will always lean towards C-style languages, so please be objective. But, I'm torn. For this project I'm about to embark on, I have two mandatory requirements. Everything is optional. 1) It's gotta be able to do web requests. 2) I gotta be able to know I can do regex... should I need it. Regex has saved my butt so many times I will never use a language without. Just won't happen. So, back in the day, in C at least, for these two solves I would just use [libcurl](https://curl.se/libcurl/) and [libpcre2](https://github.com/PCRE2Project/pcre2). I don't know about you guys, but that got old. It's a hell of a lot easier to handle these requirements in higher level languages. But, I need the speed here because I want this application to represent the best of what I can do... not half arse it because it's easy. I wanna be proud of this; otherwise, I'd just use JavaScript/Node.js. So, that brings me to Zig (yes, I said it :laugh:). If I were to give a 2 second overview, Zig is to C as Rust is to C++. And that really, really got me interested. I'm an old fart, and this is a new smell. Cool. However... Despite all the niceties of Zig, it's still young with 1.0 being years away I'm sure. It can do web requests, but that just came out months ago and it cannot connect to some [TLS servers](https://github.com/ziglang/zig/issues/17446). Which means, I'd still be using `libcurl` anyway to be able to reliably do web requests... just in Zig. I'm sure it'll improve in time, but that may be a couple years from now. It's still so young. Same thing goes with regex, there are _some_ regex libraries by people, but nothing official as part of the language yet. And, the ok "zig style" third party ones I've seen don't support UTF-8 for instance. So, for now, I'd still be using `libpcre2` as well. Edit: There is POSIX regex, but ideally this app would be cross platform and that would still be C-style anyway. I want something new (a lot); I'm not afraid of moving on from C if I can find something that has the same philosophy of it (KISS). But, I also want things to work reliably. And unfortunately, it may be that Zig is still too young for this for the next couple of years. There's absolutely nothing preventing me from using C libraries in Zig. So, I can use these libraries and just eventually migrate over to the "zig way" in
Stick with C or move to C++. We also now have Rust. Anything else and you could be risking more than you would want...
Steve Naidamast Sr. Software Engineer Black Falcon Software, Inc. blackfalconsoftware@outlook.com
-
I'd answer your question in a language agnostic manner. You're not being stupid, but being cautious. To me, whether you need to be that cautious or not is entirely up to you. You mention that it's a 'personal' project with no time constraints. In the pure sense of that, you can throw caution to the wind and have fun! But, if the definition of personal means that you might hope that it turns into an MVP down the road, I'd stay with the tried and true. Aside from being the shiny object, would Zig get you where you want to be that much faster? Along with realizing that it may never get to 1.0. Sometimes the back of your head has the right answer even though your eyes may see it another way :)
MikeCO10 wrote:
To me, whether you need to be that cautious or not is entirely up to you.
Good point. Think I'm just in over worry mode, because that's what good times are made of. :laugh:
MikeCO10 wrote:
But, if the definition of personal means that you might hope that it turns into an MVP down the road, I'd stay with the tried and true.
Good point. This project is personal to me, but it still needs to function as if it were not. I'll never resale it as I do not want to support it, but it needs to be rock solid no different than a commercial app.
MikeCO10 wrote:
Aside from being the shiny object, would Zig get you where you want to be that much faster? Along with realizing that it may never get to 1.0. Sometimes the back of your head has the right answer even though your eyes may see it another way
You speak from experience. :) I'll admit I did get caught up in the new shiny object thing a bit since AFAIK there hasn't been a viable "C 2.0" as it were until now IMO. I'm pretty sure they're serious enough to take it to 1.0, but yeah you're right... either way it's a gamble.
Jeremy Falcon
-
Do you have time/energy to do both Zig and C, side-by-side? Could be some useful results from that, both for you and others, and if you start seeing problems on the Zig side, you've got a fallback.
Good question... not sure I do have the energy. :laugh: If I had to pick one (to do both) though I'd have to stick with C. Zig ships with a C translator to Zig but nothing exists the other way around.
Jeremy Falcon
-
Mike Hankey wrote:
- Is time a factor?
Yes and no. No in the fact I don't have a deadline, but I'm not gonna do this is in assembly. :laugh:
Mike Hankey wrote:
- Is this a personal project of for client/
Personal. I'd never use Zig in the enterprise just yet. It's too young and the docs/books aren't out there. Which means it would be harder to find and train devs on it. Maybe in 10 years, but definitely not now.
Mike Hankey wrote:
Problem was the project manager selected BETA software to run the plant.
:wtf:
Mike Hankey wrote:
We spent months debugging their software and in the end cost me a marriage, no lose there but the company got sued.
Ha ha ha ha ha. To that point, I'd never use a language I can't unit test in. Fortunately, I can unit test in C and Zig.
Mike Hankey wrote:
Upshot is: If you have the time for ZIG to evolve and mature, use it if there are constraints I'd say go with what you know.
I do as I can at least do things C-style for now. I think I'm just having a hard time of letting go of my old buddy... sitting back in the corner saying "did you forget about me? sniff sniff" :laugh:
Mike Hankey wrote:
Just my two sense. :)
Great points man.
Jeremy Falcon
I would throw out one other consideration that we sometimes overlook at the beginning of a project: Language performance is sometimes (sometimes) misleading. Yes, a language with garbage collection does not fit a situation with real time requirements. But if you break your work up into transactions, for the sake of a white board, where is the time spent? You mentioned network requests. Those can typically run forever compared to most of the processing between. I'm not recommending Python, but why do folks use it? It's got to be at the far end of slow. Development is fast, but that may not make up for the slowness. Oh, got large matrices? Lots of matrix math? It's the choice. Languages such as GO and Swift often compensate for their performance flaws with access to great algorithm libraries and debug tools. For myself, I always want a good development and debug environment. Also, you identified one important requirement: whatever language you choose, it needs to be able to call out to C libraries. If you meet this last requirement, then it seems that you are good to go. Good luck and wishing you fun times with your project.
-
I would throw out one other consideration that we sometimes overlook at the beginning of a project: Language performance is sometimes (sometimes) misleading. Yes, a language with garbage collection does not fit a situation with real time requirements. But if you break your work up into transactions, for the sake of a white board, where is the time spent? You mentioned network requests. Those can typically run forever compared to most of the processing between. I'm not recommending Python, but why do folks use it? It's got to be at the far end of slow. Development is fast, but that may not make up for the slowness. Oh, got large matrices? Lots of matrix math? It's the choice. Languages such as GO and Swift often compensate for their performance flaws with access to great algorithm libraries and debug tools. For myself, I always want a good development and debug environment. Also, you identified one important requirement: whatever language you choose, it needs to be able to call out to C libraries. If you meet this last requirement, then it seems that you are good to go. Good luck and wishing you fun times with your project.
Great points all around.
Bill_M wrote:
Good luck and wishing you fun times with your project.
Thanks man.
Jeremy Falcon
-
You can challenge it all you want. That means nothing to me. Now, I'm just gonna assume you're not flat-out lying about this little CTO thing you got in your bio... But, if you reread the post, I mention needing to handle web requests. Now, can you imagine the need to able to parse a body response that many or may not be what you anticipated? Ever use the web before, where people say they're RESTful but they're not... especially in error conditions? I could go on, but you already missed the entire point of the post man. :|
Jeremy Falcon
-
breath Jeremy. :)
Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.
Ok ok, I'll go crawl back into my corner. :laugh: :laugh: :laugh:
Jeremy Falcon
-
Ok ok, I'll go crawl back into my corner. :laugh: :laugh: :laugh:
Jeremy Falcon
lol, you are clearly passionate about what you are doing. I recognize the psych profile.
Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.
-
lol, you are clearly passionate about what you are doing. I recognize the psych profile.
Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.
You know me well, man. :-O
Jeremy Falcon
-
Bruh... bro... dude... You uh, eggshells much?
Jeremy Falcon
-
Uh, brohan, from someone who doesn't give a crap either way, he could be saying the same to you.
I'm sure you feel better now, but nope... try again dude.
Jeremy Falcon