Page 433 of 652

Re: Does not follow...

Posted: Mon Nov 13, 2017 8:00 pm
by Weetabix
Greg wrote:As time goes by, I more and more strongly feel I ought to learn Python.
I recently decided to try C because that's what the "experiments" that came with my Raspberry Pi starter kit have code for. Of course, they also have the Python code.

Why is Python better than C or C better than Python?

ETA: putting on my seldom used "take an interest in others" hat, Gee, Greg. Tell us about what has motivated this desire? :geek:
ETA2: That sounds sarcastic, but the sarcasm is directed at me, not you.

Re: Does not follow...

Posted: Mon Nov 13, 2017 8:46 pm
by Netpackrat
Weetabix wrote:
Greg wrote:As time goes by, I more and more strongly feel I ought to learn Python.
I recently decided to try C because that's what the "experiments" that came with my Raspberry Pi starter kit have code for. Of course, they also have the Python code.

Why is Python better than C or C better than Python?

ETA: putting on my seldom used "take an interest in others" hat, Gee, Greg. Tell us about what has motivated this desire? :geek:
ETA2: That sounds sarcastic, but the sarcasm is directed at me, not you.
I don't think he expected the Spanish Inquisition, Weet.

Re: Does not follow...

Posted: Mon Nov 13, 2017 9:07 pm
by Weetabix
Nobody expects the Spanish Inquisition.

Re: Does not follow...

Posted: Mon Nov 13, 2017 9:17 pm
by Greg
Weetabix wrote:Nobody expects the Spanish Inquisition.
I did, however, just recently buy a comfy chair.

Re: Does not follow...

Posted: Mon Nov 13, 2017 9:34 pm
by Greg
Weetabix wrote:
Greg wrote:As time goes by, I more and more strongly feel I ought to learn Python.
I recently decided to try C because that's what the "experiments" that came with my Raspberry Pi starter kit have code for. Of course, they also have the Python code.

Why is Python better than C or C better than Python?

ETA: putting on my seldom used "take an interest in others" hat, Gee, Greg. Tell us about what has motivated this desire? :geek:
ETA2: That sounds sarcastic, but the sarcasm is directed at me, not you.
C is a much lower level language, what you control with C is much closer to what the computer is actually doing.

So what you can do with 1 or 2 lines of Python code, you might need hundreds of lines of C code to do. The upside, for C, is that those hundreds of lines of C code are almost certainly going to be faster (possibly MUCH faster) than the 1 or 2 lines of Python.

That's the short version.

When computers were less powerful, everything was written in lower level languages, like C. Or even lower, like assembler, for when you REALLY need speed and efficiency.

Now that computers are so much more powerful, higher level languages like Python are more desirable. They make it much easier to get any particular thing coded and done, and they run fast enough. Mostly. This is very desirable for folks like sysadmins, who want to automate various things.

Operating system kernels and such, device drivers, things that work with hardware and need to be *fast* still tend to all be written in things like C. Or just programs intended to run on very small, weak, slow computers.

A systems programmer (someone working on the OS or its utilities, network infrastructure, etc) will still need C, or relatives.

A sysadmin or regular person can get by with a scripting language, of which Python is the leading candidate these days. (Used to be Perl, and before that shell. Those are still used. I can get by in either of those.)

As a sysadmin, evolving to keep up with the world as it currently is, knowing Python is *very* helpful. Many scripts you'll run into are written in it, many of the newer cooler tools use it, or at least integrate with it.

Oh I should add, around 1991 (or 2? 3? I forget exactly) or so when it was clear that engineering wasn't happening, a friend gave me a copy of THE book on C (K&R) and said, 'need a job, learn this'. I did in fact work through the entire book and learn a bit of C, but found it exquisitely painful. So painful in fact, I got a job selling books (many of them copies of K&R) instead of coding C, for 1/4 the money of a coding job. Then my inherent geeky problem solving skills set me on the path to accidental sysadminhood.

Anyway, short version of *that* is, unless you know you need to know C, I recommend learning Python instead.

Re: Does not follow...

