|
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.
|
# ? Dec 1, 2022 09:33 |
|
|
# ? Apr 26, 2024 23:15 |
|
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.
|
# ? Dec 1, 2022 11:31 |
|
c is at its best when programming like you're in the 1970s
|
# ? Dec 1, 2022 12:09 |
|
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
|
# ? Dec 1, 2022 12:12 |
|
man who wrote this phalcon model, there are relationships defined that don't exist in the database
|
# ? Dec 1, 2022 12:12 |
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
|
|
# ? Dec 1, 2022 12:42 |
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
|
|
# ? Dec 1, 2022 12:42 |
|
I know someone whos doing advent of code in K&R C this year. gcc was not pleased when they tried to compile their day 1 solution lmao
|
# ? Dec 1, 2022 12:57 |
Kazinsal posted:I know someone whos doing advent of code in K&R C this year. gcc was not pleased when they tried to compile their day 1 solution lmao
|
|
# ? Dec 1, 2022 13:13 |
|
sb hermit posted:C is the closest I'll get to feeling alive. 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)
|
# ? Dec 1, 2022 15:04 |
|
"I feel like I'm flying!" - a C developer as they re-implement a resizeable string worse than anyone has since 1983
|
# ? Dec 1, 2022 15:08 |
|
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
|
# ? Dec 1, 2022 15:16 |
|
champagne posting posted:flying and falling has this funny quality that they feel the same until they dont
|
# ? Dec 1, 2022 15:27 |
|
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/ 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.
|
# ? Dec 1, 2022 17:30 |
|
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
|
# ? Dec 1, 2022 17:32 |
|
Xarn posted:People who like C, wtf is wrong with you?
|
# ? Dec 1, 2022 17:42 |
|
Presto posted:Nothing wrong with liking the best language OP. C is indeed the best compiled language followed by Rust.
|
# ? Dec 1, 2022 17:44 |
|
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
|
# ? Dec 1, 2022 18:03 |
|
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
|
# ? Dec 1, 2022 18:26 |
|
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.
|
# ? Dec 1, 2022 18:26 |
|
my brother, have your heard the word of the standard committee and the good news of the spaceship operator???
|
# ? Dec 1, 2022 18:36 |
|
more like spacepoop
|
# ? Dec 1, 2022 18:38 |
correct, we're halfway into day 1. i guess as a low effort psa, spoiler your solutions to aoc if you discuss them here
|
|
# ? Dec 1, 2022 18:41 |
Deep Dish Fuckfest posted:now lemme tell you about decltype(auto) no, i object
|
|
# ? Dec 1, 2022 18:42 |
|
cinci zoo sniper posted:no, i object Terrible programming: No, I object.
|
# ? Dec 1, 2022 18:49 |
|
*foaming at the mouth* constexpr consteval constinit!! const! const!!
|
# ? Dec 1, 2022 18:57 |
|
Dont use malloc on C++ or youll be in a heap of trouble
|
# ? Dec 1, 2022 18:58 |
|
placement new! call destructor manually! yes yessss
|
# ? Dec 1, 2022 18:59 |
|
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
|
# ? Dec 1, 2022 18:59 |
|
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.
|
# ? Dec 1, 2022 19:02 |
|
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.
|
# ? Dec 1, 2022 19:03 |
|
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.
|
# ? Dec 1, 2022 19:51 |
|
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
|
# ? Dec 1, 2022 19:52 |
|
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
|
# ? Dec 1, 2022 19:54 |
|
Private Speech posted:C++ is kindof the same, don't go completely crazy and stick to conventions and you'll get good results "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
|
# ? Dec 1, 2022 19:57 |
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
|
|
# ? Dec 1, 2022 20:44 |
|
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"
|
# ? Dec 1, 2022 21:25 |
|
No there's very few things that can go wrong. It's just that those things can have far-reaching and wildly varying effects.
|
# ? Dec 1, 2022 21:28 |
|
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
|
# ? Dec 1, 2022 21:42 |
|
|
# ? Apr 26, 2024 23:15 |
|
I multiplied two unsigned values, why is there UB everywhere now?
|
# ? Dec 1, 2022 21:54 |