Mailing List Archive

1 2 3 4  View All
Re: New Python implementation [ In reply to ]
On 12/02/2021 00:15, Alan Gauld wrote:
> On 11/02/2021 12:30, Mr Flibble wrote:
>
>> I am starting work on creating a new Python implementation
>> from scratch using "neos" my universal compiler that can
>> compile any programming language.
>
> Can i clarify that?
> Are you saying that you are going to recompile the existing
> C code for pyhton using yoour universal compiler and the
> resulting binary file will be a new implementation of
> the interpreter that you expect to be faster?

Nope.

>
> That's what it sounds like to me.
> In which case the question is not whether you can write a
> better interpreter than CPython but whether you can write
> a better compiler than GNU/MING/VC etc

See previous answer.

>
> While a universal compiler is certainly an interesting
> and challenging project I'm not sure how much it tells us
> about existing Python implementations.

The two things are unrelated; however it is well known that Python is slow.

>
> On the other hand, if you are planning on rewriting the
> existing interpreter in something other than C, what
> is that something?

Nope.

>
>> Sample neos session (parsing a fibonacci program,
>> neoscript rather than Python in this case):
>
> I'm not sure what relevance this has unless you want
> to rewrite Python in neoscript? Or are you translating
> the C into neoscript and then compiling it? But in a
> later response you seem to say neoscript was not involved?
>
> Slightly confused...
>

The neos Python implementation will consist of a schema file which describes the language plus any Python-specific semantic concepts that don't generalize to more than one language.

/Flibble

--
????
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
On 12/02/2021 21:46, Mr Flibble wrote:

> The neos Python implementation will consist of a schema file
> which describes the language plus any Python-specific semantic concepts

So the schema file is some kind of formal grammar definition of
the language?

And you "compile" this directly into machine code?
Is that the idea?

So when you say you have a universal compiler for any language
what you mean is that you can produce a compiler/interpreter
for any language from a language definition/schema. Is that it?

I'm still not sure I understand what exactly you are proposing
to do. What the final output looks like?

I'm assuming it's a new executable interpreter that can run any
valid python code. Is that correct?

--
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 2/12/2021 4:42 PM, Mr Flibble wrote:
> On 12/02/2021 02:45, Terry Reedy wrote:
>> On 2/11/2021 5:33 PM, Mr Flibble wrote:
>>> On 11/02/2021 22:25, Dan Stromberg wrote:
>>>> On Thu, Feb 11, 2021 at 2:00 PM Mr Flibble
>>>> <flibble@i42.removethisbit.co.uk>
>>>> wrote:
>>>>
>>>>> On 11/02/2021 21:13, Dan Stromberg wrote:
>>>>>> Does your project have a name yet?  I'd like to follow it through
>>>>>> google
>>>>>> alerts or an announcement mailing list.
>>>>>
>>>>> "neos" - https://neos.dev/ https://github.com/i42output/neos
>>>>>
>>>>
>>>> Pypi already appears to have another project named neos:
>>>> https://pypi.org/project/neos/
>>>
>>> neos isn't a Python package so that isn't a problem.
>>
>> Since it obviously is a Python package, as in importable into a Python
>> program, why do you deny it?
>
> You are mistaken: it isn't a Python package and it isn't importable into
> a Python program.

https://pypi.org/project/neos/ shows
import neos.makers as makers
import neos.cls as cls

When you wrote 'neos' without qualification right after the neos package
url, I though you were referring to the package, not your neos. My
mistake and your unclear writing.

--
Terry Jan Reedy


--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
On 13/02/2021 00:01, Alan Gauld wrote:
> On 12/02/2021 21:46, Mr Flibble wrote:
>
>> The neos Python implementation will consist of a schema file
>> which describes the language plus any Python-specific semantic concepts
>
> So the schema file is some kind of formal grammar definition of
> the language?
>
> And you "compile" this directly into machine code?
> Is that the idea?
>
> So when you say you have a universal compiler for any language
> what you mean is that you can produce a compiler/interpreter
> for any language from a language definition/schema. Is that it?
>
> I'm still not sure I understand what exactly you are proposing
> to do. What the final output looks like?
>
> I'm assuming it's a new executable interpreter that can run any
> valid python code. Is that correct?

It is a universal *compiler* so it compiles the python code to byte code and then optionally to machine code via a JIT which is then executed.

/Flibble

--
????
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
On 13/02/2021 16:09, Mr Flibble wrote:
> On 13/02/2021 00:01, Alan Gauld wrote:
>> I'm assuming it's a new executable interpreter that can run any
>> valid python code. Is that correct?
>
> It is a universal *compiler* so it compiles the python code to byte code
> and then optionally to machine code via a JIT which is then executed.

OK, sorry for being dense, but just to be absolutely clear.

You are going to create a Python compiler that will take existing
Python code and output a byte code file. (I assume the byte code
is not standard Python byte code?) And I assume the execution
environment for the bytecode is part of your neos system?

If that's correct, then how do you propose to deal with
regular Python byte code? And what would the Python disassembler
produce - Python assembler instructions or neos?

--
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 ]
Hi,
But most importantly - what is the reason for this ?
I mean - what problems the actual python compiler produce?

Thank you.


On Sat, Feb 13, 2021, 3:26 PM Alan Gauld via Python-list <
python-list@python.org> wrote:

> On 13/02/2021 16:09, Mr Flibble wrote:
> > On 13/02/2021 00:01, Alan Gauld wrote:
> >> I'm assuming it's a new executable interpreter that can run any
> >> valid python code. Is that correct?
> >
> > It is a universal *compiler* so it compiles the python code to byte code
> > and then optionally to machine code via a JIT which is then executed.
>
> OK, sorry for being dense, but just to be absolutely clear.
>
> You are going to create a Python compiler that will take existing
> Python code and output a byte code file. (I assume the byte code
> is not standard Python byte code?) And I assume the execution
> environment for the bytecode is part of your neos system?
>
> If that's correct, then how do you propose to deal with
> regular Python byte code? And what would the Python disassembler
> produce - Python assembler instructions or neos?
>
> --
> 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 13/02/2021 18:11, Alan Gauld wrote:
> On 13/02/2021 16:09, Mr Flibble wrote:
>> On 13/02/2021 00:01, Alan Gauld wrote:
>>> I'm assuming it's a new executable interpreter that can run any
>>> valid python code. Is that correct?
>>
>> It is a universal *compiler* so it compiles the python code to byte code
>> and then optionally to machine code via a JIT which is then executed.
>
> OK, sorry for being dense, but just to be absolutely clear.
>
> You are going to create a Python compiler that will take existing
> Python code and output a byte code file. (I assume the byte code
> is not standard Python byte code?) And I assume the execution
> environment for the bytecode is part of your neos system?

No neos is not a Python compiler: it is a *universal* compiler that can compile any programming language describable by a schema file and any language-specific semantic concepts. The byte code will be proprietary, yes, and will be executed by neos and/or JITed.

>
> If that's correct, then how do you propose to deal with
> regular Python byte code? And what would the Python disassembler
> produce - Python assembler instructions or neos?

The neos Python implementation will not be dealing with Python byte code in any form whatsoever.

/Flibble

--
????
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
On 13/02/2021 23:30, Igor Korot wrote:
> Hi,
> But most importantly - what is the reason for this ?
> I mean - what problems the actual python compiler produce?
>
> Thank you.

I am creating neos as I need a performant scripting engine for my other major project "neoGFX" and I want to be able to support multiple popular scripting languages including Python.

/Flibble

--
????
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
On Sun, Feb 14, 2021 at 11:14 AM Mr Flibble
<flibble@i42.removethisbit.co.uk> wrote:
>
> On 13/02/2021 23:30, Igor Korot wrote:
> > Hi,
> > But most importantly - what is the reason for this ?
> > I mean - what problems the actual python compiler produce?
> >
> > Thank you.
>
> I am creating neos as I need a performant scripting engine for my other major project "neoGFX" and I want to be able to support multiple popular scripting languages including Python.
>

Until you have actually produced a (mostly) compatible Python
implementation, can you please stop making these repeated and baseless
jabs at CPython's performance? You keep stating or hinting that
CPython is somehow unnecessarily slow, but unless you have some code
to back your claims, this is nothing but mudslinging.

CPython is not as slow as you might think. And PyPy is highly
efficient at what it does well. Show us that you can do better than
these before you call them slow.

At the absolute least, show that you have something that can run Python code.

ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
RE: New Python implementation [ In reply to ]
It is likely that people would understand better if spoken to properly so I have been listening and hopefully gaining a picture that I can share, and be corrected helpfully when wrong.

