IRC channel logs


back to list of logs

<cousin_itt_>what might prevent (dynamic-link) from opening up a full path to a library?
<cousin_itt_>I verified that it wasn't a symbolic link. The library is "/usr/lib/x86_64-linux-gnu/
<pkill9>the 'i' is gone :3
<pkill9>I cleaned up the theme directory and it's way more organised
<pkill9>I want to make a web service like wordpress, except for static sites and editing markdown text files
<pkill9>and using haunt
<pkill9>and have themes able to be switched like wordpress
<cousin_itt_>Ok - I built Guile 3.0.5 from scratch, and tried (dynamic-link "/usr/lib/x86_64-linux-gnu/"), and it worked just fine. Guile 3.0.1 from the Debian repo gives me "file not found." Where might I look to figure out what the problem is?
<daviid>cousin_itt_: what debian version are you using? testing has 3.0.5-2, and stable still uses 2.0, afaict
<daviid>actually stable also has 2.2.4
<cousin_itt_>The (dynamic-link) issue does appear to be fixed with a newer Guile package. I tested on a different computer (Lubuntu 20.10) which had guile-3.0.4 installed, and it worked fine as well.
<cousin_itt_>Thanks daviid for the suggestion.
<daviid>np, welcome!
<Rovanion>How do I open a file relative to the Scheme files directory rather than the shells $PWD?
<Rovanion>Wrote up a longer, more detailed versino of the question on SO:
<pinoaffe>Rovanion: (current-filename) gives you the path of the current guile script, (dirname (current-filename)) gives you the directory its in
<pinoaffe>that should do the trick
<pinoaffe>ah it seems like rekado already answered your stackoverflow question :)
<Rovanion>pinoaffe: Thank you either way :D
<mdevos>I am wondering if defining multiple modules in a single source file
<mdevos> is supposed to work? (ice-9 ports) & (ice-9 ports internal) do that,
<mdevos> but perhaps it should not be relied upon.
<mdevos>(I'm converting a CL code base to Scheme and now I have many tiny modules, I'm wondering if creating only a limited few .go for space efficiency would be possible)
<spk121>mdevos: I don't think it is supposed to work that way
<mdevos>spk121: you mean it's not going to help with space usage?
<spk121>mdevos: I'm more concerned about Guile being able to locate your *.go files correctly
<mdevos>I'll re-export the variables from (mach tiny-module) in the large module (mach), and always import (mach) itself and not (mach tiny) from other modules
<mdevos>Perhaps I should first check whether this actually results in space savings ...
<leoprikler>Well, assuming that consumers should not (use-module (something something internal)) directly, you can get away with it.
<leoprikler>but if you want it for public api, just write another file
<chrislck>it's result in definitive cognitive savings...
<mdevos>leoprikler: ok. I'm just wondering if there are plans to change Guile's module system that would break this.
<leoprikler>plans in what way?
<mdevos>leoprikler: no idea, that's why I'm asking (-:
<leoprikler>nah, you can use modules for whatever, they're not intrinsically linked to the filesystem or anything
<leoprikler>same as you can use variables wherever, they're not intrinsically linked to modules
<leoprikler>you just don't get the benefits of the association, that's all
<mdevos>thanks for the responses!
<Sheilong>Is there any like map procedure that extract two items per time from a list?
<mdevos>Sheilong: I don't think so (and I've spent some time looking at (srfi srfi-1) closely in the past)
<mdevos>shouldn't be much trouble to implement it yourself, though. (define (map2 proc list) (if (null? list) '() (cons (proc (car list) (cadr list)) (map2 proc (cddr list)))))
<mdevos>Would map2 suit your purposes?
<RhodiumToad>or even using (match)
***cbaines_ is now known as cbaines
***sneek_ is now known as sneek
<Sheilong>Is there any implementation of sets that permits to add elements to a set?
<Sheilong>mdevos: Yes. But I just figured that I need to work with sets will make my life easier.
<RhodiumToad>you can add elements to hash tables...
<rlb>If the sets are small, a list, cons, and memq, member, etc. might be fine.
<RhodiumToad>srfi-1 has functions for treating lists as sets
<rlb>oh, right, that :)
<Sheilong>I seen srfi-1, but did not found a way to add the elements
<RhodiumToad>or just cons
<Sheilong>RhodiumToad: I have a list whose elements are bytevectors of the same size. I need to eliminate repeated elements and then compare the original size of the list with the one with removed elements.
<Sheilong>So I thought when transforming it into a set would do the job of removing the duplicates
<dongcarl>sneek: later tell zimoun Thanks for following up in the "Extending package transformation options" thread, I'm not familiar enough with Guix internals to comment but I'm reading every email and learning a lot! :-)
<dongcarl>sneek: botsnack
*dongcarl realizes he posted in the wrong channel, OH NO
<linas>Mixing C and scheme: I've defined functions in C, but then get "warning: possibly unbound variable" when I use them in scheme ...
<linas>How do I avoid/silence this error message?
<rlb>I think I used to work around that, but for the moment, just let it go. I can't remember for sure, but I thought I was able to define the var first on the scheme side to avoid it or something. Also wondering (don't have time to check right now) if it might be suppressed for any bindings you're exporting from the scm side (if this is a scm module wrapping a C .so).
***sneek_ is now known as sneek
<leoprikler>linas, rlb: I think you want to load your extension at compile time
<linas>The extension is in a and that lib is loaded by the "actual" module. guile tries to byte-code-compile the whatever.scm module, which is calling functions from the and that's when the error hits.
<rlb>leoprikler: that's when it complains.
<rlb>iirc (but I'd need to double check)
<linas>hi rlb! Long time no talk!
<linas>For my own use, I can ignore the messages; but I have users and I dislike scaring them with spurious error messages.
<rlb>might try a (define foo #f) before the load -- I forget if that's what I did before I stopped worrying and/or if it works.
<linas>Yeah... I guess I could try that. Vaugely worried that the optimizer might look at the #f and do something foolish.
<linas>OK, so a completely different question: what is the best/fastest/easiest way to port srfi-194 to guile and have it accepted for inclusion?
<linas>oh, shoot, right, I forgot, srfi-194 depends on some other srfis which guile doesn't have and are maybe more complicated to port...
<mdevos>how am I supposed to define a setter of an accessor (8.6.1 Accessors, define-accessor)?
<mdevos>Never mind, the documentation of "define-method" explains it