***apteryx is now known as Guest68821
***apteryx_ is now known as apteryx
<spk121>another vector patch in guile devel. There was 'vector-last' a week or two ago. and now speedup patches for vector-map and vector-for-each. I guess the vectors need some love <manumanumanu>spk121: the fact that doing (list->vector (map f (vector->list vec))) has overhead within 2x is pretty damning I would say. <dimaugh>would any kind soul help me understand how to load my own modules? (non compiled nor packaged yet, just a .scm file internally defined as a module) ***rekado_ is now known as rekado
<rekado>dimaugh: you need to add the directory containing the module to GUILE_LOAD_PATH <manumanumanu>dimaugh: try first with guile -L . (which adds the current dir to the load path) <rekado>if the module name is (my module) and is located in /home/dimaugh/code/guile-stuff/my/module.scm then GUILE_LOAD_PATH should contain “/home/dimaugh/code/guile-stuff” <dimaugh>but is GUILE_LOAD_PATH a variable, a hash...? <dimaugh>i mean, excuse my noobness, how do i add anything to GUILE_LOAD_PATH <rekado>sorry, it is an environment variable <rekado>you can use “guile -L the-directory” first; it does the same thing, really <rekado>or you can set the variable like this: export GUILE_LOAD_PATH=/path/to/my/directory:$GUILE_LOAD_PATH <dimaugh>in a terminal, in the .scm file where i'm calling the module? <tohoyn>dimaugh: more precisely, in the terminal where you run your guile program <dimaugh>but i normally use emacs for development <dimaugh>now i see geiser has the option "add to load path" <spk121>dimaugh: yeah, in that case use geiser add to load path <dimaugh>but is this then something i'll have to do everytime, or is it permanent once you add a new path to your load_path? <tohoyn>dimaugh: in emacs you can set variable scheme-program-name to contain the guile arguments <tohoyn>dimaugh: for example, I use (setq scheme-program-name "guile -q") in my emacs init file <tohoyn>dimaugh: I don't know about geiser but setting environment variables is not permanent <dimaugh>and in this case, how would i add this load-path to my init file? <tohoyn>it's probably (setq scheme-program-name "guile -L YOUR_DIR") <tohoyn>the init file is .emacs in your home directory <dimaugh>where scheme-program-name is the .scm file that is attempting to load the module <tohoyn>dimaugh: scheme-program-name is "as it is". it's a variable name. <dimaugh>i mean, i won't have to do it for each program that tries to load a module from that folder <tohoyn>dimaugh: if you define it once in .emacs it is used for all programs run under emacs <dimaugh>i hope so, because apparently my emacs crashes when i click on "add to load path" <tohoyn>dimaugh: note that changes in .emacs take action only after you restart emacs <dimaugh>i couldn't understand the documentation for this issue <dimaugh>coming from racket, i'm finding guile a bit difficult, but it might just be getting used to it <dimaugh>by the way, i'm using #:export (provide-all-defined-out), which i know from racket <dimaugh>but i'm not sure if that's the proper way to export everything defined in the module, didn't give me any error so i assumed it was proper guile <tohoyn>dimaugh: it's ok. but you can also use a separate (export ...) statement <tohoyn>dimaugh: or define the exported variables with "define-public" <dimaugh>yes, but as i'm still changing the module, i figured it would be easier that way <dimaugh>it doesn't mind, i have plenty of other things to do for today <dimaugh>thank you very much for your patience <dimaugh>(also, now i know where to look in the guide, in load paths) <civodul>how would you arrange so that GC runs more frequently, so that gcprof gets more sample? <civodul>looks like GC_FREE_SPACE_DIVISOR=10 or so can help *civodul is always amazed at the efficiency of simply asking questions :-) <wingo>with read in scheme, we can more easily use fibers for repls <spk121>civodul:planning to send out potluck e-mail today. I was delayed by the apparent war on imap and plain text e-mail by all my apps and providers <manumanumanu>spk121: would my goof-loop be something for that? I believe, apart from maybe Olin's seemingly lost loops, that they are the most flexible looping facility for scheme, beating even that of racket. <manumanumanu>not quite done, yet, but as of this week I hope to get the last syntax things in place. <morganw>Possibly this is an annoying beginner question (sorry), but is compiled code portable between different platforms as long as the Guile version remains the same? <spk121>morganw: I believe it should, but, it also requires the same CPU family and the same 32-bit or 64-bit width <manumanumanu>wingo: Regarding (rnrs base): map in boot-9.scm seems r6rs compatible: errors on circular lists, doesn't support lists of uneven length (due to using length, which gives confusing error messages) etc. It is also a bit faster than map in (rnrs base). Is there a reason they are separate other than historical garbage? <ATuin>ArneBab: I made a little poc to try fibers with the current (web client) code in guile :D <ATuin>The socket stuff seems to work but deep in the code seems to be a call somewhere within a continuation barrier that makes the threads to raise an exception when suspended <ATuin>i guess that part needs some tricks also <ATuin>`make-custom-binary-input-port` ahhh it uses a custom binary port when reading the response body, I think that's the problem <ATuin>`However notably non-blocking I/O is not supported for custom binary I/O ports, not yet anyway. If you need this, get it fixed in Guile :)` From fibers' manual :D