IRC channel logs


back to list of logs

<cybersyn>heya guilers, anyone with experience with Go care to share how guile fibers sizes up? any significant dis/advantages?
<freeguy>i have question
<freeguy>can i use guile(without c) for high performance software development.
<freeguy>please send me email
<daviid>sneek: seen spk121
<sneek>zzappie?, pretty sure was seen in #guile one day and 3 hours ago, saying: its pretty -- easy you can inherit package and specify patch file.
***sneek_ is now known as sneek
<wingo>guile 3.0.6 release is out --
<wingo>new docs:
<leoprikler>wingo: typo in Foreign-Libraries, [#:rename-on-cygwin?=#t] is on an extra line
<wingo>tx :)
<terpri>read-syntax is really cool! the inherent limitations of source-properties always bugged me (more in theory than practice, of course)
<wingo><3 :)
<ennoausberlin>Hello. I am trying to write a mron job using scheme. Can you tell me, how to debug these scripts. If I start mcron and something is wrong in the script I just get Cannot read files in your ~/.config/cron directory but no further output of the error itself
<ennoausberlin>I read the little schemer and I ran guix on some of my machines, but programming and especially debugging in scheme is still a challenge for me
***zap1 is now known as zzappie
<zzappie>ennoausberlin: I don't use mcron but I can give some tips on debugging in general. Probaby most common thing guilers do is (pk body). It will output value of body and the whole experssion evaluates to body's value as well. So you can wrap things there and there without changing program's logic
<leoprikler>call-with-trace is also useful
<zzappie>If the output is lost you can additionally wrap with (with-output-to-file "/file" ...)
<zzappie>I think there is also a posibility to start repl on error connect to a process with telnet or geiser
<zzappie>but I've never done it :) its in (system repl) or something like that
<zzappie>there you could use debugging metacommands (use ,help debug to find out more)
<zzappie>but in general I also find debugging in repl chalenging because stack trace gives me very vague idea where am I in the source code
<ennoausberlin>Thank you for your advice, but I guess mcron stops at parse time, not run-time. I probably have to start a repl and import all mcron related modules and somehow split my script into pieces and enter it line by line
<zzappie>oh! It says "source-location information for compiled code" is improved in the newest guile 3.0.6 release
<ennoausberlin>I have difficulties to load the mcron modules using (use-modules (mcron base))
<civodul>wingo: congrats on the release! \o/
***ChanServ sets mode: +o civodul
***civodul changes topic to 'Welcome to #guile. See for more information. Guile 3.0.6 is out! <>. This channel is logged, see <>. Bug database at <>.'
***ChanServ sets mode: -o civodul
<zzappie>hello! +1 looking to see where all my sources are :)
<ennoausberlin>I installed mcron from git and I have some go files in /usr/local/lib/guile/3.0/site-ccache/mcron/ like base.go or core.go
<zzappie>*looking forward
<ennoausberlin>Do I have to add them to %load-path?
<civodul>ennoausberlin: yes, you need to make sure GUILE_LOAD_PATH and GUILE_LOAD_COMPILED_PATH include the right /usr/local subdirectories
<ennoausberlin>@civodul: Can I configure this as permanent change somewhere?
<civodul>yes, you can set environment variables in ~/.bash_profile or /etc/profile
<civodul>so that they'll be defined when you log in
<lloda>how about extending define so that (define a b (values 1 2)) works? like srfi-71
<ennoausberlin>@civodul: Ah. Of course these are shell variables. My fault
<leoprikler>lloda: there is define-values IIRC
<lloda>leoprikler: i know ofc
<ennoausberlin>If I load the mcron file from the repl via (load "my_test_job.guile") I get back the output $1 = ((#<<job> ... etc)). How can I investigate it further?
<ennoausberlin>what is the meaning of $1?
<zzappie>repl saves all evaulations in $number variables
<zzappie>you can us $1 as a varible in repl
<ennoausberlin>I understand
<zzappie>load procedure evaluets content of your file in your context. so if there are any definieitons they apperar in your context and (#<<job> ... etc) i guiess means that you have job object as last expression in your file
<ennoausberlin>Right. Can I inspect the job expression to see some of the let* bindings?
<zzappie>hmm... dont know. If job I a record you could acces it with job-* accessors. But I gues the job itself is a lambda -- I dont know how to access its contents other then running it...
<zzappie>*If job is a record
<ennoausberlin>The job function is part of the mcron modules and expects an vixiecron entry like ("0-59/5 * * * *") and a lambda
<zzappie>there is a job function an job record
<zzappie>from #<<job> notation I assume that you deal with job record. Maybe you could try to get (job:action yourjob) and run it?
<ennoausberlin>zzappie: That would be perfect.
<ennoausberlin>zzappie: I now store the resulting record in a toplevel named my-record. How can I access the fields like time-proc or action? I never used records so far.
<zzappie>hm you dont need to create a new record-type.. Maybe you could put the snippet to debianpaste?
<ennoausberlin>This is from the repl
<zzappie>aah. I got you now, I thought you defining new record type... yes job record is in (mcron base) module you cann import it and try (job:action my-record)
<zzappie>*job record type
<ennoausberlin>I did (use-modules (mcron base)) but then (job:action my-record)
<ennoausberlin>;;; <stdin>:27:0: warning: possibly unbound variable `job:action'
<ennoausberlin>ice-9/boot-9.scm:1669:16: In procedure raise-exception:
<ennoausberlin>Unbound variable: job:action
<rekado>these accessors are not exported.
<rekado>if you just want to play with this in the REPL I suggest entering the (mcron base) module
<rekado>,m (mcron base)
<zzappie>yes didn't notice that, but then your local binging will be gone so you'll need to load your my_test_job.guile file again
<ennoausberlin>zzappie: I did this an I can now call the procedure.
<zzappie>s/will be gone/will not be in your context/
<davexunit>I didn't realize that guile 3.0.6 introduced a new FFI API. curious how to upgrade to it while preserving compatibility with older versions of guile.
<ennoausberlin>Every time I stop by here I learn so much. I really appreciate this channel
<zzappie>its a nice place here :)
<ennoausberlin>By the way. The error was permission denied because I call mkdir from within the job if a certain dir is missing. Insufficient user rights was the problem. Hard to track down without any output
<dsmith-work>Hey Hi Howdy, Guilers
<dsmith-work>Wooo. Release!
*sneek dances
<civodul>for the record, the GMP/GnuTLS issue is for Guile >= 2.2.7 or >= 3.0.1:
<civodul>(NEWS says 2.0.4)
<zzappie>I'm trying to wrap with-exception-handler with with-output-to-file inside a macro but file ends up empty...
<zzappie>am I missing something obvious?
<lampilelo>zzappie: it may be that the ports are not flushed because you're exiting non-locally from the handler, try calling (force-output) after writing your error log
<zzappie>lampilelo! thanks. It works now
<lampilelo>glad to help
<lampilelo>zzappie: i think setting #:unwind argument for with-exception-handler would also work, although i'm not very familiar with exceptions in guile
<lampilelo>because if raise-exception didn't trigger with-output-to-file's unwind handler it means the port is still open
<zzappie>lampilelo: I already tried it with #:unwind? #t -- doesn't work that way.
<lampilelo>what about the outer with-exception-handler? the one that should catch (raise-exception) called from the handler?
<zzappie>I'm actually intentionally rasing an exception. This macro meant to work similar way to (pk) but also outputing error object if exceptions were rised and doesnt affect other exception handlers because
<zzappie>going to use it in difficult situations like debugging shepherd services to dump things to the root directory :)
<zzappie>s/exception handlers because/exception handlers because it reraises exception it got/
<lampilelo>since it works, there's no much more to do, the gc will clean up the port eventually
***DadeBonetti1 is now known as DadeBonetti
<wingo>daviid: i have good news for you :)
<wingo>see most recent commit and lmk how it works for you
*wingo zzz
<daviid>wingo: oh, very nice tx, i will try asap, and will let you know of course, it is just that right now I am busy on annoying 'admin' ... tx
<daviid>wingo: good night
<civodul>oh syntax-error exceptions now see a vector instead of a source location alist
<RhodiumToad>ice-9 read doesn't get a compiled .go file?
<RhodiumToad>aha, it's included into boot-9
<RhodiumToad>hm. using --enable-mini-gmp failed to compile