Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C 

So What Do Some Computer Scientist Think C and C++?

(Sep 8, 2015 09:37 AM)Almost Wrote:  http://www.infoworld.com/article/2608770...l-dev.html

Wouldn't this be more suitable to your favorite section, Science, Philosophy, and other Garbage?

Maybe you could also explain why long time industry supporters of C++ are migrating away from it(C++)?
(Sep 8, 2015 01:03 AM)g4143 Wrote:  You forgot to mention the exorbitant price and maintenance that's required to keep a Ferrari going and just try and extend that Ferrari.

And the CS kids don't touch that stuff because they are too busy dealing with the theory that's creating our new languages and programming concepts.

They don't touch it because they tend to know nothing low level and are completely unaware of the world of memory mapped registers, data transfer protocols, and interfacing with any hardware without a nicely made wrapper
Here's a great quote

"A programming language is low level when its programs require attention to the irrelevant."
- Alan J. Perlis.
The formal theory of programming languages does not differentiate between high level and low level languages, you can't see if a language is low level or high level just by looking for example at the BNF of the grammar. C and C++ have their domains in OS/ Driver development, quite clear that they are not suited for web application development.
I am wondering what these guys are programming in if it isn't C or C++?

Presently I am writing smart grid software for an embedded system. With just 100mb of hard rive and 64mb of memory I have to consider every byte.

Java JRE already brings with it overhead of no less than 11mb and probably more if you need more class files. I just don't see much in the way of alternatives even if C++ in particular is ridiculously verbose (in my humble opinion).
(Sep 8, 2015 10:58 AM)bbbysmth Wrote:  Here's a great quote

"A programming language is low level when its programs require attention to the irrelevant."
- Alan J. Perlis.

I like that quote very much. It gives the phrase "low level" variable meaning depending on the applications

C is low level if you're building a website

C is high level if you're interfacing with hardware, sometimes so high level you require inline assembly.
(Sep 8, 2015 01:33 AM)g4143 Wrote:  I guess I missed that part of engineering where you choose the most impractical and expense solution.

Impractical? Alright, you go ahead and write a boot loader in C# there, then get back to me on your thinking process before you decide to post something like this again.. 😅


(Sep 8, 2015 02:08 AM)g4143 Wrote:  The Ferrari is the language in the video. The creator of the language built a very stable Ferrari that can be re-used by all programmers. This is the way programming works in most circles. You build something good and then you reuse it, you don't keep rebuilding the same thing.

I now think, that you're not even capable of reviewing the context of the video you posted yourself. ❓

The Ferrari was a clear reference to C/C++ in the guy's video. His debate was Performance vs. Productivity with Performance being the Ferrari, and productivity being the image of the guy sitting on a chair (for whatever reason).

He also says at the very beginning of the video: "At the performance end of the spectrum we have languages like C and C++". Additionally, Ur/Web is supposedly only for modern web applications.

You seem to think the ideal world is the one we live in...

(Sep 8, 2015 10:45 AM)6577657534735 Wrote:  They don't touch it because they tend to know nothing low level and are completely unaware of the world of memory mapped registers, data transfer protocols, and interfacing with any hardware without a nicely made wrapper

Exactly, they know mainly about theory and algorithms within an ideal world which is generalized for their understanding of the topics at hand.
Getting Started: C/C++
[C/C++/.NET/x86 ASM - Automation Programmer]
(Sep 8, 2015 06:07 PM)0xDEAD10CC Wrote:  ..

The Ferrari was a clear reference to C/C++ in the guy's video. His debate was Performance vs. Productivity with Performance being the Ferrari, and productivity being the image of the guy sitting on a chair (for whatever reason).

And if you watched the video you would have noticed that he did in fact create a language which was safe and fast. A Ferrari Volvo..

(Sep 8, 2015 06:07 PM)0xDEAD10CC Wrote:  Impractical? Alright, you go ahead and write a boot loader in C# there, then get back to me on your thinking process before you decide to post something like this again.. 😅


Well someone has to be charged with the mundane tasks(writing a boot loader). I think that's the obligation of an engineer isn't it?
(Sep 8, 2015 06:51 PM)g4143 Wrote:  And if you watched the video you would have noticed that he did in fact create a language which was safe and fast. A Ferrari Volvo..

Well someone has to be charged with the mundane tasks(writing a boot loader). I think that's the obligation of an engineer isn't it?

More like a Ferrari with a ball and chain. It's a language for web applications.

