IRC channel logs

2015-04-28.log

back to list of logs

***koz__ is now known as koz_
<nalaginrut>morning guilers~
***michel_mno_afk is now known as michel_mno
***michel_mno is now known as michel_mno_afk
<dsmith-work>Tuesday Greetings, Guilers
<ArneBab_>moin moin dsmith-work
<davexunit>does anyone have an idea of how I could use the 'clone' system call in guile?
<davexunit>I'm reading the man page and it takes a function pointer and a pointer to a "child stack"
<davexunit>I can't imagine this will play nice with Guile.
<dsmith-work>davexunit: clone is a generalizaion of fork
<davexunit>dsmith-work: yeah, but afaict it's what I need to use to create a separate process namespace and stuff
<dsmith-work>There are issues when mixing posix threads and fork
<davexunit>I'm trying to write a quick linux container script using guile
<dsmith-work>davexunit: The nasty thing to watch out for is that any mutex that is locked will still be locked in the new process, but there is no thread running that owns it.
<dsmith-work>And so will never be released
<dsmith-work>pthread_atfork() is to help with that
<dsmith-work>davexunit: Checkout the pthread_atfork man page. Has a good description
<davexunit>thanks but I don't think that's really what I'm after
<dsmith-work>davexunit: I meant that man page as a good description of the problems you can run into combining clone/fork and pthreads.
<davexunit>oh okay
<paroneayea>haha, I should package xmms for old times' ssake
<dsmith-work>wow. xmms
<paroneayea>haha requires gtk1
<paroneayea>I guess not.
<davexunit>oof
<dsmith-work>This reminds me of a question I had years ago, and never found an answer. Is it possible to give a thread a unique name that will show in a ps listing?
<please_help>Is there a term to refer to something that can be "eval'd" (e.g. a quoted sexp)? Is it true that, where x is a macro pattern, (list? (quote x)) iff x is a sexp?
<dsmith-work>please_help: Doesn't need to be a list
<please_help>?
<dsmith-work>(eval "hey" (interaction-environment))
<dsmith-work>$2 = "hey"
<dsmith-work>
<please_help>but "hey" isn't a sexp, it's a string?
<dsmith-work>It's a scheme datum
<please_help>yes, but not a sexp
<dsmith-work>Could be returned from read
<dsmith-work>You can still eval it. It's self-evaluating, so you get a string.
<dsmith-work>An sexp isn't necessarily a list
<please_help>is a string (a symbol, a number ...) considered a sexp?
<please_help>ah ok
<please_help>so then, (list? (quote x)) iff x is a non-selfevaluating sexp?
<saul>please_help, a pair is not self-evaluating, yet it is also not a list.
<dsmith-work>please_help: I didn't mean to be confusing. Just that the data passed to eval doens't have to be a list.
<dsmith-work>It looked like you were assuming it was.
<dsmith-work>please_help: So are you wanting to know some test to make sure what you are passing to eval is valid?