IRC channel logs

2021-12-04.log

back to list of logs

<avalenn>I'd like to do some unit-tests of unexported functions of a module with my tests in a second file. Any recommendations?
<amazigh>use @@
<avalenn>Ok. I will do that. Hoped to find a less verbose way.
<ft>@@ doesn't work all that well anymore with guile-3's declarative modules.
<avalenn>When you say "doesn't work that well" what are the problems?
<avalenn>Ideally I would like to operate like if I am in the module but in a second file with only tests.
<lampilelo>avalenn: i think you can use set-current-module for that
<avalenn>lampilelo: thank you, it seems indeed useful. I will try this.
<ft>avalenn: I will probably get the details wrong, so you'll have to refer to the manual unless someone else wants to chime in. But I used @@ to forcibly import private functions in the TAP emitting testing module I wrote, and got hit by the effects. It's been too long, so I can't recall the details. Sorry.
*avp added a new usage example for Guile-SMC: https://github.com/artyom-poptsov/guile-smc/tree/master/examples/parenthesis-check
<ArneBab>taw10: nice! For day I I thought about using a par, too, instead of the record, but decided on the record to make it easier to understand and change.
<ArneBab>taw10: I do not focus on making the code perfect, but rather on getting it done and readable and obviously correct quickly, because my time is too limited :-)
<ArneBab>(and I have other things Ii should be doing that limit the time I have …)
<avp>Guile-SMC 0.3.0 is out: https://lists.gnu.org/archive/html/guile-user/2021-12/msg00003.html
<avp>Besides, is there a way in install "logger" command in Guix?
<avp>Or at least is there a replacement for this?
<ArneBab>avp: nice!
<ArneBab>avp: having an ini parser is also cool!
<avp> ArneBab: I'd like to package Guile-SMC for Guix, but it seems that Guix lacks 'logger' command...
<lilyp>What is the logger command?
<lilyp>could you replace it with nothing?
<civodul>avp: the "inetutils" package provides it
<avp>civodul: Thanks, installing "inetutils" solved my problem.
***lilyp_ is now known as lilyp
<civodul>hey avp, i hadn't recognized the nickname :-)
<atka>hi guile, does anyone have a good introductory tutorial or text to get up and running with guile/scheme? pretty much all of the links on schemers.org are dead. I'm not a programmer, but I am somewhat familar with POSIX sh and can write scripts etc. Mainly want to start scripting in guile, and want to use GNU Guix better.
<lampilelo>atka: start with 'the little schemer' book, then read guile manual, skipping the parts about C integration
<atka>lampilelo: thanks, I'll do that.
<atka>one other question, would a tutorial for say Dr Racket work with guile and its repl or will I get bit eventually
<lampilelo>every dialect has its own unique additions so there will be some differences for sure, i don't really know racket that much so maybe someone else could chime in on that
<lampilelo>you can also ask on #scheme
<atka>ok, thanks, I will just use the little schemer and guile manual for now.
<taw10>ArneBab: The squid definitely ate me in the time it took me just to read the input files
<taw10> https://github.com/taw10/advent-of-code/blob/main/2021/day4/day4.scm
<taw10>(spoilers)
<ArneBab>I’m only starting now, so I won’t read the code until I’m finished :-)
<taw10>Ok :) I thought you'd got there first when I saw the title come up in your RSS feed, but I only clicked through just now