<zacts>he gives a time-sharing system as an example <zacts>it sounds like a really nice abstraction <zacts>but I'm still learning about it <zacts>I'm almost done with the Little Schemer <zacts>I'm at the chapter on sets and relations <zacts>I can tell it's going to get tounge twistery <zacts>I'm going to have to go through lambda the ultimate again, my mind is already a pretzel <zacts>the multiinsert&co, I need to read this when I'm less tired. <leo2007>zacts: what is that, lambda the ultimate? <zacts>leo2007: oh a chapter from the book the Little Schemer <mark_weaver>wingo, civodul: FYI, I merged stable-2.0 into master. <zacts>sorry, I'm just ultra excited about this frons stuff.. will bbl. I forgot you guys are merging stuff. <mark_weaver>zacts: no worries, I'm done with the merge now, and will sleep imminently :) <wingo>mark_weaver: o/~ did you ever know that you're my herooooo o/~ <mark_weaver>civodul: the fact that libguile-2.0-gdb.scm is a source file (in the repo) with the version number in it presents complications for merging between stable-2.0 and master. I wonder occurrences of 2.0 could be avoided in repo source ? <wingo>might not be worth it if the file only changes once per major/minor version <mark_weaver>I took care of it in the merge, but if changes are made to it in stable-2.0 then it will continue to present complications when merging. <wingo>ah it's a bit more involved than that, i see <mark_weaver>also libguile/Makefile.am contains several occurrences of 2.0 in it. <wingo>easy to fix in the makefile at least <mark_weaver>the makefile could include a rule to copy the source file (without version number) to the current name (with version number). <mark_weaver>(maybe there's a better way, but that's one simple solution that comes to mind) <wingo>a8b80d6b29b33ea39c96e5e366a0365886b31dc8 seems to at least attempt to be parameterized by the version <civodul>mark_weaver: yeah i'd just rename it after the merge <civodul>in practice libguile-2.0-gdb and libguile-2.2-gdb are likely to diverge anyway <civodul>for instance they'd have different stack walking procedures <wingo>being able to reliably get a backtrace for the current thread would be swell <wingo>i.e. without needing to call into the inferior <mark_weaver>I didn't modify libguile-2.2-gdb.scm at all, so I guess it's non-functional. <civodul>well the pretty-printing part should work, but not the rest <mark_weaver>yeah, I got (system base types) working properly, I think. <wingo>also slot 0 isn't always the procedure, in master -- you have to grovel elf/dwarf <wingo>very excited about that stuff <wingo>i wrote a pretty-printer for v8 using the guile buildings and it has already improved my life <civodul>did you get your pretty-printer upstream? <civodul>as a way to push Guile in new areas ;-) <wingo>civodul: they want it upstream, yes! <wingo>i have to change the license to something not GPL, it seems -- but that's fine <wingo>the nice thing is that i didn't have to hard-code any of the tags <wingo>since they are defined as static const int kFoo = 343; <wingo>but they don't distribute gdb <wingo>so there's no issue in making this one file mit-licensed or whatever <wingo>yep -- especially given that the tagging is different between 64-bit and 32-bit targets... <wingo>btw they include simulators for non-ia32, non-x64 arches <wingo>so there is a simulator in the tree for arm, arm64, mips, etc <wingo>and they are able to actually build and run an arm jit compiler on a normal desktop <wingo>the C++ code runs "natively" <wingo>and the jit code runs in the simulator <wingo>only a couple of pieces that have to be aware of the difference between the two <civodul>a good idea given that most hackers probably have an x86_64 box <wingo>so by default typing "make" builds ia32, x64, and arm targets in both release and debug modes <wingo>and you can "make check" too <wingo>firefox imported the v8 simulators recently and are using it in a similar way <wingo>well, relatively short anyway ;) <wingo>they only have to support the instructions they emit <civodul>gdb has simulators for non-intel arches, but it probably can't be embedded this easily <civodul>nalaginrut: couldn't it just use 'compose' no? :-) <zacts>have you heard of them before? <zacts>I'm hoping you guys can eventually help me to more fully understand this idea. whenever you have time. I have a somewhat fuzzy idea of the implementation details of it now, but I see how it can be a useful abstraction. <zacts>mainly I would like to see a more practical application of frons.. I think it could lead to some elegant code for certain situations. the example given by steele was the time-sharing system. <ijp>civodul: the main problem with compose is that it is in the wrong direction <ijp>(compose number->string 1+ string->number) ; wat <ijp>(revcompose string->number 1+ number->string) ; much better <ijp>all the arrows point in the right direction <ijp>civodul: yeah, maths people do it this way <ijp>the (f ⎄ g) x = f (g x) way, that is <taylanub>"f o g" notation always confused me in high-school and I asked myself what was wrong with f(g(x)) instead of "f o g (x)" <ijp>hmm, apparently you use ∘ RING OPERATOR, not ⎄ COMPOSITION SYMBOL <ijp>taylanub: well, there is little advantage if you are immediately applying <ijp>IIRC, category theorists often do (f ; g) rather than (g ∘ f) <taylanub>by the way any idea on how to fix http://sprunge.us/MDdf after pulling the recent changes on master and recompiling ? (I'd like to avoid `make clean' which will make .go compilation take hours.) <nalaginrut>taylanub: after one hour trying for fixing it, I chose to clean then compile <wingo>taylanub: you need to make clean <wingo>bytecode versions changed, there is no help <zacts>mark_weaver: ^ I forgot, this is an application of this idea <taylanub>wow, R7RS-small library syntax lets me cleanly do something Guile modules don't, who would've thought :P (Via `include-library-declarations' I can have the exports of each library component in a separate file; then I can use a wrapper library that imports the standard components and re-exports all their exports by including all their export files) <ijp>why would you have exports in a separate file? <taylanub>ijp: the wrapper uses `include-library-declarations' on each of the export files to cleanly re-export everything the real owner of that export file exports <ijp>that's not an answer <taylanub>then I either fail to explain, or to understand your question <ijp>taylanub: what is the advantage of listing the exports in a separate file, rather than having a form that just does "reexport-all-from-module" <ijp>which I can write in guile, no problem <ijp>and this standard solution is stupid <ijp>it's the exceptions fiasco all over again <wingo>i can't think about r7rs without grumbling <leo2007>taylanub: which scheme implementation? <ijp>leo2007: probably only chibi <leo2007>I meant which scheme implemented that feature? <taylanub>Uh, I thought Guile implements all the significant parts of R7RS-small now but I don't see define-library <nalaginrut>civodul: I updated the post to introduce `compose', well it's cool to have it in Guile ;-) <haxie>so, I'm trying to use a function defined in a C program in guile, but I'm getting an error that I've been trying to fix quit some time <haxie>error: no matching function for call to 'scm_c_define_gsubr' <haxie> note: candidate function not viable: no known conversion from 'SCM (SCM, SCM)' to 'scm_t_subr' (aka 'void *') for 5th argument <haxie>SCM_API SCM scm_c_define_gsubr (const char *name, <haxie>sorry if the answer is ridiculously simple :/ but I've been at it for a while <haxie>and hello, I'm a new lisper, excited to meet everyone in the channel :) <atheia>Welcome haxie, I'm afraid I can't help you with your problem, but always nice to have new people in the channel :-) <haxie>atheia: no worries, thanks for the welcome! <civodul>haxie: i think may need to explicitly cast the 5th argument to (scm_t_subr) <haxie>civodul: will give that a try <haxie>okay, definitely working... you were right, had to cast, thanks! <mark_weaver>taylanub: the 'r7rs-wip' branch of guile (in the git repo) implements almost all of R7RS-small. <mark_weaver>ijp: IMO, 'reexport-all-from-module' is worse than 'include-library-declarations', because (1) it will export things like internal toplevel bindings created by 'define-record-type', (2) once you've used 'reexport-all-from-module' there's no way to make an internal helper if you later want that. <mark_weaver>That said, I'm not a fan of 'include-library-declarations', though doesn't seem horrible to me either. <mark_weaver>taylanub: the main missing bit you are likely to notice missing from R7RS-small is that imports like (srfi 1) don't yet work. <mark_weaver>(you have to import (srfi :1) or (srfi srfi-1) instead <taylanub>ok, thanks for the notice. couldn't one make a re-export-all that only re-exports explicitly exported bindings ? <mark_weaver>oh, I see. yeah, I guess maybe that's what ijp meant. <ijp>mark_weaver: you can get the exports from the module ***linas__ is now known as linas
<ijp>or, happy national zucchini bread day <sneek>Sneeky bot running on Guile version 2.0.11 using bobot++ 2.3.0-darcs <sneek>Linux beaglebone 3.8.13-bone47 #1 SMP Fri Apr 11 01:36:09 UTC 2014 armv7l GNU/Linux <sneek>davexunit was here Apr 25 at 03:12 pm UTC, saying: neat. <mark_weaver>sneek: it's good to have you back! you've been solely missed. <linas>so I've got a stupid closure question ... <linas>I want something like the following to work ,,, but it doesn't .... <linas> (lambda (exp) (eval exp (interaction-environment))))) <linas>which bombs with Unbound variable: gas <linas>how do I get eval to evaluate within the scope of the closure? <davexunit>I'm not sure, linas. why do you want to do this in the first place? <linas>well, I'm using guile to wrap some C routines ... and want to have those C routines see a local environment <stis>using this shuld be the very last thing to try though <linas>ah yes, I think that might be it ... I thought I'd seen that efore but couldn't find it <taylanub>linas: Is this what you wanted ? http://sprunge.us/cXCZ I believe this is a less "dirty" way of doing what you want, since it doesn't involve messing with local static environments imperatively (which I always thought ought to be forbidden, I'm surprised that `local-eval' exists at all in Guile (rather, is possible with psyntax) and wonder about implications of its existence...) <ijp>taylanub: local-eval exists because lilypond requires the behaviour <taylanub>ijp: but psyntax wasn't modified by us just to support that, was it ? <taylanub>Well anyway, I'd need to look more into this `local-eval' thing before I can say anything good or bad about it, it just "intuitively" seems (very) wrong but that's all I can say :P <linas>local-eval seems to be exactly what I wanted ... <linas>taylanub your pastebin might work for me as well ... <linas>mostly, I'll have to be able to create several environments, and have them work 'right' in a threa-safe way ... <taylanub>Let's see the difference between the ,optimize outputs of (define (foo) (let ((x 5)) x)) and (define (foo) (let ((x 5)) (the-environment) x)) : http://sprunge.us/ZBCj <taylanub>*Something* is wrong there but I can't quite tell! <linas>taylanub, yes, that works for me too .. <taylanub>(Note that the return-value of (the-environment) is not used, but apparently it doesn't get optimized out anyway; that may or may not be because of difficulties in proving it to be side-effect free.) <linas>taylanub module-define! seems to be what I was looking for .. but it is not documented publicly ... is that an issue? <taylanub>linas: it's in (info "(guile) Module System Reflection") <linas>dooh, I see it in the form of scm_c_module_define in Accessing-Modules-from-C.html <linas>and its deep in my C code where I have to use it, so that seems to be what I needed, again, many thanks. <developernotes>Does that mean it is either not implemented, and/or not available? <taylanub>developernotes: it's "srfi", not "sfri" :) <daviid>hello guilers, the clutter dvelopper is very friendly, really a nice guy: he helps me in a very efficient way, even though i'm asking quizz about deprecated in 1.10, how to do things in 1.12 [the stable is 1.18 for who would not know...] <daviid>wingo: hello. I have a serious bug trying to ,use (gnome gw gdk): i've never used it before, but clutter 1.12 requires it [clutter-texture-* deprecated and ClutterImage only accept gdk-pixbuf data...]. I'd like to see if you also have the problem? if you could just try to ,use (gnome gw gdk) and let me know... here is the message I get: guile: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0. <daviid>I wonder if it could be because I have multiple displays [an external monitor is connected to my laptop atm...] <daviid>dsmith-work: tx. I just tried but it did not solve the problem. it actually hangs in: ... newer then ... compile /opt/share/guile-gnome-2/gnome/gw/gdk.scm <daviid>ok, don't why (just reproduced some steps manually that were in a clutter example module) but it did compiled it now, wierd, I wonder what caused the bug earlier <Fulax>does anyone know about a libnl (netlink(7)) guile interface? or similar work <civodul>Fulax: not really, but that seems like a good job for the FFI :-) <civodul>definitely if you limit yourself to glibc (+ Linux) <Fulax>civodul: it's on my tocheck list for networking support in dmd <Fulax>right, we would have to define a bare minimal interface for dmd needs in networking configuration