My personal guess is that the project at hand is to do something very vaguely like what was done to the CURSES functionality ages ago in prehistory where lots of different terminals (and terminal emulators) used an assortment of control and escape sequences to make a text-based terminal do things like delete to the end of a line. The idea was to extract out all kinds of functionality used by pretty much all the terminals and save the info for say the hp2621 terminal either in a file with that name, or as entries in a file specifying many terminals or even in your environment. Then you made sure you had some variable like TERM set to hp2621 or whatever. If later you logged in on another kind of terminal, it would adjust dynamically for that without changing your program.

When a program like vi(m) or emacs ran, it used the curses library which would dynamically reconfigure based on the terminal used and try to figure out the cheapest way (in terms of characters and I/O usually) to send extra escape sequences to update your screen as changes were made. Sometimes it would clear the screen and re-enter the new stuff and sometimes delete three lines then put in the replacement and so on.

End of example. There are other examples like a format for documents that might take one of many ones like Word and make a common storage format that can easily be printed on any device that supports the features. The important aspect for me, is abstraction.

My impression is the proposed project would abstract out the details of what any language can do and then examine one language after another (such as Ada or Python) and create some kind of description that can be stored, such as in a file. I have no idea what that might look like. I assume it would include what keywords there are or what variable names might look like or if some construct has an ending like "FI" or "endif" or "}" and it is only once this is completed, that the next phase can be used.

It sounds like they would have what he considers a universal compiler that determines what language (perhaps even version) a file or group of files are using and then loads in info that metamorphizes it into an effective compiler for that language. It may not be that simple and I have no idea how it does that or how it outputs the result but it sounds like they have yet another language we might loosely compare to the byte stream used by JAVA and SCALA and some others that is half-digested and can be run by the JVM, or the Python version of something along those lines.

In any case, I get the impression that this output will then look about the same no matter what language it came from. It will not require specific run-time environments but one overarching runtime that can run anything, again, using whatever abstraction or rules they come up with. And, in some cases, you may choose to go a step further and take this portable file format and compile it further down to an executable that runs on a specific machine and so on. I shudder at how well it will output error messages!

Assuming this is feasible and well done, it might open quite a few doors in terms of designing both mini-languages and variants on existing ones and brand new ones with new ideas. You would have to find a way to describe your language as described above and as long as it is consistent in some ways, no need to ever build your own interpreter or compiler. It might be a bit like designing a new terminal (or just emulator) that has features you want. Mind you, some of the new features might require changes in the "Neo" something/data before it can be handled, but once added, any other language, within reason, might be able to add a similar feature and it should work.

I hope I got this at least partially right and it is more informative that repeatedly telling people things like "Nope" as if this is a quiz and not an informative discussion.

-----Original Message-----
From: Python-list <python-list-bounces+avigross=verizon.net@python.org> On Behalf Of Mr Flibble
Sent: Saturday, February 13, 2021 7:07 PM
To: python-list@python.org
Subject: Re: New Python implementation

On 13/02/2021 18:11, Alan Gauld wrote:
> On 13/02/2021 16:09, Mr Flibble wrote:
>> On 13/02/2021 00:01, Alan Gauld wrote:
>>> I'm assuming it's a new executable interpreter that can run any
>>> valid python code. Is that correct?
>>
>> It is a universal *compiler* so it compiles the python code to byte
>> code and then optionally to machine code via a JIT which is then executed.
>
> OK, sorry for being dense, but just to be absolutely clear.
>
> You are going to create a Python compiler that will take existing
> Python code and output a byte code file. (I assume the byte code is
> not standard Python byte code?) And I assume the execution environment
> for the bytecode is part of your neos system?

No neos is not a Python compiler: it is a *universal* compiler that can compile any programming language describable by a schema file and any language-specific semantic concepts. The byte code will be proprietary, yes, and will be executed by neos and/or JITed.

>
> If that's correct, then how do you propose to deal with regular Python
> byte code? And what would the Python disassembler produce - Python
> assembler instructions or neos?

The neos Python implementation will not be dealing with Python byte code in any form whatsoever.

/Flibble

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

--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
On Saturday, February 13, 2021 at 7:19:58 PM UTC-5, Chris Angelico wrote:
> On Sun, Feb 14, 2021 at 11:14 AM Mr Flibble
> <fli...@i42.removethisbit.co.uk> wrote:
> >
> > On 13/02/2021 23:30, Igor Korot wrote:
> > > Hi,
> > > But most importantly - what is the reason for this ?
> > > I mean - what problems the actual python compiler produce?
> > >
> > > Thank you.
> >
> > I am creating neos as I need a performant scripting engine for my other major project "neoGFX" and I want to be able to support multiple popular scripting languages including Python.
> >
> Until you have actually produced a (mostly) compatible Python
> implementation, can you please stop making these repeated and baseless
> jabs at CPython's performance? You keep stating or hinting that
> CPython is somehow unnecessarily slow, but unless you have some code
> to back your claims, this is nothing but mudslinging.
>
> CPython is not as slow as you might think. And PyPy is highly
> efficient at what it does well. Show us that you can do better than
> these before you call them slow.
>
> At the absolute least, show that you have something that can run Python code.
>
> ChrisA

The OP has been making these claims on IRC for a while (at least two years). He has never cared to substantiate them, or even participate in a civil and detailed discussion. He is either 1) smarter than all of us, or 2) woefully under-informed, or 3) trolling. Our best course is to ignore him until he has code we can try.

--Ned.
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
On 14/02/2021 00:07, Mr Flibble wrote:
> On 13/02/2021 18:11, Alan Gauld wrote:

>> You are going to create a Python compiler that will take existing
>> Python code and output a byte code file.
>
> No neos is not a Python compiler: it is a *universal* compiler that
> can compile any programming language describable by a schema file

Yes, I understand that, but from the perspective of this list
what you are doing is providing a tool (a combination of neos
and a schema) that will take in Python source code and spit out
neos byte code. So, to all intents and purposes it is a Python
compiler (albeit capable of more when needed).

>> If that's correct, then how do you propose to deal with
>> regular Python byte code? And what would the Python disassembler
>> produce - Python assembler instructions or neos?
>
> The neos Python implementation will not be dealing
> with Python byte code in any form whatsoever.

Ok but what do you do with the disassembler module?
Will it read neos byte code instead of the Python codes?
Also what about tools that work at the byte code level,
I assume they will not work with neos either?
That might include the profiler and debugger for example?

Also what would happen with the interactive prompt (>>>)
I'm assuming you'd expect users to continue using the CPython
interpreter and only compile the source after it was working
there? Like turning on the optimiser in a traditional
compiled language like C.

--
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 14/02/2021 00:19, Chris Angelico wrote:
> On Sun, Feb 14, 2021 at 11:14 AM Mr Flibble
> <flibble@i42.removethisbit.co.uk> wrote:
>>
>> On 13/02/2021 23:30, Igor Korot wrote:
>>> Hi,
>>> But most importantly - what is the reason for this ?
>>> I mean - what problems the actual python compiler produce?
>>>
>>> Thank you.
>>
>> I am creating neos as I need a performant scripting engine for my other major project "neoGFX" and I want to be able to support multiple popular scripting languages including Python.
>>
>
> Until you have actually produced a (mostly) compatible Python
> implementation, can you please stop making these repeated and baseless
> jabs at CPython's performance? You keep stating or hinting that
> CPython is somehow unnecessarily slow, but unless you have some code
> to back your claims, this is nothing but mudslinging.
>
> CPython is not as slow as you might think. And PyPy is highly
> efficient at what it does well. Show us that you can do better than
> these before you call them slow.
>
> At the absolute least, show that you have something that can run Python code.

It isn't just me that is saying CPython is egregiously slow: it is at the bottom of the list as far as performance is concerned. Python is undoubtedly the biggest contributor to climate change of all the programming languages in mainstream use today.

See: https://thenewstack.io/which-programming-languages-use-the-least-electricity/

/Flibble

--
????
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
On 14/02/2021 00:51, Ned Batchelder wrote:
> On Saturday, February 13, 2021 at 7:19:58 PM UTC-5, Chris Angelico wrote:
>> On Sun, Feb 14, 2021 at 11:14 AM Mr Flibble
>> <fli...@i42.removethisbit.co.uk> wrote:
>>>
>>> On 13/02/2021 23:30, Igor Korot wrote:
>>>> Hi,
>>>> But most importantly - what is the reason for this ?
>>>> I mean - what problems the actual python compiler produce?
>>>>
>>>> Thank you.
>>>
>>> I am creating neos as I need a performant scripting engine for my other major project "neoGFX" and I want to be able to support multiple popular scripting languages including Python.
>>>
>> Until you have actually produced a (mostly) compatible Python
>> implementation, can you please stop making these repeated and baseless
>> jabs at CPython's performance? You keep stating or hinting that
>> CPython is somehow unnecessarily slow, but unless you have some code
>> to back your claims, this is nothing but mudslinging.
>>
>> CPython is not as slow as you might think. And PyPy is highly
>> efficient at what it does well. Show us that you can do better than
>> these before you call them slow.
>>
>> At the absolute least, show that you have something that can run Python code.
>>
>> ChrisA
>
> The OP has been making these claims on IRC for a while (at least two years). He has never cared to substantiate them, or even participate in a civil and detailed discussion. He is either 1) smarter than all of us, or 2) woefully under-informed, or 3) trolling. Our best course is to ignore him until he has code we can try.

