IRC channel logs

2013-06-15.log

back to list of logs

<mark_weaver>I suppose I could be accused of worrying too much about efficiency, but sometimes it can make the difference between being able to write something in Scheme rather than having to resort to C.
***fangism is now known as fangism-shadow
<nalaginrut_>it's rather amazing for foreign-module-reference in ecmascript front-end, for that, I'll add it for IMP
<cky>mario-goulart: How on earth do you return multiple values without allocating? Isn't "values" a normal procedure, so that all arguments get put into an argument list (since it's variadic)?
<cky>Oops.
<cky>It's for mark_weaver.
<cky>But he's disappeared off IRC so my tab completion got the wrong person. ;-)
<ijp>values gets handled specially in the vm
<nalaginrut_>I did that wrong every time mark left ;-)
<ijp>in it's full generality, I don't think you can completely avoid allocation, but in most cases you can
<cky>ijp: Ah, how interesting.
<cky>So I guess values isn't just (lambda items (call/cc (lambda (k) (apply x items)))) then. ;-)
<cky>*apply k
<cky>Actually, more elegantly: (lambda items (call/cc (cut apply <> items)))
<cky>;-)
<ijp>"elegant"
<cky>Lol.
<ijp>e.g. a static call like (values 1 2 3), can easily get turned into a couple of stack pushes
<ijp>> (compile '(values 1 2 3) #:to 'glil)
<ijp>#<glil (program () (std-prelude 0 0 #f) (label :LCASE889) (const 1) (const 2) (const 3) (call return/values 3))>
<cky>Bwahahaha, I just tried ,compile (call/cc (cut <> 1 2 3))
<ijp>for the (apply values ...) case, there is a return/values* instruction
<cky>Nice.
<ijp>of course, we still can't fix a ((lambda (f) (lambda args (apply f args)) values) 1 2 3 4) type scenario, (ignoring peval)
<cky>ijp: I think you meant ((lambda (f) ((lambda args (apply f args)) 1 2 3 4)) values), and the compiled code isn't actually too bad at all.
<ijp>well, more or less
<ijp>but did you make sure to turn off optimisation?
<cky>No, I didn't turn off optimisation.
<ijp>well, I was trying to get at the "really really higher order case", but guile should be able to fold those functions
<cky>*nods*
<civodul>Hello Guilers!
<sneek>Welcome back civodul, you have 2 messages.
<sneek>civodul, nalaginrut says: IMP is a tiny imperative language, which is used in some CS course, http://fsl.cs.uiuc.edu/images/0/0d/CS522-Spring-2011-PL-book-imp.pdf
<sneek>civodul, nalaginrut says: it's simple enough but not too simple, so I think it's suitable to be a tutorial of Guile front-end taking all the 'regular' mechanism like make-token&LALR
<civodul>oh, ok
<add^_>sneek: tell davexunit I just realized that what you are making is what I was planning on making, so I guess I wont work on the exact same thing.. Too bad for me :-P
<sneek>davexunit, add^_ says: I just realized that what you are making is what I was planning on making, so I guess I wont work on the exact same thing.. Too bad for me :-P
<add^_>ah
<add^_>right
<add^_>tell later
<add^_>sneek: tell davexunit later I just realized that what you are making is what I was planning on making, so I guess I wont work on the exact same thing.. Too bad for me :-P
<sneek>davexunit, add^_ says: later I just realized that what you are making is what I was planning on making, so I guess I wont work on the exact same thing.. Too bad for me :-P
<add^_>guh
<add^_>sneek: later tell davexunit I just realized that what you are making is what I was planning on making, so I guess I wont work on the exact same thing.. Too bad for me :-P
<sneek>Got it.
<add^_>Thank you.
<fbs>sneek: later tell snake hi
<sneek>Will do.
<fbs>eh
<fbs>sneek: later tell sneek hi
<sneek>Umm, I'm right here.
<add^_>:-)
<add^_>Hum, is there a Scheme version of Parenscript?
<civodul>many of them :-)
<civodul>there's one in Hop, one in Chicken, one in Racket, etc.
<add^_>And for Guile?
<add^_>Because, that's the most important one ;-)
<add^_>Alas, since there are versions in the other Scheme implementations, maybe one could reuse some stuff to make one for Guile :-)
<add^_>Can't seem to find the Chicken one, I'll look for the Racket one instead..
<ijp>lol, reusable scheme code
<civodul>add^_: for Guile, ijp had a different (and possibly more interesting) plan
<civodul>i'll let him explain ;-)
<ijp>chicken's scheme->js is called spock
<ijp>racket's is whalesong, I think
<ijp>and my silly plan is to implement the guile vm directly in js, and have it directly interpret precompiled go files
<add^_>yeah, I just found whalesong
<add^_>oh
<add^_>Uh
<ijp>although, since I have barely any code, we can call that vapourware
<add^_>"the" guile vm?
<add^_>Hm
<ijp>well, technically guile comes with 2, and there is the rtl branch
<add^_>oh, it does?
<add^_>I didn't know it came with (+ 2 1)..
<add^_>So you'd make ANOTHER VM to get this done? :-D
<add^_>err
<add^_>Yeah
<ijp>moar code, more good, obviously
<add^_>Then I guess I won't be doing anything on that idea either..
<ijp>add^_: don't let me stop you
<add^_>Nah
<add^_>Your solution sounds nice, but a bit over my head.
<add^_>Maybe all my projects are over my head.
<add^_>But still
<ijp>if it isn't over your head, you won't learn something
<add^_>True
<add^_>I meant more like "I don't get how that would be done". But maybe that still applies..
<add^_>also, reusable scheme code does sound a bit weird..
<add^_>Now that I think about it.
<rlb>...so how do you run a guile you just built these days? i.e. modern equiv of pre-inst-guile?
<ijp>meta/guile
<rlb>right -- thanks
<rlb>...trying to figure out why net-db.test is failing like this:
<rlb>unexpected error code: -11 "System error"
<rlb>FAIL: net-db.test: getaddrinfo: no name
<rlb>
<rlb>(working on the 2.0.9 debs)
<rlb>Should the EAI_FOO values match errno.h?
<rlb>i.e. EAI_EAGAIN?
<ijp>I would have assumed so
<add^_>Hm, might as well just try and come up with a experimental/learning project..
<fbs>yea
<rlb>ijp: thanks -- sent a report to guile-devel.
<civodul>hey rlb
<civodul>you might want to check http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13205 and related
<rlb>civodul: thanks, although this is not running in a chroot or anything else.
<rlb>And I don't think I've ever edited the nsswitch.conf file on that system (FWIW).
<rlb>it says:
<rlb>passwd: compat
<rlb>group: compat
<rlb>shadow: compat
<rlb>hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
<rlb>networks: files
<rlb>protocols: db files
<rlb>services: db files
<rlb>ethers: db files
<rlb>rpc: db files
<rlb>netgroup: nis
<rlb>
<civodul>rlb: and are libnss_mdns4*.so in $LD_LIBRARY_PATH?
<rlb>should be:
<rlb>$ dpkg -S libnss_mdn
<rlb>libnss-mdns: /lib/libnss_mdns6.so.2
<rlb>libnss-mdns: /lib/libnss_mdns_minimal.so.2
<rlb>libnss-mdns: /lib/libnss_mdns4_minimal.so.2
<rlb>libnss-mdns: /lib/libnss_mdns4.so.2
<rlb>libnss-mdns: /lib/libnss_mdns6_minimal.so.2
<rlb>libnss-mdns: /lib/libnss_mdns.so.2
<rlb>