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
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
no, you copy an existing one
But can I edit in GENERIC?
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
Hi all I have a question.What does it mean by kernel configuration file?
I solved these, but where should I put device runfw (firmware)?
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
Reminder that we are not on a PDP-11 and C is not portable assembly
I think you misunderstood what portable assembly means
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.
Михаил
Isn't IR or mlir or GNU gas portable assembly?
afaik gnu gas doesn't support universal IR code, as llvm ir for examplle
Михаил
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
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.
C is not assembly itself. C is high level to assembly. C language has registers, just it doesn't directly provide access to specific registers like assembly language. It uses the register keyword as a hint to the compiler to potentially store a variable in a register for faster access. That's it. Direct register access would make C non portable.
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?
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
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.
Have you ever written anything in assembly and then the same thing in C and tried to use the same code across different architecture?
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
C doesn't support SIMD though, you have to optimize by hand no?
What? Why do you think <immitrin.h> for?
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
polyduekes
c is jut diy everything, the security of c code represents the knowledge and experience of the dev
Sudarshan
c is jut diy everything, the security of c code represents the knowledge and experience of the dev
I mean I write some of my own tools in Rust for fun, but the selling point of Rust should be "high level ergonomics without garbage collection" rather than "It's C/C++ killer, let's rewrite everything". Oh well, Rust project never said that either, it's just Rustaceans who does
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
this is a true nintendo moment
Lol that's crab lang policy
polyduekes
Lol that's crab lang policy
crab lang isn't rust? or am i missing some context?
Sudarshan
BTW for those who use memstick images to install FreeBSD: https://x.com/cperciva/status/1860394948258078732
Jay
BTW for those who use memstick images to install FreeBSD: https://x.com/cperciva/status/1860394948258078732
I know hybrid ISOs from Linux distributions but not from FreeBSD. Does FreeBSD build a hybrid ISO by default?
Jay
Since long time ago
What's the tool to create such images?
Sudarshan