I am sure you are most annoyed that you can't ban me from Usenet, dear, like you banned me from IRC. You need to grow the fuck up.

Your use of the words "all of us" is disingenuous, try "me" instead. "All of us" includes people as smart as me but can't be arsed fixing the Python space because they can just about live with the status quo.

/Flibble

--
????
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
On 2021-02-14, Ned Batchelder <ned@nedbatchelder.com> wrote:
> On Saturday, February 13, 2021 at 7:19:58 PM UTC-5, Chris Angelico wrote:
>
>> At the absolute least, show that you have something that can run Python code.
>
> The OP has been making these claims on IRC for a (at least two
> years). He has never cared to substantiate them, or even participate
> in a civil and detailed discussion. He is either 1) smarter than
> all of us, or 2) woefully under-informed, or 3) trolling.

He posts using the name of a hand-puppet. I think that provides a bit
of a clue as to which of the 3 is most likely. And it's not even a
_real_ hand-puppet: it's a computer-generated hologram of a hand
hand-puppet.





--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
On 14/02/2021 03:35, Paul Rubin wrote:
> Mr Flibble <flibble@i42.REMOVETHISBIT.co.uk> writes:
>> I am creating neos as I need a performant scripting engine for my
>> other major project "neoGFX" and I want to be able to support multiple
>> popular scripting languages including Python.
>
> Is something wrong with Guile for that purpose? If yes, maybe you are
> setting yourself up for the exact same obstacles ;-).

NIH.

/Flibble

--
????
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
On 14/02/2021 02:54, Mark Lawrence wrote:
> On Sunday, February 14, 2021 at 2:18:03 AM UTC, Mr Flibble wrote:
>> On 14/02/2021 00:51, Ned Batchelder wrote:
>
>>> The OP has been making these claims on IRC for a while (at least two years). He has never cared to substantiate them, or even participate in a civil and detailed discussion. He is either 1) smarter than all of us, or 2) woefully under-informed, or 3) trolling. Our best course is to ignore him until he has code we can try.
>> I am sure you are most annoyed that you can't ban me from Usenet, dear, like you banned me from IRC. You need to grow the fuck up.
>
> I take it that you didn't write "How to win friends and influence people"? I don't suppose that the moderators will actually wake up and remove you from the mailing lists asap.

I see you are just as prickly as Ned, Mark. May I suggest that you too grow a pair? I am not on the mailing list BTW; e-mail lists are an outmoded concept much like CPython.

/Flibble

--
????
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
On 14/02/2021 00:52, Alan Gauld wrote:
> On 14/02/2021 00:07, Mr Flibble wrote:
>> On 13/02/2021 18:11, Alan Gauld wrote:
>
>>> You are going to create a Python compiler that will take existing
>>> Python code and output a byte code file.
>>
>> No neos is not a Python compiler: it is a *universal* compiler that
>> can compile any programming language describable by a schema file
>
> Yes, I understand that, but from the perspective of this list
> what you are doing is providing a tool (a combination of neos
> and a schema) that will take in Python source code and spit out
> neos byte code. So, to all intents and purposes it is a Python
> compiler (albeit capable of more when needed).
>
>>> If that's correct, then how do you propose to deal with
>>> regular Python byte code? And what would the Python disassembler
>>> produce - Python assembler instructions or neos?
>>
>> The neos Python implementation will not be dealing
>> with Python byte code in any form whatsoever.
>
> Ok but what do you do with the disassembler module?
> Will it read neos byte code instead of the Python codes?
> Also what about tools that work at the byte code level,
> I assume they will not work with neos either?
> That might include the profiler and debugger for example?

neos will include a language agnostic disassembler and debugger.

>
> Also what would happen with the interactive prompt (>>>)
> I'm assuming you'd expect users to continue using the CPython
> interpreter and only compile the source after it was working
> there? Like turning on the optimiser in a traditional
> compiled language like C.

neos will include support for interactive sessions; no reason to use CPython at all.

/Flibble

--
????
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
On 14/02/2021 03:26, Grant Edwards wrote:
> On 2021-02-14, Ned Batchelder <ned@nedbatchelder.com> wrote:
>> On Saturday, February 13, 2021 at 7:19:58 PM UTC-5, Chris Angelico wrote:
>>
>>> At the absolute least, show that you have something that can run Python code.
>>
>> The OP has been making these claims on IRC for a (at least two
>> years). He has never cared to substantiate them, or even participate
>> in a civil and detailed discussion. He is either 1) smarter than
>> all of us, or 2) woefully under-informed, or 3) trolling.
>
> He posts using the name of a hand-puppet. I think that provides a bit
> of a clue as to which of the 3 is most likely. And it's not even a
> _real_ hand-puppet: it's a computer-generated hologram of a hand
> hand-puppet.

lulz. If I am a troll then Elon Musk is also a troll.

/Flibble

--
????
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
After reading the thread i'm like: where can i try it out ...

On Thu, 11 Feb 2021, 16:38 Mr Flibble, <flibble@i42.removethisbit.co.uk>
wrote:

