<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>Any comments/suggestions related to the SFTP API would be very welcome (if someone interested at all.) <wingo>mark_weaver: you don't happen to be around, i guess? :) <csed>amz3: Pong. At work though, what's up? <sneek>Welcome back csed, you have 1 message. <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>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? <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. <lloda>is there a way to limit the depth of ,trace? <davexunit>ACTION wants to write a web application for collecting and analyzing statprof'd guile applications <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 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>how much time is spent in GC, how much time spent talking to the guix daemon, etc. <davexunit>you could probably just use some generic statistics daemon, too, but I don't know of a good one. <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 <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!" <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 <wingo>backtrace on all threads, summary of profiling for last second, ... <davexunit>any good application should let you pick your interface of choice <wingo>davexunit: i have a local patch that supports unboxed locals in the vm :) <davexunit>maybe that means I don't have to make a C extension for Sly after all <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. <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? <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 <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 <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. <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 <wingo>heh that part was done already in 2.0 i think ;) <davexunit>really hoping that 2.2 and the new website will get some fresh eyes on the things we're all building. <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>interestingly this could give us free 64-bit integers everywhere too ***dje is now known as xdje
<bubu^>i would like to a kind of alias of define <bubu^>something like (define DD define) (DD x 4) in the idea <mark_weaver>bubu^: (define-syntax-rule (DD var expr) (define var expr))