Posted: Fri Nov 17, 2017 4:47 pm
by Steamforger
We watched this happen yesterday afternoon standing outside the office. Sky Dick

I hope the pilot isn't punished too badly :lol:

Re: Does not follow...

Posted: Sat Nov 18, 2017 3:39 pm
by Rich Jordan
Greg wrote:
Weetabix wrote:
Greg wrote:As time goes by, I more and more strongly feel I ought to learn Python.
I recently decided to try C because that's what the "experiments" that came with my Raspberry Pi starter kit have code for. Of course, they also have the Python code.

Why is Python better than C or C better than Python?

ETA: putting on my seldom used "take an interest in others" hat, Gee, Greg. Tell us about what has motivated this desire? :geek:
ETA2: That sounds sarcastic, but the sarcasm is directed at me, not you.
C is a much lower level language, what you control with C is much closer to what the computer is actually doing.

So what you can do with 1 or 2 lines of Python code, you might need hundreds of lines of C code to do. The upside, for C, is that those hundreds of lines of C code are almost certainly going to be faster (possibly MUCH faster) than the 1 or 2 lines of Python.

That's the short version.
.....
.....
Anyway, short version of *that* is, unless you know you need to know C, I recommend learning Python instead.
To add just a little, with Python you both get (depending on platform) and can easily add a huge number of library packages that make it relatively easy to do a lot of things that might have to be written for C. Want to output PDF files? Excel spreadsheets? Control IO ports on the RPi? Run fancy-pants LED lighting? Connect a weather monitor? Do motion detection on the video feed from webcams? Thousands of different things that folks have pre-written libraries for; you include them, you can call the functions in the library, and they do the low level bit twiddling for you. Its possible there is support for some of these in C but it will be a small fraction of the support in Python

Re: Does not follow...

Posted: Tue Nov 21, 2017 6:58 am
by Netpackrat
https://www.nytimes.com/2017/11/18/opin ... ml?src=twr
There is a common liberal argument that our present polarization is the result of constant partisan escalations on the right — the rise of Newt Gingrich, the steady Hannitization of right-wing media.

Some of this is true. But returning to the impeachment imbroglio made me think that in that case the most important escalators were the Democrats. They had an opportunity, with Al Gore waiting in the wings, to show a predator the door and establish some moral common ground for a polarizing country.

And what they did instead — turning their party into an accessory to Clinton’s appetites, shamelessly abandoning feminist principle, smearing victims and blithely ignoring his most credible accuser, all because Republicans funded the investigations and they’re prudes and it’s all just Sexual McCarthyism — feels in the cold clarity of hindsight like a great act of partisan deformation.

For which, it’s safe to say, we have all been amply punished since.
Frank Zappa wrote:Do you love it? Do you hate it? There it is. The way you made it.

Re: Does not follow...

Posted: Wed Nov 22, 2017 1:36 pm
by Greg
Netpackrat wrote:https://www.nytimes.com/2017/11/18/opin ... ml?src=twr
There is a common liberal argument that our present polarization is the result of constant partisan escalations on the right — the rise of Newt Gingrich, the steady Hannitization of right-wing media.

Some of this is true. But returning to the impeachment imbroglio made me think that in that case the most important escalators were the Democrats. They had an opportunity, with Al Gore waiting in the wings, to show a predator the door and establish some moral common ground for a polarizing country.

And what they did instead — turning their party into an accessory to Clinton’s appetites, shamelessly abandoning feminist principle, smearing victims and blithely ignoring his most credible accuser, all because Republicans funded the investigations and they’re prudes and it’s all just Sexual McCarthyism — feels in the cold clarity of hindsight like a great act of partisan deformation.

For which, it’s safe to say, we have all been amply punished since.
Frank Zappa wrote:Do you love it? Do you hate it? There it is. The way you made it.
OMG.

If that hit print in the New York Times, the jig is up. The purge is coming.

Re: Does not follow...

Posted: Wed Nov 22, 2017 4:22 pm
by Rich
Clinton at his worst was worth at least ten of AlGore.

Please, please be careful what you wish for.