IRC channel logs

2015-10-28.log

back to list of logs

<atgnag>(getaddrinfo "google.com") is returning an error for some reason.
<atgnag>I have already made sure that my DNS is working, and stuff.
<artyom-poptsov>Hello everybody.
<artyom-poptsov>Here's a "remote 'cat'" program written in Scheme with updated (ssh sftp) API: https://gist.github.com/artyom-poptsov/8cc1e913cc47d277d65c
<artyom-poptsov>Any comments/suggestions related to the SFTP API would be very welcome (if someone interested at all.)
<wingo>ahoy
<wingo>mark_weaver: you don't happen to be around, i guess? :)
<amz3>sneek: later tell csed, here is a new version of the procedure http://paste.debian.net/318498/
<sneek>Okay.
<amz3>ping csed
<csed>amz3: Pong. At work though, what's up?
<sneek>Welcome back csed, you have 1 message.
<sneek>csed, amz3 says: here is a new version of the procedure http://paste.debian.net/318498/
<csed>amz3: Awesome, cheers.
<roelj>When I have multiple functions selecting a number from a list, and I'd like to switch which specific function is used while the program is running, what would be the way to go? I'm currently trying to have one 'default-selector' function which should refer to the specific function, but I'm not sure how I could do that.
<roelj>I tried: (define default-selector 'highest-efficacy). Then calling (default-selector params of highest-efficacy), but that of course, doesn't work.
<roelj>I found a way by defining my 'default-selector' to do nothing, and set a real selector function using (set! default-selector some-real-selector).
<csed>So uh, what is (pk ...)? I can't find any reference to it in the manual.
<csed>Found something in the Guix manual, but nothing informative.
<amz3>pk is 'peek stuff' it allows to debug
<amz3>by printing stuff
<amz3>it's just there for debug, you can remove it eventually
<amz3>it's handy because you can wrap existing expression with it, it will return the same thing as expr e.g. (pk (+ 1 1)) will print 2 and return 2
<csed>amz3: Ah, so like (trace ...) in Common Lisp?
<amz3>I don't know trace
<amz3>and command lisp
<dsmith-work>Wednesday Greetings, Guilers
<csed>amz3: Good to know, cheers.
<wingo>csed: it's just for printing values. funny that it's not documetned tho
<csed>wingo: Yeah, a bit weird. But it's nice that it exists. I just did (format ...) for debugging.
<wingo> http://git.savannah.gnu.org/gitweb/?p=guile.git;a=blob;f=module/ice-9/boot-9.scm;h=a5b3422bcb2fcc165121a71e79adda4f25781929;hb=HEAD#l186
<wingo>csed: ^
<csed>wingo: Nice, thanks.
<wingo>boot-9 is worth a read fwiw
<csed>I'll give it a read.
<lloda>is there a way to limit the depth of ,trace?
<civodul>i don't think so
<davexunit>ACTION wants to write a web application for collecting and analyzing statprof'd guile applications
<civodul>ooh
<davexunit>there's a certain big proprietary software company that does this for rails and node.js applications
<davexunit>would like to have a similar, but AGPL licensed thing for Guile programs.
<civodul>what does it do that a local program cannot do though?
<davexunit>civodul: you use it for web applications to collect tons of performance data automatically
<davexunit>so you can analyze things in aggregate
<davexunit>so you can answer questions like "what is the slowest end-point on average for this application?"
<davexunit>as a practical guile example, it would be neat to profile the requests from 'guix publish'
<davexunit>and see what stands out as good and bad
<davexunit>how much time is spent in GC, how much time spent talking to the guix daemon, etc.
<civodul>ooh i see
<civodul>makes sense
<davexunit>you could probably just use some generic statistics daemon, too, but I don't know of a good one.
<civodul>a relative is developing this fancy tool: http://yellowlab.tools/
<civodul>very web-oriented, but nice
<davexunit>oh cool
<davexunit>looks useful
<wingo>davexunit: would be nice if you could link that to guix somehow
<wingo>then you could just have it upload the addresses at which the .go files are mapped, the guix version of guile, and the PC trace buffers
<wingo>having the guix version of guile would allow you to map the PC trace buffers back to source locations
<davexunit>wingo: ah, so by using the version in guix you can have the same guile on the machine doing the stats crunching?
<wingo>though as long as you are running something on the client, just processing the trace buffers in a separate thread is probably easier
<wingo>yeah
<davexunit>the way this proprietary thing works is by sending the profiling data to another daemon on the same system, and then that daemon dispatches the stats to the evil proprietary server.
<davexunit>it would be a really neat tool to have to say "look, guile is for real stuff, too!"
<wingo>:)
<davexunit>because it is really convenient to be able to see how much time a web application is spending in application code vs. database vs. GC and stuff.
<wingo>i want to be able to send sighup to an app and have it print out this info on the console.
<wingo>web is nice too of course but usually i want it on the console
<davexunit>that's nice, too.
<wingo>backtrace on all threads, summary of profiling for last second, ...
<davexunit>any good application should let you pick your interface of choice
<wingo>gc percent, alloc rate
<davexunit>that would be so awesome
<davexunit>I'd love that for analyzing Sly
<wingo>davexunit: i have a local patch that supports unboxed locals in the vm :)
<wingo>raw f64 values whee
<davexunit>wingo: wow!
<civodul>neat
<davexunit>very excite
<wingo>we we we we so excited
<davexunit>maybe that means I don't have to make a C extension for Sly after all
<wingo>maybe
<wingo>what does your processing kernel look like?
<davexunit>I've been trying to write a batch renderer that dynamically packs vertices into a large buffer on-the-fly, which is useful for drawing large numbers of sprites for instance.
<davexunit>and that involves applying transformation matrices to each vertex before inserting it into the vertex buffer.
<davexunit>so lots of float math
<wingo>yeah. so things will still be boxed across function call/return boundaries
<wingo>so how much you are able to reduce allocation and use unboxed floats will depend on how much gets inlined
<davexunit>but perhaps a 4x4 matrix multiplication procedure can take advantage?
<davexunit>that might be enough
<wingo>yes probably. when you deal in bytevectors and access them only via the f32/f64 interface, and just do add/subtract/multiply on them, there should be no allocation
<davexunit>yes, I would be using f32 vectors
<wingo>but i haven't done the compiler part yet, just working to make sure the vm can do unboxed locals
<wingo>and that debugging works, etc
<davexunit>would I need to unroll the loop I have that iterates over rows and columns?
<wingo>maybe, or maybe the compiler does it already
<wingo>use ,x to see :)
<davexunit>I'm happy to do that because every fast 4x4 matrix mult in C does this.
<davexunit>wingo: great, I will try sometime when I get a chance to hack on it again.
<davexunit>thank you.
<wingo>usually if you have a small limit on the number of iterations and the loop body is small then the compiler should unroll it already
<davexunit>that's awesome
<davexunit>this new compiler is so cool
<wingo>heh that part was done already in 2.0 i think ;)
<wingo>peval
<davexunit>this old compiler is so cool :)
<wingo>:)
<davexunit>are we a real language now? :D
<davexunit>really hoping that 2.2 and the new website will get some fresh eyes on the things we're all building.
<civodul>look at the competition! https://github.com/tromey/el-compilador
<wingo>ooh neat :)
<wingo>i am not worried tho :)
<civodul>:-)
<davexunit>wingo: didn't you evaluate the pros/cons of SSA compilers in some article and determine that CPS seemed to be a better way to go?
<davexunit>ACTION still fairly ignorant about compilers
<wingo>davexunit: mmm, dunno :) they are very close to the same thing when you get down to it.
<davexunit>wingo: okay, so I'm likely misremembering something. thanks.
<davexunit>ACTION saw "SSA" and was trying to remember the context in which he saw it used previously
<wingo>well i think the thing is that people don't often build cps-based irs these days, ssa has a lot more traction
<wingo>but they are equivalent (& formally proven to be so)
<civodul>i think the first article in the series was more enthusiastic about CPS than the last one ;-)
<wingo>civodul: heh indeed :)
<wingo>interestingly this could give us free 64-bit integers everywhere too
***dje is now known as xdje
<dsmith-work>wingo: everywhere? OR just on 64bit machines?
<wingo>dsmith-work: everywhere
<bubu^>hello
<bubu^>i would like to a kind of alias of define
<bubu^>something like (define DD define) (DD x 4) in the idea
<bubu^>any idea how to do think ?
<mark_weaver>bubu^: (define-syntax-rule (DD var expr) (define var expr))