Hare would unironically be the best C replacement yet if it used LLVM instead of toy compiler and if there would be an AppImage of the compiler instead of having to build 200 things from source.
>>106443106make another /chug/llvm is bloatbootstrapping hare is easy
>>106443106Why?
>>106443106Building Hare is easy. Using Hare is hard. Too few examples and reference materials.
>>106443634Why? I can see his point>Rust: huge binaries and target folder, borrow checker madness, high learning curve because it is completely different from C, confusing module system>C++: has literally the same flaws of C (or most of them anyway), like header files, no pattern matching, bad error handling>Go: garbage collected. nuff said>Zig: changes every day, so it is impossible to find documentation, not even gpt can help you there. Also the worst build system I have ever seen, literally tried for days to include opengl bindings library and failed.
>>106443664I see no real problem with C.
>>106443754Yeah because you have not used it enough. Call me when you have over 3 directories and over 16 files (C files, not including headers) in your project.
>>106443782Skill issue.
>>106443106> if it used LLVM instead of toy compileActually the opposite. New languages (zig, odin) are ditching LLVM because it's a huge pile of unmanageable shit that breaks at any release and a good effort of language mantainers/dev is to keep up with it.ddv just had "the balls" to stand up explicitly first because aside from e-persona shit you hear on /g/ that you shouldn't care, his takes on technology are almost always sensibleRevolutions needs to break something and explorarion, you can't just keep staying in "battle-tested" technology because that's what everyone else thinks is the correct thing to doSmall backend means faster porting to platform and architecture and higher dependability. QBE actually deliver 0.7x C runtime perfomance on average>>106443754- pointer arithmetic to cope with not having slices - inexcusable, almost absent error handling capabilities (one of the most important feature in a programming language)- header/text macro retardation - null- string implementation is just embarrassing- lack of good standard library - no standard tooling
>>106444801>QBE actually deliver 0.7x C runtime perfomance on averageSo slower than using Go, Java, probably even slower than Javascript with JITWHY would you use a low level C like language, if not for speed? are you a masochist?
>>106443754>>106444801Let me add to that list:- Imports are automated copy-paste- No standard way to store source locally, have to rely on OS-dependent ways to resolve import and linker directory search paths- Portable inlined functions are automated copy-paste (inline keyword is a suggestion, have to use #define to force)- Metaprogramming/generics are automated copy-paste, or crossing your fingers that your *void are passed correctly.- Because no generics, every library has their own container types, which can't be used between them, resulting in duplicate code, symbols, and unnecessary glue code.- No namespaces, modules, packages, etc, everything in one global flat namespace. Every symbol name is 2-4x as long as it needs to be to avoid collisions- No canonical way to structure code, every project does it slightly differently- No canonical way to build multiple files together, there is an entire zoo of different build tools you need to be familiar with (make, cmake, automake/autotools, ninja, meson)- The grammar has a dependency cycle. To understand the lexical grammar, you must understand the semantic grammar, and vice versa, the parse tree productions are different if a symbol is a variable or a typedef, so you have to maintain a symbol table as you parse, meaning you cannot parse C without compiling it in the process.- Conditional compilation at the textual, not symbolic, level, plus the above, means reliable static analysis is next to impossible, and requires re-compiling as part of the analysis.- Basic integer type widths are compiler, OS, and arch dependent, everyone has to include the types header.- "Low level", but no portable inline assembly- Typedef is an alias, no way to create a compile-time unique type- structs and unions have their own namespace s- "Outward spiral" type syntax is indefensible
>>106444832> So slower than using Go, Java, probably even slower than Javascript with JITpost bench >WHY would you use a low level C like language, if not for speed?Because you can't (sensiby) do embed with those languages, which is the point of C, not the speed> are you a masochist?do you even code?
>>106444938honestly some of these are positives.
>>106443106I'd rather not use a one-man-army language especially when this person is a notorious pedophile who went to the netherland to rape trannies.
>>106445035this. normally I'd say separate the art from the artist but drew is such an enormous pdf file it's unbelievable.
>>106444971>>106445008>> are you a masochist?>do you even code?>honestly some of these are positives.Herein lies the "soul" of the Cnile condition: "Coding should be hard".If it makes code easier to write it must be bad. If it makes code easier to read, it must be bad. If it makes finding mistakes easier, it must be bad. If it makes mistakes impossible in the first place, it must be bad.They insist that only they can do these things, not because the tools they use are inadequate, but because they are somehow gifted or special, and that they are part of some sort of elite club. If better tools allowed anyone to do what they can do, what do they have left? If all the effort they had to spend for meager results was a result of being handicapped, was was the point of it all? The Cnile will never use a better language, because it will show what they really are: nothing special. No different to those who decried the adoption of calculators, slide rules, typewriters, or even the printing press, those who defined themselves by their suffering, must make others suffer to preserve their self-worth.Pathetic.
>>106445087>t. troon.pdf
>>106445108Ah, yes, I nearly forgot about this, thank you for the concise example. Because the Cnile defines his self worth by his suffering, he must believe anyone who works to lessen that suffering as less than him. Because his pain is his value, he is trapped in a paradox, any attempt at his own self-improvement necessarily decreases his own value, self-perceived or otherwise.I will never be a woman, and I thank the creator every day for that fact, but you, you will never a good programmer.
>>106445108
>>106443782my last project had over 80 .c files and i had no problems with that whatsoeveryou are just retarded
>>106444971>0.7x performanceinteresting way to say ~43% slower. >post benchThere's barely benchmarks for the relevant languages today, nothing relevant is implemented in both hare and another language anyway. Making your "source!!!" claim desperate and impossible.With a basic internet search you'll find that java/c# is often 30-35% slower than C, meaning faster than hare. Heck, JS is outperforming java sometimes these days so anon is probably right on that too. Might as well use a super easy language with no need for memory management when it performs better than hare.>>106445087>>106445187Jeez the projection, given that you use something over-complicated compared to C but BOTH hard and slow compared to GC languages.>>106445292>>106443782>16 fileswhat? You know that most projects are hundreds-thousands of files regardless of language, right?
>>106445733>what? You know that most projects are hundreds-thousands of files regardless of language, right?Yes, which is why you shouldn't use C, because then you have double the files.
>>106445733Yes, I read that Java is half as fast as C and that was some detailed benchmark that a magazine I bought did. And that was in the 90s. Surely the difference must be much smaller now, given how shit JVM was back then.
>>106444801Agreed. Even if hare's attempt wasn't very good because ddv is a dumb cnile, he definitely had the right idea. The era of LLVM shitware has to end.
>>106443664rust binaries can be stripped to the point the only difference is the embedded rust runtime and even then you can still strip it even more. even then there are plenty of advantages in exchange for its drawbacks. personally i appreciate the strong types and trait system.>>106445187the moment you use the word cnile your opinion is automatically discarded because you're a child or its mental equivalent.
>>106445761personally I agree it as a drawback yes but by "industry standard" people that love to make 10-50 line files, it's basically a advantage. But making it out as a big thing is just BS, you'll learn how to deal with 1000+ files/project anyway.>>106445773In basic tests, yes.In reality, it's much more complicated, and there's very few benchmarks.
>>106445820>rust binaries can be stripped to the point the only difference is the embedded rust runtimeFalse. Because Rust doesn't have .o files, it means that compiler will not exclude code from your dependencies that you don't use. That means if you use a gif library for example and that gif library has something Rust equivalent of C++ boost dependency (a huge dependency) but only uses some utility functions, then your output binary will be 100+ MBAdditionally, even if it did, the target folder would be 1GB which not only destroys developer's free space on disk in no time, but also destroys the SSD (write/erase cycles are spent downloading large dependency trees due to NodeJS like situation where people download packages for literally everything and your dependencies already have level 5 dependency trees)
>>106446031You realize dead code elimination has been a basic feature in compilers for decades, right? When compiling an executable, its trivial to traverse the graph of symbols and only include ones reachable from main. That is, its trivial if you have an integrated build system that understands more than one file at a time. Its hilarious that you think that you can see the .o files that make leaves lying around somehow those files are special.Here is another hallmark of the Cnile perspective: His position is founded on the idea that C is the only good language, therefore, anything C does must be done because it is the best way to do it, and not because of an insistence on backwards compatibility with half a century of haphazard design and arbitrary decisions made originally in ignorance of developments that would come later, and later persisted in conscious defiance of those developments.
you should stop shitting and pissing your pants over the difficulty of the borrow checker and actually fucking learn how to build software alongside ityour data models are almost certainly complete fucking trash if you run into regular borrow checker issues>dislike the module systemRust's build system is one of the best in any language, so fucking learn that as well.I'm sorry that actual software isn't easily managed by just including direct file paths and shit, but it's time to grow the fuck up, rub your braincells together, and try learning better developmental processes.
Drew shilling again?
>>106444938>- Imports are automated copy-pastebased>- No standard way to store source locally, have to rely on OS-dependent ways to resolve import and linker directory search pathsbased beyond belief. this is why c is a systems programming language and your language is a application/toy language>- Portable inlined functions are automated copy-paste (inline keyword is a suggestion, have to use #define to force)inlining is an optimization>- Metaprogramming/generics are automated copy-paste, or crossing your fingers that your *void are passed correctly.news flash, objects are physically blobs>- Because no generics, every library has their own container types, which can't be used between them, not because of generics, because standard containers werent a thing in the 70's. use cxx, gobject, or whatever>- No namespaces, modules, packages, etc, everything in one global flat namespace. Every symbol name is 2-4x as long as it needs to be to avoid collisionswow just wow. go add namespacing to elf then>- No canonical way to structure code, every project does it slightly differentlyoh ok, youre a communist>- The grammar has a dependency cycle. To understand the lexical grammar, you must understand the semantic grammar, and vice versa, the parse tree productions are different if a symbol is a variable or a typedefoy vey, call the adl>- Basic integer type widths are compiler, OS, and arch dependent, everyone has to include the types header.wow just wow
>>106446315If this is satire, then its masterfully done.
>>106443648sex with Eli.
>>106445733> interesting way to say ~43% slower. that would be 30% slower if my math is correct > There's barely benchmarks for the relevant languages today, nothing relevant is implemented in both hare and another language anyway. Making your "source!!!" claim desperate and impossible.So you made a statement that is, using your words "impossible" to check? > With a basic internet search you'll find that java/c# is often 30-35% slower than CSo it's on par with hare? > Might as well use a super easy language with no need for memory management when it performs better than hare.Their runtimes don't fit in typical embedded device or high constrained envs. You keep glossing over this important fact which is the point of why C is used in some context (and hare could fit the same space) and java is not Your "java is le slow1!!!!!" old untrue mantra and "C is for le speed" naive conception is actually depressing Speed is such nonsensical metric nowadays where LLVM backended languages pretty much have the same runtime perfomances comparable with C anyway
>>106443664Odin is better than all of them.
>>106444832You're making out manual memory management is the problem with C. Managing memory is the trivial part of C once you learn a couple of things like arena's.
>>106446541it's ok. I think overall hare is a better attempt at replacing C from a conceptual point of view That said, I'm not a fan a odin syntax and error handling is actually better with anonymous tagged union
>>106446197This would have been a good opinion to have in 2015 when rust was such a huge improvement on the crap that came before. But ten years have passed now. For example, the build system is very convenient compared to C++'s one, which is a nightmare to use AND dog-slow. But if you look at it in isolation, rust's one is still dog-slow. Many newer languages have vastly superior build system structures that look more like on-demand compilation than the outdated crap that rust does.And even for muh borrow checker, people have finally started to realize that there's ways to give the same guarantees with way laxer rules. See https://verdagon.dev/blog/group-borrowing, https://antelang.org/blog/safe_shared_mutability/ .Even without going so far, rust's model of borrowing is basically wrong and it's eventually going to be replaced with a smarter system: https://smallcultfollowing.com/babysteps/blog/2024/03/04/borrow-checking-without-lifetimes/
>>106443106You mean that its pedo creator made some bad design decisions?
I won't bother re-writing shit>>106449005
>>106443106You can just use D + LDC + @nogcYou'll still have a bigger standard library than H*re.
>>106449034Didn't you just create a thread where you shill for rewriting projects because "hurrdurr you couldn't possibly know what to do"? Fuck off hindu nigger
>>106449336>Didn't you just create a thread where you shill for rewriting projectswhen?I ain't a rust fag.Not like you'd listen to anything I say and pin me with your accusation one way or another.cope.
>>106449420>starts sperging in a strawman>"just kidding, i was only pretending to be retarded">"cope"every single time.Hindu behavior noticed
>>106446031LLVM has LTO.
>>106449460>every single time.yep. Right back at you.That's how I react every single time I get accused of random shit and never does the accuser justifies themselves but forcefully pin it on me by mentioning my race instead.Every single time.
1. use only TinyC2. patch existing codebase to compile it with TinyC3. reject any C extensions/standards if it not supported by TinyC
>>106443664Enter.
>>106449810I was literally just reading the tiny c manual today lmao. https://dn790006.ca.archive.org/0/items/tiny-c_manual/tiny-c_manual.pdf
>>106450422
>>106450422https://www.youtube.com/watch?v=F11UGNm6qfc
>>106450426I thought tiny C was made in 2001 not 1978
>>106450590Tiny c is a subset of c that can fit in the memory of microcomputers. tcc is a standard c compiler.
>>106450600subset might not be quite the right word cause the syntax is a bit different '[' and ']' instead of '{' and '}' There are probably other things like recursion failingI don't see anything about stopping functions from being defined in other functions for example
>>106450663in the definition of other functions*
>>106450600TinyC is a memory safe language
I do honestly believe some people here shouldn't be allowed to live.
>>106450669Though it probably doesn't support it who knows. another difference is that you define functions likelenchar str (10)int n[ ...]instead of len(str, n)char str [10];int n;{...}also /* is a single line comment.
lenchar str (10)int n[ ...]
len(str, n)char str [10];int n;{...}also /* is a single line comment.
>>106450600>>106450663>>106450719AI hallucinations
>>106450689rollan with max(9,last_digit)
>>106450728>>106450426
>>106450746fake and gay post
I'd consider it if it wasn't made by drew
>>106443664>Also the worst build system I have ever seen, literally tried for days to include opengl bindings library and failed.you are retardedLiterally just use comptime to loop over the openGL headers, and generate a vtable containing a function pointer for each function, then make a function that takes GetProcAddr as an argument and it initialises the GL funptrsNo need for a external binding library bloat.Fuck you can even use comptime to make wrapper functions that call glGetError on every call and even log the calls when debugging so you dont even need apitrace
>>106450422Jon is so handsome.
>>106450689roll
>>106450422JAI SHRI RAMJAI SHRI RAM SOKOBAN
>>106451363>>106451385
>>106451363No he isn't. He is bald and looks like a convicted criminal. The only woman who finds that attractive is the one who also finds drug dealer thugs attractive
>>106450734disgusting.
>>106450689Roll for gold 9old
>>106454799Today is a good day :)))
>>106454799Nice dub.
>>106444938Skill issue
>>106444832Go, Java and Javascript are way slower than that outside synthetic benchmarks. Closer to 0.1x or even slower
>>106443664>literally tried for days to include opengl bindings library and failed.Just do exe.root_module.linkSystemLibrary("glew", .{});
exe.root_module.linkSystemLibrary("glew", .{});
>>106454972source?