C Need guidance for programming in C on FreeBSD

I understand from where Paul Floyd's view point originates, what I don't undestand is pushing that narrative on an Unix forum.

The man specifically asked on how to work with C on a particular Unix system. You have basically shat on the entire codebase of the system whose forums' we're on, and the compiler used. You have needlessly introduced concepts of generic programming via C++ which has absolutely nothing to do with the Unix cpp standard lib, and you have introduced Rust as an even 'better' thing, and Rust brings their own entire runtime.

Imagine being on greasemonkey forum, somebody comes in asks what tools do I need to unscrew brakes on my '80s car, and someone goes ranting about how electric cars with modern braking systems are way safer and you should move to them immediately.

You are derailing the entire topic with your nonsense. If you believe C is unsafe what are you doing here?
 
Without knowing that clang was already installed by default, I installed the version: llvm17: 17.0.6_3
Now when I check to understand, things get messy!
It was understandable to have 2 versions, but to have 3?

You missed one

clang version 18.0.0
Target: x86_64-portbld-freebsd14.0
Thread model: posix
InstalledDir: /usr/local/llvm-devel/bin
 
I understand from where Paul Floyd's view point originates, what I don't undestand is pushing that narrative on an Unix forum.
and in 2024!

This argument was good fun in the 90's. Kind of a "should have been there" moment. Now seeing the *exact* same argument many decades later just makes me feel old. Ultimately both sides have valid points, which is why both languages dominate the top 5 language survey each year.

Its a good sign that both languages are going strong though. I guess err.. bring on the *same* argument in space year 2124!
 
One probably came in with Xorg.
I think the amdgpu stuff requires a specific version of LLVM. Bit messy (especially if you have an i.e Intel GPU).
Yes 1 I understood it to be from xorg, v.15
It was installed along with it. But I imagined that when installing v.17 it would update to 15, but that didn't happen

I believe v.16 came in the basic installation, because I can't even find its llvm files on the PC

Yes, my laptop has an Intel processor and an Nvidia/Intel video card
 
Who needs Rust when there is Lisp?

lisp.jpg
Perl and Lisp were written in C from get-go 😏
 
The man specifically asked on how to work with C on a particular Unix system. You have basically shat on the entire codebase of the system whose forums' we're on, and the compiler used. You have needlessly introduced concepts of generic programming via C++ which has absolutely nothing to do with the Unix cpp standard lib, and you have introduced Rust as an even 'better' thing, and Rust brings their own entire runtime.

You didn't answer my previous question. So I assume that when you say "Unix cpp standard library" you just mean the C++ standard library, which isn't specific to Unix. You claim that generic programming has nothing to do with it.

I say that you haven't got a clue.

The architect of the STL (standard template library, a major component of the C++ standard library) is Alexander Stepanov. Here is his website of publications http://stepanovpapers.com/. Notice the first book "From Mathematics to Generic Programming". Then the entire section "Generic Programming".

The C+ standard library is fundamentally based on generic programming.

Imagine being on greasemonkey forum, somebody comes in asks what tools do I need to unscrew brakes on my '80s car, and someone goes ranting about how electric cars with modern braking systems are way safer and you should move to them immediately.

You are derailing the entire topic with your nonsense. If you believe C is unsafe what are you doing here?

I've seen this report doing the rounds the past few days https://www.mend.io/most-secure-programming-languages/ Take it with a pinch of salt as a) they don't publish their source data and b) it is from a commercial entity and they may be fearmongering to drum up business.

For the past few years I've been the main contributor to Valgrind so I have a fairly strong interest in software correctness. Valgrind itself is written in C, but it's very unlike your typical C codebase.

I also participate in WG21 SG23 (the last line on this page https://isocpp.org/std/the-committee). Over the last 6 months there has been a significant move by authorities to improve software correctness. Here are a few links

https://www.regulations.gov/document/ONCD-2023-0002-0001/comment?filter=c [sadly the C++ response is particularly cringeworthy]

Anyone considering learning C (or recommending that others learn C) should have a read of those.

For the future, both C and C++ are looking at making improvements. I'm not sure if either will succeed, but I don't think that C has enough abstraction to be able to retrofit safety to any meaningful degree that doesn't break virtually all existing software.
 
The architect of the STL (standard template library, a major component of the C++ standard library) is Alexander Stepanov.

The history is actually a bit more convoluted, and not as clean. Today, we think that the C++ standard library was "designed", and is based on a set of great principles. People go around claiming that they "architected" the whole towering edifice.

Here is the reality. Alex Stepanov was a mid-level researcher at HP Labs in the early 90s (before I worked there). He was working in a group designing disk controllers. My future group was (both organizationally and physically) next to it, building storage systems (RAID and clusters). Alex had been thinking in terms of generic programming for a long time, and that was sort of his "research" thing, while helping write software for storage was his "development" thing; one of the aspects of careers in the industrial labs was that you had to have one leg in research and one in development at all times: publish papers and get patents, and ship profitable products. He was loud enough to become the manager of a very small group, called "Software Technology Lab" (if you write down the acronym, you'll notice something that is NOT a coincidence). In the early 90s, that group hired a spectacularly smart and productive computer scientist named Meng Lee; she did a lot of work on implementing a "generics" library using the mechanism of early C++ prototype compilers.

At some point, the C++ standards committee (meaning Andy Koenig, yes "the" Andy Koenig of Bell Labs) decided that they really needed some standard libraries for containers in the C++ language, to prevent every implementation rolling their own. For things like vectors and lists, that wasn't too hard, but when it came to hash tables (dictionaries = maps), it requires some serious thought, and the history of programming languages is littered with badly implemented hash tables. Through the research connections (Bell Labs, HP Labs, academia), Koenig knew about the work at HP Labs, and asked Stepanov and Lee whether they would like to submit a proposal to the C++ committee for a set of standard containers. The rest is history. The name "Standard Template Library" is an inside joke on the department name (*). Shortly thereafter (somewhere before 1999, when I arrived at labs) Alex left HP, under a giant black cloud. I've only met him a few times, but the second-hand information I've heard is that he is exceedingly abrasive, ego-centric and difficult to deal with. I know Meng Lee a little better, and she's REALLY friendly and competent and helpful.

I think of the STL as a set of containers implemented using templates in C++; after that became workable, it was turned into a way of life or a religion. Many other programming languages also have generics and containers, some better, some worse.

(*) The other product that was named after a HP Labs group is MCS a.k.a. Wolfpack: Microsoft's windows server cluster technology started out life at HP Labs, in Dejan's group (another super smart and helpful person).
 
The history is actually a bit more convoluted, and not as clean. Today, we think that the C++ standard library was "designed", and is based on a set of great principles. People go around claiming that they "architected" the whole towering edifice.

Interesting. Most of what I'd heard about Alex Stepanov came from Sean Parent. They worked together at Adobe, which also has a 'Software Technology Lab' Stepanov also got fired (and later re-hired) at Adobe. If you are interested, listen to the ADSP podcasts where Sean Parent is a regular guest. For instance https://adspthepodcast.com/2021/08/13/Episode-38.html. And generally the episodes with Sean Parent are amongst the best ones, unless you like to hear Bryce expressing his love for himself, wittering on about his furniture and is dawg and Conor excitedly going off at tangents with obscure array programming languages.
 
Back
Top