Mailing List Archive

1 2 3 4  View All
Re: New Python implementation [ In reply to ]
Mr Flibble schreef op 15/02/2021 om 0:32:
> On 14/02/2021 23:00, Christian Gollwitzer wrote:
> I'm not saying that it is unfeasible or very difficult. I'm saying that it is a lot of work, and for a single developer who has this as a side project / support for his graphics engine and who wants to beat existing implementations wrt. speed, I'm saying it is going to take a lot of time. It'definitely impossible by "defining a few JSON schema files", as Leigh claims with his "universal compiler". There definitely IS a lot of stuff in a baseline CPython interpreter - a (seemingly) simple thing like "print" will have an implementation of 1000 lines in C with all the formatting library, file I/O etc. Arbitrary precision integers - another library, networking - yet another and so on.
>
> There will only be one schema file and it is will be a relatively small task which certainly isn't "impossible": I should have a working implementation by the summer.

So your claim is that your compiler is able to, or will be able to,
compile any language just by specifying a small schema file. Great!

Do you maybe have a proof-of-concept? A simple language with a simple
schema file to test the basic workings of your compiler, like your
neoscript or perhaps something like a minimal variant of Python? I'm
curious what such a schema file would like look, and especially how you
use it to not only specify the syntax but also the semantics of the
various languages.

Is it your intention to not only compile procedural and object-oriented
languages, or also functional languages such as Haskell, Ocaml, Scheme?

--
"Honest criticism is hard to take, particularly from a relative, a
friend, an acquaintance, or a stranger."
-- Franklin P. Jones

Roel Schroeven

--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
On 2021-02-15, Roel Schroeven <roel@roelschroeven.net> wrote:

> Is it your intention to not only compile procedural and object-oriented
> languages, or also functional languages such as Haskell, Ocaml, Scheme?

And Prolog!

--
Grant



--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
Grant Edwards schreef op 15/02/2021 om 21:59:
> On 2021-02-15, Roel Schroeven <roel@roelschroeven.net> wrote:
>
>> Is it your intention to not only compile procedural and object-oriented
>> languages, or also functional languages such as Haskell, Ocaml, Scheme?
>
> And Prolog!

Ha, yes, that one was the next one I thought about, but in the I decided
to leave it out.

--
"Honest criticism is hard to take, particularly from a relative, a
friend, an acquaintance, or a stranger."
-- Franklin P. Jones

Roel Schroeven

--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
And C.

Thank you.


On Mon, Feb 15, 2021, 3:56 PM Grant Edwards <grant.b.edwards@gmail.com>
wrote:

> On 2021-02-15, Roel Schroeven <roel@roelschroeven.net> wrote:
>
> > Is it your intention to not only compile procedural and object-oriented
> > languages, or also functional languages such as Haskell, Ocaml, Scheme?
>
> And Prolog!
>
> --
> Grant
>
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
--
https://mail.python.org/mailman/listinfo/python-list
RE: New Python implementation [ In reply to ]
Grant,

Haven't thought about Prolog in a LOOONG time but it had some wild twists on
how to specify a problem that might not be trivial to integrate with other
languages as our now seemingly censored person with much delusion of
grandeur suggests. It is a language that does not specify what to do but
more what rules an answer must abide by.

Perhaps he should go to work for the Star Trek Federation and improving
their Universal Translator that can learn any alien language in about two
sentences. I am sure he will tell us it would be trivial for him or her
along with other Fibbles he/she tells.

Am I the only one who found it amusing, back to Python, that a recent attack
on Python was about a fairly trivial problem to solve in most languages, let
alone Python. Toy language does not normally apply to a fairly mature
language, regularly extended to do many things in many ways, unless anything
not fully standardized is a toy. I consider many such to become toys as they
end up near the end of their lives and hard to extend further.

I think the question was as simple as how to find the first period in a
string (assuming it exists?) and replace it with an @ and not subsequent
ones. Not very challenging even using very basic commands in a computer
language. Computing 101?

Can you name any language where that is hard to do from scratch? Sure, many
will provide a ready-made function that does it in one line of code (or a
partial line) but most languages let you use something like a loop that lets
you look at one letter of a "string" variable at a time and perhaps copy it
to a new one. A logical variable can be set so you conditionally replace
just the first instance. Whether changed in place or in a copy, it seems
trivial.