>
> Hi!
>
> I am starting work on creating a new Python implementation from scratch
> using "neos" my universal compiler that can compile any programming
> language. I envision this implementation to be significantly faster than
> the currently extant Python implementations (which isn't a stretch given
> how poorly they perform).
>
> Sample neos session (parsing a fibonacci program, neoscript rather than
> Python in this case):
>
> neos 1.0.0.0 ED-209
> ] help
> h(elp)
> s(chema) <path to language schema> Load language schema
> l(oad) <path to program> Load program
> list List program
> c(ompile) Compile program
> r(un) Run program
> ![<expression>] Evaluate expression (enter
> interactive mode if expression omitted)
> :<input> Input (as stdin)
> q(uit) Quit neos
> lc List loaded concept libraries
> t(race) <0|1|2|3|4|5> [<filter>] Compiler trace
> m(etrics) Display metrics for running
> programs
> ] lc
> [neos.core] (file:///D:\code\neos\build\win32\vs2019\x64\Release\core.ncl)
> [neos.boolean]
> [neos.language]
> [neos.logic]
> [neos.math]
> [neos.module]
> [neos.object]
> [neos.string]
> [neos.math.universal]
> (file:///D:\code\neos\build\win32\vs2019\x64\Release\core.math.universal.ncl)
> ] s neoscript
> Loading schema 'neoscript'...
> Language: Default neoGFX scripting language
> Version: 1.0.0
> Copyright (C) 2019 Leigh Johnston
> neoscript] l examples/neoscript/fibonacci.neo
> neoscript] list
> File 'examples/neoscript/fibonacci.neo':
> -- neoscript example: Fibonacci
>
> using neos.string;
> using neos.stream;
>
> import fn to_string(x : i32) -> string;
> import fn to_integer(s : string) -> i32;
> import proc input(s : out string);
> import proc print(s : in string);
>
> -- functions are pure
> def fn add(x, y : i32) -> i32
> {
> return x + y;
> }
> def fn fib(x : i32) -> i32
> {
> if (x < 2)
> return 1;
> else
> return add(fib(x-1), fib(x-2));
> }
>
> -- procedures are impure
> def proc main()
> s : string;
> {
> print("Enter a positive "
> "integer: ");
> input(s);
> print("Fibonacci(" + s + ") = " + to_string(fib(to_integer(s))) +
> "\n");
> }
> neoscript] t 1
> neoscript] c
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(g)
> folding: string.utf8(g) <- string.utf8.character.alpha()
> folded: string.utf8(g) <- string.utf8.character.alpha() = string.utf8(gn)
> folding: string.utf8(gn) <- string.utf8.character.alpha()
> folded: string.utf8(gn) <- string.utf8.character.alpha() = string.utf8(gni)
> folding: string.utf8(gni) <- string.utf8.character.alpha()
> folded: string.utf8(gni) <- string.utf8.character.alpha() =
> string.utf8(gnir)
> folding: string.utf8(gnir) <- string.utf8.character.alpha()
> folded: string.utf8(gnir) <- string.utf8.character.alpha() =
> string.utf8(gnirt)
> folding: string.utf8(gnirt) <- string.utf8.character.alpha()
> folded: string.utf8(gnirt) <- string.utf8.character.alpha() =
> string.utf8(gnirts)
> folding: string.utf8(gnirts) <- string.utf8.character.period()
> folded: string.utf8(gnirts) <- string.utf8.character.period() =
> string.utf8(gnirts.)
> folding: string.utf8(gnirts.) <- string.utf8.character.alpha()
> folded: string.utf8(gnirts.) <- string.utf8.character.alpha() =
> string.utf8(gnirts.s)
> folding: string.utf8(gnirts.s) <- string.utf8.character.alpha()
> folded: string.utf8(gnirts.s) <- string.utf8.character.alpha() =
> string.utf8(gnirts.so)
> folding: string.utf8(gnirts.so) <- string.utf8.character.alpha()
> folded: string.utf8(gnirts.so) <- string.utf8.character.alpha() =
> string.utf8(gnirts.soe)
> folding: string.utf8(gnirts.soe) <- string.utf8.character.alpha()
> folded: string.utf8(gnirts.soe) <- string.utf8.character.alpha() =
> string.utf8(gnirts.soen)
> folding: source.package.name() <- string.utf8(gnirts.soen)
> folded: source.package.name() <- string.utf8(gnirts.soen) =
> source.package.name(neos.string)
> folding: source.package.import() <- source.package.name(neos.string)
> folded: source.package.import() <- source.package.name(neos.string) =
> source.package.import(neos.string)
> folding: source.package.import(neos.string) <-
> source.package.import(neos.string)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(g)
> folding: string.utf8(g) <- string.utf8.character.alpha()
> folded: string.utf8(g) <- string.utf8.character.alpha() = string.utf8(gn)
> folding: string.utf8(gn) <- string.utf8.character.alpha()
> folded: string.utf8(gn) <- string.utf8.character.alpha() = string.utf8(gni)
> folding: string.utf8(gni) <- string.utf8.character.alpha()
> folded: string.utf8(gni) <- string.utf8.character.alpha() =
> string.utf8(gnir)
> folding: string.utf8(gnir) <- string.utf8.character.alpha()
> folded: string.utf8(gnir) <- string.utf8.character.alpha() =
> string.utf8(gnirt)
> folding: string.utf8(gnirt) <- string.utf8.character.alpha()
> folded: string.utf8(gnirt) <- string.utf8.character.alpha() =
> string.utf8(gnirts)
> folding: string.utf8(gnirts) <- string.utf8.character.underscore()
> folded: string.utf8(gnirts) <- string.utf8.character.underscore() =
> string.utf8(gnirts_)
> folding: string.utf8(gnirts_) <- string.utf8.character.alpha()
> folded: string.utf8(gnirts_) <- string.utf8.character.alpha() =
> string.utf8(gnirts_o)
> folding: string.utf8(gnirts_o) <- string.utf8.character.alpha()
> folded: string.utf8(gnirts_o) <- string.utf8.character.alpha() =
> string.utf8(gnirts_ot)
> folding: language.identifier() <- string.utf8(gnirts_ot)
> folded: language.identifier() <- string.utf8(gnirts_ot) =
> language.identifier(to_string)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(x)
> folding: language.identifier() <- string.utf8(x)
> folded: language.identifier() <- string.utf8(x) = language.identifier(x)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(r)
> folding: string.utf8(r) <- string.utf8.character.alpha()
> folded: string.utf8(r) <- string.utf8.character.alpha() = string.utf8(re)
> folding: string.utf8(re) <- string.utf8.character.alpha()
> folded: string.utf8(re) <- string.utf8.character.alpha() = string.utf8(reg)
> folding: string.utf8(reg) <- string.utf8.character.alpha()
> folded: string.utf8(reg) <- string.utf8.character.alpha() =
> string.utf8(rege)
> folding: string.utf8(rege) <- string.utf8.character.alpha()
> folded: string.utf8(rege) <- string.utf8.character.alpha() =
> string.utf8(reget)
> folding: string.utf8(reget) <- string.utf8.character.alpha()
> folded: string.utf8(reget) <- string.utf8.character.alpha() =
> string.utf8(regetn)
> folding: string.utf8(regetn) <- string.utf8.character.alpha()
> folded: string.utf8(regetn) <- string.utf8.character.alpha() =
> string.utf8(regetni)
> folding: string.utf8(regetni) <- string.utf8.character.underscore()
> folded: string.utf8(regetni) <- string.utf8.character.underscore() =
> string.utf8(regetni_)
> folding: string.utf8(regetni_) <- string.utf8.character.alpha()
> folded: string.utf8(regetni_) <- string.utf8.character.alpha() =
> string.utf8(regetni_o)
> folding: string.utf8(regetni_o) <- string.utf8.character.alpha()
> folded: string.utf8(regetni_o) <- string.utf8.character.alpha() =
> string.utf8(regetni_ot)
> folding: language.identifier() <- string.utf8(regetni_ot)
> folded: language.identifier() <- string.utf8(regetni_ot) =
> language.identifier(to_integer)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(s)
> folding: language.identifier() <- string.utf8(s)
> folded: language.identifier() <- string.utf8(s) = language.identifier(s)
> folded: source.package.import(neos.string) <-
> source.package.import(neos.string) = ()
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(m)
> folding: string.utf8(m) <- string.utf8.character.alpha()
> folded: string.utf8(m) <- string.utf8.character.alpha() = string.utf8(ma)
> folding: string.utf8(ma) <- string.utf8.character.alpha()
> folded: string.utf8(ma) <- string.utf8.character.alpha() = string.utf8(mae)
> folding: string.utf8(mae) <- string.utf8.character.alpha()
> folded: string.utf8(mae) <- string.utf8.character.alpha() =
> string.utf8(maer)
> folding: string.utf8(maer) <- string.utf8.character.alpha()
> folded: string.utf8(maer) <- string.utf8.character.alpha() =
> string.utf8(maert)
> folding: string.utf8(maert) <- string.utf8.character.alpha()
> folded: string.utf8(maert) <- string.utf8.character.alpha() =
> string.utf8(maerts)
> folding: string.utf8(maerts) <- string.utf8.character.period()
> folded: string.utf8(maerts) <- string.utf8.character.period() =
> string.utf8(maerts.)
> folding: string.utf8(maerts.) <- string.utf8.character.alpha()
> folded: string.utf8(maerts.) <- string.utf8.character.alpha() =
> string.utf8(maerts.s)
> folding: string.utf8(maerts.s) <- string.utf8.character.alpha()
> folded: string.utf8(maerts.s) <- string.utf8.character.alpha() =
> string.utf8(maerts.so)
> folding: string.utf8(maerts.so) <- string.utf8.character.alpha()
> folded: string.utf8(maerts.so) <- string.utf8.character.alpha() =
> string.utf8(maerts.soe)
> folding: string.utf8(maerts.soe) <- string.utf8.character.alpha()
> folded: string.utf8(maerts.soe) <- string.utf8.character.alpha() =
> string.utf8(maerts.soen)
> folding: source.package.name() <- string.utf8(maerts.soen)
> folded: source.package.name() <- string.utf8(maerts.soen) =
> source.package.name(neos.stream)
> folding: source.package.import() <- source.package.name(neos.stream)
> folded: source.package.import() <- source.package.name(neos.stream) =
> source.package.import(neos.stream)
> folding: source.package.import(neos.stream) <-
> source.package.import(neos.stream)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(t)
> folding: string.utf8(t) <- string.utf8.character.alpha()
> folded: string.utf8(t) <- string.utf8.character.alpha() = string.utf8(tu)
> folding: string.utf8(tu) <- string.utf8.character.alpha()
> folded: string.utf8(tu) <- string.utf8.character.alpha() = string.utf8(tup)
> folding: string.utf8(tup) <- string.utf8.character.alpha()
> folded: string.utf8(tup) <- string.utf8.character.alpha() =
> string.utf8(tupn)
> folding: string.utf8(tupn) <- string.utf8.character.alpha()
> folded: string.utf8(tupn) <- string.utf8.character.alpha() =
> string.utf8(tupni)
> folding: language.identifier() <- string.utf8(tupni)
> folded: language.identifier() <- string.utf8(tupni) =
> language.identifier(input)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(s)
> folding: language.identifier() <- string.utf8(s)
> folded: language.identifier() <- string.utf8(s) = language.identifier(s)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(t)
> folding: string.utf8(t) <- string.utf8.character.alpha()
> folded: string.utf8(t) <- string.utf8.character.alpha() = string.utf8(tn)
> folding: string.utf8(tn) <- string.utf8.character.alpha()
> folded: string.utf8(tn) <- string.utf8.character.alpha() = string.utf8(tni)
> folding: string.utf8(tni) <- string.utf8.character.alpha()
> folded: string.utf8(tni) <- string.utf8.character.alpha() =
> string.utf8(tnir)
> folding: string.utf8(tnir) <- string.utf8.character.alpha()
> folded: string.utf8(tnir) <- string.utf8.character.alpha() =
> string.utf8(tnirp)
> folding: language.identifier() <- string.utf8(tnirp)
> folded: language.identifier() <- string.utf8(tnirp) =
> language.identifier(print)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(s)
> folding: language.identifier() <- string.utf8(s)
> folded: language.identifier() <- string.utf8(s) = language.identifier(s)
> folded: source.package.import(neos.stream) <-
> source.package.import(neos.stream) = ()
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(g)
> folding: string.utf8(g) <- string.utf8.character.alpha()
> folded: string.utf8(g) <- string.utf8.character.alpha() = string.utf8(gn)
> folding: string.utf8(gn) <- string.utf8.character.alpha()
> folded: string.utf8(gn) <- string.utf8.character.alpha() = string.utf8(gni)
> folding: string.utf8(gni) <- string.utf8.character.alpha()
> folded: string.utf8(gni) <- string.utf8.character.alpha() =
> string.utf8(gnir)
> folding: string.utf8(gnir) <- string.utf8.character.alpha()
> folded: string.utf8(gnir) <- string.utf8.character.alpha() =
> string.utf8(gnirt)
> folding: string.utf8(gnirt) <- string.utf8.character.alpha()
> folded: string.utf8(gnirt) <- string.utf8.character.alpha() =
> string.utf8(gnirts)
> folding: string.utf8(gnirts) <- string.utf8.character.underscore()
> folded: string.utf8(gnirts) <- string.utf8.character.underscore() =
> string.utf8(gnirts_)
> folding: string.utf8(gnirts_) <- string.utf8.character.alpha()
> folded: string.utf8(gnirts_) <- string.utf8.character.alpha() =
> string.utf8(gnirts_o)
> folding: string.utf8(gnirts_o) <- string.utf8.character.alpha()
> folded: string.utf8(gnirts_o) <- string.utf8.character.alpha() =
> string.utf8(gnirts_ot)
> folding: language.identifier() <- string.utf8(gnirts_ot)
> folded: language.identifier() <- string.utf8(gnirts_ot) =
> language.identifier(to_string)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(x)
> folding: language.identifier() <- string.utf8(x)
> folded: language.identifier() <- string.utf8(x) = language.identifier(x)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(r)
> folding: string.utf8(r) <- string.utf8.character.alpha()
> folded: string.utf8(r) <- string.utf8.character.alpha() = string.utf8(re)
> folding: string.utf8(re) <- string.utf8.character.alpha()
> folded: string.utf8(re) <- string.utf8.character.alpha() = string.utf8(reg)
> folding: string.utf8(reg) <- string.utf8.character.alpha()
> folded: string.utf8(reg) <- string.utf8.character.alpha() =
> string.utf8(rege)
> folding: string.utf8(rege) <- string.utf8.character.alpha()
> folded: string.utf8(rege) <- string.utf8.character.alpha() =
> string.utf8(reget)
> folding: string.utf8(reget) <- string.utf8.character.alpha()
> folded: string.utf8(reget) <- string.utf8.character.alpha() =
> string.utf8(regetn)
> folding: string.utf8(regetn) <- string.utf8.character.alpha()
> folded: string.utf8(regetn) <- string.utf8.character.alpha() =
> string.utf8(regetni)
> folding: string.utf8(regetni) <- string.utf8.character.underscore()
> folded: string.utf8(regetni) <- string.utf8.character.underscore() =
> string.utf8(regetni_)
> folding: string.utf8(regetni_) <- string.utf8.character.alpha()
> folded: string.utf8(regetni_) <- string.utf8.character.alpha() =
> string.utf8(regetni_o)
> folding: string.utf8(regetni_o) <- string.utf8.character.alpha()
> folded: string.utf8(regetni_o) <- string.utf8.character.alpha() =
> string.utf8(regetni_ot)
> folding: language.identifier() <- string.utf8(regetni_ot)
> folded: language.identifier() <- string.utf8(regetni_ot) =
> language.identifier(to_integer)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(s)
> folding: language.identifier() <- string.utf8(s)
> folded: language.identifier() <- string.utf8(s) = language.identifier(s)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(t)
> folding: string.utf8(t) <- string.utf8.character.alpha()
> folded: string.utf8(t) <- string.utf8.character.alpha() = string.utf8(tu)
> folding: string.utf8(tu) <- string.utf8.character.alpha()
> folded: string.utf8(tu) <- string.utf8.character.alpha() = string.utf8(tup)
> folding: string.utf8(tup) <- string.utf8.character.alpha()
> folded: string.utf8(tup) <- string.utf8.character.alpha() =
> string.utf8(tupn)
> folding: string.utf8(tupn) <- string.utf8.character.alpha()
> folded: string.utf8(tupn) <- string.utf8.character.alpha() =
> string.utf8(tupni)
> folding: language.identifier() <- string.utf8(tupni)
> folded: language.identifier() <- string.utf8(tupni) =
> language.identifier(input)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(s)
> folding: language.identifier() <- string.utf8(s)
> folded: language.identifier() <- string.utf8(s) = language.identifier(s)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(t)
> folding: string.utf8(t) <- string.utf8.character.alpha()
> folded: string.utf8(t) <- string.utf8.character.alpha() = string.utf8(tn)
> folding: string.utf8(tn) <- string.utf8.character.alpha()
> folded: string.utf8(tn) <- string.utf8.character.alpha() = string.utf8(tni)
> folding: string.utf8(tni) <- string.utf8.character.alpha()
> folded: string.utf8(tni) <- string.utf8.character.alpha() =
> string.utf8(tnir)
> folding: string.utf8(tnir) <- string.utf8.character.alpha()
> folded: string.utf8(tnir) <- string.utf8.character.alpha() =
> string.utf8(tnirp)
> folding: language.identifier() <- string.utf8(tnirp)
> folded: language.identifier() <- string.utf8(tnirp) =
> language.identifier(print)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(s)
> folding: language.identifier() <- string.utf8(s)
> folded: language.identifier() <- string.utf8(s) = language.identifier(s)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(d)
> folding: string.utf8(d) <- string.utf8.character.alpha()
> folded: string.utf8(d) <- string.utf8.character.alpha() = string.utf8(dd)
> folding: string.utf8(dd) <- string.utf8.character.alpha()
> folded: string.utf8(dd) <- string.utf8.character.alpha() = string.utf8(dda)
> folding: language.identifier() <- string.utf8(dda)
> folded: language.identifier() <- string.utf8(dda) =
> language.identifier(add)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(x)
> folding: language.identifier() <- string.utf8(x)
> folded: language.identifier() <- string.utf8(x) = language.identifier(x)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(y)
> folding: language.identifier() <- string.utf8(y)
> folded: language.identifier() <- string.utf8(y) = language.identifier(y)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(x)
> folding: language.identifier() <- string.utf8(x)
> folded: language.identifier() <- string.utf8(x) = language.identifier(x)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(y)
> folding: language.identifier() <- string.utf8(y)
> folded: language.identifier() <- string.utf8(y) = language.identifier(y)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(b)
> folding: string.utf8(b) <- string.utf8.character.alpha()
> folded: string.utf8(b) <- string.utf8.character.alpha() = string.utf8(bi)
> folding: string.utf8(bi) <- string.utf8.character.alpha()
> folded: string.utf8(bi) <- string.utf8.character.alpha() = string.utf8(bif)
> folding: language.identifier() <- string.utf8(bif)
> folded: language.identifier() <- string.utf8(bif) =
> language.identifier(fib)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(x)
> folding: language.identifier() <- string.utf8(x)
> folded: language.identifier() <- string.utf8(x) = language.identifier(x)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(x)
> folding: language.identifier() <- string.utf8(x)
> folded: language.identifier() <- string.utf8(x) = language.identifier(x)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(d)
> folding: string.utf8(d) <- string.utf8.character.alpha()
> folded: string.utf8(d) <- string.utf8.character.alpha() = string.utf8(dd)
> folding: string.utf8(dd) <- string.utf8.character.alpha()
> folded: string.utf8(dd) <- string.utf8.character.alpha() = string.utf8(dda)
> folding: language.identifier() <- string.utf8(dda)
> folded: language.identifier() <- string.utf8(dda) =
> language.identifier(add)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(b)
> folding: string.utf8(b) <- string.utf8.character.alpha()
> folded: string.utf8(b) <- string.utf8.character.alpha() = string.utf8(bi)
> folding: string.utf8(bi) <- string.utf8.character.alpha()
> folded: string.utf8(bi) <- string.utf8.character.alpha() = string.utf8(bif)
> folding: language.identifier() <- string.utf8(bif)
> folded: language.identifier() <- string.utf8(bif) =
> language.identifier(fib)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(x)
> folding: language.identifier() <- string.utf8(x)
> folded: language.identifier() <- string.utf8(x) = language.identifier(x)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(b)
> folding: string.utf8(b) <- string.utf8.character.alpha()
> folded: string.utf8(b) <- string.utf8.character.alpha() = string.utf8(bi)
> folding: string.utf8(bi) <- string.utf8.character.alpha()
> folded: string.utf8(bi) <- string.utf8.character.alpha() = string.utf8(bif)
> folding: language.identifier() <- string.utf8(bif)
> folded: language.identifier() <- string.utf8(bif) =
> language.identifier(fib)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(x)
> folding: language.identifier() <- string.utf8(x)
> folded: language.identifier() <- string.utf8(x) = language.identifier(x)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(n)
> folding: string.utf8(n) <- string.utf8.character.alpha()
> folded: string.utf8(n) <- string.utf8.character.alpha() = string.utf8(ni)
> folding: string.utf8(ni) <- string.utf8.character.alpha()
> folded: string.utf8(ni) <- string.utf8.character.alpha() = string.utf8(nia)
> folding: string.utf8(nia) <- string.utf8.character.alpha()
> folded: string.utf8(nia) <- string.utf8.character.alpha() =
> string.utf8(niam)
> folding: language.identifier() <- string.utf8(niam)
> folded: language.identifier() <- string.utf8(niam) =
> language.identifier(main)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(s)
> folding: language.identifier() <- string.utf8(s)
> folded: language.identifier() <- string.utf8(s) = language.identifier(s)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(t)
> folding: string.utf8(t) <- string.utf8.character.alpha()
> folded: string.utf8(t) <- string.utf8.character.alpha() = string.utf8(tn)
> folding: string.utf8(tn) <- string.utf8.character.alpha()
> folded: string.utf8(tn) <- string.utf8.character.alpha() = string.utf8(tni)
> folding: string.utf8(tni) <- string.utf8.character.alpha()
> folded: string.utf8(tni) <- string.utf8.character.alpha() =
> string.utf8(tnir)
> folding: string.utf8(tnir) <- string.utf8.character.alpha()
> folded: string.utf8(tnir) <- string.utf8.character.alpha() =
> string.utf8(tnirp)
> folding: language.identifier() <- string.utf8(tnirp)
> folded: language.identifier() <- string.utf8(tnirp) =
> language.identifier(print)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8( )
> folding: string.utf8( ) <- string.utf8.character.alpha()
> folded: string.utf8( ) <- string.utf8.character.alpha() = string.utf8(
> folding: string.utf8( <- string.utf8.character.alpha()
> folded: string.utf8( <- string.utf8.character.alpha() = string.utf8( :r)
> folding: string.utf8( :r) <- string.utf8.character.alpha()
> folded: string.utf8( :r) <- string.utf8.character.alpha() = string.utf8(
> :re)
> folding: string.utf8( :re) <- string.utf8.character.alpha()
> folded: string.utf8( :re) <- string.utf8.character.alpha() = string.utf8(
> :reg)
> folding: string.utf8( :reg) <- string.utf8.character.alpha()
> folded: string.utf8( :reg) <- string.utf8.character.alpha() = string.utf8(
> :rege)
> folding: string.utf8( :rege) <- string.utf8.character.alpha()
> folded: string.utf8( :rege) <- string.utf8.character.alpha() =
> string.utf8( :reget)
> folding: string.utf8( :reget) <- string.utf8.character.alpha()
> folded: string.utf8( :reget) <- string.utf8.character.alpha() =
> string.utf8( :regetn)
> folding: string.utf8( :regetn) <- string.utf8.character.alpha()
> folded: string.utf8( :regetn) <- string.utf8.character.alpha() =
> string.utf8( :regetni)
> folding: string.utf8( :regetni) <- string.utf8.character.alpha()
> folded: string.utf8( :regetni) <- string.utf8.character.alpha() =
> string.utf8( :regetni )
> folding: string.utf8( :regetni ) <- string.utf8.character.alpha()
> folded: string.utf8( :regetni ) <- string.utf8.character.alpha() =
> string.utf8( :regetni e)
> folding: string.utf8( :regetni e) <- string.utf8.character.alpha()
> folded: string.utf8( :regetni e) <- string.utf8.character.alpha() =
> string.utf8( :regetni ev)
> folding: string.utf8( :regetni ev) <- string.utf8.character.alpha()
> folded: string.utf8( :regetni ev) <- string.utf8.character.alpha() =
> string.utf8( :regetni evi)
> folding: string.utf8( :regetni evi) <- string.utf8.character.alpha()
> folded: string.utf8( :regetni evi) <- string.utf8.character.alpha() =
> string.utf8( :regetni evit)
> folding: string.utf8( :regetni evit) <- string.utf8.character.alpha()
> folded: string.utf8( :regetni evit) <- string.utf8.character.alpha() =
> string.utf8( :regetni eviti)
> folding: string.utf8( :regetni eviti) <- string.utf8.character.alpha()
> folded: string.utf8( :regetni eviti) <- string.utf8.character.alpha() =
> string.utf8( :regetni evitis)
> folding: string.utf8( :regetni evitis) <- string.utf8.character.alpha()
> folded: string.utf8( :regetni evitis) <- string.utf8.character.alpha() =
> string.utf8( :regetni evitiso)
> folding: string.utf8( :regetni evitiso) <- string.utf8.character.alpha()
> folded: string.utf8( :regetni evitiso) <- string.utf8.character.alpha() =
> string.utf8( :regetni evitisop)
> folding: string.utf8( :regetni evitisop) <- string.utf8.character.alpha()
> folded: string.utf8( :regetni evitisop) <- string.utf8.character.alpha() =
> string.utf8( :regetni evitisop )
> folding: string.utf8( :regetni evitisop ) <- string.utf8.character.alpha()
> folded: string.utf8( :regetni evitisop ) <- string.utf8.character.alpha()
> = string.utf8( :regetni evitisop a)
> folding: string.utf8( :regetni evitisop a) <- string.utf8.character.alpha()
> folded: string.utf8( :regetni evitisop a) <- string.utf8.character.alpha()
> = string.utf8( :regetni evitisop a )
> folding: string.utf8( :regetni evitisop a ) <-
> string.utf8.character.alpha()
> folded: string.utf8( :regetni evitisop a ) <-
> string.utf8.character.alpha() = string.utf8( :regetni evitisop a r)
> folding: string.utf8( :regetni evitisop a r) <-
> string.utf8.character.alpha()
> folded: string.utf8( :regetni evitisop a r) <-
> string.utf8.character.alpha() = string.utf8( :regetni evitisop a re)
> folding: string.utf8( :regetni evitisop a re) <-
> string.utf8.character.alpha()
> folded: string.utf8( :regetni evitisop a re) <-
> string.utf8.character.alpha() = string.utf8( :regetni evitisop a ret)
> folding: string.utf8( :regetni evitisop a ret) <-
> string.utf8.character.alpha()
> folded: string.utf8( :regetni evitisop a ret) <-
> string.utf8.character.alpha() = string.utf8( :regetni evitisop a retn)
> folding: string.utf8( :regetni evitisop a retn) <-
> string.utf8.character.alpha()
> folded: string.utf8( :regetni evitisop a retn) <-
> string.utf8.character.alpha() = string.utf8( :regetni evitisop a retnE)
> folding: string.utf8( :regetni evitisop a retnE) <- string.utf8( :regetni
> evitisop a retnE)
> folded: string.utf8( :regetni evitisop a retnE) <- string.utf8( :regetni
> evitisop a retnE) = string.utf8(Enter a positive integer: )
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(t)
> folding: string.utf8(t) <- string.utf8.character.alpha()
> folded: string.utf8(t) <- string.utf8.character.alpha() = string.utf8(tu)
> folding: string.utf8(tu) <- string.utf8.character.alpha()
> folded: string.utf8(tu) <- string.utf8.character.alpha() = string.utf8(tup)
> folding: string.utf8(tup) <- string.utf8.character.alpha()
> folded: string.utf8(tup) <- string.utf8.character.alpha() =
> string.utf8(tupn)
> folding: string.utf8(tupn) <- string.utf8.character.alpha()
> folded: string.utf8(tupn) <- string.utf8.character.alpha() =
> string.utf8(tupni)
> folding: language.identifier() <- string.utf8(tupni)
> folded: language.identifier() <- string.utf8(tupni) =
> language.identifier(input)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(s)
> folding: language.identifier() <- string.utf8(s)
> folded: language.identifier() <- string.utf8(s) = language.identifier(s)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(t)
> folding: string.utf8(t) <- string.utf8.character.alpha()
> folded: string.utf8(t) <- string.utf8.character.alpha() = string.utf8(tn)
> folding: string.utf8(tn) <- string.utf8.character.alpha()
> folded: string.utf8(tn) <- string.utf8.character.alpha() = string.utf8(tni)
> folding: string.utf8(tni) <- string.utf8.character.alpha()
> folded: string.utf8(tni) <- string.utf8.character.alpha() =
> string.utf8(tnir)
> folding: string.utf8(tnir) <- string.utf8.character.alpha()
> folded: string.utf8(tnir) <- string.utf8.character.alpha() =
> string.utf8(tnirp)
> folding: language.identifier() <- string.utf8(tnirp)
> folded: language.identifier() <- string.utf8(tnirp) =
> language.identifier(print)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(()
> folding: string.utf8(() <- string.utf8.character.alpha()
> folded: string.utf8(() <- string.utf8.character.alpha() = string.utf8((i)
> folding: string.utf8((i) <- string.utf8.character.alpha()
> folded: string.utf8((i) <- string.utf8.character.alpha() = string.utf8((ic)
> folding: string.utf8((ic) <- string.utf8.character.alpha()
> folded: string.utf8((ic) <- string.utf8.character.alpha() =
> string.utf8((icc)
> folding: string.utf8((icc) <- string.utf8.character.alpha()
> folded: string.utf8((icc) <- string.utf8.character.alpha() =
> string.utf8((icca)
> folding: string.utf8((icca) <- string.utf8.character.alpha()
> folded: string.utf8((icca) <- string.utf8.character.alpha() =
> string.utf8((iccan)
> folding: string.utf8((iccan) <- string.utf8.character.alpha()
> folded: string.utf8((iccan) <- string.utf8.character.alpha() =
> string.utf8((iccano)
> folding: string.utf8((iccano) <- string.utf8.character.alpha()
> folded: string.utf8((iccano) <- string.utf8.character.alpha() =
> string.utf8((iccanob)
> folding: string.utf8((iccanob) <- string.utf8.character.alpha()
> folded: string.utf8((iccanob) <- string.utf8.character.alpha() =
> string.utf8((iccanobi)
> folding: string.utf8((iccanobi) <- string.utf8.character.alpha()
> folded: string.utf8((iccanobi) <- string.utf8.character.alpha() =
> string.utf8((iccanobiF)
> folding: string.utf8((iccanobiF) <- string.utf8((iccanobiF)
> folded: string.utf8((iccanobiF) <- string.utf8((iccanobiF) =
> string.utf8(Fibonacci()
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(s)
> folding: language.identifier() <- string.utf8(s)
> folded: language.identifier() <- string.utf8(s) = language.identifier(s)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8( )
> folding: string.utf8( ) <- string.utf8.character.alpha()
> folded: string.utf8( ) <- string.utf8.character.alpha() = string.utf8( =)
> folding: string.utf8( =) <- string.utf8.character.alpha()
> folded: string.utf8( =) <- string.utf8.character.alpha() = string.utf8( = )
> folding: string.utf8( = ) <- string.utf8.character.alpha()
> folded: string.utf8( = ) <- string.utf8.character.alpha() = string.utf8( =
> ))
> folding: string.utf8( = )) <- string.utf8( = ))
> folded: string.utf8( = )) <- string.utf8( = )) = string.utf8() = )
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(g)
> folding: string.utf8(g) <- string.utf8.character.alpha()
> folded: string.utf8(g) <- string.utf8.character.alpha() = string.utf8(gn)
> folding: string.utf8(gn) <- string.utf8.character.alpha()
> folded: string.utf8(gn) <- string.utf8.character.alpha() = string.utf8(gni)
> folding: string.utf8(gni) <- string.utf8.character.alpha()
> folded: string.utf8(gni) <- string.utf8.character.alpha() =
> string.utf8(gnir)
> folding: string.utf8(gnir) <- string.utf8.character.alpha()
> folded: string.utf8(gnir) <- string.utf8.character.alpha() =
> string.utf8(gnirt)
> folding: string.utf8(gnirt) <- string.utf8.character.alpha()
> folded: string.utf8(gnirt) <- string.utf8.character.alpha() =
> string.utf8(gnirts)
> folding: string.utf8(gnirts) <- string.utf8.character.underscore()
> folded: string.utf8(gnirts) <- string.utf8.character.underscore() =
> string.utf8(gnirts_)
> folding: string.utf8(gnirts_) <- string.utf8.character.alpha()
> folded: string.utf8(gnirts_) <- string.utf8.character.alpha() =
> string.utf8(gnirts_o)
> folding: string.utf8(gnirts_o) <- string.utf8.character.alpha()
> folded: string.utf8(gnirts_o) <- string.utf8.character.alpha() =
> string.utf8(gnirts_ot)
> folding: language.identifier() <- string.utf8(gnirts_ot)
> folded: language.identifier() <- string.utf8(gnirts_ot) =
> language.identifier(to_string)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(b)
> folding: string.utf8(b) <- string.utf8.character.alpha()
> folded: string.utf8(b) <- string.utf8.character.alpha() = string.utf8(bi)
> folding: string.utf8(bi) <- string.utf8.character.alpha()
> folded: string.utf8(bi) <- string.utf8.character.alpha() = string.utf8(bif)
> folding: language.identifier() <- string.utf8(bif)
> folded: language.identifier() <- string.utf8(bif) =
> language.identifier(fib)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(r)
> folding: string.utf8(r) <- string.utf8.character.alpha()
> folded: string.utf8(r) <- string.utf8.character.alpha() = string.utf8(re)
> folding: string.utf8(re) <- string.utf8.character.alpha()
> folded: string.utf8(re) <- string.utf8.character.alpha() = string.utf8(reg)
> folding: string.utf8(reg) <- string.utf8.character.alpha()
> folded: string.utf8(reg) <- string.utf8.character.alpha() =
> string.utf8(rege)
> folding: string.utf8(rege) <- string.utf8.character.alpha()
> folded: string.utf8(rege) <- string.utf8.character.alpha() =
> string.utf8(reget)
> folding: string.utf8(reget) <- string.utf8.character.alpha()
> folded: string.utf8(reget) <- string.utf8.character.alpha() =
> string.utf8(regetn)
> folding: string.utf8(regetn) <- string.utf8.character.alpha()
> folded: string.utf8(regetn) <- string.utf8.character.alpha() =
> string.utf8(regetni)
> folding: string.utf8(regetni) <- string.utf8.character.underscore()
> folded: string.utf8(regetni) <- string.utf8.character.underscore() =
> string.utf8(regetni_)
> folding: string.utf8(regetni_) <- string.utf8.character.alpha()
> folded: string.utf8(regetni_) <- string.utf8.character.alpha() =
> string.utf8(regetni_o)
> folding: string.utf8(regetni_o) <- string.utf8.character.alpha()
> folded: string.utf8(regetni_o) <- string.utf8.character.alpha() =
> string.utf8(regetni_ot)
> folding: language.identifier() <- string.utf8(regetni_ot)
> folded: language.identifier() <- string.utf8(regetni_ot) =
> language.identifier(to_integer)
> folding: string.utf8() <- string.utf8.character.alpha()
> folded: string.utf8() <- string.utf8.character.alpha() = string.utf8(s)
> folding: language.identifier() <- string.utf8(s)
> folded: language.identifier() <- string.utf8(s) = language.identifier(s)
> folding: string.utf8() <- string.utf8.character.LF()
> folded: string.utf8() <- string.utf8.character.LF() = string.utf8( )
> folding: string.utf8( ) <- string.utf8( )
> folded: string.utf8( ) <- string.utf8( ) = string.utf8( )
> Compilation time: 336.892ms
> neoscript]
>
> Message ends.
>
> /Flibble
>
> --
> ????
> --
> https://mail.python.org/mailman/listinfo/python-list
>
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
Am 14.02.21 um 01:19 schrieb Chris Angelico:
> On Sun, Feb 14, 2021 at 11:14 AM Mr Flibble
> <flibble@i42.removethisbit.co.uk> wrote:
>>
>> On 13/02/2021 23:30, Igor Korot wrote:
>>> Hi,
>>> But most importantly - what is the reason for this ?
>>> I mean - what problems the actual python compiler produce?
>>>
>>> Thank you.
>>
>> I am creating neos as I need a performant scripting engine for my other major project "neoGFX" and I want to be able to support multiple popular scripting languages including Python.
>>
>
> Until you have actually produced a (mostly) compatible Python
> implementation, can you please stop making these repeated and baseless
> jabs at CPython's performance? You keep stating or hinting that
> CPython is somehow unnecessarily slow, but unless you have some code
> to back your claims, this is nothing but mudslinging.

This is a message to all commentators on this list: Mr Flibble is known
on comp.lang.c++ for making very confident claims and announcements of
the greatest software product since the invention of the wheel.

He is indeed a capable C++ programmer, but he frequently underestimates
the work needed for such big projects so that you can easily count them
as vaporware for now. For example, he created his own "cross-platform,
modern" GUI toolkit neoGFX[*] just because he thinks that QT is bad (it
uses non-standard C++). Of course, cross-platform for now means it runs
on Windows and anything else is far into the future, also the optical
design looks modern / OK right now, but will look outdated soon. There
is no evidence that any other designer will join the project to keep the
look up to date.

He wants that neoGFX is scriptable in Python, but instead of linking
with CPython, he will write his own Python implementation instead,
because CPython is slow/not clean/ whatever. He doesn't seem to
understand that this is an enormous task on its own, because the
interesting part of a scripting language is the standard library with
many decade-years of work.

So my advice is to waste your time in this discussion if you find it
entertaining, but don't expect to have a usable product soon.

Best regards,

Christian

[*] https://github.com/i42output/neoGFX
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
Of course not.
Its like saying "JAVA sucks" without any citation or proof.

And I'm just curious - why not use C directly, since he is so great
developer for whatever task he needs to do?

Fun time reading... Hope it will continue.

Thank you.


On Sun, Feb 14, 2021, 1:22 AM Christian Gollwitzer <auriocus@gmx.de> wrote:

> Am 14.02.21 um 01:19 schrieb Chris Angelico:
> > On Sun, Feb 14, 2021 at 11:14 AM Mr Flibble
> > <flibble@i42.removethisbit.co.uk> wrote:
> >>
> >> On 13/02/2021 23:30, Igor Korot wrote:
> >>> Hi,
> >>> But most importantly - what is the reason for this ?
> >>> I mean - what problems the actual python compiler produce?
> >>>
> >>> Thank you.
> >>
> >> I am creating neos as I need a performant scripting engine for my other
> major project "neoGFX" and I want to be able to support multiple popular
> scripting languages including Python.
> >>
> >
> > Until you have actually produced a (mostly) compatible Python
> > implementation, can you please stop making these repeated and baseless
> > jabs at CPython's performance? You keep stating or hinting that
> > CPython is somehow unnecessarily slow, but unless you have some code
> > to back your claims, this is nothing but mudslinging.
>
> This is a message to all commentators on this list: Mr Flibble is known
> on comp.lang.c++ for making very confident claims and announcements of
> the greatest software product since the invention of the wheel.
>
> He is indeed a capable C++ programmer, but he frequently underestimates
> the work needed for such big projects so that you can easily count them
> as vaporware for now. For example, he created his own "cross-platform,
> modern" GUI toolkit neoGFX[*] just because he thinks that QT is bad (it
> uses non-standard C++). Of course, cross-platform for now means it runs
> on Windows and anything else is far into the future, also the optical
> design looks modern / OK right now, but will look outdated soon. There
> is no evidence that any other designer will join the project to keep the
> look up to date.
>
> He wants that neoGFX is scriptable in Python, but instead of linking
> with CPython, he will write his own Python implementation instead,
> because CPython is slow/not clean/ whatever. He doesn't seem to
> understand that this is an enormous task on its own, because the
> interesting part of a scripting language is the standard library with
> many decade-years of work.
>
> So my advice is to waste your time in this discussion if you find it
> entertaining, but don't expect to have a usable product soon.
>
> Best regards,
>
> Christian
>
> [*] https://github.com/i42output/neoGFX
> --
> https://mail.python.org/mailman/listinfo/python-list
>
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
Am 14.02.21 um 11:12 schrieb Paul Rubin:
> Christian Gollwitzer <auriocus@gmx.de> writes:
>> He wants that neoGFX is scriptable in Python, but instead of linking
>> with CPython, he will write his own Python implementation instead,
>> because CPython is slow/not clean/ whatever. He doesn't seem to
>> understand that this is an enormous task on its own, because the
>> interesting part of a scripting language is the standard library with
>> many decade-years of work.
>
> I wonder how big an issue the stdlib really is. Lots of it is written
> in Python and can port to another interpreter. Lots more is CPython C
> API bindings to external C libraries (e.g. OpenSSL) so porting those
> would be a matter of rebinding those libraries to libffi in the cases
> where that hasn't been done already.

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.

> CPython really is pretty slow, maybe because it uses so much boxed data,
> derps around with refcounts all the time, suffers memory fragmentation
> from not having a relocating GC, etc. And that is before we even
> mention the GIL.

I don't argue with that. CPython is slow. But I'm arguing that you can't
make it faster by multiple orders of magnitude unless you change the
language. For numerical code, straight-forward C is usually 100x to
1000x faster than Python, and you can reach the same performance by
giving up dynamic typing - Cython demonstrates this quite convincingly.
If you don't want static typing (with types close to the machine like
fixed-width integers) than you'll have to resort to a LOT of black magic
to even come close (PyPy, modern JS engines, ....)

Christian

--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
On 14/02/2021 23:00, Christian Gollwitzer wrote:
> Am 14.02.21 um 11:12 schrieb Paul Rubin:
>> Christian Gollwitzer <auriocus@gmx.de> writes:
>>> He wants that neoGFX is scriptable in Python, but instead of linking
>>> with CPython, he will write his own Python implementation instead,
>>> because CPython is slow/not clean/ whatever. He doesn't seem to
>>> understand that this is an enormous task on its own, because the
>>> interesting part of a scripting language is the standard library with
>>> many decade-years of work.
>>
>> I wonder how big an issue the stdlib really is.  Lots of it is written
>> in Python and can port to another interpreter.  Lots more is CPython C
>> API bindings to external C libraries (e.g. OpenSSL) so porting those
>> would be a matter of rebinding those libraries to libffi in the cases
>> where that hasn't been done already.
>
> 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. As far as arbitrary precision integers are concerned I am well on the way to completing the "neonumeral" library (which also has arbitrary precision floats).

As far as the standard library is concerned: that is already in Python so I should be able to support it with little effort; the only thing requiring more work would be the built-ins.

>
>> CPython really is pretty slow, maybe because it uses so much boxed data,
>> derps around with refcounts all the time, suffers memory fragmentation
>> from not having a relocating GC, etc.  And that is before we even
>> mention the GIL.
>
> I don't argue with that. CPython is slow. But I'm arguing that you can't make it faster by multiple orders of magnitude unless you change the language. For numerical code, straight-forward C is usually 100x to 1000x faster than Python, and you can reach the same performance by giving up dynamic typing - Cython demonstrates this quite convincingly. If you don't want static typing (with types close to the machine like fixed-width integers) than you'll have to resort to a LOT of black magic to even come close (PyPy, modern JS engines, ....)

I believe PyPy is only 4x faster than CPython on average and comes nowhere near close to JS JIT engines performance-wise.

/Flibble

--
????
--
https://mail.python.org/mailman/listinfo/python-list
Re: New Python implementation [ In reply to ]
On Sun, Feb 14, 2021 at 3:05 PM Christian Gollwitzer <auriocus@gmx.de>
wrote:

> Am 14.02.21 um 11:12 schrieb Paul Rubin:
> > Christian Gollwitzer <auriocus@gmx.de> writes:
> >> He wants that neoGFX is scriptable in Python, but instead of linking
> >> with CPython, he will write his own Python implementation instead,
> >> because CPython is slow/not clean/ whatever. He doesn't seem to
> >> understand that this is an enormous task on its own, because the
> >> interesting part of a scripting language is the standard library with
> >> many decade-years of work.
> >
> > I wonder how big an issue the stdlib really is. Lots of it is written
> > in Python and can port to another interpreter. Lots more is CPython C
> > API bindings to external C libraries (e.g. OpenSSL) so porting those
> > would be a matter of rebinding those libraries to libffi in the cases
> > where that hasn't been done already.
>
Hopefully CFFI, not libffi: https://cffi.readthedocs.io/en/latest/

I'm not saying that it is unfeasible or very difficult. I'm saying that
> it is a lot of work


It is.

However, IronPython and Shedskin do not have a full Python standard
library. I'd still call them "Python".
--
https://mail.python.org/mailman/listinfo/python-list

1 2 3 4  View All