Re: Macro for Python-style debugging output

2022-03-30 Thread Thien-Thi Nguyen
() Liliana Marie Prikler () Wed, 30 Mar 2022 21:08:12 +0200 I think using plain old 'peek' might be preferable in most cases. While you're missing out on the LHS expression, you can mix it with symbols arbitrarily, e.g. (peek 'my-function a b 'args+kwargs= rest) For those who use E

Re: Macro for Python-style debugging output

2022-03-30 Thread Liliana Marie Prikler
Am Montag, dem 28.03.2022 um 21:22 +0200 schrieb Jean Abou Samra: > The following macro is a variant of peek that mimics Python's = > format specifier (e.g. print(f"{a=} {a+b=}")) by printing expressions > and the values they evaluate to. > > (define-syntax-rule (db arg ...) >    (begin > (le

Macro for Python-style debugging output

2022-03-28 Thread Jean Abou Samra
The following macro is a variant of peek that mimics Python's = format specifier (e.g. print(f"{a=} {a+b=}")) by printing expressions and the values they evaluate to. (define-syntax-rule (db arg ...)   (begin     (let ((evaluated-arg arg))   (format (current-error-port) ";;; ~s => ~s\n" (quot

python-on-guile

2022-02-19 Thread Stefan Israelsson Tampe
i am now experimenting with the new generator infrastructure to see how much actual python on guile code is sped up. In the process I am optimizing a lot of stuff regarding python for loops. But some irritating things remain. My number 1 anger is that a iterator can throw an exception as a way to

Python