So why snide comments that you need more than a toy language when this is
precisely what is doable even in a toy language, but so commonly done that
many better languages (and Python definitely is included) give you an
assortment of built-in functionality to make it easy, and then dozens of
other ways in modules you can load ...

Now there are fairly complex things that a user cannot easily build from
scratch or find a ready-made solution. There may well be say a PROLOG
program that is simple and elegant and very hard to solve using Python, let
alone a toy language.

To me, all languages are toys, albeit for different age/experience groups.

-----Original Message-----
From: Python-list <python-list-bounces+avigross=verizon.net@python.org> On
Behalf Of Grant Edwards
Sent: Monday, February 15, 2021 4:00 PM
To: python-list@python.org
Subject: Re: New Python implementation

On 2021-02-15, Roel Schroeven <roel@roelschroeven.net> wrote:

> Is it your intention to not only compile procedural and
> object-oriented languages, or also functional languages such as Haskell,
Ocaml, Scheme?

And Prolog!

--
Grant



--
https://mail.python.org/mailman/listinfo/python-list

--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
On Thu, Feb 11, 2021 at 1:49 PM dn via Python-list <python-list@python.org>
wrote:

> When I first met it, one of the concepts I found difficult to 'wrap my
> head around' was the idea that "open software" allowed folk to fork the
> original work and 'do their own thing'. My thinking was (probably)
> "surely, the original is the authoritative version". Having other
> versions seemed an invitation to confusion and dilution.
>
> However, as soon as (open) software is made available, other people
> start making it 'better' - whatever their own definition of "better".
>
> Yes, it is both a joy and a complication.
>
> ...
>
> Wishing you well. It seems (to (neos-ignorant) me at least) an ambitious
> project. There are certainly times when 'execution speed' becomes a
> major criteria. Many of us will look forward to (your development of) a
> solution. Please let us know when it's ready for use/trials...
>

Well put! Thank you for this thoughtful and informative message. You
obviously put substantial work into it.
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
On 2021-02-15, Avi Gross via Python-list <python-list@python.org> wrote:

> Haven't thought about Prolog in a LOOONG time but it had some wild
> twists on how to specify a problem that might not be trivial to
> integrate with other languages as our now seemingly censored person
> with much delusion of grandeur suggests. It is a language that does
> not specify what to do but more what rules an answer must abide by.

