Forums

Python question

Started by Tim Wescott March 31, 2015
Dimiter_Popoff <dp@tgi-sci.com> writes:

> On 07.4.2015 &#1075;. 10:56, David Brown wrote: >> ..... >> >> The younger generation seems to prefer web forums, stack overflow, >> facebook, etc. It's incomprehensible to me - web-based communication is >> so incredibly inefficient compared to Usenet (or mailing lists). But it >> means there are relatively few people who genuinely want answers, >> discussions and advice about straightforward practical C programming, >> and who want to do it using Usenet. >> > > I think it is indicative of the overall development, amazing how > H.G Wells has anticipated that in the 19-th century. Humans become > more and more useless, this is at the root of it all. Just because there > is no necessity for them to _do_ anything, they want just to click > and consume. We all want that, our curiousity is supposed to wrestle > this inclination but given enough temptation it just hopelessly loses > the battle. Only real need can win - and it is fading because we > have done our best to eliminate it, that's what we do by design > I guess. > I suppose I begin to sound like an old person, I am about to get 60 > this year, may be my perception is just down to that, I don't know.
Hear, hear, Dimiter. I feel the same way and I'm only 57... :) -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
On Mon, 06 Apr 2015 22:48:13 +0200, David Brown
<david.brown@hesbynett.no> wrote:

>On 01/04/15 22:45, Grant Edwards wrote: >> I never read c.l.c++, but I do remember how difficult c.l.c was...
>c.l.c++ is similar in style to c.l.c - except that mentions of C are >allowed in a limited fashion in c.l.c++, while mentioning C++ in c.l.c. >is considered heresy. The groups can be entertaining, and sometimes >enlightening, but they are not much use for beginners or programmers (no >matter how experienced) simply interested in practical use of the languages.
I've read some incredibly closed-minded C language-Nazi statements that were attributed to Linus Torvalds, the Linux guy. Ex: "C++ is a horrible language. It's made more horrible by the fact "that a lot of substandard programmers use it, to the point where it's "much much easier to generate total and utter crap with it." Supposedly continued to say that at least it keeps all the crappy programmers away from C. That mindset may be setting the tone for the C group. Hard to imagine why anyone programming in C could have such a chip on their shoulder about C++.
On Tue, 31 Mar 2015 16:20:17 -0500, Tim Wescott
<seemywebsite@myfooter.really> wrote:

>On Tue, 31 Mar 2015 17:55:34 +0000, Grant Edwards wrote: > >> On 2015-03-31, Tim Wescott <seemywebsite@myfooter.really> wrote:
>>> So -- does Python let you grab a handle to a data object, >> >> Sorry, I've no clue what "grab a handle" means. > >In C/C++ it's taking an address.
Tim, Python's "id()" function returns something like a handle in C/C++. No guarantee that it's a true memory address (like C's "&" operator), but it will be a unique reference to that location. Some comparison/equality ops use id() internally to verify that references are pointing to the same object. Python is not nearly the low-level "assembly code generator" that C is though, so you couldn't just arbitrarily write to those locations. In fact, in languages that do automatic ('non-deterministic') memory management, objects can get shuffled around behind the scenes as the memory management functions ('garbage collector') deallocs unused objects and defragments memory space. In C#, you can 'pin' objects that need to stay locked in place, and then pass that pointer to assembly code without worrying that the object will be moved. But I'm not sure how that can be managed in Python. Ref: https://docs.python.org/2/library/functions.html#id
On 08/04/15 10:53, Max wrote:
> Hard to imagine > why anyone programming in C could have such a chip on their shoulder > about C++.
Maybe http://yosefk.com/c++fqa/ would give you a few hints.
On 07.4.2015 &#1075;. 16:16, Randy Yates wrote:
> Dimiter_Popoff <dp@tgi-sci.com> writes: > >> On 07.4.2015 &#1075;. 10:56, David Brown wrote: >>> ..... >>> >>> The younger generation seems to prefer web forums, stack overflow, >>> facebook, etc. It's incomprehensible to me - web-based communication is >>> so incredibly inefficient compared to Usenet (or mailing lists). But it >>> means there are relatively few people who genuinely want answers, >>> discussions and advice about straightforward practical C programming, >>> and who want to do it using Usenet. >>> >> >> I think it is indicative of the overall development, amazing how >> H.G Wells has anticipated that in the 19-th century. Humans become >> more and more useless, this is at the root of it all. Just because there >> is no necessity for them to _do_ anything, they want just to click >> and consume. We all want that, our curiousity is supposed to wrestle >> this inclination but given enough temptation it just hopelessly loses >> the battle. Only real need can win - and it is fading because we >> have done our best to eliminate it, that's what we do by design >> I guess. >> I suppose I begin to sound like an old person, I am about to get 60 >> this year, may be my perception is just down to that, I don't know. > > Hear, hear, Dimiter. I feel the same way and I'm only 57... :) >
Come to think of it, I have been feeling like this for 20+ years... :D. I must have been aging prematurely I guess :-). Dimiter
On 4/7/15 8:21 AM, Dimiter_Popoff wrote:
> On 07.4.2015 &#1075;. 10:56, David Brown wrote: >> ..... >> >> The younger generation seems to prefer web forums, stack overflow, >> facebook, etc.
FB is a time suck (but, i guess we can say the same about USENET).
>> It's incomprehensible to me - web-based communication is >> so incredibly inefficient compared to Usenet (or mailing lists).
dsp.stackexchange has eclipsed comp.dsp a little, for me because i can do legit math expression on it.
>> But it >> means there are relatively few people who genuinely want answers, >> discussions and advice about straightforward practical C programming, >> and who want to do it using Usenet. >> > > I think it is indicative of the overall development, amazing how > H.G Wells has anticipated that in the 19-th century. Humans become > more and more useless, this is at the root of it all. Just because there > is no necessity for them to _do_ anything, they want just to click > and consume. We all want that, our curiosity is supposed to wrestle > this inclination but given enough temptation it just hopelessly loses > the battle. Only real need can win - and it is fading because we > have done our best to eliminate it, that's what we do by design > I guess. > I suppose I begin to sound like an old person, I am about to get 60 > this year, may be my perception is just down to that, I don't know.
same here. i'm chomping at the bit to get to some of my IRA to use to retire some debt and i have to wait until July 1, when i am 59.5 y.o. otherwise there's a 10% early withdrawal penalty. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On Wed, 08 Apr 2015 11:20:27 +0100, Tom Gardner
<spamjunk@blueyonder.co.uk> wrote:

