Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
sb hermit
Dec 13, 2016





C is the closest I'll get to feeling alive.

It's so easy to see how code translates into assembly and back in order to really get that sweet sweet control over your hardware when writing device drivers.

But I still want to write new drivers in Rust. Gonna be so much better.

Adbot
ADBOT LOVES YOU

MrMoo
Sep 14, 2000

Xarn posted:

People who like C, wtf is wrong with you?

It is simple and not much can go wrong. Anything else and there are always language bugs and severe limitations. All the classics: string handling & UTF-8, memory management, networking, threading, and multi-processing.

redleader
Aug 18, 2005

Engage according to operational parameters
c is at its best when programming like you're in the 1970s

Kazinsal
Dec 13, 2011



there's also something really unique about the feeling of writing bare metal code and seeing it boot for the first time and C is great for that

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



man who wrote this phalcon model, there are relationships defined that don't exist in the database

cinci zoo sniper
Mar 15, 2013




redleader posted:

c is at its best when programming like you're in the 1970s

ah, is it so rough that you cry in a way that is reminiscent of coding in a cigarette smoke-filled room

cinci zoo sniper
Mar 15, 2013




also surely this is the year where i participate in the advent of code. it's only day 2, i still have 30 days to decided whether if i'd like to do it in typescript or go

Kazinsal
Dec 13, 2011



I know someone who’s doing advent of code in K&R C this year. gcc was not pleased when they tried to compile their day 1 solution lmao

cinci zoo sniper
Mar 15, 2013




Kazinsal posted:

I know someone who’s doing advent of code in K&R C this year. gcc was not pleased when they tried to compile their day 1 solution lmao

:staredog:

Twerk from Home
Jan 17, 2009

This avatar brought to you by the 'save our dead gay forums' foundation.

sb hermit posted:

C is the closest I'll get to feeling alive.

It's so easy to see how code translates into assembly and back in order to really get that sweet sweet control over your hardware when writing device drivers.

But I still want to write new drivers in Rust. Gonna be so much better.

The new hotness is writing kernel mode drivers in Python, grandpa: https://asahilinux.org/2022/11/tales-of-the-m1-gpu/

(Used as a prototype for the real thing in rust)

Twerk from Home
Jan 17, 2009

This avatar brought to you by the 'save our dead gay forums' foundation.
"I feel like I'm flying!" - a C developer as they re-implement a resizeable string worse than anyone has since 1983

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER

Twerk from Home posted:

"I feel like I'm flying!" - a C developer as they re-implement a resizeable string worse than anyone has since 1983

flying and falling has this funny quality that they feel the same until they dont

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

champagne posting posted:

flying and falling has this funny quality that they feel the same until they dont
"The knack lies in learning how to throw yourself at the ground and miss."

sb hermit
Dec 13, 2016





Twerk from Home posted:

The new hotness is writing kernel mode drivers in Python, grandpa: https://asahilinux.org/2022/11/tales-of-the-m1-gpu/

(Used as a prototype for the real thing in rust)

that's pretty cool

I prototype a lot of things in python before rewriting it in C, but I really should be switching from C to Rust.

sb hermit
Dec 13, 2016





cinci zoo sniper posted:

also surely this is the year where i participate in the advent of code. it's only day 2, i still have 30 days to decided whether if i'd like to do it in typescript or go

Is that this?

https://en.m.wikipedia.org/wiki/Advent_of_Code

Presto
Nov 22, 2002

Keep calm and Harry on.

Xarn posted:

People who like C, wtf is wrong with you?
Nothing wrong with liking the best language OP.

FlapYoJacks
Feb 12, 2009
Probation
Can't post for 2 hours!

Presto posted:

Nothing wrong with liking the best language OP.

C is indeed the best compiled language followed by Rust.

Xarn
Jun 26, 2015

MrMoo posted:

It is simple and not much can go wrong.

Twerk from Home posted:

"I feel like I'm flying!" - a C developer as they re-implement a resizeable string worse than anyone has since 1983

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal
why would you use C when modern C++ is right there and offers you the same performance or even better all with the convenience of a modern language?

now lemme tell you about rvalue references and decltype(auto) and how substitution failure in template parameters is not an error and that time when i found a bug in a version of gcc because of some weird interaction between two phase lookup and argument dependent lookup

MrMoo
Sep 14, 2000

The language itself has minimal scope for errors, obviously anything a developer creates above is going to be super 💩

C++ almost guarantees developers making super 💩 above.

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal
my brother, have your heard the word of the standard committee and the good news of the spaceship operator???

