Sudarshan
Bro, I feel like that's just some generic AI written garbage lines
Sudarshan
Rust is just another language that brings higher level ergonomics to code lower level stuff and that's it
Sudarshan
Nowhere in the Rust book or their website says it's a C replacement. That's a decision individual programmers have to make
Sudarshan
You believe? Sure
Sudarshan
Sudarshan
There are kernels written in micropython too. These kinds of arguments don't invalidate the use case of C.
https://github.com/w84death/smolOS
A.
https://github.com/pizlonator/llvm-project-deluge/tree/deluge
https://www.theregister.com/2024/11/12/trapc_memory_safe_fork/
Possibly useful links..as option of solutions 🤔
A.
Ada. Fortran? ☺️🙈🤔 ohh yeah difficult situation with zoo of languages 😢
accelerat0r 🇮🇱 🇮🇱 🇮🇱
Ada is actually pretty good
Hi all I have a question.What does it mean by kernel configuration file?
I want to install run driver
Andreas
https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config
Andreas
no, you copy an existing one
Andreas
thing is you shouldn't
Andreas
GENERIC is GENERIC.. if you make changes to it, it's no longer GENERIC.. so you should name it anything else, so that you and everyone else that helps you in the future will KNOW for certain that it's your own kernel and not the one shipped
Should I edit Bus support in MYKERNEL?
There is only ata and scsi controllers except
accelerat0r 🇮🇱 🇮🇱 🇮🇱
maybe reading the docs on configuring the kernel could be a good start BTW
Sudarshan
Rust plebs have been screaming about this since 2014?
https://gitlab.com/b17wise/personalDotfiles/-/tree/main/c/buffer_exploit
Wintermute
Reminder that we are not on a PDP-11 and C is not portable assembly
Sudarshan
Sudarshan
All bare metal languages generate assembly, but C is the closest to them, with the least amount of syscall overhead. The abstraction is so bare minimum that tinyC implementation was like only 60k lines of code
Flan
Isn't IR or mlir or GNU gas portable assembly?
Flan
I've seen C and to me any command based language seems more like assembly than C, hell C not having registers should tell you how alien it is to assembly.
accelerat0r 🇮🇱 🇮🇱 🇮🇱
😳
Krond
Well, there was a number of even more bare-metal languages like forth, C-- etc.
Flan
Forth is bare metal but not to X86, since forth is based around a stack and X86 is based around registers.
Flan
I think that's why it's slow too, slower than python in some cases
Flan
I think, but what do I know, the factor folk think compilation optimizations could lead to faster programs, but if you do that then you break the interpretive nature of forth.
Михаил
but i guess you don't want to write projects in llvm ir and so you prefer C
Flan
Unless you're tsoding
Flan
I could've sworn they had an intermediate representation which is how they achieved the compiler collection
Михаил
yes thats reasonable
Михаил
but probably it's stored in memory and discarded after compilation
Михаил
i'm too lazy to deep dive into gcc
Flan
So am I
Flan
https://gcc.gnu.org/wiki/GIMPLE
Sudarshan
One thing you can be sure about is, that C is portable assembly. All bare metal languages can generate assembly but C was the first to do so in a very expressive manner in the history of mankind. And the second is C++/Rust are not C alternative and neither C is alternative to those. There are good reasons to pick one over another but they are merely replaceable
Flan
Forgot about fortran
BasedFlake
Anybody played warband?
Flan
Sudarshan
Also there were lisp machines. Way before C. Talk about expressive!
This is ridiculous Flan
I don't think you've ever used FORTRAN or Classic LISP. Those languages are very different from C. C was special because it could do low-level tasks very quickly. It was used to rewrite UNIX V4 and then V5 and so on, though early C compilers weren't perfect, they were good enough to generate native assembly on many different architectures, which made UNIX spread like viruses. It's well known that C's unique blend of expressiveness over assembly with sufficient memory level control just like assembly still makes it unique.
Flan
Compare the C answer to any of the assembly languages here
https://rosettacode.org/wiki/100_doors
In what way does C compare to any of them at all.
Sudarshan
Flan
No. I've only have ever had X86.
Flan
I have written code from forth and know that forth machines existed with its assembly language, and forth does not look like C
Sudarshan
No. I've only have ever had X86.
With assembly, you'll need to put machine level instructions (OPCODE mnemonics) sets. These instruction sets were native to each architecture/board specific and don't work in another. With C, you can generate native optimised assembly from the same code base. The C compiler can generate native assembly (though that depends on the Implementation of the compiler)
Flan
So why is C portable assembly and not pascal? If you have to build an AST then your language is not assembly
Flan
C doesn't support SIMD though, you have to optimize by hand no?
Sudarshan
Sudarshan
Sudarshan
It maps directly to SIMD instructions
Flan
Fine
Sudarshan
C is NOT assembly language, but it generates native assembly. And that depends on the implementation of the C compiler and how well it does. But what I was saying is that when people treat C is "it can do everything, so let's write the next desktop environment" in it, then the next "Music app" in it, then you are looking at manual memory management on a large codebase without a significant compiler checks (because C is less opinionated than Rust) and that leads to all sort of possibilities to access footguns
Sudarshan
But if you treat C as portable assembly, start small and stay small, you have a fairly manageable code base even with limited man power
Jay
Sudarshan
polyduekes
c is jut diy everything, the security of c code represents the knowledge and experience of the dev
polyduekes
Sudarshan
polyduekes
You mean Rust foundation?
idk properly, just saw some terms somewhere, that's all i remember
my memory is a mess
polyduekes
polyduekes
this is a true nintendo moment
Sudarshan
Sudarshan
BTW for those who use memstick images to install FreeBSD: https://x.com/cperciva/status/1860394948258078732
Sudarshan
Sudarshan
polyduekes