[Tutor] Tungsten teaching method
ThreeBlindQuarks
threesomequarks at proton.me
Fri Jul 14 21:45:37 EDT 2023
Interesting Alan and I want to just slightly correct one thing, not that I am an expert.
There are two somewhat related things called Wolfram|Alpha and the Wolfram Language. You may be combining both in your thoughts. The first has a sort of Natural Language Interface and the second is the formal language I was talking about.
Of course, one aspect of the Wolfram Language is that you can call on the first in various ways so it interrogates a knowledge base and seamlessly returns objects or info you can drill down in. I, personally, am thinking of how to teach the language.
As I continue reading the book I am seeing more data structures that seem to be variations on dictionaries and sets with rather different names and notations and approaches.
My main point is that people who design languages often have one or more themes in mind. I know in a language like R, so much is vectorized that it feels natural to skip most loops as you can just use operations on complete vectors that sort of do everything at once. Similarly, it is very common to apply a function to something like a list that returns a list of the results. Python has that to an extent but because it was built on lists as a main component, some people feel more comfortable using the techniques on the data structures added in numpy/pandas.
I think the point you make about levels of languages includes doing things at higher levels and that can be anything from ideas like the above to just having a huge library of flexible functions that handle most of your needs so you rarely HAVE TO provide your own detailed designs.
But I keep suspecting the rest of the stuff is in there just as in python where you have all kinds of pre-defined objects and functions you can use, but sometimes feel a need to subclass or apply a decorator to tweak it to your needs.
My point though was that anyone answering a question here may find their response is challenging. A recent example wanted an iterative solution and might have not been ready for a similar recursive solution.
Sent with Proton Mail secure email.
------- Original Message -------
On Friday, July 14th, 2023 at 3:33 PM, Alan Gauld via Tutor <tutor at python.org> wrote:
> On 14/07/2023 19:09, ThreeBlindQuarks via Tutor wrote:
>
> > Do you start with the basics as in ...basic types... IF statements...
>
>
> That is the traditional approach to 3G procedural languages
> that most people use. But...
>
> > So I decided to learn another language called WOLFRAM.
>
>
> Yes, it comes on the RaspberryPi microcomputer version of Linux.
> It is a 4G type language similar, as you say to Mathematica.
>
> > What got me is that for an ELEMENTARY text, it skips all the elementary parts.
>
>
> Thats because you have to approach it differently to 3G languages.
> You express your problem and let the language solve it. Much of
> it is done using symbolic math equations etc. In that sense it
> is similar to Prolog which is also typically taught in a more
> "exemplary" style than 3G languages. (Or indeed SQL which
> also doesn't explicitly have concepts like variables and
> loops etc)
>
> > ..how to create an object. I know it all has to be THERE
>
>
> Not necessarily. 4G (and higher) languages often don't provide
> those explicit concepts because they don;t expect the user to
> be deciding how to solve the problem so the internals of the
> language implementation create variables(as in temporary storage)
> build loops and make major decisions. Usually you can get in
> through a back door to do those things if you must (Prolog
> for example does allow such things) but they are advanced concepts.
> For example, its hard to envision how OOP fits into a declarative
> style of programming as used in Prolog. (It can be done and I've
> seen an ObjectProlog interpreter somewhere on the net but its not
> obvious, especially to a normal Prolog user.)
>
> > ... functions appropriately, often in a nested fashion.
>
>
> And that nesting is the key. The values stored in variables
> are simply passed as inputs to outer functions. (Javascript is often
> used in a similar way with code like
>
> function f(value, function(another_value), function()...)
>
> And the parametrized functions can be defined inline which
> leads to fairly tricky code to read but relatively few explicit
> variables, certainly at the global level.
>
> > The point here is that we often have little idea about
> > the person asking a question and their background.
>
>
> Indeed.
>
> > ...determine if a number is prime, rather than suggesting
> > some technique using an algorithm, they would just suggest
> > using PrimeQ[number] and voila!
>
>
> And that is typical of 4G and 5G languages.
> You give the interpreter the problem to solve and don't
> worry too much about how its done.
>
> > ...in effect they would apply a function to a list returning
> > the list of results. If you want just the ones that are prime,
> > you can use a sort of embedded if statement.
>
>
> That sounds like functional programming. Even in Python we have
> similar tools like generators and map(), reduce(), and others.
> Modules like itertools, functools, and some others remove or
> reduce the need for explicit loops and branches.
>
> > Python though is actually many paradigms in one.
>
>
> Indeed it is.
>
> > ... learn how computers work on a basic level and then
> > get into higher abstractions, it is very good.
>
>
> And that was (back in the 1990s) what Guido had in mind. A
> language that was useful for real world tasks but also
> suitable for teaching programming, in all its various guises.
> It also had to be easily extendible and easily embedded
> in other systems.
>
> > Some of what I describe is in there if you know where
>
>
> And that's true of most 5G languages. Even SQL(but you have
> to look very hard!)
>
> > In this forum, I suspect that unless asked otherwise,
> > we ought to remain in the lower levels.
>
>
> Yes. If someone knows enough to ask about other approaches
> we will oblige but in 90%+ of cases we are dealing with
> "students" who are learning conventional 3G programming.
>
> 4G languages are very good at what they do, but they tend
> to be focused on specific domains. It's not easy to build
> a GUI application in Wolfram or Prolog or to write a web
> server, say. But if a student is only interested in that
> niche area the 5G approach may be the best().
>
> The problems arise when they want to step outside the
> niche and discover they need to learn a whole new
> programming style. One that may initially seem very
> primitive and complex. Its like a Python programmer
> suddenly having to learn assembler...
>
> ()Although 4G languages often have their own steep learning
> curve. But it tends to kick in later. Basic usage can be
> picked up easily but the huge "vocabulary" of builtin
> functions can take a long time to master. Compare that
> with "primitive" C which originally only had about
> 2 dozen keywords. Everything else was functions in
> libraries.
>
> --
> 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
>
>
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list