On 2020-02-11 21:57, Stefan Israelsson Tampe wrote:
This error is fixed in repository
/Stefan
Thanks. That solved that part. Now Im getting this error on make:
(commit 226d33163e7f1e305c0b6e2ada37209513377dff)
----------------------
Makefile:1390: warning: overriding recipe for target 'python'
Makefile:771: warning: ignoring old recipe for target 'python'
GEN oop/pf-objects.go
guile: warning: failed to install locale
warning: failed to install locale: Invalid argument
Backtrace:
In ice-9/boot-9.scm:
2312:4 19 (save-module-excursion #<procedure 55a897256bc0 at
lang?>)
In language/scheme/compile-tree-il.scm:
31:15 18 (_)
In ice-9/psyntax.scm:
1235:36 17 (expand-top-sequence ((define-module (oop #) # (# ?)
?)) ?)
1182:24 16 (parse _ (("placeholder" placeholder)) ((top) #(# #
?)) ?)
285:10 15 (parse _ (("placeholder" placeholder)) (()) _ c&e (#
#) #)
In ice-9/eval.scm:
293:34 14 (_ #<module (#{ g77}#) 55a8972dd0a0>)
In ice-9/boot-9.scm:
2874:4 13 (define-module* _ #:filename _ #:pure _ #:version _ #
_ ?)
2071:24 12 (call-with-deferred-observers #<procedure 55a897086910
?>)
2887:24 11 (_)
222:29 10 (map1 (((oop goops)) ((oop dict) #:renamer #<proce?>)
?))
222:29 9 (map1 (((oop dict) #:renamer #<procedure 55a8972fb?>)
?))
222:29 8 (map1 (((ice-9 vlist)) ((ice-9 match)) ((system # #))
?))
222:29 7 (map1 (((ice-9 match)) ((system base message)) ((# ?))
?))
222:29 6 (map1 (((system base message)) ((language python #)) #
?))
222:29 5 (map1 (((language python guilemod)) ((ice-9 #)) ((#
?))))
222:29 4 (map1 (((ice-9 pretty-print)) ((persist
persistance))))
222:17 3 (map1 (((persist persistance))))
2803:6 2 (resolve-interface _ #:select _ #:hide _ #:prefix _ #
_ ?)
In unknown file:
1 (scm-error misc-error #f "~A ~S" ("no code for modu?"
?) ?)
In ice-9/boot-9.scm:
752:25 0 (dispatch-exception _ _ _)
ice-9/boot-9.scm:752:25: In procedure dispatch-exception:
no code for module (persist persistance)
make: *** [Makefile:1385: oop/pf-objects.go] Error 1
----------------------
Regards,
David
On Tue, Feb 11, 2020 at 8:17 AM david larsson
<address@hidden> wrote:
On 2020-02-10 21:11, Stefan Israelsson Tampe wrote:
I have now added the bytes constructor that was not working.
Thanks!
To compile from source please try use the git repository at:
https://gitlab.com/python-on-guile/python-on-guile/
see readme for how to compile and what dependencies you have.
I was able to build and install:
- guile-persist: commit ebebb66ae6d6c47dbc406cdbcaccb5ffed2e463a
- stis-parser: commit 7673dd576abb445fbcfce8c4b6ae961ee860902e
but for python-on-guile Im getting this error on make:
--------------
Makefile:1390: warning: overriding recipe for target 'python'
Makefile:771: warning: ignoring old recipe for target 'python'
GEN language/python/guilemod.go
guile: warning: failed to install locale
warning: failed to install locale: Invalid argument
ice-9/boot-9.scm:752:25: In procedure dispatch-exception:
Syntax error:
language/python/guilemod.scm:271:0: cond-expand: unfulfilled
cond-expand
in form (cond-expand (guile-3.0 (define-set-M lookup-warning-type
lookup-warning-type) (define-set-M warning warning) (set!
%warning-types
w-types)) (guile-2.0 or guile-2.2 (define-M %warning-types
w-types)
(define-exp-M lookup-warning-type (lambda (name) "Return the
warning
type NAME or `#f' if not found." ((M find) (lambda (wt) (eq? name
((M
warning-type-name) wt))) (M %warning-types))))))
make: *** [Makefile:1385: language/python/guilemod.go] Error 1
---------------
Im compiling with guile2.2
Regards,
David
Regards
Stefan
On Mon, Feb 10, 2020 at 1:14 PM david larsson
<address@hidden> wrote:
On 2020-02-09 21:36, Stefan Israelsson Tampe wrote:
in sys that is
On Sun, Feb 9, 2020 at 9:36 PM Stefan Israelsson Tampe
<address@hidden> wrote:
OKey, I changed the values from immutable lists to lists.
Great!
On Sun, Feb 9, 2020 at 9:27 PM Stefan Israelsson Tampe
<address@hidden> wrote:
Note that a lot of things are untested because I'm alone on
the
development.
Ok, I understand.
I haven't been able to build a recent version, but if you can
share
some
updated instructions, then I could perhaps help out with some
occasional
testing. I have only managed to build from the old commit
fc0d7a9
by
updating the current python-on-guile guix package locally.
netlib is not included, you can test to add the python module
file
to a (language python module) directory
What's been working for me so far is only (load
"path/to/file.py")
and
(load-compiled "path/to/file.go").
(use-modules (a b c)) did not work for me, except to load
modules
already shipped with python-on-guile repo; (language python
module
python) etc.
I have recently added much more of the python stdlib aka 3.7
but
not
all.
Not sure what you mean by .scm file and .py fle when it comes
to
base64
using that module in scheme gives
scheme@(guile-user)> (b64decode (b64encode "abc"))
$2 = b'abc'
scheme@(guile-user)> (b64decode (b64encode #(1 2 3)))
$3 = b'\x01\x02\x03'
Which return a bytevector if you want a string back you need
to
interpret the bytevector back to a string
Im getting weird results when trying to output the base64
representation
of a string, take btest.py:
#import sys
import base64
def mybmethod(x):
mybytes = bytes(x, "utf-8")
encodedbytes = base64.b64encode(mybytes)
myb64string = str(encodedbytes, "utf-8")
return myb64string
#print(myb64string)
#mybmethod(sys.argv[1])
and assume btest.scm using it with:
(add-to-load-path (dirname (current-filename)))
(use-modules (language python module python))
(load "btest.py")
(define-public (mybmethodscm cmdline)
(display (mybmethod (cadr cmdline))))
With this it will not work to run the scheme file with
guile -e mybmethodscm btest.scm dfasdf
The error I got indicated that btest.py uses the bytes
procedure
from
within python-on-guile instead of from the python3 base64 lib:
-------------------
In