<alextee[m]>i want to call a proc on each element in a list, and i also want to know the index of the element in that proc. is there a function that does this? <alextee[m]>or somehow pass both the element and the list in the proc, so i can calculate the index myself <RhodiumToad>(fold (lambda (elem idx) (do-stuff elem) (1+ idx)) 0 mylist) <RhodiumToad>obviously you could do it with a named-let but then you can do anything with a named-let <daviid>I fixed/enhanced g-golf for (a) 'interface properties and (b) list-store/tree-model set/get value for 'object column type ***wxie1 is now known as wxie
<rlb>Is there a "Local Varables" setting to select the scheme "implementation" for scheme-mode? i.e. chicken vs guile vs...? <rlb>s/Varables/Variables/ <dsmith>rlb: I don't think so for bare scheme mode. But probably is for geiser. <rlb>maybe that's what I'm seeing? <rlb>normally says Guile when you have #!/...guile, but doesn't if you need some mess that execs guile further down in the #!...!# block comment, and so I was trying to fix that. <dsmith>rlb: geiser-guile--guess in geiser-guile.el <rlb>dsmith: ahh, thanks. I'll take a look. <str1ngs>I think the guile mode comes from geiser <dsmith>rlb: file-local-variable: geiser-scheme-implementation <dsmith>rlb: Thanks for the reminder. I was just wanting this the othe day. <rlb>Hah, your welcome? (Thanks.) <alextee[m]>which module provides string-replace-substring? the manual doesn't mention <alextee[m]>i still get "In procedure module-lookup: Unbound variable: string-replace-substring" <alextee[m]>RhodiumToad: 6.6.5.12 Miscellaneous String Operations <alextee[m]>6.6.5.12 Miscellaneous String Operations last part <alextee[m]>im using guile 2.2.7 btw, maybe this is for guile 3? <alextee[m]>oh didnt know about that. not sure how that would work <rekado>it lets you convert an S-expression representation to valid XML <rekado>(sxml->xml '(enum (@ (id "org.zrythm.Zrythm.audio-backend-enum")) (value (@ (nick "none") (value "0"))))) <rekado>also remember to use quasiquotation and procedures to generate stuff <alextee[m]>could probably use more compex examples in the manual *alextee[m] has no idea what s-expressions or quasiquotations are <rekado>`(this is data but ,(+ 1 3 4) is code) <rekado>an S-expression is just a fancy name for all of these parentheses and what they enclose. <alextee[m]>haven't consciously used ` or , yet so not sure how they work, although i see them in guix packages <alextee[m]>so in the example above, this is an S-expression? '(enum (@ (id "org.zrythm.Zrythm.audio-backend-enum")) (value (@ (nick "none") (value "0")))) <rekado>the example above is equivalent to '(this is data but 8 is code) *chrislck read SXML and SSAX chapters several times to finally grasp it <chrislck>using sxml will "guarantee" that your XML is well-formed <chrislck>ok it will be easier to write well-formed xml <alextee[m]>doesn't look well-formatted to me: <enum id="org.zrythm.Zrythm.audio-backend-enum"><value nick="none" value="0" /><value nick="alsa" value="1" /><value nick="jack" value="2" /><value nick="portaudio" value="3" /><value nick="sdl" value="4" /><value nick="rtaudio" value="5" /></enum> <alextee[m]>probably needs some flags to change how it outputs things *alextee[m] reads the SXML chapter <vms14>Hi, I'm trying to load a gnome guile library in netbsd, but I don't know what I should do, I have the gnome libraries in a different location from the guile stuff and trying to add it with setting %load-compiled-path <vms14>(set! %load-compiled-path (list "/usr/pkg/guile/2.2/lib/guile/2.2/ccache" "/usr/pkg/guile/2.2/lib/guile/2.2/site-ccache" "/usr/pkg/lib" "/usr/pkg/libguile-gnome-2/")) <vms14>gnome stuff is in /usr/pkg/lib/libguile-gnome folder <vms14>and guile stuff in /usr/pkg/guile/2.2/ it has a bunch of folders there like lib, man, include, share, bin and so on <vms14>but gtk.so is in /usr/pkg/lib/guile-gnome-2/libgw-guile-gnome-gtk.so <vms14>how I'm supposed to load those paths? <dsmith-work>vms14: I don't have an answer for you, but just be patient. Might take a day or so. <RhodiumToad>vms14: did it install a gnome-2.scm in the guile "site" dir? <RhodiumToad>vms14: I made a freebsd port for guile-gnome so I have some idea of what's going on <RhodiumToad>the theory is that you should be able to import the (gnome-2) module and it sets up all the paths for you <vms14>RhodiumToad: found it at /usr/pkg/share/guile-gnome-2/gnome/gw/gtk.scm <vms14>so I should try to add that to the path, but which "path" variable? %load-path/ <vms14>/usr/pkg/share/guile/site/gnome-2.scm <RhodiumToad>(use-modules (gnome-2) (gnome gtk) (gnome whatever...)) <vms14>it seems I have to add a bunch of folders to some paths <vms14>no code for module (gnome-2) <vms14> "/usr/pkg/guile/2.2/lib/guile/2.2/ccache" "/usr/pkg/guile/2.2/lib/guile/2.2/site-ccache" <vms14>but the gnome wrapper stuff is installed in different paths <vms14>("/usr/pkg" "/home/vms/.emacs.d/elpa/geiser-20200426.2152/scheme/guile/" "/usr/pkg/guile/2.2/share/guile/2.2" "/usr/pkg/guile/2.2/share/guile/site/2.2" "/usr/pkg/guile/2.2/share/guile/site" "/usr/pkg/guile/2.2/share/guile") <vms14>so, I've just need to add /usr/pkg/share/guile/site to load-path? <vms14>it seems I'll have to add several folders to several load paths <RhodiumToad>just add that one directory to that one path, nothing else <RhodiumToad>(my freebsd port of guile-gnome is blocked on a portmgr review, unfortunately, but I use it locally) *RhodiumToad would rather not :-) *dsmith-work ran netbsd on a cobalt qube for a while. <RhodiumToad>the annoying thing about going a freebsd port for guile-gnome was having to patch the hell out of the autoconf script to make it respect --without-BLAH options <vms14>dsmith-work: can't tell you really, just installed it, I don't even know scheme, I use common lisp with sbcl <vms14>and I could say support for sbcl in netbsd is kinda bad :/ <vms14>no thread support and most libraries using ffi won't work since they assume linux paths <dsmith-work>Just curious becuse I know nbsd is very picky about posix things. No linux-isms there! <vms14>usually in netbsd is a hell to install libraries in a not mainstream language since netbsd tends to separate in folders what it comes in base and what the user has installed <vms14>/usr/pkg is where your installed stuff goes, so you have /usr/lib and /usr/pkg/bin <vms14>I should work on that someday and try to add a way to make languages find their libraries <vms14>btw thanks for helping me with that <civodul>wingo: i'm testing a trick to avoid malloc/free/dynwind in most cases for POSIX subrs that take a string <civodul>i'll post a patch & figures soon if that makes sense to you <wingo>civodul: nice! do we have internal pointers enabled? <wingo>otherwise returning a pointer into a string could be a hazard <civodul>ah good point, we don't have internal pointers <civodul>and STRINGBUF_CONTENTS is a pointer in the middle of the stringbuf <civodul>but OTOH, for this use case, it's fine because the Scheme string outlives the C pointer returned <wingo>civodul: i am not so confident making the assertion that a C compiler wouldn't remove the SCM. depends on the use site but it's a bit iffy <wingo>one of those occasions where what one would want is C++ with RAII :) <sneek>rlb was last seen in #guile 18 hours ago, saying: s/your/you're/. <sneek>Someone once said testing is Testing, Testing, One Two Three.. <alextee[m]>is there a variant of (format) that returns the string instead of printing it? <civodul>wingo: hmm even if it were removed, the SCM is still in the VM stack no? <wingo>civodul: that is not guaranteed. in practice though, yes. <sneek>Sewni was in (here?) 7 months ago, saying: I didnt realise you were using the bot :P. <dsmith-work>alextee[m]: Also can be a port, so you could pass a string port. Might be useful for building a string a piece at at time. <sneek>Sewni was last seen in (here?) 7 months ago, saying: I didnt realise you were using the bot :P. *guix-vits "ah, some sort of regex" <dsmith-work>alextee[m]: I wouldn't be surprised if #f is implmented by printing to a string port internally and then returning the string. <civodul>wingo: ok, i've sent what i have to guile-devel + you! <dsmith-work>So the problem I was having with for-each being undefined goes away when using srfi-1 ***dsmith-work is now known as someoneelse
***someoneelse is now known as dsmith-work
<sneek>Welcome back dsmith-work, you have 1 message! <sneek>dsmith-work, someoneelse says: It's working.