IRC channel logs

2013-08-01.log

back to list of logs

<taylanub>Hrm, would it be acceptable if (symbolp (eval-scheme "#f")) is t ?
<taylanub>Is most efficient I think. Perhaps boolean.h should implement an efficient scm_is_true_or_nil if that's possible (from what I got it isn't though).
<davexunit>I have a question about the (system repl repl) module.
<davexunit>it makes use of the before-eval-hook, but not the after-eval-hook. is there a reason? oversight?
<davexunit>I want to be able to lock a mutex before evaluation, and unlock the mutex afterwards.
<nalaginrut>morning guilers~
<davexunit>hey!
<davexunit>hmmm I can't seem to lock a mutex in a before-eval-hook...
<davexunit>geiser just freezes completely
<nalaginrut>ArneBab: fixed ;-P
<nalaginrut>davexunit: thanks~
<davexunit>could someone help me a bit with a mutex problem?
<davexunit>I am writing a game that can be edited via interacting with a REPL server running on another thread. To deal with threading issues, I'm implementing a global mutex.
<davexunit>the mutex is locked by the game loop and periodically unlocked and relocked.
<davexunit>there are before eval and after eval hooks that lock/unlock this same mutex.
<davexunit>the goal is for evaluation from the REPL to happen only when the game loop unlocks the mutex.
<davexunit>my concern is that calling unlock-mutex, immediately followed by lock-mutex accomplishes nothing. the repl just freezes and never does anything, presumably because it's waiting for a mutex to unlock that it will never have time to detect is unlocked.
<nalaginrut>davexunit: any code to try?
<davexunit>nalaginrut: I'd put together a minimal example... but I had modify the repl server code to run an after-eval-callback
<davexunit>after-eval-hook rather
<davexunit>I was able to make things sort of work by placing a usleep statement in between the unlock and lock
<nalaginrut>davexunit: I'll leave for a while, I'll be back and see your problem
<nalaginrut>;-P
<davexunit>nalaginrut: I'm punting on it for now. I realized that I wrote a "busy loop" that never sleeps to give the CPU a break, so I'm fixing it.
<davexunit>I think it will leave me in a better position to fix mutex locking issue.
*hellekin didn't have any split second to watch the wiki thread. Anyting new there?
<nalaginrut>hellekin: did you see my reply? ;-)
<hellekin>nalaginrut: Hmmm, I think yes... But nobody else replied? So should we proceed?
<hellekin>nalaginrut: I was waiting for people to chime in, as your position seems to be: worth it, but wait and see
<hellekin>I would tend to think: let's get started, see how people react to it.
<hellekin>anyway I have a busy day today, so it will wait a bit more :]
<taylanub>I wonder if there's a reason SCM_SETCAR etc. aren't documented ...
<add^_>taylanub: like, one shouldn't use them?
<taylanub>They're defined alongsite SCM_CAR etc. .. I see no reason they shouldn't be used by user-code.
<add^_>Well, lists should be immutable unless otherwise stated ;-)
<taylanub>Eh, that's irrelevant to my concern. :P scm_car is documented, SCM_CAR is documented, scm_set_car_x is documented, SCM_SETCAR isn't documented
<taylanub>I'll just send a patch .. I generally need to be less lazy about this business.
<wingo>i would say to always use the lower-case versions
<wingo>we should remove the docs for SCM_CAR perhaps
<wingo>scm_car is already an inline function
<davexunit>what do the uppercase versions do?
<taylanub>Oh ? Still, aren't they faster ?
<taylanub>davexunit: Supposedly faster ...
<wingo>they are macros that don't do any type checking
<davexunit>ah
<wingo>this won't be at the top of any profile you have, i don't think...
<add^_>taylanub: I'm just messing around, I don't really mean anything :-P
<taylanub>wingo: I got interested in them because they do exactly what XCAR, XSETCAR etc. do in Elisp, so it felt wrong to implement those with scm_car and scm_set_car_x etc., although bipt already seems to have done so ...
<add^_>jao: hey, I'm wondering about an error I have when I connect geiser with guile, it gives off an error and warning about compilation of /home/paw/geiser/scheme/guile/<all-those-files.scm> failing.
<taylanub>add^_: Is your guile installation in $PATH and all ?
<add^_>Uh, why wouldn't it be?
<add^_>It's installed in /usr/local/, shouldn't be a problem..
<taylanub>Just checking ..
<add^_>It's ok taylanub. :-)
<add^_>It's good that you ask.
<jao>add^_, geiser doesn't compile any of <all-those-files.scm>...
<add^_>...
<taylanub>Hrm, I needed to set `geiser-guile-load-path' to where geiser is installed, maybe relevant to you too ?
<add^_>Hm
<add^_>Maybe
<jao>add^_, how have you installed geiser?
<add^_>git
<add^_>./autogen.sh
<add^_>./configure && make
<add^_>and so on
<jao>(geiser already sets the guile's load path)
<jao>and make install? how are you requiring geiser in your .emacs?
<add^_>Well, either it's guile or it's geiser
<add^_>(load-file "/home/paw/geiser/elisp/geiser.el")
<jao>did you make install?
<add^_>Well, might be guild too
<add^_>Yes
<jao>then that's not the way of loading geiser
<add^_>I think you were the one telling me to do that
<add^_>So..
<jao>check the docs
<jao>if you did
<jao>make install
<jao>you need (require 'geiser-install)
<jao>instead of the load
<jao>what i told you was
<jao>NOT to configure &co.
<jao>and then just use the load-file
<add^_>Oh
<add^_>Still doesn't work though
<add^_>Even though I changed the way of loading geiser
<add^_>e.g I can't compile scheme files.
<wingo>it's all fairly well documented at http://www.nongnu.org/geiser/geiser_2.html ...
<jao>did you uninstall your geiser installation first?
<add^_>Hm
<add^_>Maybe that was it
*add^_ tries
<add^_>Nope
<add^_>Still doesn't work to compile other files
<add^_>Hm
<add^_>Maybe I should try compiling something with guild instead and see if that's the problem
<add^_>Aha
<add^_>So guild is the *real* problem...
<add^_>Sorry for bothering you jao
<add^_>:-(
<jao>np... i'll take the chance to go grab some food :)
<add^_>Maybe I should ask wingo about this instead..
<add^_>Oki ^^ Hope it'll taste well
<add^_>wingo: When I run `guild compile example-file.scm´ it ends with the error that it failed to create path for auto-compiled file example-file.scm
<wingo>is your home directory read-only or something?
<add^_>Hum
<add^_>It shouldn't be
<add^_>Maybe it is though.
<wingo>check ~/.cache and ~/.cache/guile
<add^_>Huh, ~/.cache/guile/ccache/<some-numbers>/home is actually owned by root
<add^_>for some reason
<add^_>Good call wingo
<wingo>you have a strange system :)
<add^_>Yeah
<add^_>I'm probably the one who's the bad guy though
<add^_>Since I had to fiddle around to make guile work a while ago..
<add^_>I mean, the problems were worse before.
<add^_>Now I can't compile files but even that's a step forward xD
<add^_>Testing again
<add^_>Nope
<add^_>Oh, I needed to run a recursive thingy on the chown..
<add^_>Ofc
<add^_>There we go
<add^_>Yay, thanks wingo
<wingo>np :)
*add^_ does the happy dance
***janneke1 is now known as janneke
<taylanub>Does Guile Elisp really not have `symbolp' ? I guess it's a function that's not used very often.
<PuercoPop>how does one run emacs guile
<taylanub>PuercoPop: Like you run normal Emacs.
<mark_weaver>wingo: is there a convention for changelogs in the VM? I'm not sure what to put in the parens (where the function name usually goes) when modifying instructions or more exotic things like: BV_SET_WITH_ENDIANNESS (f64, ieee_double)
<wingo>use the name of the op
<wingo>with either dashes or underscores
<wingo>dashes probably better :)
<mark_weaver>okay, thanks!
<PuercoPop>taylanub: I meant where is the source
<mark_weaver>sneek: guilemacs
<sneek>Someone once said guilemacs is http://git.hcoop.net/?p=bpt/emacs.git;a=summary,
<mark_weaver>PuercoPop: ^^
<mark_weaver>bubu: I believe you were asking about how to conveniently work with one column of an array the other day, right?
<mark_weaver>bubu: if so, take a look at the docs for 'make-shared-array'
<PuercoPop>thanks!
<mark_weaver>PuercoPop: np, happy hacking!
<bubu>hello, I can't get guilemacs compile :/
<bubu>it just doing an infinite loop with "make"
<bubu>after the first "make" failed
<taylanub>bubu: What exact commands did you run and what is their output ?
<bubu>sh autogen.sh && ./configure && make
<bubu>make seems "ok" the first time but still ends with an error [2]
<bubu>another "make"
<bubu>will just infinitely loop
<taylanub>It runs make again automatically after an error ?
<bubu>compiling list files in suppose
<bubu>no
<bubu>the first "make" ends
<bubu>but with an error
<bubu>the second "make" (i enter) will loop
<bubu>i tried on two different computers
<bubu>with suse 12.3 and gentoo
<bubu>same result
<taylanub>Could you paste the output somewhere ?
<bubu>so maybe i'm doing something wrong
<bubu>just give me 10 mins I "rm"ed everything by frustration :)
<taylanub>hehe
<bubu>:o i still have it on this one
<bubu>ok
<bubu>"make clean"
<bubu>and "make"
<taylanub>To be 100% safe one can do "git clean -fdx" .. that tells git "bomb everything!"
<taylanub>(It won't revert changes in files though, for that one can "git reset --hard" which bombs all changes in files.)
<bubu>it seems to loop once again
<taylanub>Paste the output please.
<bubu>will do the git clean -fdx
<taylanub>On some pastebin site.
<bubu>taylanub, which part ?
<bubu>its killometers of spam
<taylanub>Ideally all of it, but the end would be a good start. Use a pastebin site. http://paste.lisp.org
<bubu>the thing is
<bubu>as it is looping
<bubu>i have to ^C
<bubu>i'm going for autogen && configure now
<bubu>+ regular make
<bubu>its looping once again
<bubu>:(
<taylanub>bubu: I'm also looping, telling you to paste the output again and again.
<bubu>:)
<bubu>best would be to dump things in a file no ?
<bubu>make > file ?
<taylanub>You don't use a terminal that supports copying ?
<taylanub>But yeah, logging to a file is OK too. make | tee file
<taylanub>Via `tee' you'll also see it yourself, while it's being written into the file.
<mark_weaver>bubu: what version of guile do you have installed?
<mark_weaver>(on the machines where you tried to compile guilemacs?)
<PuercoPop>if guile emacs fails to build for me should I bugreport it somewhere of deal with it because it is not released yet?
<taylanub>PuercoPop: I'd like to see the output, maybe it's something I've encountered.
<bubu>oh ! it seems to have stopped now !
<bubu>strange
<bubu>and there is an emacs binary
<bubu>this time
<bubu>gonna try it
<bubu>taylanub, is "make install" mandatory to run this ?
<bubu>any way to launch from build directory ?
<taylanub>bubu: Try it out, but I think it does need install.
<bubu>> ./src/emacs
<bubu>Warning: Lisp directory `/usr/local/share/emacs/24.3.50/lisp': No such file or directory
<bubu>Warning: Lisp directory `/usr/local/share/emacs/24.3.50/leim': No such file or directory
<bubu>Cannot open load file: loadup.el
<bubu>and returns to prompt
<PuercoPop>ok, let me paste it
<taylanub>bubu: Yes, needs installation.
<taylanub>Or maybe there's a way to specify an alternate load-path ...
<taylanub>bubu: Maybe you can run it like "./src/emacs -l lisp/loadup.el"
<taylanub>If it gives the same error, no good; If it gives a different error, then it could work, although simply installing it is probably less work.
<mark_weaver>bubu: if you don't want to install it to /usr/local, you could rerun ./configure with --prefix to install it somewhere else.
<mark_weaver>actually, you probably want the -L option, which adds a directory to the elisp 'load-path'
<PuercoPop> https://gist.github.com/PuercoPop/6135206
<PuercoPop>Now that I read the entire error it is clear the error
<taylanub>Ah, couldn't find -L because it doesn't have "load" anywhere in its description. :P
<PuercoPop>it is not finding the header
<mark_weaver>the relevant error is: ../src/lisp.h:33:22: error: libguile.h: No such file or directory
<mark_weaver>sneek: guilemacs?
<sneek>Someone once said guilemacs is http://git.hcoop.net/?p=bpt/emacs.git;a=summary,
<mark_weaver>I'm not familiar with the guile emacs build system, so I'm not sure how it's meant to find those headers.
*mark_weaver fetches the guilemacs sources to investigate
<mark_weaver>ah, I see that it uses pkg-config to find guile-2.0. Not sure why that didn't work.
<mark_weaver>PuercoPop: what does "pkg-config --cflags --libs guile-2.0" output?
<PuercoPop>-D_THREAD_SAFE -I/usr/local/Cellar/guile/2.0.9/include/guile/2.0 -I/usr/local/Cellar/readline/6.2.4/include -I/usr/local/Cellar/bdw-gc/7.2d/include -L/usr/local/Cellar/guile/2.0.9/lib -L/usr/local/Cellar/bdw-gc/7.2d/lib -lguile-2.0 -lgc
<PuercoPop>sorry about the spam, forgot to use a gist
<mark_weaver>it's fine to paste something that short here.
<PuercoPop>maybe I should pass ./configure
<PuercoPop>an extra option
<mark_weaver>does /usr/local/Cellar/guile/2.0.9/include/guile/2.0/libguile.h exist?
<PuercoPop>yes
<mark_weaver>okay, it sounds like something is wrong with the guilemacs build system.
<PuercoPop>well homebrew packages are always give me trouble
<mark_weaver>unfortunately, bipt` is rather hard to reach.
<PuercoPop>bipt`?
<mark_weaver>guilemacs is mostly his work
<mark_weaver>well, I see what the problem is anyway.
<mark_weaver>PuercoPop: http://paste.lisp.org/display/138300
<mark_weaver>PuercoPop: that's untested, but I think that's more or less what's needed to fix it.
<mark_weaver>(you might need to rerun configure after making those changes)
<taylanub>I think I had similar problems in the past, just added things to CFLAGS and LDFLAGS in my .profile and had the problems disappear, failed to report a bug ..
<mark_weaver>*nod* something like that would be sufficient to work around the problem.
<mark_weaver>a slightly better way to work around the problem would be to pass the needed CFLAGS as an argument to configure. but it would be better to fix this properly.
<mark_weaver>I suspect the reason this wasn't noticed before is because lwlib is needed only for the "lucid" graphical interface type, whereas I suspect most people use the gtk interface these days.
<taylanub>I always use --with-x-toolkit=no
<mark_weaver>sure, that too :)
<bipt`>yes, i build it almost exclusively with GTK+
<taylanub>bipt` is here!
<mark_weaver>bipt`: I think you need something along these lines to fix lucid builds: http://paste.lisp.org/display/138300
<mark_weaver>(untested)
<bipt`>in particular, nextstep definitely won't work atm, since i have to manually update it for some api changes (coccinelle doesn't work with objective-c)
<bipt`>mark_weaver, thanks, i'll try that tonight
<bipt`>s/tonight/now/
<taylanub>:D
<PuercoPop>mark_weaver: that fixed that error :D
<PuercoPop>I've got a new one though
<PuercoPop>error: error opening 'deps/dispnew.d': Error opening output file
<PuercoPop> 'deps/dispnew.d'
<PuercoPop>1 error generated.
<mark_weaver>PuercoPop: well, that's a strange one, but bipt` just said "nextstep definitely won't work atm", and MacOS X is nextstep, so I guess you're probably out of luck for now anyway.