Click here to Skip to main content
16,004,653 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: This is the best description ever... Pin
PIEBALDconsult24-Aug-24 9:51
mvePIEBALDconsult24-Aug-24 9:51 
GeneralRe: This is the best description ever... Pin
Jeremy Falcon24-Aug-24 9:53
professionalJeremy Falcon24-Aug-24 9:53 
GeneralRe: This is the best description ever... Pin
Amarnath S24-Aug-24 15:09
professionalAmarnath S24-Aug-24 15:09 
GeneralRe: This is the best description ever... Pin
Jeremy Falcon24-Aug-24 15:13
professionalJeremy Falcon24-Aug-24 15:13 
GeneralCatmeat is doing code reviews while perched on my shoulders Pin
honey the codewitch24-Aug-24 4:31
mvahoney the codewitch24-Aug-24 4:31 
GeneralRe: Catmeat is doing code reviews while perched on my shoulders Pin
Mike Hankey24-Aug-24 4:46
mveMike Hankey24-Aug-24 4:46 
GeneralRe: Catmeat is doing code reviews while perched on my shoulders Pin
Richard Andrew x6424-Aug-24 9:19
professionalRichard Andrew x6424-Aug-24 9:19 
QuestionTell me if I'm being stupid... Pin
Jeremy Falcon24-Aug-24 3:56
professionalJeremy Falcon24-Aug-24 3:56 
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 and libpcre2.

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 | :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. 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 the future. That's the route I'm leaning towards. But, there's something in the back of my head saying... if you're doing it the C way, just use C - duh. It's your buddy. It's your pal. Y'all have been places together.

So, am I being stupid or am I just overthinking this or both? Blush | :O
Jeremy Falcon


modified 24-Aug-24 11:55am.

AnswerRe: Tell me if I'm being stupid... Pin
dandy7224-Aug-24 4:17
dandy7224-Aug-24 4:17 
GeneralRe: Tell me if I'm being stupid... Pin
Jeremy Falcon24-Aug-24 4:26
professionalJeremy Falcon24-Aug-24 4:26 
GeneralRe: Tell me if I'm being stupid... Pin
dandy7224-Aug-24 5:17
dandy7224-Aug-24 5:17 
GeneralRe: Tell me if I'm being stupid... Pin
Peter Jamieson25-Aug-24 20:21
Peter Jamieson25-Aug-24 20:21 
GeneralRe: Tell me if I'm being stupid... Pin
Jeremy Falcon26-Aug-24 7:07
professionalJeremy Falcon26-Aug-24 7:07 
AnswerRe: Tell me if I'm being stupid... Pin
Mike Hankey24-Aug-24 4:20
mveMike Hankey24-Aug-24 4:20 
GeneralRe: Tell me if I'm being stupid... Pin
Jeremy Falcon24-Aug-24 4:35
professionalJeremy Falcon24-Aug-24 4:35 
GeneralRe: Tell me if I'm being stupid... Pin
Bill_M26-Aug-24 10:28
Bill_M26-Aug-24 10:28 
GeneralRe: Tell me if I'm being stupid... Pin
Jeremy Falcon26-Aug-24 10:55
professionalJeremy Falcon26-Aug-24 10:55 
AnswerRe: Tell me if I'm being stupid... Pin
PIEBALDconsult24-Aug-24 5:11
mvePIEBALDconsult24-Aug-24 5:11 
GeneralRe: Tell me if I'm being stupid... Pin
Jeremy Falcon24-Aug-24 5:17
professionalJeremy Falcon24-Aug-24 5:17 
AnswerRe: Tell me if I'm being stupid... Pin
theoldfool24-Aug-24 5:44
professionaltheoldfool24-Aug-24 5:44 
AnswerRe: Tell me if I'm being stupid... Pin
megaadam24-Aug-24 6:05
professionalmegaadam24-Aug-24 6:05 
GeneralRe: Tell me if I'm being stupid... Pin
Jeremy Falcon24-Aug-24 6:32
professionalJeremy Falcon24-Aug-24 6:32 
GeneralRe: Tell me if I'm being stupid... Pin
megaadam24-Aug-24 7:20
professionalmegaadam24-Aug-24 7:20 
GeneralRe: Tell me if I'm being stupid... Pin
Jeremy Falcon24-Aug-24 7:55
professionalJeremy Falcon24-Aug-24 7:55 
GeneralRe: Tell me if I'm being stupid... Pin
thewazz27-Aug-24 8:57
professionalthewazz27-Aug-24 8:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.