Conversation

Wanderer atop the sea of clouds or whatever

kinda weird that in C you still have to do -lfoo to link against a system library. I thought the whole point of #include <bar/foo.h> in that style was that the <> indicate to look for it in the system path. Why can't the compiler link them for me?

Crazy that nobody thought to make a C-like language plus like two small improvements. Two pluses, basically. Someone should make that.
5
0
1
@WandererUber >Crazy that nobody thought to make a C-like language plus like two small improvements. Two pluses, basically. Someone should make that
2
4
4
@WandererUber g++ doesn't make you pass in linker flags at compile time?
1
0
0
@WandererUber
>man has not thought about system-level archetecture
1
0
0
there's actually two others I didn't know about, C2 and C3
0
0
1

Wanderer atop the sea of clouds or whatever

Missed the joke?
1
0
1
@WandererUber probably. all i got was "haha c++ better" and nothing more
1
0
0

Wanderer atop the sea of clouds or whatever

okay I can explain it to you. It was that c++ adds a bunch of garbage but doesn't even fix these things
1
0
1
If I had, I would have come to the conclusion that my compiler can not have any conveniences invented later than 1874
1
0
0
@WandererUber
just wait until you have to write a linker script
0
0
0
@WandererUber everything is manual in C. Headers traditionally only include function prototypes and data type definitions. You can define full functions in a header only if you declare a function with the keywords "static inline" and that is actually a nonstandard extension that is just widely supported. If you declare a function in a header without it you will have link errors if you include it from more than one C file.
1
0
2
@icst @WandererUber C tends to make a lot more sense to people when viewed as being a first abstraction over common assembly patterns. I'm becoming more firm over time in the idea that assembly should be taught before C in order to really "get" it
2
0
2
I like how you guys are explaining it historically as if that's a good reason for it.
The compiler should not be like this anymore is what I am saying. What ends up happening is people write half their program in make and C preprocessor, not C. That's kinda silly. And has basically nothing to do with assembly patterns.
2
0
1
@WandererUber @binkle @icst
ok cool we get rid of the preprocessor, nice libraries are whatever

technically most modern language """compilers""" are wrappers around the proper compiler than handle all of that anyway.

>What ends up happening is people write half their program in make and C preprocessor, not C.
Do you even know what youre talking about
1
0
1
@WandererUber @icst I guess it depends what you mean by a "good" reason - it was a good reason at the time of C's creation, because those were the problems we were setting out to solve at the time. That it doesn't always solve modern problems in an elegant way shouldn't be surprising, as no language is future-proofed in perfect elegance and is always solving some set of problems elegantly at the expense of others being less so

the one exception of course is MY language that I have yet to write which will be elegant in all cases frothvibrate
1
0
0
yes
0
0
1
@binkle @icst @WandererUber huh... yeah I've been kinda struggling with C and avoiding ASM but thinking about it that makes a lot of sense
0
0
1
>That it doesn't always solve modern problems in an elegant way shouldn't be surprising
That's not what was the "surprising" aspect of my post. The fact nobody was able to fix this once computers had more than 2 megabytes of RAM is what's "surprising"

There's no way they could have known what sorts of hellspawn abominations would come out of their "conveniences" from back then and now that people know, they don't want to do it the C way anymore.
Other languages of course have their own versions of dependency hell, but C's is particularly antiquated. Headers are annoying and everyone agrees basically.
1
0
1
@WandererUber @icst oh I see I thought you were bothered by C itself not doing that. Yeah I think a big part of it is a psychological thing on the part of language designers - they want to do something "BIG" not just a few changes. I joke about JBlow a lot but I do think the way Jai started out was exactly what you want. These days it still has those improvements but it also has a lot of metaprogramming conveniences that are the "BIG" thing. I think Zig and Odin might also scratch a similar itch but I haven't looked much into them
2
0
0
>Jai Zig Odin
I knew about those and plan to learn them, but since they deviate so much I felt like getting back into C first. They all removed headers and preproc macros btw, because it's anachronistic.

Blow is REALLY cooking with Jai, I'm pretty sure.

>oh I see I thought you were bothered by C itself not doing that
Well I mean it is what it is. But obviously everyone who knows anything is bothered by it at this point.
It was a bit of a jokey OP, but my idea was "why isn't anyone simply breaking the standard?", if you know what I mean. If gcc added any of this there would be a freakout, but if someone wrote some tooling that acted like a shim and just brute-forced it, i.e. rewrote all header imports to .c imports and stuff so that "old-style" C would compile but you could use these new conveniences in YOUR code, I think it would take off.
Especially with anyone new googling stuff about C.
"If I use this, I never have to deal with this crap again and can focus on putting buffer overflow bugs into my string functions? Great."
1
0
1
@WandererUber @icst I think that's the idea behind C++20's modules but I haven't seen them get wide adoption (at least not in the sphere I'm in)
0
0
0
@binkle @WandererUber I remember Sterence talking about having tried Zig and Odin because he couldn't stand the build setup annoyance of C but had lots of different problems with each and eventually settled on using D for his projects.
2
0
1
@icst @binkle @WandererUber sterence is one of those people (like me) who hates having to adapt his style to a framework, he wants to organize things how he wants and not worry too much with standards.

I'm trying to get out of that headspace, trying to stick to the patterns everyone else uses in whatever language I'm writing in, but holy shit some of them are stupid and annoying
0
0
1
someone should make a compiler for python
1
0
0
who is that again?
1
0
1
@WandererUber @binkle
@Sterence / @Stererence
tldr if you actually weren't around back then he ran an instance from 2021-2023 and left fedi after shutting it down. A lot of people on Cyberia had accounts there back then. Hes still around in places outside of fedi though
1
0
1