General > General Technical Chat

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

<< < (38/99) > >>

intmpe:

--- Quote from: engrguy42 on May 03, 2020, 05:45:28 pm ---
And yeah, I have lots of fond memories of Fortran  :D

Are there still compilers available for that?? Hmm.......

--- End quote ---

Yes, there is a Linux compiler for it and a couple of commercial ones. It is still the preferred language in much of naval architecture (or was) due to the availability of libraries like lapack (IIRC). A lot of finite element stuff was written in it as well for structural engineers. A few years back I was asked to work on some old military code using Fortran 66 - they needed to extend the code as it modeled a particular process. The military usually works on the principal if it works dont mess with it. I hadn't done Fortran 66 but had done Fortran 77. It's a hard language to port due to the spaghetti code nature of it - so its probably going to last a while. It's a lot easier to extend existing code than to port it to C etc.

IDEngineer:

--- Quote from: intmpe on May 09, 2020, 06:12:50 pm ---The military usually works on the principal if it works dont mess with it. I hadn't done Fortran 66 but had done Fortran 77. It's a hard language to port due to the spaghetti code nature of it - so its probably going to last a while.
--- End quote ---
This is exactly why there's still a lot of COBOL code running government infrastructure too. Nobody dares to be the politician or bureaucrat who bets their job/career on "updating" some long-working COBOL application to a more modern language. Let's be honest, more votes can be bought for less money doing other things.

IDEngineer:
Since folks like to quote it: "TIOBE Index for May 2020: C passes Java and becomes number 1 programming language".

https://jaxenter.com/c-programming-may-2020-171598.html

engrguy42:
For a bit more C# perspective, and how it can help with workbench stuff, I'm pretty much done with my data acquisition app. For now. Maybe 75% of it I wrote today, and that's after not touching C# for a while. Nice and quick to get user interface stuff done.

Basically it reads a data acquisition device (Labjack) via USB. I'm also using an excellent C# math library called Mathnet. You can do FFT, for example, in just a single line or so.

You first connect to the Labjack data acquisition device, and it has 8 analog inputs (plus some digitals and other I/O stuff). So I've set it up to let the user enter how many seconds to scan, and it plots that on the top chart. You can then do an FFT on the waveform.

Or you can log data from 4 other inputs, and you can also select via checkbox to do realtime graphing of any of those. The FFT and logging charts are on top of each other, so whatever you select will be enabled and displayed. And you can stop the plotting whenever you want.

In the screenshot below I've grabbed 0.5 seconds of a 60Hz triangle wave, and simultaneously done realtime plots of a couple analog inputs (I varied some power supply dials). I've hard-coded it to sample the bottom inputs every 0.5 seconds, and the chart automatically updates and re-scales the X and Y times and magnitudes. Very slick. And this is just default behavior of Windows forms. 

Yes, you can do something like this in 12 other languages. No question. Though I'm sure I'll be corrected that "it's not 12, it's 13".  :D

I'm just giving one example of something that can be done real quick, with drag-n-drop charts and buttons and a few hundred lines of code, in case anyone might be interested in setting up something for their workbench.   

nctnico:

--- Quote from: IDEngineer on May 09, 2020, 08:13:18 pm ---Since folks like to quote it: "TIOBE Index for May 2020: C passes Java and becomes number 1 programming language".

https://jaxenter.com/c-programming-may-2020-171598.html

--- End quote ---
Interesting. That just made one of my eyebrows move upwards. I did not expect that. Also the decline of C# is impressive. About a decade ago people where convinced C# would kill Java. Some actually called C# 'A Java which works'.

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