>On 08/04/15 10:53, Max wrote: >> Hard to imagine >> why anyone programming in C could have such a chip on their shoulder >> about C++. > >Maybe http://yosefk.com/c++fqa/ would give you a few hints.
There are some valid things there, but a few I find kind of humorous. Any compiler problems are up to Microsoft or whomever. The main problems for those using the C++ compilers could be in the relatively vague error messages due to difficulties in parsing C++ syntax, but I've never found that to be a huge problem. Compile speed? That's not a big factor these days, as far as I know. Some of the other objections to C++ seem to be pinned to the absence of automated memory management. It's a feature that I love in C#, but that wouldn't necessarily be a great thing for those writing DSP or systems code. (You don't want the CPU going away for indeterminate periods of time, and then finding that your memory locations have changed.) I just look at C++ as C with objects, and in that sense, it is very effective at getting closer to a 'design patterns' type of model, which is near impossible in C. In other words, the points at that page are well taken, but they're not relevant to how I have used C++. You can pretty much use the C++ compiler to compile C code anyway. I'll take the minor disadvantage along with the major advantage of objects, structure and encapsulation.
On Tue, 07 Apr 2015 15:21:47 +0300, Dimiter_Popoff <dp@tgi-sci.com>
wrote:

>I think it is indicative of the overall development, amazing how >H.G Wells has anticipated that in the 19-th century. Humans become >more and more useless, this is at the root of it all. Just because there >is no necessity for them to _do_ anything, they want just to click >and consume.
Cute puppies on Youtube!
>We all want that, our curiousity is supposed to wrestle >this inclination but given enough temptation it just hopelessly loses >the battle. Only real need can win - and it is fading because we >have done our best to eliminate it, that's what we do by design >I guess.
Perhaps the paradigm is just in the process of being reformulated and finding a new balance. After all, there was never a direct survival- related need for music and art, and I look at those as the pinnacle of what humans have achieved. Something compels us toward that.
On 09/04/15 05:56, Max wrote:
> On Wed, 08 Apr 2015 11:20:27 +0100, Tom Gardner > <spamjunk@blueyonder.co.uk> wrote: > >> On 08/04/15 10:53, Max wrote: >>> Hard to imagine >>> why anyone programming in C could have such a chip on their shoulder >>> about C++. >> >> Maybe http://yosefk.com/c++fqa/ would give you a few hints. > > There are some valid things there, but a few I find kind of humorous. > Any compiler problems are up to Microsoft or whomever. The main > problems for those using the C++ compilers could be in the relatively > vague error messages due to difficulties in parsing C++ syntax, but > I've never found that to be a huge problem. Compile speed? That's > not a big factor these days, as far as I know. > > Some of the other objections to C++ seem to be pinned to the absence > of automated memory management. It's a feature that I love in C#, but > that wouldn't necessarily be a great thing for those writing DSP or > systems code. (You don't want the CPU going away for indeterminate > periods of time, and then finding that your memory locations have > changed.) > > I just look at C++ as C with objects, and in that sense, it is very > effective at getting closer to a 'design patterns' type of model, > which is near impossible in C. > > In other words, the points at that page are well taken, but they're > not relevant to how I have used C++. You can pretty much use the C++ > compiler to compile C code anyway. I'll take the minor disadvantage > along with the major advantage of objects, structure and > encapsulation.
Fundamentally my position is that I'll choose the tool that best supports and least hinders my solving my problem; any tool that introduces unnecessary problems is thrown out. I presume you are the same. You are using a subset of C++ that works for you. That's fine and pragmatic, but when you have a large systems different subsystems and people use different subsets for perfectly justifiable reasons. And in practice there can be problems reconciling operation of the different subsets. The problem with compilers is apparently more pernicious than you believe. My understanding is second hand (fortunately, deliberately), but it is based on the experience of people with much more experience that me at the sharp end of debugging C++ problems and on various C++ national standards committees and working groups. Apparently the definitions of the language are sufficiently vague that it is entirely possible that compiler writers and compiler users can /correctly/ have entirely differing opinions of what can/must/should happen in practical circumstances. It is even possible that different compiler writers disagree. BTW, I'm not talking about the clear "nasal daemons" issues. Two things made me give up on C++ as being irretrievably unusable. Firstly the endless philosophical discussions in the early-mid 90s about whether it should be possible or impossible to "cast away constness". The unresolved philosophy still leads to practical problems. Secondly the inability of the language designers to realise the dangerous baroque complexity of their creation. (Scarcely uniquie to C++, I add). In particular the designers didn't realise the complexity of the template sub-language, despite warnings. They were extremely embarrassed and backtracked furiously when someone submitted a simple program that caused the /compiler/ to emit the sequence of prime numbers /during compilation/. Yes, they hadn't noticed their template sub-language had grown like Topsy until it was Turing complete! If the language designers don't understand their creation, what chance do mere practicing mortals have?