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>so
<paroneayea>let's see
<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
<paroneayea>is this mostly right?
<wingo>mark_weaver: i had an idea of how to make ports not crash in the presence of threads without locks
<wingo>*but without
<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?
<davexunit>lokien: that list is probably not complete
<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>:)
<lokien>janneke: you mean?
<janneke>being big has its own disadvantages
<lokien>I didn't mean "big"
<lokien>like.. clojure size community
<janneke>i think there's gsoc procect to include npm packages
<janneke>in guix
<davexunit>janneke: lokien is talking about guile, not guix
<lokien>yeah, guile
<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>I love the website btw :D
<lokien>and if go people managed to rewrite everything - we can do it too
<davexunit>;)
<davexunit>I just enjoy writing Scheme more than other languages, so I just keep on writing Guile
<davexunit>slowly building up libraries and things
<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
<rain1>I might be able to help
<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>char *name;
<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
<rain1>I (define pointer-width 8)
<rain1>in my source
<rain1>since I'm on 32 bit
<rain1>sorry 64 bit
<madmax96>ahhh, I think this did the trick! Thanks rain1
<rain1>oh great :)
<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!
<jmd>r
<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.
<mark_weaver>ijp: it's good to see you!
<ijp>thanks mark_weaver, good to be back
<paroneayea>ijp! :D :D
<paroneayea>ijp: we've missed you!
<ijp>I figured easter was an appropriate time to return
<paroneayea>haha
<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>and indeed, a lot of that is due to Guix
<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>stopping for today, though.
<davexunit>civodul: (pointer->string (make-pointer 123) 123) did the trick!
<davexunit>"sh -c 'exec kill -SEGV 2'" didn't work, BTW.
<davexunit>woops, meant to say this on #guix
<wingo>mark_weaver: apologies, I don't recall details about your plan!
<wingo>mind like a sieve sometimes
<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>dunno
<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>dunno
<wingo>might not work :)
<wingo>ACTION found the recap thread, from last year: https://lists.gnu.org/archive/html/guile-devel/2015-02/msg00010.html
<wingo>mark_weaver: do you have a link to your plan?
<wingo>ACTION zzz