Readit News logoReadit News
cremno commented on Stdio(3) change: FILE is now opaque   undeadly.org/cgi?action=a... · Posted by u/gslin
notepad0x90 · a month ago
I don't know if I agree, but this is one shining example of what makes *bsd's great, not being afraid of change. Linux should take note. So much of Windows' headaches stem from not wanting to break things, and needing to support old client code.
cremno · a month ago
"Windows" did this 11 years ago:

>FILE Encapsulation: In previous versions, the FILE type was completely defined in <stdio.h>, so it was possible for user code to reach into a FILE and muck with its internals. We have refactored the stdio library to improve encapsulation of the library implementation details. As part of this, FILE as defined in <stdio.h> is now an opaque type and its members are inaccessible from outside of the CRT itself.

https://devblogs.microsoft.com/cppblog/c-runtime-crt-feature...

cremno commented on Modern C for Fedora (and the World)   lwn.net/Articles/954018/... · Posted by u/signa11
fractalb · 2 years ago
Is there some place where I can see all the packages that need to be fixed and raise a pull request for any package? Maybe, I can help with some fixes during the holiday season.
cremno · 2 years ago
Besides fixing bad C code: how many of those packages are still properly maintained? The Ruby ones don't seem to be. Fedora and other distros likely have to build their packages with patches.
cremno commented on Rewriting the Ruby parser   railsatscale.com//2023-06... · Posted by u/kddeisz
e4m2 · 2 years ago
Interestingly, the actual syntax tree and related structures/functions are generated from the config.yml file and the templates inside the bin directory. They are using a custom template language written in Ruby, here's an example of how they do enum stringification: https://github.com/ruby/yarp/blob/main/bin/templates/src/tok.... Obviously this isn't a novel idea, but IMO this kind of design goes a long way to support their maintainability argument, especially in C.

Also,

> CRuby actually ships with 90 encodings (as of 3.3)

This is asinine.

cremno · 2 years ago
>> CRuby actually ships with 90 encodings (as of 3.3)

>This is asinine.

Overall there are even more: 103. But then again 1.9.2 only has 85 and 95 overall. Also one of those new 'overall' ones is the EBCDIC code page for US/Canada.

cremno commented on New C features in GCC 13   developers.redhat.com/art... · Posted by u/petercooper
hgs3 · 2 years ago
> nullptr: fixes problems with eg, va_arg

nullptr is an overkill solution. The ambiguity could have been solved by mandating that NULL be defined as (void*)0 rather than giving implementations the choice of (void*)0 or 0.

cremno · 2 years ago
dmr would've approved of going a step further - only nullptr, no 0 and (void*)0:

>Although it would have been a bit of a pain to adapt,

>an '89 or '99 standard in which the only source representation

>of the null pointer was NULL or nil or some other built-in token

>would have had my approval.

https://groups.google.com/g/comp.std.c/c/fh4xKnWOQuo/m/IAaOe...

cremno commented on New C features in GCC 13   developers.redhat.com/art... · Posted by u/petercooper
duckqlz · 2 years ago
Everyone is so angry in the comments about c adopting c++ traits. I do not see it that way. This is not the language standard this is just GCC. Clang and GCC have always had compiler specific features which could only be described as wizardry to a regular c user. GCC has always kept the c standard at arms length, clang is a bit better but using compiler specific features has always been reserved for mavericks. Conversely, C23 has some great additions, none that remind me of C++? [1]. I don't think the standards enthusiasts that hang out on #c in freenode would be happy to think this many people see c going in the direction of C++.

[1] https://open-std.org/JTC1/SC22/WG14/www/docs/n3054.pdf

cremno · 2 years ago
It's weird because even the first C standard was influenced by C++: function prototypes and const.
cremno commented on YouTubers Will Enter Politics   buzzfeednews.com/article/... · Posted by u/crunchiebones
funkythings · 7 years ago
alt-right is right wing identity politics.

Sargon is anti identity politics and a classic, free speech pro-capitalist liberal. I'm not sure where you take your information from

cremno · 7 years ago
People just have to look at the politicians and parties he's supporting. For example in the last French presidential election he opposed the pro-capitalist liberal (redundant as liberals are by definition pro-capitalism). I wonder what's his opinion on the Brazil one. A moderate social democrat vs. fascist belonging to a party called the "Social Liberal Party"?

He's not even a good source of information as his 3 hours long videos consist of Wikipedia articles he glanced through and repeating extreme right-wing conspiracies (Cultural Marxism, the terrorist attack at the Unite the Right rally).

(Also the only decent anti-idpol people are Marxists.)

u/cremno

KarmaCake day2610March 24, 2012View Original