Of all the languages I've used, Prolog was by far the hardest to get
my head around. The dialect I used the most (which still wasn't much)
was part of Digitalk's Smalltalk system. I don't recall if Digitalk
Prolog was written entirely in Smalltalk, or if it was just integrated
into the Smalltalk system as an opaque object.

--
Grant

--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
On 15/02/2021 22:24, Roel Schroeven wrote:
> Grant Edwards schreef op 15/02/2021 om 21:59:
>> On 2021-02-15, Roel Schroeven <roel@roelschroeven.net> wrote:
>>
>>> Is it your intention to not only compile procedural and object-oriented
>>> languages, or also functional languages such as Haskell, Ocaml, Scheme?
>>
>> And Prolog!
>
> Ha, yes, that one was the next one I thought about, but in the I decided
> to leave it out.

Yes, Prolog is definitely different. When I was at Uni' in the mid 80s
we all got taught Prolog because the Japanese had promised to produce
a 5th generation computer by 1990 and it would be based on Prolog.
We're still waiting, but in the meantime we got the internet and GUIs.

Looks like Sun got it right - "the network is the computer"...

--
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


--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
On Mon, Feb 15, 2021 at 3:25 PM Grant Edwards <grant.b.edwards@gmail.com>
wrote:

> On 2021-02-15, Avi Gross via Python-list <python-list@python.org> wrote:
> Of all the languages I've used, Prolog was by far the hardest to get
> my head around. The dialect I used the most (which still wasn't much)
> was part of Digitalk's Smalltalk system. I don't recall if Digitalk
> Prolog was written entirely in Smalltalk, or if it was just integrated
> into the Smalltalk system as an opaque object.
>
I actually found Prolog to be a lot like /usr/bin/make.

It's an OK language if everything you need to do can be solved well using a
depth first search. Otherwise, it kind of gets in the way.
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
Hi, guys,
Let me try to throw in another one - PL/1.
This guys used to be very popular with the accounting community...

Thank you.

On Mon, Feb 15, 2021 at 9:51 PM Alan Gauld via Python-list
<python-list@python.org> wrote:
>
> On 15/02/2021 22:24, Roel Schroeven wrote:
> > Grant Edwards schreef op 15/02/2021 om 21:59:
> >> On 2021-02-15, Roel Schroeven <roel@roelschroeven.net> wrote:
> >>
> >>> Is it your intention to not only compile procedural and object-oriented
> >>> languages, or also functional languages such as Haskell, Ocaml, Scheme?
> >>
> >> And Prolog!
> >
> > Ha, yes, that one was the next one I thought about, but in the I decided
> > to leave it out.
>
> Yes, Prolog is definitely different. When I was at Uni' in the mid 80s
> we all got taught Prolog because the Japanese had promised to produce
> a 5th generation computer by 1990 and it would be based on Prolog.
> We're still waiting, but in the meantime we got the internet and GUIs.
>
> Looks like Sun got it right - "the network is the computer"...
>
> --
> 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
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
On Mon, Feb 15, 2021 at 8:52 PM Igor Korot <ikorot01@gmail.com> wrote:

> Hi, guys,
> Let me try to throw in another one - PL/1.
> This guys used to be very popular with the accounting community...
>

Actually PL/I is basically proprietary Pascal - from IBM. My Intro Comp
Sci classes at the University of Cincinnati were in PL/I, because IBM had
an office not far from the University, and they liked to hire interns from
UCinci. I was told that otherwise the classes would've been in Pascal.
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
On 16/02/2021 17.57, Dan Stromberg wrote:
> On Mon, Feb 15, 2021 at 8:52 PM Igor Korot <ikorot01@gmail.com> wrote:
>
>> Hi, guys,
>> Let me try to throw in another one - PL/1.
>> This guys used to be very popular with the accounting community...
>>
>
> Actually PL/I is basically proprietary Pascal - from IBM. My Intro Comp
> Sci classes at the University of Cincinnati were in PL/I, because IBM had
> an office not far from the University, and they liked to hire interns from
> UCinci. I was told that otherwise the classes would've been in Pascal.


Might a coincidence of location have been conflated with language
development?


PL/I (note the Roman "one") was developed out of the IBM System/360
effort, ie one computer architecture for all types of users (cf
different computers for 'commercial' and 'scientific' clients - which
you can see again today in AWS' range of compute options, for example).
It was to be 'one language to rule them all'.

Initially, it was based on FORTRAN. We joked that it took all of the bad
parts of FORTRAN and COBOL and mashed them into a single ... language.
However, like many such efforts, it attempted to take 'the best' from
many sources (including ALGOL).

Sadly, (maybe) it, like Ada (another attempt to be 'all things to all
men') only ever really existed in a niche market.


Pascal, named after the mathematician and philosopher the French credit
with 'inventing the computer', was developed in the European world -
which even back-then had marked differences in thinking to the American
approach/domination of computing.

Prof Niklaus Wirth published a seminal book "Algorithms + Data
Structures = Programs" (which I seem to have lost, somewhere in the
mists of time). I don't think it gave examples in Pascal, but it did use
a pseudo-code/-language which illuminated various ideas and ways of
developing programmatic solutions. As I recall, it (and Pascal) was very
ALGOL like, and thus heavily influenced by "stack architecture" (cf
IBM's collections of "registers" in an ALU). Certainly the language was
clearly based upon ALGOL-60. Clearly it led to the refinement and/or
development of Pascal.

Pascal's value as a teaching language was that it embodied many aspects
of structured programming, and like Python, consisted of a limited range
of items which could be learned very quickly (in contrast to PL/I's many
'bells and whistles'). Thus, once absorbed, learning attention could be
directed to ComSc/algorithms + data!

Pascal was also very efficient, to compile and to execute, which made it
a competent fore-runner of Micro-Python (etc) in the micro and
single-board computer arenae/arenas.

Without Python, I think I'd prefer to use (an updated) UCSD-Pascal or
Borland Turbo-Pascal to this very day! PL/I, not so much - even on a
mainframe project!
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
On Mon, Feb 15, 2021 at 9:37 PM dn via Python-list <python-list@python.org>
wrote:

> On 16/02/2021 17.57, Dan Stromberg wrote:
> > On Mon, Feb 15, 2021 at 8:52 PM Igor Korot <ikorot01@gmail.com> wrote:
> >
> >> Hi, guys,
> >> Let me try to throw in another one - PL/1.
> >> This guys used to be very popular with the accounting community...
> >>
> >
> > Actually PL/I is basically proprietary Pascal - from IBM. My Intro Comp
> > Sci classes at the University of Cincinnati were in PL/I, because IBM had
> > an office not far from the University, and they liked to hire interns
> from
> > UCinci. I was told that otherwise the classes would've been in Pascal.
>
>
> Might a coincidence of location have been conflated with language
> development?
>
Nah. All 3 are in the Algol family: Algol, Pascal, PL/I.

I'll grant you that PL/I is a "big language" though. It didn't rely on
external libraries as much as it should have.
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
Am 15.02.21 um 21:37 schrieb Roel Schroeven:
>
> So your claim is that your compiler is able to, or will be able to,
> compile any language just by specifying a small schema file. Great!
>
> Do you maybe have a proof-of-concept? A simple language with a simple
> schema file to test the basic workings of your compiler,

Here is the git repo:

https://github.com/i42output/neos

under languages/ you'll find different schema files.

Christian
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
Am 16.02.21 um 06:36 schrieb dn:
> Pascal's value as a teaching language was that it embodied many aspects
> of structured programming, and like Python, consisted of a limited range
> of items which could be learned very quickly (in contrast to PL/I's many
> 'bells and whistles').

ROFL. Maybe that was true for Python when it was first invented. Today
it is not "a few simple things". Even just the core language, anything
that's built into the interpreter if you leave out any standard
function, is enormous. To name a few: List comprehension, format
strings, iterator protocol, asynchronous programming, everything called
__dunderland. A minimal language with only very few basic rules, that
would be Scheme e.g. Of course, it doesn't mean that Scheme is easier to
program, but it is easier to write a compiler for it than for Python.

That is a misundestanding often presented - a language that is simple in
the sense of having a few simple rules, is usually hard to use. (e.g.
Brainfuck). A language which is easy to use, often comes with a large
variety of building blocks, to give you the right tool to choose for the
job at hands (e.g. Python), and therefore is "complex".

Christian

--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
Christian Gollwitzer writes:

> Am 16.02.21 um 06:36 schrieb dn:
>> Pascal's value as a teaching language was that it embodied many aspects
>> of structured programming, and like Python, consisted of a limited range
>> of items which could be learned very quickly (in contrast to PL/I's many
>> 'bells and whistles').
>
> ROFL. Maybe that was true for Python when it was first invented. Today
> it is not "a few simple things". Even just the core language, anything
> that's built into the interpreter if you leave out any standard
> function, is enormous. To name a few: List comprehension, format
> strings, iterator protocol, asynchronous programming, everything called
> __dunderland. A minimal language with only very few basic rules, that
> would be Scheme e.g. Of course, it doesn't mean that Scheme is easier to
> program, but it is easier to write a compiler for it than for Python.
>
> That is a misundestanding often presented - a language that is simple in
> the sense of having a few simple rules, is usually hard to use. (e.g.
> Brainfuck). A language which is easy to use, often comes with a large
> variety of building blocks, to give you the right tool to choose for the
> job at hands (e.g. Python), and therefore is "complex".
>
> Christian

In Norway, where I try to teach mathematics to highschoolers, programming has
recently entered the teaching of stem subjects.

Even if Python is my choice language for personal projects, I am not certain it
is the right language to use in a classroom context. My feeling is that Python
comes with way too much packed in, making it very hard for the students to get
to a level where they can sit down and be creative with their own
programming. You either guide them very, very deliberately, exposing piece by
piece of the language ... or you let them loose, having to explain the
difference in scoping between list comprehensions and for loops after three
weeks.

I am exaggerating ... a little.

I am not sure I agree that a language like Scheme or Logo or Brainfuck, with
their small number of building blocks, would be harder to learn.

To me, Python is the lego boxes from the early 2000s, where there were so many
specialized pieces that you felt that the original design might as well be the
only design.

Regards,
Tarjei
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
On 16/02/2021 07:35, Christian Gollwitzer wrote:
> Am 16.02.21 um 06:36 schrieb dn:
>> Pascal's value as a teaching language was that it embodied many aspects
>> of structured programming, and like Python, consisted of a limited range
>> of items which could be learned very quickly
>
> ROFL. Maybe that was true for Python when it was first invented. Today
> it is not "a few simple things". Even just the core language,

Python v1 was a good teaching language. v2 complicated it a bit
but it was still usable. v3 is no longer a good teaching language
(unless maybe you are teaching CompSci at university.)

In fact in v3 things are so complex that I seriously considered
dropping Python as the core language for my programming tutorial.
Until I started looking for an alternative, and there really isn't
anything much better. At least not that can also be used for real
projects once you've learned it.

But the sort of change that has made it complicated for beginners
is range(). range() used to be simple - it returned a list of numbers
in the range specified. The hardest thing to explain was why it
stopped one short of the upper limit. Now range returns a
"range object". Say what? How do explain a range object to a beginner?
And you can't avoid it because the name pops up in the interpreter.

And that's just one example, the language is now full of meta goodness
that makes it incomprehensible to beginners. In a teaching environment,
with a teacher present to answer questions, it's probably usable,
but for a self guided course it's increasingly inscrutable.

--
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


--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
> In Norway, where I try to teach mathematics to highschoolers,
> programming has recently entered the teaching of stem subjects.
>
> Even if Python is my choice language for personal projects, I am not
> certain it is the right language to use in a classroom context.
> ...
> I am not sure I agree that a language like Scheme or Logo or
> Brainfuck, with their small number of building blocks, would be harder
> to learn.

Does this mean that you also try to teach programming to highschoolers,
or is there a different (maybe dedicated) teacher to that? What language
do they use? And does it influence math education at all? (Coming from
someone who sometimes tries to teach undergraduates about math).

- David Lowry-Duda
--
https://mail.python.org/mailman/listinfo/python-list
RE: New Python implementation [ In reply to ]
Christian,

Thanks for sharing. I took a look and he does have a few schemas for Ada and
C from TWO YEARS ago. Nothing about the infinite number of other languages
he plans on supporting, let alone Python. And what he has is likely not
enough to do what he claims he can do easily and rapidly.

What gets me is that many languages severely overload the use of some
characters and tokens so they can mean many things based on the context and
capturing that is much harder than declaring what is a keyword. Worse, some
languages like PERL make so many things optional, that you can write very
brief programs that keep implicitly assuming the previous part stored
results in $_ and seem at first to be magical as the actual code does not
seem connected to anything. I am not so sure there is a reasonable way to
program ALL existing language his way & to have one ring-like compiler to
rule them all, albeit you might be able to consolidate several somewhat
similar languages.

I also wonder how efficient such a universal compiler (maybe technically not
a compiler) would be but if it was only used once, maybe not. But didn't he
also say this thing would work in an interactive mode line by line?

It reminds me of when I was studying concepts about various takes on a
Turing Machine for my thesis. It has been proven that a Turing Machine can
theoretically solve any problem you can solve with a non-quantum computer. I
emphasize it is theoretical because we are talking about an infinite tape
with squares containing symbols that are read by a head that moves over it
either to the left or right based on the current state and so on. Fairly
simple programs like copying a million instances of "1" in a row can take
quite a while and really complex programs need near-infinite times or
infinitesimal time per step. What is POSSIBLE is far from useful.

I feel the same way about NEOS. Given a sufficiently advanced and convoluted
schema you can write a sufficiently convoluted computer program that might
halt with an answer -- meaning it will compile a valid program written in a
language that is completely defined by that schema and perhaps additional
info. We know it can be done because each language has existing compilers
and/or interpreters that do so, without an explicit schema.

But to have a program that can take any schema whatsoever and do what is
needed is a bit much. Existing languages were simply not designed with this
in mind and new/old languages might feel constrained about designing new
features that will not be able to fit within an existing schema.

In particular, how do you handle multiple versions of a language like Python
2.X and the incompatible Python 3.X and the eventual re-re-designed Python
4.Y? They all may be placed in files ending in .py!

There is nothing wrong with thinking out of the box or making grand plans.
But I have known people ranging from overly optimistic to manic who think
nothing of making extraordinary claims and may actually believe it. I would
not be shocked if a subset of what is being suggested for NEOS might be done
by a large team in a few decades but by then, we may all be using quantum
computers and a whole new set of languages to take advantage of new
paradigms like superposition ...

-----Original Message-----
From: Python-list <python-list-bounces+avigross=verizon.net@python.org> On
Behalf Of Christian Gollwitzer
Sent: Tuesday, February 16, 2021 2:25 AM
To: python-list@python.org
Subject: Re: New Python implementation

Am 15.02.21 um 21:37 schrieb Roel Schroeven:
>
> So your claim is that your compiler is able to, or will be able to,
> compile any language just by specifying a small schema file. Great!
>
> Do you maybe have a proof-of-concept? A simple language with a simple
> schema file to test the basic workings of your compiler,

Here is the git repo:

https://github.com/i42output/neos

under languages/ you'll find different schema files.

Christian
--
https://mail.python.org/mailman/listinfo/python-list

--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
"Avi Gross" <avigross@verizon.net> writes:

> Thanks for sharing. I took a look and he does have a few schemas for Ada and
> C from TWO YEARS ago. Nothing about the infinite number of other languages
> he plans on supporting, let alone Python. And what he has is likely not
> enough to do what he claims he can do easily and rapidly.

The C schema says almost nothing about C. It lists one kind of comment
and a few type names. Significantly, it says almost nothing about the
semantics of even the tiny fragment of C presented.

Attempts at a universal compiler stalled in the 1980s (though there may
have been some new developments since I stopped looking) because
expressing the semantics of different languages is so very hard. In
fact, much of the interest in pursuing the idea came from benefits that
would be derived simply from having a language's semantics formally
described.

I don't think there is anything to see here. If the author had come up
with some new ways to tackle any of the problems, he would be telling
people about these, not saying "be patient" (and bad-mouthing CPython).

--
Ben.
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
I agree to all the rest of your post, but this:

Am 16.02.21 um 09:57 schrieb Tarjei Bærland:
> I am not sure I agree that a language like Scheme or Logo or Brainfuck, with
> their small number of building blocks, would be harder to learn.


is strange. I'm not sure, have you actually looked at Brainfuck? Maybe
there is also confusion what means "learning" a programming language.
For me, learning a language does not mean to remember the rules and
keywords, but to be able to write useful programs. Indeed, Brainfuck
with its 8 commands is easy to remember, but it comes at a very high
price: you can't do anything useful with it with reasonable effort. It
is unusable even for pure computer science stuff. It is easy to see that
BF is Turing complete, so please write a BF program to compute the
ackermann function. Should be easy, just three rules ;) I'd definitely
choose Python to do it here.

In that sense, Scheme also appears to be the Brainfuck of functional
programming to me. It is not much more than the pure untyped lambda
calculus, and by definition this allows you to compute anything, just
like Brainfuck is a Turing machine. Actually it is impressive that you
can write actual useful code with such a minimalist language (infix
math? Pure bloat!). OTOH it feels like "assembly" compared to more
evolved functional languages like, e.g. Haskell.

Christian
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
On 2/16/21 10:58 AM, Ben Bacarisse wrote:
> Attempts at a universal compiler stalled in the 1980s (though there may
> have been some new developments since I stopped looking) because
> expressing the semantics of different languages is so very hard. In
> fact, much of the interest in pursuing the idea came from benefits that
> would be derived simply from having a language's semantics formally
> described.
>
> I don't think there is anything to see here. If the author had come up
> with some new ways to tackle any of the problems, he would be telling> people about these, not saying "be patient" (and bad-mouthing CPython).

Indeed, in all seriousness if he is successful, I look forward to
reading his PhD dissertation, because it would be worthy of a PhD,
especially if he made some breakthroughs in metacompiler design. His
comments don't give me hope, though.

Seems a bit paradoxical to me to, on the one hand, express a desire to
build a Python implementation, but on the other hand, mock Python as a
toy language. Why bother with Python at all?

I wish him luck and maybe he'll eventually come back to the community
with something to show and impress with.

--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
David Lowry-Duda writes:

>> In Norway, where I try to teach mathematics to highschoolers,
>> programming has recently entered the teaching of stem subjects.
>>
>> Even if Python is my choice language for personal projects, I am not
>> certain it is the right language to use in a classroom context.
>> ...
>> I am not sure I agree that a language like Scheme or Logo or
>> Brainfuck, with their small number of building blocks, would be harder
>> to learn.
>
> Does this mean that you also try to teach programming to highschoolers,
> or is there a different (maybe dedicated) teacher to that? What language
> do they use? And does it influence math education at all? (Coming from
> someone who sometimes tries to teach undergraduates about math).
>
> - David Lowry-Duda

Yes, that also means that mathematics teachers are teaching programming
as well. For my part, it's a welcome change, and I've already been
teaching another programming course for a couple of years, but a lot of
teachers are having to start programming alongside their students.

I don't have any numbers for this, but I'd be surprised if less than 95%
of all teachers used Python for this. (I know of no exception.)

I think it's too soon to tell whether it affects the education. However,
I would have liked to better know the motivation for including
it. Python seems like one of several good choices if you want to
manipulate mathematical objects, perhaps mixing in som symbolic algebra
via Sympy, and other "high level concepts". However, if the aim is for
the students to quickly experience what it's like to design their own
simple algorithm without excessive guidance, Python might not then be the
optimal choice.

- Tarjei Bærland

PS: I can't remember in what context I visited it, but thanks for an
inspiring site.
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
Christian Gollwitzer writes:

> I agree to all the rest of your post, but this:
>
> Am 16.02.21 um 09:57 schrieb Tarjei Bærland:
>> I am not sure I agree that a language like Scheme or Logo or Brainfuck, with
>> their small number of building blocks, would be harder to learn.
>
>
> is strange. I'm not sure, have you actually looked at Brainfuck? Maybe
> there is also confusion what means "learning" a programming language.
> For me, learning a language does not mean to remember the rules and
> keywords, but to be able to write useful programs. Indeed, Brainfuck
> with its 8 commands is easy to remember, but it comes at a very high
> price: you can't do anything useful with it with reasonable effort. It
> is unusable even for pure computer science stuff. It is easy to see that
> BF is Turing complete, so please write a BF program to compute the
> ackermann function. Should be easy, just three rules ;) I'd definitely
> choose Python to do it here.
>
> In that sense, Scheme also appears to be the Brainfuck of functional
> programming to me. It is not much more than the pure untyped lambda
> calculus, and by definition this allows you to compute anything, just
> like Brainfuck is a Turing machine. Actually it is impressive that you
> can write actual useful code with such a minimalist language (infix
> math? Pure bloat!). OTOH it feels like "assembly" compared to more
> evolved functional languages like, e.g. Haskell.
>
> Christian

To me, it depends on what you want out of including programming in
mathematics education.

Sure, Brainfuck is two steps too far, but Scheme or Logo I'd wager be
excellent languages to get the students into computational
thinking. Haskell might be a good choice as well, I do not have enough
experience with it to say.

If the aim is to quickly get the students to "be creative" with
programming by themselves, my feeling is that Python is too unwieldy for
a beginner.

In a programming course I am teaching, one of the goals is for the
students to distinguish "high level" and "low level" languages. I've
used Brainfuck as an example of a programming language at a low level of
abstraction. That session is often the most engaging throughout the
year. The students are sitting writing their own code after a few
minutes. They get the feeling of designing their own computational
procedure much quicker than in Python. (Yes, of course, the introductory
excercises in Python are a bit more advanced than "add two numbers".)

I am honestly not sure what quite what my feelings are regarding this,
perhaps Python is the best of all possible options.

- Tarjei

Note, I am emphatically saying this in the context of a maths class.
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
On Tue, Feb 16, 2021 at 1:23 PM Tarjei Bærland via Python-list <
python-list@python.org> wrote:

> Sure, Brainfuck is two steps too far, but Scheme or Logo I'd wager be
> excellent languages to get the students into computational
> thinking. Haskell might be a good choice as well, I do not have enough
> experience with it to say.
>
I am not a Haskell expert by any stretch. But I did play with it a bit.

It's a fascinating language. But I think the language is hobbled by poor
error messages from the main compiler, GHC. I've been told GHC has a
rather elegant implementation, but that came at the cost of the quality of
error messages.
https://www.reddit.com/r/haskell/comments/54l3ug/readable_error_messages_like_in_elm/

There was a project to produce a somewhat restricted Haskell implementation
with better error messages, but sadly that project is no longer maintained.
https://wiki.haskell.org/Hugs
--
https://mail.python.org/mailman/listinfo/python-list

1 2 3 4  View All