***Gues_____ is now known as Guest50901
***fangism is now known as fangism-hawngry
***jao is now known as Guest23100
***jao` is now known as jao
***janneke1 is now known as janneke
<taylanub>Hrm, there's `make-undefined-variable', and `make-unbound-fluid'. Should they not use the same word ? (I also seem to remember some messiness in the names of the C constants involved here, also with regard to *unspecified* if I'm not mistaken .. is there any motivation to get that straight, or will we indefinitely put up with the historical accident?) ***Shozan is now known as SHODAN
***jao is now known as Guest78786
***Guest78786 is now known as jao
<shanecelis>hello guilers, I have a question: I love how all the scheme procedures and C functions have a very clear isomorphism, e.g. scheme (length lst) and C scm_length(lst). But how is this achieved? Does it mean that most of Guile is written in C? <cky>shanecelis: Once upon a time, indeed that was the case. <cky>shanecelis: More and more C-side stuff got moved into Scheme-side code, though. <cky>I do not speak for the Guile maintainers, but I think the eventual intention is to have as much code in Scheme as possible, and the C API is simply for people who want to embed Guile in their C projects (and/or write C-side extensions for Guile). <davexunit>as guile's VM gets faster, it makes sense to have more of the code be Scheme. <davexunit>especially since native compilation will happen someday <shanecelis>Cool. Yeah, I was just curious. I was wondering about how best to emulate Guile's Scheme/C APIs. It's a convention worth embracing. <shanecelis>I figure it'll help them get more comfortable with Guile if it's not Emacsy does this and Guile does that. <davexunit>I've wrote C code that calls Scheme procedures that I've written. <davexunit>so your C API would wrap Guile procedures. heh that usually goes the other way. <shanecelis>davexunit: Cool. Yeah, that's what I have write now. I just wanted to make sure I was on the right track. :) <davexunit>I'm not sure if the Guile source does the same thing for the bits that are in Scheme that have C equivalents. <davexunit>but it's a hunch. perhaps a dev will give you a better answer sometime. ***fangism-hawngry is now known as fangism
***cky944 is now known as cky
***mario-go` is now known as mario-goulart`
***heroux_ is now known as heroux
***solarus_ is now known as solarus
<taylanub>The *unspecified* value has no type, does it ? ***jao is now known as Guest34631
<Fulax>taylanub: actually, it has the type <unknown> <taylanub>Trying to clarify my mind on the whole unbound, undefined, unspecified, etc. stuff, I wrote down these notes: http://sprunge.us/FicJ I should set up some place where I can publish stuff of this kind; could help other newcomers. <Fulax>I'm always puzzled with unspecified. For me, standard does not specify some behaviors, implementation choose a behavior, or return the undefined value. But I don't grok the unspecified value's role <taylanub>Fulax: We could just return #f or something, yes (we could also return the string "LOL I'M UNSPECIFIED", or a randomly-generated number each time), but its nice to know that it's distinct from any useful value thus couldn't possibly be confused, and it also has the practical use of not making the REPL print out a value when returned. (Maybe there's more pragmatic benefits like that.) <Fulax>taylanub: thanks to your notes. I understand now :-) <Fulax>so unspecified is a real, user-visible value, while undefined is not <taylanub>Only the module API can mess with undefined variables. E.g. you can (module-add! (current-module) 'foo (make-undefined-variable)) to bind the identifier `foo' to an undefined variable in the current module, but now when you try to use `foo' it will give the same error as if you had never bound it at all. <taylanub>"Normal" Scheme code can't distinguish the two situations (never bound at all vs. bound to an undefined variable). <taylanub>Hrm, weird, grepping the whole code-base I can't see any place at all where SCM_UNBOUND is used, except for GOOPS which re-uses it for its own SCM_GOOPS_UNBOUND. ***DerGuteM1ritz is now known as DerGuteMoritz
***Gues_____ is now known as Guest29148