IRC channel logs
2016-03-27.log
back to list of logs
<daviid>HN 7. The cost of a system call [pdf] (cmu.edu) <- cool stuff <paroneayea>I wonder how close my understanding of how registers vs stacks vs heaps are now <paroneayea> - registers: data being used during some operation, generally, a very very temporary place to hold data while computing <paroneayea> - stacks: grow and shrink with the application's execution; each let for instance will add things on the stack and remove them when you step out of it; most "purely functional" data will be allocated an deallocated from here in a sense <paroneayea> - heap: data that's going to be accessed and mutated from all sorts of places; needs to more explicitly be allocated and deallocated than the logical append and pop off nature of the stack <wingo>mark_weaver: i had an idea of how to make ports not crash in the presence of threads without locks <lokien>hey guys, what is guile the best for? what are your killer libraries? <davexunit>lokien: guile is pretty multi-purpose. I use it for one-off scripts, web dev, CLI utilities, games, etc. <davexunit>Guix is probably the community's most popular project <lokien>davexunit: suitable in every field where python is? <lokien>also, where do I look for libraries? on the official site, there are only few of them <davexunit>lokien: guile doesn't have the massive selection of libraries that python does. <lokien>davexunit: aw, so just these on gnu.org? <lokien>davexunit: fine then. I'll try to do something with it, when I'm done with my python scraping work <davexunit>the list should be spruced up. I know of a number of libraries that aren't on that list. <davexunit>guile-opengl, guile-sdl2, guile-json, others <lokien>too bad community is so small :( <janneke>lokien: be careful what you wish for <janneke>i think there's gsoc procect to include npm packages <davexunit>janneke: lokien is talking about guile, not guix <davexunit>lokien: well, we're here to build the community :) <janneke>davexunit: yes, well try to keep guile real small if guix soars? <janneke>anyway, let's enjoy it while it's small :-) <davexunit>guile has grown in popularity quite a bit over the past few years <lokien>and if go people managed to rewrite everything - we can do it too <davexunit>I just enjoy writing Scheme more than other languages, so I just keep on writing Guile <lokien>I came to python now, after a long struggle with haskell <lokien>I used clojure too, but java underneath was awful <davexunit>ACTION does some more tedious work converting blog to haunt <ijp>hmm, I wonder how easy it would be to convert my site. That custom code is just going stale <davexunit>once I get my blog converted and fix any problems I encounter along the way, I will release 0.2 <madmax96>hello, all! I'm strugglign to use the guile FFI. I need to pass a parameter to a c function a void**, but I can't seem to get this right <madmax96>I tried using binding a local variable as a bytevector and using `bytevector-pointer`, but that didn't seem to do the trick <madmax96>rain1, do you have any idea/experience doing this? <rain1>g_base_info_iterate_attributes (info, &iter, &name, &value) <rain1>I translated this into this scheme code <rain1>let (name (bytevector->pointer (make-bytevector pointer-width 0))) <rain1>(g-base-info-iterate-attributes info iter name value) <rain1>I think this is similar to what you want to do, hope it helps <madmax96>ahhhh, I'll try it with the pointer-width flag added. Thanks! <rain1>if that isn't useful the best way to figure this out is lets make a simplified test case <madmax96>ahhh, I think this did the trick! Thanks rain1 <madmax96>yup, it works. I was just using a 1 byte sized bytevector. With the (sizeof '*) added, it's the correct size for a pointer. <rain1>oh I'll change my define to use that sizeof! <mark_weaver>wingo: what's your idea? I still believe that my idea will work, I just haven't yet found time to implement it. <ijp>thanks mark_weaver, good to be back <ijp>I figured easter was an appropriate time to return <paroneayea>lokien: guile's community is indeed "small" but it seems to have grown a lot even in the last year and a half I've participated in it <paroneayea>but I think Guile holds a lot of promise beyond Guix, even though I am a Guix enthusiast too :) <davexunit>ACTION only has 6 more blog posts to translate to Skribe format and the Haunt migration is done <davexunit>civodul: (pointer->string (make-pointer 123) 123) did the trick! <davexunit>"sh -c 'exec kill -SEGV 2'" didn't work, BTW. <wingo>mark_weaver: apologies, I don't recall details about your plan! <wingo>it was to make port buffers first-class objects accessible from scheme; switching port buffers via setvbuf or for custom binary ports would atomically swap out the pointer to the ring buffer <wingo>the ring buffer can have a lock or not but i think for common architectures you can provide a lockless mode that won't crash though it might produce gibberish <wingo>i am also thinking about how to expose those buffers to scheme <wingo>so we don't have to trampoline through c to do port operations <wingo>and so that ethreads could work on normal scheme ports <wingo>mark_weaver: do you have a link to your plan?