2021-09-19 Thread Stefan Israelsson Tampe
in python on guile you can do, def g(yield_fkn,x): yield_fkn(x+1) yield_fkn(x+2) and def f(l): for x in l: g(yield,x) and this extension works like this in python on guile list(f([1,2]) --> [1,2,2,3] Nifty right. This is thanks to the superb infrastructure in sch

Re: Python-on-guile

2021-04-27 Thread Nala Ginrut
ode to the compiler, some of which > concerned skipping some arity checking. > > Also, Stefan meanwhile committed something called "reworked object system" > to his python-on-guile. > > Sorry for coming with unspecific information (don't have time to track > d

Re: Python-on-guile

2021-04-25 Thread Developers list for Guile, the GNU extensibility library
Hello, Le dimanche 25 avril 2021 à 12:54 +0200, Dr. Arne Babenhauserheide a écrit : > (next frontier: compete with math that’s implemented via numpy — you > can find RPython implementations of the basics of numpy in the > pypy-sources: > https://foss.heptapod.net/pypy/pypy/-/tree/branch/default/py

Re: Python-on-guile

2021-04-25 Thread Dr. Arne Babenhauserheide
Stefan Israelsson Tampe writes: > (define-syntax-rule (letec f) > (let/ec x (f x > > Actually lead to similar speeds as python3. Please keep in mind that this is math. There are parts of Python that are heavily optimized, for example reading strings from disk. Guile will l

Re: Python-on-guile

2021-04-25 Thread Stefan Israelsson Tampe
ndicate, perhaps that would amount to efficiently compiling > let/ec. > > Best regards, > Mikael > > On Sat, Apr 24, 2021 at 5:19 PM Stefan Israelsson Tampe < > stefan.ita...@gmail.com> wrote: > >> Guile is 3x faster then fastest python-on-guile which

Re: Python-on-guile

2021-04-25 Thread Stefan Israelsson Tampe
Python List lookup is 2x slower now than cpython. Tuple lookup is slightly faster. On Fri, 23 Apr 2021, 17:01 Mikael Djurfeldt wrote: > Hi, > > Yesterday, Andy committed new code to the compiler, some of which > concerned skipping some arity checking. > > Also, Stefan m

Re: Python-on-guile

2021-04-25 Thread Stefan Israelsson Tampe
The remaining 3x between guile and python can be to either the extensive usage of set! in python or if the number of runs in the inner loop is small because there is a let/ec for the break and according to the standard a catch to support the raising of StopIteration. Set! probably cannot account

Re: Python-on-guile

2021-04-25 Thread Mikael Djurfeldt
Guile is 3x faster then fastest python-on-guile which is 2x faster then > python3 Cpython > > attached is a guile corresponding program. > > On Sat, Apr 24, 2021 at 4:41 PM Stefan Israelsson Tampe < > stefan.ita...@gmail.com> wrote: > >> To note is that 'continu

Re: Python-on-guile

2021-04-24 Thread Stefan Israelsson Tampe
Guile is 3x faster then fastest python-on-guile which is 2x faster then python3 Cpython attached is a guile corresponding program. On Sat, Apr 24, 2021 at 4:41 PM Stefan Israelsson Tampe < stefan.ita...@gmail.com> wrote: > To note is that 'continue' is killing performance

Re: Python-on-guile

2021-04-24 Thread Stefan Israelsson Tampe
To note is that 'continue' is killing performance for python-on-guile programs, so by changing the code to not use continue lead to python-on-guile running twice the speed of python3. The reason is that the while loop is used as (while (...) (let/ec continue ...)) And the

Re: Python-on-guile

2021-04-24 Thread Stefan Israelsson Tampe
Actually changing in (language python compile), (define (letec f) (let/ec x (f x To (define-syntax-rule (letec f) (let/ec x (f x Actually lead to similar speeds as python3. On Sat, Apr 24, 2021 at 1:26 PM Stefan Israelsson Tampe < stefan.ita...@gmail.com> wrote: > Pro

Re: Python-on-guile

2021-04-24 Thread Stefan Israelsson Tampe
ned skipping some arity checking. >> >> Also, Stefan meanwhile committed something called "reworked object >> system" to his python-on-guile. >> >> Sorry for coming with unspecific information (don't have time to track >> down the details) but I notic

Re: Python-on-guile

2021-04-24 Thread Mikael Djurfeldt
me arity checking. > > Also, Stefan meanwhile committed something called "reworked object system" > to his python-on-guile. > > Sorry for coming with unspecific information (don't have time to track > down the details) but I noticed that my benchmark script written i

Re: Python-on-guile

2021-04-23 Thread Linus Björnstam
d something called "reworked object > system" to his python-on-guile. > > Sorry for coming with unspecific information (don't have time to track > down the details) but I noticed that my benchmark script written in > Python, and which computes the 20:th Ramanujan number,

Python-on-guile

2021-04-23 Thread Mikael Djurfeldt
Hi, Yesterday, Andy committed new code to the compiler, some of which concerned skipping some arity checking. Also, Stefan meanwhile committed something called "reworked object system" to his python-on-guile. Sorry for coming with unspecific information (don't have time to

Re: Python on guile v1.2.3.7

2021-04-17 Thread Dr. Arne Babenhauserheide
Stefan Israelsson Tampe writes: > I have continued to debug python for guile 3.1 and I am now getting much > less warnings and also I can run test cases and it looks good. Tip, To run > unit tests one can do from the module directory in the dist > > python language/python/module

Re: Python on guile v1.2.3.7

2021-04-17 Thread Stefan Israelsson Tampe
Om du vill kan du göra en update på guile and guile-persists, börjar bli bra nu. On Sun, Apr 18, 2021 at 12:12 AM Stefan Israelsson Tampe < stefan.ita...@gmail.com> wrote: > I have continued to debug python for guile 3.1 and I am now getting much > less warnings and also I can run te

Re: Python on guile v1.2.3.7

2021-04-17 Thread Stefan Israelsson Tampe
I have continued to debug python for guile 3.1 and I am now getting much less warnings and also I can run test cases and it looks good. Tip, To run unit tests one can do from the module directory in the dist python language/python/module/unittest/tests/test_case.py to see what's workin

Re: Python on guile v1.2.3.7

2021-04-14 Thread Mikael Djurfeldt
Hi Stefan, Could it be that you have not committed the file: language/python/module/re/flag-parser.scm ? Best regards, Mikael On Sun, Apr 11, 2021 at 11:23 AM Stefan Israelsson Tampe < stefan.ita...@gmail.com> wrote: > Hi, > > I released a new tag of my python code that

Re: Python on guile v1.2.3.7

2021-04-11 Thread Maxim Cournoyer
Hi Stefan, Stefan Israelsson Tampe writes: > Hi, > > I released a new tag of my python code that basically is a snapshot of a > work in progress. > > This release includes > * pythons new match statement > * dataclasses > * Faster python regexps through caching

Python on guile v1.2.3.7

2021-04-11 Thread Stefan Israelsson Tampe
Hi, I released a new tag of my python code that basically is a snapshot of a work in progress. This release includes * pythons new match statement * dataclasses * Faster python regexps through caching and improved datastructures * Numerous bug fixes found while executing the python unit tests.

continuation of schme-python mail

2020-09-12 Thread Stefan Israelsson Tampe
The source is at, https://gitlab.com/tampe/scheme-python

Project scheme-python

2020-09-12 Thread Stefan Israelsson Tampe
Hi, I am the author of python-on-guile and I just took out the scheme infrastructure for python and put it is a self contained project of not too large size. It does not have a python compiler and cannot use python code. So scheme only. You can find the project at docs for the interfaces is

Python on guile v1.2.3.6

2020-08-06 Thread Stefan Israelsson Tampe
Hi, This is an interesting release as I'm starting to get the cpython's unit tests to work. Still remains a lot of work but much more is now working according to the CPython standard. Next up is getting all unit tests for the test framework to pass. Then to get as much as possible of the CPython

Re: Python on guile v1.2.3

2020-06-23 Thread Marius Bakke
Stefan Israelsson Tampe writes: > done, all now have tags 1.2.3 Incredible response time, thanks! :-) I have not been able to build stis-parser, because slask.scm is missing: https://gitlab.com/tampe/stis-parser/-/issues/2 Is it a bug, or am I doing something wrong? Thanks, Marius

Re: Python on guile v1.2.3

2020-06-23 Thread Marius Bakke
Stefan Israelsson Tampe writes: > Hi, > > I just tagged a minor release python on guile v1.2.3 that mainly is > bugfixes an implementation of pythons ctypes ontop of guiles ffi layer. Hi, thanks for this work! I don't see any tags in this repository: https://gitlab.co

Re: Python on guile v1.2.3

2020-06-23 Thread Stefan Israelsson Tampe
done, all now have tags 1.2.3 On Tue, Jun 23, 2020 at 2:54 PM Marius Bakke wrote: > Stefan Israelsson Tampe writes: > > > Hi, > > > > I just tagged a minor release python on guile v1.2.3 that mainly is > > bugfixes an implementation of pythons ctypes ontop of gu

Python on guile v1.2.3

2020-05-24 Thread Stefan Israelsson Tampe
Hi, I just tagged a minor release python on guile v1.2.3 that mainly is bugfixes an implementation of pythons ctypes ontop of guiles ffi layer. Happy Hacking!

python-on-guile 1.2.1

2020-04-28 Thread Stefan Israelsson Tampe
I just released a version of python on guile that I think i much more fast in execution of the attribute lookup than before and also I think that this is one of the more correct versions and decided to freeze it into a release. Not much more feature wise than just speedier and slots implemented

Re: Python on guile version 1.2

2020-04-26 Thread Stefan Israelsson Tampe
yes we can compile to module ast python-on-guile compiles to macros in scheme that can be used without compiling python from scheme. It targets good or excellent interoperability between scheme and python Yes works on guile 3.0. Also you need the most current dependencies see readme On Sat, Apr

Re: Python on guile version 1.2

2020-04-25 Thread zimoun
Dear, Thank you for this interesting work. On Fri, 10 Apr 2020 at 15:41, Stefan Israelsson Tampe wrote: > I'm pleased to announce python on guile 1.2. This version increases the > correctness of the parser as well as adding quite a number of system py > files that compiles as

Python on guile version 1.2

2020-04-10 Thread Stefan Israelsson Tampe
Hi I'm pleased to announce python on guile 1.2. This version increases the correctness of the parser as well as adding quite a number of system py files that compiles as an example the we can now generate python ast from the compiler. Also some work to improve speed have been done. Pyth

Re: Python on guile

2020-03-23 Thread Arne Babenhauserheide
Stefan Israelsson Tampe writes: > Now in corona times I'm working quite a lot with python-on-guile fixing > bugs in the parser and compiler. Trying to add and test more python > modules. My test case is to get IPython running on python on guile. You’re awesome! Thank you! It s

Python on guile

2020-03-22 Thread Stefan Israelsson Tampe
Hi all, Now in corona times I'm working quite a lot with python-on-guile fixing bugs in the parser and compiler. Trying to add and test more python modules. My test case is to get IPython running on python on guile. Some of the python library code is very advanced python so getting it worki

Re: python-on-guile

2019-06-26 Thread Nala Ginrut
Thanks for the work! I appreciate it! On Sat, Jun 15, 2019 at 3:05 AM Stefan Israelsson Tampe wrote: > > python on guile has reached quite far and now compiles a lot of the standard > python code base. The speed has not been of importance. Rather to get good > coopertion between

Re: python-on-guile

2019-06-22 Thread Arne Babenhauserheide
Stefan Israelsson Tampe writes: > python on guile has reached quite far and now compiles a lot of the > standard python code base. The speed has not been of importance. Rather to > get good coopertion between guile scheme and python programs. That sounds awesome! Thank you fo

python-on-guile

2019-06-14 Thread Stefan Israelsson Tampe
python on guile has reached quite far and now compiles a lot of the standard python code base. The speed has not been of importance. Rather to get good coopertion between guile scheme and python programs. But it also define a scheme interface to the python functionalites and i'm now tryi

Re: [RFC] [PATCH] Provide the ability to write the frame unwinder in Python

2015-03-19 Thread Andy Wingo
ect passed to a sniffer, how about calling it >>>>> FrameData? Note that it's not very important from the user's point of >>>>> view as sniffer code does not ever reference it by name. >>>> >>>> It's true that from user code it barely

Re: [RFC] [PATCH] Provide the ability to write the frame unwinder in Python

2015-03-18 Thread Doug Evans
passed to a sniffer, how about calling it >>>> FrameData? Note that it's not very important from the user's point of >>>> view as sniffer code does not ever reference it by name. >>> >>> It's true that from user code it barely matters to Python, but Sch

Re: [RFC] [PATCH] Provide the ability to write the frame unwinder in Python

2015-03-18 Thread Andy Wingo
important from the user's point of >>> view as sniffer code does not ever reference it by name. >> >> It's true that from user code it barely matters to Python, but Scheme's >> monomorphic flavor makes these things more apparent: >> >> (fram

Re: [RFC] [PATCH] Provide the ability to write the frame unwinder in Python

2015-03-18 Thread Doug Evans
ry important from the user's point of >> view as sniffer code does not ever reference it by name. > > It's true that from user code it barely matters to Python, but Scheme's > monomorphic flavor makes these things more apparent: > > (frame-data-read-register fra

Re: python on guile

2014-06-02 Thread Nala Ginrut
; I do need to develop the guile-log parser framework further so it is > logical to use it because of that. This means that currently none but me > probably can use it atm but that will change. I'm very pleased with how > the functional parser framework works. Currently it is in hefty d

python on guile

2014-05-30 Thread Stefan Israelsson Tampe
currently none but me probably can use it atm but that will change. I'm very pleased with how the functional parser framework works. Currently it is in hefty development and I can't parse much python code, but that will change soon. https://gitorious.org/python-on-guile Stay tuned! /Stefan