'I think that's the obligation of an engineer isn't it?' - Of course, someone who actually understands how to write low level code without an abstraction of the actions being optimized by some compiler in a non-controlled way lol.
Getting Started: C/C++
[C/C++/.NET/x86 ASM - Automation Programmer]
(Sep 8, 2015 08:25 PM)0xDEAD10CC Wrote:  'I think that's the obligation of an engineer isn't it?' - Of course, someone who actually understands how to write low level code without an abstraction of the actions being optimized by some compiler in a non-controlled way lol.

But its not exactly ground breaking work is it. Its just a mundane task.
(Sep 8, 2015 06:51 PM)g4143 Wrote:  And if you watched the video you would have noticed that he did in fact create a language which was safe and fast. A Ferrari Volvo..

Well someone has to be charged with the mundane tasks(writing a boot loader). I think that's the obligation of an engineer isn't it?

Mundane tasks lol, only the crème de la crème are allowed to touch bootloaders and similar tasks in serious commercial settings. Definitely not me or you or anyone on HF.


(Sep 8, 2015 08:31 PM)g4143 Wrote:  But its not exactly ground breaking work is it. Its just a mundane task.

Once you experience the frustration and then joy of making an LED blind on your first microcontroller, using only C and assembly with no helper libraries at all (this is the key point, no helper libraries at all), then you will realize the difficulty of these tasks compared to throwing together a little whatsit in dongle.js or whatever.

I have limited experience in this area but know enough to know that I know relatively nothing about it and that it is very difficult and not even remotely mundane

There is SO much going on underneath all this it's inconceivable to someone who has only ever written software in high level languages
(Sep 8, 2015 08:52 PM)6577657534735 Wrote:  Once you experience the frustration and then joy of making an LED blind on your first microcontroller, using only C and assembly with no helper libraries at all....

Congratulations. You have caught up with the 1950's.
How does "std::ofstream s("x.txt");s<<1" actually write to a file?

System call called by fopen, file descriptor located by kernel and filesystem drivers, write system call called by fprintf, data buffer copied to kernel I/O buffer cache maintained for all file writes and made consistent for reads, buffer cache eventually flushed, interface with hard drive controller using some mechanism I don't understand so this stops here

And this is ignoring the actual work that goes into making a system call, trap instruction to move into privileged execution mode (requiring assembly to mask or set values in particular registers not accessible from C), virtual memory system to allow all processes to reference the same kernel routines at the same memory locations, how to return from a system call.

Then there are concerns with system calls being safely concurrent and re-entrant, the fun (Hell) just doesn't stop

This low level stuff is where the real work happens, not C# or anything taught in most CS classes. Really wish I majored in Computer Engineering instead of CS but it's too late
(Sep 8, 2015 09:10 PM)6577657534735 Wrote:  How does "std::ofstream s("x.txt");s<<1" actually write to a file?

System call called by fopen, file descriptor located by kernel and filesystem drivers, write system call called by fprintf, data buffer copied to kernel I/O buffer cache maintained for all file writes and made consistent for reads, buffer cache eventually flushed, interface with hard drive controller using some mechanism I don't understand so this stops here

And this is ignoring the actual work that goes into making a system call, trap instruction to move into privileged execution mode (requiring assembly to mask or set values in particular registers not accessible from C), virtual memory system to allow all processes to reference the same kernel routines at the same memory locations, how to return from a system call.

Then there are concerns with system calls being safely concurrent and re-entrant, the fun (Hell) just doesn't stop

This low level stuff is where the real work happens, not C# or anything taught in most CS classes. Really wish I majored in Computer Engineering instead of CS but it's too late

Its mundane and not breaking any new ground. This is engineer's work.

i.e. Someone already did the heavy lifting so now its handed off to the engineers to repeatedly crunch out the results.
(Sep 8, 2015 09:15 PM)g4143 Wrote:  Its mundane and not breaking any new ground. This is engineer's work.

i.e. Someone already did the heavy lifting so now its handed off to the engineers to repeatedly crunch out the results.

If this is engineer's work then they are the only ones doing heavy lifting and everyone else is just using their results with their nice abstractions like fopen and std::cout

Never mind the massive abstractions in things like Python, request.get("google.com"), I want to cry for the frustration past engineers must have felt implementing everything underneath that hood at the bottom layer


Possibly Related Threads...
Thread / Author Replies Views Last Post
by SiLent55Sep 3, 2026 11:56 AM 2 84 Sep 3, 2026 11:56 AM
Last Post: hackathonuk