General > General Technical Chat

How many people code in C these days, and if so, why?

<< < (28/99) > >>

Picuino:
I usually use Python as scripts from the command line together with the make tool.

For example a small utility that I sometimes use is a small script that automatically generates header files from c files. It collects all the definitions of the functions and with them generates a header. It is not very flexible, but it saves me work.
Another small Python macro from the command line allowed me to generate KiCad library files for integrated circuits (they are written in plain text).
Those are examples of another way to use Python. Once you know Python, you can think of many ways to apply it to small daily tasks.

engrguy42:

--- Quote from: nctnico on May 07, 2020, 07:12:22 pm ---
--- Quote from: engrguy42 on May 07, 2020, 06:52:59 pm ---Now I'm sure there are fixes for much or all of this, and I'm sure I'll hear an unending stream of them. And I'm sure some of them involve jumping thru a bunch of annoying hoops. But for me it just isn't worth the hassle.

--- End quote ---
Your problem seems to be being stuck to VS (which is not the best tool to work on code; it is pretty clumsy).  >:D When I need to work on a VS project I load the same project in Eclipse CDT and use VS only to compile.

--- End quote ---

Funny, I was recently watching a video of a guy who teaches C++, and he's been working for years with one of the biggest game companies (Electronic Arts) and he writes game engines for them. And it sounds like he and his company use only Visual Studio.
 

Siwastaja:
engrguy42, you fail to see the point of Python.

Python is like Arduino.

In Arduino, you solve a commonplace electronic problem by buying a completely engineered finished product - called a "shield", which comes with a complete software, and just write a few lines of codes to instantiate, or configure it. thing.run(); Works great, whenever such already finished product exists. Strong point: you can quickly combine things, use them like building blocks, and the configuration isn't fully fixed, you can make small adjustments on it. And it still looks like it's made by you.

Same is true for Python. You need to solve some common software problem, which has been already solved. You load up a Python library: the problem is solved in C, by the library writer. You instantiate it, write your input data. Strong point: you can easily combine such blocks, to solve larger problems. But just like with Arduino, you are pretty much limited to existing algorithms. Everything is so easy as long as you do series of one-liners to process data. When you start actually looping through data and do your own things from-scratch, not only the performance totally sucks, you may realize the language itself is lacking for such work after all.

This explains the very strange claims you hear, like "Python is the language of AI algorithms, so it is very powerful", while in reality all that this means is that Python is used to load up a complete AI program (which is likely written in C, plus things like OpenCL and similar to utilize GPUs), and just to define the configuration and data structures. For this, the syntax of Python is quite handy. And for such simple use, you don't want strong typing.

I have found zero use for Arduino, and similarly, I have found absolutely no use for Python. But, I mostly do system-level or embedded work.

Please take this comment as a humble opinion, not a scientifically sound exact fact.

nctnico:

--- Quote from: engrguy42 on May 07, 2020, 07:44:03 pm ---
--- Quote from: nctnico on May 07, 2020, 07:12:22 pm ---
--- Quote from: engrguy42 on May 07, 2020, 06:52:59 pm ---Now I'm sure there are fixes for much or all of this, and I'm sure I'll hear an unending stream of them. And I'm sure some of them involve jumping thru a bunch of annoying hoops. But for me it just isn't worth the hassle.

--- End quote ---
Your problem seems to be being stuck to VS (which is not the best tool to work on code; it is pretty clumsy).  >:D When I need to work on a VS project I load the same project in Eclipse CDT and use VS only to compile.

--- End quote ---

Funny, I was recently watching a video of a guy who teaches C++, and he's been working for years with one of the biggest game companies (Electronic Arts) and he writes game engines for them. And it sounds like he and his company use only Visual Studio.

--- End quote ---
That doesn't mean it is a good idea. But if you don't know any better then every screw looks like a nail. Last year I had to make some modifications to the Unreal engine and VS was just not up to the job to take on such a large project and work at a comfortable speed (on a machine with 18GB of memory!). Eclipse to the rescue!

engrguy42:

--- Quote from: Siwastaja on May 07, 2020, 08:12:39 pm ---engrguy42, you fail to see the point of Python.

Python is like Arduino.

In Arduino, you solve a commonplace electronic problem by buying a completely engineered finished product - called a "shield", which comes with a complete software, and just write a few lines of codes to instantiate, or configure it. thing.run(); Works great, whenever such already finished product exists. Strong point: you can quickly combine things, use them like building blocks, and the configuration isn't fully fixed, you can make small adjustments on it. And it still looks like it's made by you.

Same is true for Python. You need to solve some common software problem, which has been already solved. You load up a Python library: the problem is solved in C, by the library writer. You instantiate it, write your input data. Strong point: you can easily combine such blocks, to solve larger problems. But just like with Arduino, you are pretty much limited to existing algorithms. Everything is so easy as long as you do series of one-liners to process data. When you start actually looping through data and do your own things from-scratch, not only the performance totally sucks, you may realize the language itself is lacking for such work after all.

This explains the very strange claims you hear, like "Python is the language of AI algorithms, so it is very powerful", while in reality all that this means is that Python is used to load up a complete AI program (which is likely written in C, plus things like OpenCL and similar to utilize GPUs), and just to define the configuration and data structures. For this, the syntax of Python is quite handy. And for such simple use, you don't want strong typing.

I have found zero use for Arduino, and similarly, I have found absolutely no use for Python. But, I mostly do system-level or embedded work.

Please take this comment as a humble opinion, not a scientifically sound exact fact.

--- End quote ---

Siwastaja, thanks. It sounds like what you're describing is, like I say, quite a bit like what Matlab does. Lots of premade scientific/engineering/AI/math functionality that you just grab and go.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod