[Tutor] origins bootstrapped.

Alan Gauld alan.gauld at yahoo.co.uk
Wed Nov 21 19:54:29 EST 2018


On 21/11/2018 16:31, Avi Gross wrote:
> Alan has been involved with Python for a long time so he has more to offer
> historically.

I'm not so sure about that, several folks on this list
have been around longer than me. And I don't follow the
main comp.lang.python list that closely.

I'm simply giving my perspective for whatever that may
be worth.

> OK, horrible analogy but interesting naming. So some say Guido started with
> learning his ABC and then became educated enough to understand Monty Python
> and reach for the holy grail.

Made me laugh out loud!

> Back when my group was programming in C, I was sent to Denver for a class in
> Lex/Yacc to learn how to use C libraries that now look primitive. One was a
> lexical analyzer and the other sort of a parser somewhat rudely named as Yet
> Another Compiler-Compiler.

Still powerful tools and in active use in several projects.
They were great for quickly bootstrapping a small bespoke language.

> some think python as a formal language is being pushed by industry in
> directions that may not meld as well for its use in other contexts like for
> teaching students. How much of that is due to it being a relative open and
> free product? 

I think that's true but not necessarily bad.
It just takes the language in as different direction.
And as you said, that happens in many projects. They start
as one ting and end up someplace entirely different.
I remember one project that started out as a network
management system for a fairly obscure protocol and
wound up as both a customer service system for our Global
Corporate clients and as part of the monitoring system
for the English Channel Tunnel!. Very different applications
of the same root code base.

> ...Is there room for a smaller core
> language that remains good for teaching purposes and that is small enough to
> fit in a Rasberry pi, while other versions are of industrial strength? Do we
> already sort of have some of that?

We sort of have that. Python v3 certainly works well on the pi.
We could certainly have a smaller language for teaching but then
we had that in ABC and nobody used it. Students don't like
learning stuff that they can't use in the real world.

And if you want purity for beginners we already have Logo,
Scheme, Squeak/Scratch and a few others. But none of those
really work well in the wider world. Which is why I still
recommend python, warts and all.

> I was thinking of how many languages and environments have been looking at
> working using parallelism. Most people simply have no need 

Absolutely and for beginners a single thread is more than
enough to cope with.


> I was thinking about the little project I mentioned the other day. Should
> some of it be done in parallel using methods available? 

It sounded a lot like a job for the map-reduce paradigm.
Which is parallel where it can be and sequential where
it should be...

> An obvious speedup might be had by starting up N threads with each opening
> one file and doing what I said above into one shared process with N
> variables now available. But will it be faster?

Trying to calculate (or guess) this kind of thing in
advance is near impossible. The best solution is to
prototype and measure, making sure to do so on typical
data volumes.

That having been said if you know (or discover) that
you definitely need parallelism then its definitely worth
revisiting the design to ensure the data structures
and overall workflow are optimised for a parallel approach.

> ...I will pause and simply say that I opted not to bother
> as the darn program finished in 5 or 10 seconds.

Exactly so.
AS the famous quote says "Premature optimisation is..."

> For heavy industrial uses, like some of the applications in the cloud
> dealing with huge problems, it may well be worth it.

In many cases it's the only practical solution.
Almost all of my industrial programming has involved multi
processing and threading. Almost none (I think one )of my
personal programming projects has needed it.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list