IRC channel logs


back to list of logs

<Aurora_v_kosmose>a-c/d-bus is a bit rough.
<daviid>Keele: fwiw and to make you understand what i meant, g-golf will not (never) import Gdk constants 'for you', nor any namespace constants, and as you did rightfully mentioned, currently g-golf does not import constants (most are totally useless fronm a lang binding pov) - but in the light of your request and RhodiumToad paste to help you, i now think that g-golf should provide a procedure to import (some) namespace constants, using a
<daviid>filter, as described above ... meanwhile, just use the one RhodiumToad pasted here, maybe adapt it to prefix using the namespace and call gname->name, up to you ...
<daviid>*g-name->name - as in (g-name->name "GDK_KEY_z") => gdk-key-z
<apteryx>in guile manual: "Note that ‘flock’ does not lock files across NFS." -> not true anymore
<elevenkb>hello there, i'm aware that when you load a program from the repl then (current-location-vector) and friends evaluate to #f.
<RhodiumToad>current-location-vector ?
<elevenkb>sorry meant (current-filename)
<elevenkb>so how do you get it to acquire a useful value?
<RhodiumToad>in the repl, what value would be useful?
<elevenkb>hmmm, say I have a directory called "~11kb/dir". I'm in the repl and call (add-to-load-path "/home/11kb/dir").
<elevenkb>Let's also say there's a module "dir/module.scm" which has a line (define %my-loc (current-filename)). I would like %my-loc to evaluate to "/home/11kb/dir". Does that make sense?
<RhodiumToad>within the load of dir/module.scm, it'll evaluate to /home/11kb/dir/module.scm
<RhodiumToad>ACTION just noticed that his builder VM had managed to come up with no swap space, so it's been OOMing a lot
<RhodiumToad>ain't going to build no gcc or ghc in 4.5GB of ram and no swap
<RhodiumToad>is there any reason why a package build of guile3 would add GUILE_OPTIMIZATIONS = -O1 -Oresolve-primitives -Ocps for the bootstrap build in place of just -O1 ?
<RhodiumToad>(but only for powerpc, after deleting the prebuilt/... files)
<flatwhatson>is there a way to force recompilation of a procedure? (reload-module ...) doesn't seem to do it
<flatwhatson>the problem is the procedure has inlined something which i've later redefined with module-set!
<flatwhatson>compile-and-load works if i use #:optimization-level 1, but that's a bit weird, why would optimization-level 2 still inline the old definition?
<flatwhatson>seems like level 1 is only working because it prevents inlining. so there's some inlining cache which isn't affected by module-set!?
<RhodiumToad>"Users must not modify the returned value unless they think they're really clever."
<haugh>Would anyone be willing to run the following on a modern guile?
<haugh>(file-system-tree "." (const #t) (compose stat:size stat))
<haugh>returns #f for me on 3.0.5
<haugh>oh, requires (ice-9 ftw)
<old>on 3.0.9
<haugh>Given that ((compose stat:size stat) ".") returns a number and (file-system-tree "." (const #t) stat), which is equivalent to (file-system-tree "."), returns a list, either this is a bug or I don't understand the invocation.
<haugh>oh wait a minute, I think it uses lstat by default, not stat
<haugh>that shouldn't matter
<old>what do you want to do?
<haugh>nothing in particular, just trying to understand this lib
<old>I think that STAT
<old>is used on the directory and the result is passed to enter?
<old>and accumulate by file-system-tree
<old>returning a tree of stats
<old>so composing stat:size is like doing: (file-system-tree "." (const #t) (const 0))
<old>which also return #f
<old>try this: (file-system-tree "." (const #t) (const (stat ".")))
<old>personnaly, I've never used this API before
<old>I always use ftw
<old>or file-system-fold
<haugh>OH I SEE
<haugh>So when it says enter? is invoked as '(ENTER? NAME STAT)', the STAT is referring to the result of (STAT FILE-NAME), not the STAT argument to file-system-tree
<haugh>old, thank you, I was completely thrown
<old>file-system-tree "." (lambda args (pk args) #t) (const #(23 784512 16832 1 1000 998 0 1292 1684355310 1684355169 1684355169 4096 48 'foo 448 545256172 361772142 1684355169)))(
<old>oups wrong parens
<old>but the third argument is a procedure that get the stat value of the file
<old>the returned value is the npassed to enter?
<old>you will see the (quote foo) in the (pk ...)
<haugh>yes, but shouldn't that be ignored when enter? is (const #t)
<old>one way to know is to check the source code of it :-)
<haugh>maybe I should :/
<old>it's defined in term of file-system-fold
<haugh>We should put that at the top of every manual page
<old>so really, it's better to focus on file-system-fold, then it's easy to understand what file-system-tree does by looking a the source