Xarn
Jun 26, 2015
more like spacepoop

cinci zoo sniper
Mar 15, 2013





correct, we're halfway into day 1. i guess as a low effort psa, spoiler your solutions to aoc if you discuss them here

cinci zoo sniper
Mar 15, 2013




Deep Dish Fuckfest posted:

now lemme tell you about decltype(auto)

no, i object

FlapYoJacks
Feb 12, 2009
Probation
Can't post for 2 hours!

Terrible programming: No, I object.

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal
*foaming at the mouth* constexpr consteval constinit!! const! const!!

FlapYoJacks
Feb 12, 2009
Probation
Can't post for 2 hours!
Don’t use malloc on C++ or you’ll be in a heap of trouble :v:

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal
placement new! call destructor manually! yes yessss

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

MrMoo posted:

It is simple and not much can go wrong.

anyone who says this about C doesn't know the first thing about C

Xarn
Jun 26, 2015
Before we dig into decltype(auto), we need to talk about how decltype(x) and decltype((x)) are different things, and when do we want to use each one. :eng101:

FlapYoJacks
Feb 12, 2009
Probation
Can't post for 2 hours!

DELETE CASCADE posted:

anyone who says this about C doesn't know the first thing about C

C is a simple revolver pointed at your foot with your finger on the trigger.

Sapozhnik
Jan 2, 2005

Nap Ghost

DELETE CASCADE posted:

anyone who says this about C doesn't know the first thing about C

works for me op

sticking to well-established conventions in C can get you surprisingly far. the temptation is always there to encode those conventions into a smarter compiler for a smarter language but then it turns into the usual problem where the first 80% of that task is easy and the remaining 20% is a nightmare caldera of complexity, as c++ and golang demonstrate. the nice thing about conventions versus language features is that they can be bent. the disadvantage is, of course, that this will get you into trouble sooner or later.

probably not the greatest lang to use in the modern security-sensitive internet landscape on account of things like integer overflows potentially lurking everywhere etc but it does still have its uses.

whatever language fully digests all of the lessons of the making-it-up-as-we-go rust experiment and files them down into something more compact and coherent is going to be pretty nice to work with i think.

CPColin
Sep 9, 2003

Big ol' smile.
Every time I do Advent of Code I get about a week in and then it's like "use the thing you hated from two days ago and expand it to do more weird poo poo oh and also we secretly got some of the requirements wrong last time lol" and I get bored and give up

Private Speech
Mar 30, 2011

I HAVE EVEN MORE WORTHLESS BEANIE BABIES IN MY COLLECTION THAN I HAVE WORTHLESS POSTS IN THE BEANIE BABY THREAD YET I STILL HAVE THE TEMERITY TO CRITICIZE OTHERS' COLLECTIONS

IF YOU SEE ME TALKING ABOUT BEANIE BABIES, PLEASE TELL ME TO

EAT. SHIT.


C++ is kindof the same, don't go completely crazy and stick to conventions and you'll get good results

decltype is banned outside of insanely rare exceptions, for one

Sapozhnik
Jan 2, 2005

Nap Ghost

Private Speech posted:

C++ is kindof the same, don't go completely crazy and stick to conventions and you'll get good results

decltype is banned outside of insanely rare exceptions, for one

"don't use the vast majority of the language features or the standard library" isn't the ringing endorsement of c++ you think it is

i know that's not what you said but that's the form that your advice takes in practice

cinci zoo sniper
Mar 15, 2013




CPColin posted:

Every time I do Advent of Code I get about a week in and then it's like "use the thing you hated from two days ago and expand it to do more weird poo poo oh and also we secretly got some of the requirements wrong last time lol" and I get bored and give up

i haven't joined it in a few years but apparently since like 2019 or 2020 they've stopped interlinking tasks

bob dobbs is dead
Oct 8, 2017

I love peeps
Nap Ghost

DELETE CASCADE posted:

anyone who says this about C doesn't know the first thing about C

"it is very simple and more things can go wrong than you can possibly imagine"

Presto
Nov 22, 2002

Keep calm and Harry on.
No there's very few things that can go wrong. It's just that those things can have far-reaching and wildly varying effects.

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal
the standard says this is undefined behavior, you did that exact thing, and now you're getting undefined behavior. working as intended, i don't know why you're complaining

Adbot
ADBOT LOVES YOU

Xarn
Jun 26, 2015
I multiplied two unsigned values, why is there UB everywhere now? :v:

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply