IRC channel logs


back to list of logs

***taiju` is now known as taiju
<jpoiret>i've just sent the 4 patches as a follow-up to, it'd be great if we could get this merged somewhere down the line
<jpoiret>system* and friends being mt-safe would be cool, but there's also a glaring bug in the file descriptor handling
<stis>Time to print a bytevector of 100M singles => 2s in my write implementation, can you guess how long it takes in guiles vanilla write?
<stis>yep 100s
<stis>we are talking anbout 50X
<stis>actually that was for f64, the same size f32 takes 170s
<stis>almost 100X faster in my optimized implementation
<stis>and 75X for doubles
<stis>A pure bytevector prints out 100M elements in 20s, the same for my write implementation is 0.5s
<stis>That's a 40X speed increase
***chris is now known as Guest1300
***Guest1300 is now known as chrislck
<cwebber>hm, is there a convenient guile procedure I don't know about of "split directory name into a list"
<cwebber>I guess I could use basename for that
<cwebber>yeah this works enough as a kludge
<rekado>cwebber: how about this: (string-tokenize "hello/world/how/are-you/" (char-set-complement (char-set #\/)))
<rekado>returns ("hello" "world" "how" "are-you")
<cwebber>rekado: I was thinking that, but does it handle escaped backslashes?
<cwebber>oh gosh
<cwebber>it does!
<cwebber>thanks rekado
<cwebber>oh wait
<cwebber>I mean escaped forwardslashes
<cwebber>for filenames
<cwebber>> (string-tokenize "hello/world/how/are\\/you/"
<cwebber> (char-set-complement (char-set #\/)))
<cwebber>$14 = ("hello" "world" "how" "are\\" "you")
<cwebber>looks like not
<cwebber>I kind of wish we had path datastructures like racket does
<cwebber>rekado: I appreciate your suggestion nonetheless
<cwebber>I ended up using a combination of basename on down with tree-style-fold
<cwebber>and that was good enough for my needs :)
<cwebber>in case you're curious
<cwebber>that worked great
<rekado>cwebber: lilyp built this:
<rekado>it uses lists as the storage data structure for file names
<rekado>converting to and from strings as needed
<cwebber>oh athat's cool
<lilyp>Come to think of it, I do wonder how C++ stdlibs implement this
<lilyp>My version is semi-eager, but there's probably lazier ones
***karlosz_ is now known as karlosz
<stis>hello guilers!
<cwebber>hi stis
***Sauvin is now known as Lemniscate
***Lemniscate is now known as Sauvin