IRC channel logs

2020-09-30.log

back to list of logs

<luis-felipe>One thing I noticed in the documentation for pre-post-order is that it doesn't say in which module it is defined, which is "(sxml transform)".
<stis>hey guilers!
<dsmith>stis: Heya stis. How goes the Python?
<stis>I fix bugs daily. Improving a lot I would say.
<ft>This is for running python programs on guile? Or to use python modules? Both?
<stis>you can do both
<ft>Cool!
<ft>Not the biggest python fan, but some of their batteries are rather good. :)
<stis>yeah, i can compile most of the library modules, but remains to get them functional
<stis>also great interoperability between python and guile modules
<stis>there is a macro package so that you can access classes etx from guile scheme
<stis>and a looping macro so that you can loop with python's generators
<ft>Sounds fun. I might give it a try, next time I'm jealous of matplotlib. ;)
<stis>it's python3
<ft>Shouldn't about everything these days be python3?
<stis>yeah it should
<ft>Hehe
<chrislck>guile needs an (import 'anigravity) <g>
<chrislck>guile needs an (import 'antigravity) <g>
***catonano_ is now known as catonano
<apteryx>hello Guilers! I was thinking; is it possible to pass from one language (say, Elisp) to another (say, Scheme) as part of the same execution?
<apteryx>I'd like to read some Elisp "data" and use it in a Scheme program.
<RhodiumToad>apteryx: data is data
<ArneBab_>RhodiumToad: I just tried with ,L elisp (setq foo (+ 1 1)) ,L scheme (display foo) ;; Undbound variable: foo
<ArneBab_>RhodiumToad: am I missing something?
<ArneBab_>I know that I can import procedures from other languages after they have been compiled (that’s what I routinely do in wisp), but I don’t know how to pass them in the running REPL.
<RhodiumToad>I'm guessing other languages store their globals somewhere other than the usual scheme module
<RhodiumToad>this works: (define get-foo (compile '(lambda () foo) #:from 'elisp)) ,L elisp (setq foo 123) ,L scheme (get-foo)
<RhodiumToad>elisp global variables are actually fluids, but I don't know where they are kept
<RhodiumToad>more generically you can do (define get-elisp-var (compile '(lambda (sym) (symbol-value sym)) #:from 'elisp))
<leoprikler>you could also use (symbol-value 'sym) from (language elisp runtime)
<lloda>why do assq and assq-ref take their arguments in different orders
<lloda>smh
<mwette>lloda: my only guess is this: assq is RnRS; assq-ref is not, it is Guile-custom(?); whoever designed the guile routines decided that order made more sense.
<mwette>in the example nyacc languages I use the user module for variables; see https://paste.debian.net/1165267/
<apteryx>RhodiumToad, ArneBab, leoprikler re elisp -> scheme; thanks for the enlightening answers!
<dsmith-work>Wednesday Greetings, Guilers
***jonsger1 is now known as jonsger
<str1ngs>hello dsmith-work.
***jonsger1 is now known as jonsger
***V is now known as v
<cloveistaken>How can I process time in Guile ?
***v is now known as V
<cloveistaken>For example getting current time or converting between time format ?
<cloveistaken>Oh I found it, SRFI19
<dsmith-work>cloveistaken: Did you see my response about call-with-input-file and with-input-from-file ?
<cloveistaken>Shit I missed it
<cloveistaken>Ah I see
<cloveistaken>They are quite different indeed
<cloveistaken>So if I call with-input-from-file, I can't get user input from original stdin anymore right ?
<dsmith-work>Right. And by "stdin" I mean (current-input-port)
<dsmith-work>s/mean/meant/
<cloveistaken>$s/mean/meant/ is better
<cloveistaken>I'm having some weird bugs with srfi-19 in guile-2.2
<cloveistaken>I'm not sure should I just go full one bleeding edge or fix the bug myself
<cloveistaken>The source i mean
<leoprikler>w.r.t. input-port: you can save the current input port in some other variable, but what would be the point in doing that?
<dsmith-work>Of course, current-input-port is back safe and unharmed after with-input-from-file returns
***rekado_ is now known as rekado
<rekado>mwette: the FFI helper is amazing!
<rekado>I realized that I always wanted to have Guile bindings for DRMAA and the FFI helper gets me very close to that goal