[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
▼ Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: IMG_2195.png (611 KB, 1440x1297)
611 KB PNG
You’re an average unix or windows system dev who uses C in 2026, Why? The same work you do can be achieved much faster and explored better in a language like Rust or even C++ by picking importing the relevant parts of std into your projects.
>>
>>110282137
>The same work you do can be achieved much faster and explored better in a language like Rust or even C++
The same work you do can be achieved much faster and explored better with AI.
>>
>>110282148
imagine having an llm parse requests instead of an http server
unfathomably based
>>
>>110282137
Because you can expect C11 to compile for the next 50 years, and the tools for verifying, linting, and analyzing C are the best they've ever been, see: the CVE apocalypse right now, which is the result of these advances. C++ is untenable outside of a few domains and Rust is not yet sufficiently static aka "done", nor ubiquitous. I feel that the fate of Rust will be something else that uses its core but provides more C/C# like ergonomics (C for bare metal, C# for abstraction). However, I don't really give a shit. I am tired of technology tinkertrannying and how software can no longer be done. Therefore I write my own shit in a language that is essentially done, taking no real opinion on whatever the rest of you faggots do.
>>
>>110282287
>nocoder + never compiled anything tech illiterate
>>
>>110282137
Daily bait thread. Retarded OP.
>>
>>110282287
In practice gcc and clang will break your code on a whim. gcc and clang were a disaster for computing, they turned every C/C++ codebase into a minefield. Its not possible to write an operating system in C without running into undefined behavior, which means gcc and clang could break you code at any time.
>>
>>110282137
>The same work you do can be achieved much faster and explored better in a language like Rust or even C++ by picking importing the relevant parts of std into your projects.
I like to have control of everything the program does. Also the guy in the pic is not an expert.
>>
>>110282189
unironically gonna work that way in 15 years if we're still around by then
>>
>>110282652
If you reread my post, it should be clear I'm not talking about implementing operating systems, but rather writing normal programs and library code. It's quite rare for gcc/clang to have true regressions that aren't in part due to UB. I haven't encountered one myself since gcc 4.x, and even that was within a gcc extension I didn't really need to be using. C11/17 and probably 23 plus POSIX is literally immortal at this point.
>>
>>110282948
You can't implement malloc in C, your can't write a custom pool allocator. Anything that handles memory and pointers is suspect in C. gcc and clang will mangle your code, and they do so in other ways too.
>>
>>110282652
>gcc and clang will break your code on a whim
Only happens if you're a midwit who does 5 UBs per line (average on /g/).
>>
>>110282992
You certainly can with C + POSIX. Think about it: in the degenerate case you just round the request up to the nearest page size multiple and back the memory with an anonymous mmap(2). I'm not sure what point you're trying to make here. Is C and POSIX prickly and a pain in the ass? Sure. Are complicated things impossible? Generally no.
>>
>>110283059
Memory allocators are undefined behavour. If you for example wrote malloc and free in C, that is undefined behavior and so gcc and clang could technically break the code.
>>
>>110283183
Again, things undefined by the C standard needed to actually _do_ things are defined by POSIX, although typically annoyingly. As I previously noted, you can use C + POSIX to implement your own memory allocator.

This is the mmap man page: https://www.man7.org/linux/man-pages/man2/mmap.2.html Right off the bat, you see this:

>mmap() creates a new mapping in the virtual address space of the calling process. [...] If addr is NULL, then the kernel chooses the (page-aligned) address at which to create the mapping [...]

None of: mapping, virtual address space, process, and kernel are defined by C. They are defined by POSIX:

>STANDARDS: POSIX.1-2024
>HISTORY: SVr4, 4.4BSD, SUSv1, POSIX.1-1996

You need to develop a better understanding of how things actually work in practice.
>>
>>110283364
>POSIX
ngmi
>>
>>110282137
Who is funding these rust shill threads?
>>
>>110283026
>another nocoder tech illiterate who also never compiled real software EVER
>>
>>110283392
Me.
>>
>>110282189
>imagine having an llm parse requests instead of an http server
I genuinely hope some vibeshitter does that
>>
>>110283378
Brutal cope.
>>
>>110283432
How do I join? I can shill 20 rust threads per day if the pay is good.
>>
File: IMG_0281.png (642 KB, 700x867)
642 KB PNG
>>110283460
>>
>>110282137
Why does everything have to be about "being fast" all the time? What are you all constantly rushing towards?
>>
>>110282287
this right here, C is legitimately the best systems programming language. blazing fast compilation (the largest personal project is 50k LOC and it compiles and links under a second, which means I just iterate on it without compiler being a bottleneck), I use PVS-Studio for static analysis which is excellent, I run clang-tidy over it as well, visual studio debugger is still the best in class but raddebugger is quickly closing the gap. there was genuinely never a better moment to be a C programmer than now. rust has much worse developer experience because of retarded compile times, already fragmented ecosystem, lack of tools and retarded, off-putting trannies pushing it all the time, also it's not a true low level systems programming language, you fight borrow checker for basically no benefit because apart from the most trivial lifecycles, memory lifetime can't be inferred at compile time so you are forced to have your structures to be reference counted
>>
>>110283470
Yes I am trans and I love Rust. What are you trying to say?
>>
>>110283498
I was trying to imply you're trans and love rust.
>>
>>110283447
Nice projection
>>
>>110282137
When whatsapp started they had a single server written in c that processed billions of messages per day. How many jeet.js or jython servers would it take to do the same? 1000 kubernetes clusters?
>>
>>110283364
You totally misunderstand the problem. Because of strict aliasing. Its undefined behavior to implement a heap allocator. mmap is not relevant to this issue, does not matter where you find the underlying memory carving it up and handing it out is the problem.
>>
>>110282189
nigger, in the future the internet is just gonna be agents messaging prompts to other agents.
The protocols we use today will be osbolete
There will be no websites, there will be no web at all. The "browser" is just an agent that goes out and asks agents on the internet for stuff, and then generates something for you on the fly.
>>
>>110284078
And a central government-partnered "company" that runs these agents and gets to see and control everything everyone is doing at all times.
>>
>>110282137
Does 2026 mean anything, even rust PR-spam has been overtaken by AI spam ex the slop prompt "devs".
>>
>>110282671
> in 15 years
more like in 1-3...
>>
>>110283922
There are two conceptual issues that are non-issues in practice. The first is aliasing, that technically it is an aliasing violation to repurpose byte storage (array of unsigned char) of appropriate alignment. This has been fixed in C2y and as a result it will continue to work retroactively as it has been.

The second is that you're wrong about systems that support POSIX or POSIX-like things like mmap(). Essentially this returns a C object akin to malloc which does not have a declared type and thus which cannot have declared/accessed aliasing conflicts.
>>
>>110285592
Memory allocators don't hand mmap directly to the user.
>>
>>110287722
mmap _is_ a memory allocator called directly by the user you fucking dumbass.
>>
File: C-unity-of-purpose.png (216 KB, 590x572)
216 KB PNG
>>110282287
>>110283486
Unfathomably based. You two said everything I wanted to.
>>
>>110282287
Based.
>>
File: file.png (103 KB, 1546x761)
103 KB PNG
>>110288143
one more comment in terms of memory management: I use arenas for that almost exclusively, it's the same type ryan fleury used in raddebugger, about 95% of my allocations go through it, they are amazing, not only they function as de facto automatic memory management but they also don't have any contention, which is unbeatable even when you compare against jemalloc
>>
>>110288246
you should take another lesson from ryan and use actual strings instead of c strings. if you pass around string structs by value like this then arenas also function as string concatenators

char* StringBuilderBegin = Arena_Get_Top_Pointer(Arena, 1);
char* StringBuilderEnd;

Arena_Push_String(Arena, lit ("hello "));
Arena_Push_String(Arena, lit ("world "));
Arena_Push_String(Arena, lit ("from "));
Arena_Push_String(Arena, lit ("arena\n"));

StringBuilderEnd = Arena_Get_Top_Pointer(Arena, 1);
string Message = (string){.Data = StringBuilderBegin, .Length = StringBuilderEnd - StringBuilderBegin};

Print(Message);
>>
R2D2 trying to hold onto a dead buggy dogshit language geg
>>
>>110288466
I use tagged strings like that (the size is hidden at pointer - sizeof(uint64_t) offset + null termination, this way they are compatible with regular C apis both ways, his strings are explicit which is also perfectly valid and gives you additional type system guarantees
>>110288490
dilate, tranny
>>
>>110288499
I see. That's fair, but I really like the flexibility this offers. I don't personally like to embed any metadata or nulls by default. If I need a c string to interface with the operating system, I just make a copy and abusing the same principle above, call an Arena_Push_Null_Term() function to append a null. Usually the result is discarded afterwards so it's trivial to fill and then restore a scratch arena but I don't need to explain that because you already know all about the 3 sea shells. Are you doing the multithreaded by default thing too? I know some people consider that to be more of a meme.
>>
>>110288499
R2D2 the baldy closet homo
>>
File: IMG_0854.jpg (171 KB, 912x1172)
171 KB JPG
>>110288539
>>
>>110288644
vibeGODS like myself we will snap your effeminate pencil necks
>>
>>110282189
30 years someone must've said
>imagine having entire software run on web browsers that they are bundled with lmao
>unfathomably based
>>
>>110288539
*ack*
>>
File: file.png (39 KB, 1321x262)
39 KB PNG
>>110288524
honestly having an explicit type is just all around better, I might rewrite it at some point, I don't do multi core by default, I have an explicit thread pool with bunch of optimizations and userspace events. I have two large homebrew projects - a lisp compiler and a 3D engine, and in both multithreading is selective, the latter has task graphs that include compute shader workloads as well so I do something similar to ryan but not the way he does. the compiler works similar to other lisp listeners so it compiles a form (usually a new function) as an individual task, it goes from parsing to IR to x64 code generation in a single thread (and using a single arena)
>>
>>110282137
bait thread or just illiterate. either way, don't engage.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.