IRC channel logs

2013-07-27.log

back to list of logs

<taylanub>It's as if scm_procedure_p says --------- oh damn
<taylanub>I was testing it like a C boolean.
<taylanub>It returns the #f object, which is not 0 in C. :P
*ijp loads his troll and trolls taylanub.
<ijp><3 erc-shoot
<taylanub>Am I supposed to use scm_is_false or is there something more direct ?
<davexunit>to test for a false value in the C api?
<dsmith-work>taylanub: that's it
<davexunit>that's the function that I used.
<taylanub>(I actually meant is_true, but yeah.)
<taylanub>The Emacs API has more direct things, so it confused me.
<dsmith-work>Well, there is SOME function that turns Scheem bool to C bool.
<davexunit>scm_to_bool
<taylanub>I think scm_is_false will do that, essentially ?
<taylanub>errrrr
<taylanub>scm_is_true
<taylanub>What'd be the difference between using scm_is_true and scm_to_bool ?
<ijp>not quite
<ijp>scm_is_true will return 1 for say 'foo, but scm_to_bool will error
<taylanub>Ah I see, looks like it doesn't even accept #nil.
<dsmith-work>is scm_is_true basically (eq? x #t) insted of (not x)
<taylanub>No, is_true also covers #nil.
<ijp> -- C Function: int scm_is_true (SCM obj) Return `0' if OBJ is `#f', else return `1'.
<taylanub>So it's "the right way" to do it I guess.
<ijp>arguably it should handle #nil, but that value is best left unmentioned :)
<taylanub>It does handle nil ...
<taylanub>The doc must be wrong.
<taylanub>#define scm_is_false(x) (scm_is_false_or_nil (x))
<taylanub>(2.0.9.20)
<taylanub>Now my code to allow Scheme procedures in Elisp `apply', Elisp `funcall' and function-slots of Elisp symbols, should finally be reliable .. I think.
<taylanub>Argh, still segfault when I put it in the symbol function.
<dsmith-work>Ok
<taylanub>Hrm, I'm not calling dynwind_end before returning. -_-
<taylanub>Yey, works!
<taylanub>Someone tell me some fancy Scheme library which I can show off as being available from Elisp now. :P
<davexunit>srfi 42?
<ijp>taylanub: irregex
<ijp>oh wait, rx covers a lot of that
<turbofail>htmlprag?
<ijp>fmt
<taylanub>Hrm, "Scheme library" is the wrong term I guess, since what I can import into Elisp is limited to functions (including any new data types they bring).
<ijp>pfds, because, elisp is all about functional programming right?
<zacts>hi I'm using guile-2.0.9, and I'm trying to get the trace function to work
<zacts>I found this guide: http://www.gnu.org/software/guile/docs/docs-1.6/guile-ref/Trace.html
<zacts>but when I do: (trace recursiveprocedurehere) it throws an error that the name trace is unbound.
<zacts>ah got it to work
<zacts>the syntax seems to have changed between guile-1.6 and guile-2.0.9
<zacts>,trace (recursiveprocedurehere x y)
<ijp>that's the docs for guile 1.6 you are reading
<ijp>to call it out of date doesn't do it justice
<zacts>yeah, I just realized that.
<ArneBab>operh
<taylanub>Oh god this sheep. https://images.4chan.org/a/src/1374860238036.gif
*ijp loads his IRC bot and flames taylanub.
***fangism is now known as fangism-hawngry
<taylanub>ijp: My Emacs can evaluate Scheme, your argument is invalid.
<ijp>man, that snowclone takes me back
<zacts>taylanub: edwin can evaluate scheme also
<ijp>I feel kind of like an old man hearing it, and I'm only 23
<taylanub>zacts: Edwin doesn't have Gnus and ERC tho
<taylanub>And, uh, users
<taylanub>Or does it ? Anyway jokes giggles
<zacts>:p
<taylanub>I'm tired, gotta sleep, flying to Turkey tomorrow
<taylanub>I now realize that we're in #guile not #emacs.
<taylanub>I thought I'm in #emacs all the way back since I posted that funny sheep gif.
<ijp>taylanub: the clue was that I shot, not fsbot
***anderson is now known as Anderson
<amirouche>what is the use of bracket like [] in guile ?
<amirouche>I see them in skribilo
<add^_>amirouche: just another version for ()
<amirouche>I'm wondering if there is a use of [] in guile
<amirouche>ah ok
<add^_>For "readablilty"
***ijp` is now known as ijp