IRC channel logs
2014-06-26.log
back to list of logs
<janneke>ijp: i don't get it...why do you ask? <janneke> ((lambda (f) (f (begin (display "launch the missiles\\n") 3))) display) <ijp>janneke: will the missiles always be launched, no matter what f is? <ijp>a simple yes/no will suffice <ijp>what makes you say that? <ijp>fine, I'll jump to the end <janneke>if f is not a function, that won't work? <ijp>actually, it will error, but the missiles will be launched first <ijp>the reason is, scheme evaluates function arguments before you enter into the function <taylanub>janneke: by the way your above example will also display "3" after the missile line <ijp>but, *and* does not do that <ijp>(and #f (begin (display "launch the missiles\\n") 3)) will not launch any missiles <janneke>yes, not a function ... scary macro shit *janneke appreciates the clue-bat <taylanub>if you know C-like syntax, (and x y z) is not much more than 'x && y && z' <ijp>now, we *could* make it work, but then you need to give up knowing whether or not those missiles will be launched <ijp>you could create a macro (no-missiles <form>) that strips out any occurrences of the (display "launch the missiles\\n") form <ijp>and then ((lambda (f) (f (begin (display "launch the missiles\\n") 3))) no-missiles) would not launch missiles <ijp>but scheme does not allow this <taylanub>we first-class macros now or what do I miss? :P <ijp>janneke: most of the time this will not be a significant problem,but keep it in mind <ijp>if you come up with a convincing example for why it should be allowed, please share <janneke>i was just looking for a way to reduce the value of a list (of tests) to: all true /false <taylanub>ijp: I assume J. Shutt's dissertation didn't convince you? (I'm not saying it did me, I'm still indifferent.) <ijp>taylanub: I have a few examples I think *could* be convincing, like for autogenerating a good table-driven parser, but I never hear them from the people pushing fexprs <ijp>anyway, I *think* I could do this with first class functions <ijp>maybe for JITting your own program <ijp>but we haven't tapped out first class functions by a long shot <ijp>taylanub: basically, IMO, the power/utility ratio is terrible <ijp>like a petrol-powered power-screwdriver <ijp>contrarily, first class functions are solar powered chainsaws <dsmith-work>Eh? I think I understand that, and then I don't, and then.. <ijp>I'll get my analogy guys to work on that and get back to you <ijp>how about: first class functions are volvos, macros are humvees, and fexprs are optimus prime <ijp>first class functions: reliable, relatively cheap, good mileage <ijp>macros: more expensive, good in terrain your first class functions can't handle <ijp>fexprs: cool looking, can dynamically reconfigure midjourney, needs an expensive hollywood special effects team <ijp>and the use cases are NOT REAL <ijp>dsmith-work: better? worse? <sneek> 00:03:43 up 2 days, 11 min, 0 users, load average: 0.01, 0.02, 0.05 <taylanub>sneek: later tell ijp b-b-but Optimus Prime is the coolest! <davexunit>I'm not sure, but today I learned that there's a gap buffer implementation in guile. that's cool. <wingo>i have never used that code before <wingo>i don't even think it has any tests :) <wingo>er, meant to write :(, but maybe that was a freudian slip <ijp>davexunit: yeah, there's a lot of undocumented crap in ice-9 <sneek>ijp, taylanub says: b-b-but Optimus Prime is the coolest! <ijp>mario-goulart: ran your code, didn't reproduce <ijp>mario-goulart: the code hasn't changed in N years, but what version are you using? <ijp>hmm, what could possibly have changed <ijp>the only thing in that file has changed recently is the license in 2009, so it would need to be something under the hood <ijp>but I just tried it in 1.8 and I get no change <mario-goulart>Weird. I have only that guile version on the system I'm using right now. *mario-goulart installs guile 1.8 <mario-goulart>I confirm "diff ./1.8/ice-9/gap-buffer.scm ./2.0/ice-9/gap-buffer.scm" only shows differences in the licence <ijp>maybe a broken (and subsequently fixed) optimisation pass? <mario-goulart>I suspect that because I can reproduce the issue in CHICKEN. <ijp>right, that might be more likely <ijp>I have to leave, but I will be back in a few hours <ijp>mario-goulart: figure out the problem? <daviid>mario-goulart: did you try with the very latest stable? <ijp>mario-goulart: thankfully, no <mario-goulart>daviid: no, the most recent version I have here is 2.0.5-deb+1-3 <daviid>i'd definitely try the latest then <ijp>daviid: even though this code has not changed since 2009? <daviid>ijp: yes, i would try that, especially because you said you can't reproduce, what version did you tested it with? <ijp>mario-goulart: try (compile-and-load "/tmp/foo.scm" #:opts '(#:partial-eval? #f)) <ijp>you'll need to (use-modules (system base compile)) I think <ijp>daviid: it also fails for mario-goulart on the chicken port of that code <mario-goulart>A friend of mine tested on 2.0.11 and could NOT reproduce the issue. <daviid>mario-goulart: you can install testing just for guile if you're using stable debian <mario-goulart>ijp: (compile-and-load "guile-gap-buffer.scm" #:opts '(#:partial-eval? #f)) produces the same results here. <ijp>which means 1) it either has nothing to do with partial-eval? or 2) I've forgotten the options syntax again <daviid>mario-goulart: if i was you, i'd change /etc/apt/preferences, add testing in sources.list for guile <ijp>mario-goulart: I've never seen him on <ijp>I imagine we'd argue frequently <daviid>or install guile from source tree because debian is always [very] late <ijp>the interesting one (for me) is $16 <ijp>looking at that, if you used the same offsets for both gb->string, then you'd get your output <davexunit>what's up with ttn? he seems to be stuck in the guile 1.8 days. <davexunit>did guile go in a direction that he doesn't like? <ijp>he's stuck in the 1.4 days <davexunit>for instance, he doesn't want to break compatibility with ancient versions of guile in guile-sdl. <davexunit>and since sdl2 is out, and guile-sdl is written in C and hard to hack, I'm going to write guile-sdl2 in pure guile. <add^_>I've been out for too long it seems <add^_>I misunderstood, nevermind me. <davexunit>I need to actually write it, of course. until then it's just talk. *add^_ just bought a purely functional datastructures book. <daviid>davexunit: be careful depending on anything he writes and [does not] maintains <davexunit>to be fair, he fixed bugs for me and made new releases. <add^_>"Purely functional Data Structures - Chris Okasaki" <add^_>I forgot, I should have asked someone if they've read it and liked it (in here). <janneke>that's it. i've had it with unity and am considering reverting to sawfish; <janneke>anyone using that, or is there something better these days? <davexunit>guile-wm just needs a bit more work to be super awesome for regular use. <davexunit>by default the prefix is C-t, so it doesn't work in emacs. <davexunit>C-t C-t should escape it, but that feature isn't implemented. <add^_>I don't remember if I should be using branch 1) v2.1.0 or 2) stable-2.0 ... *add^_ is having the same problem this time as last time <add^_>says 2.0.9 when I run guile --version <add^_>I thought it was up in version 2.0.10 or something <add^_>and yes, I ran make _version this time :-P <add^_>didn't have it installed before on this system <davexunit>from the dir you built from, run meta/guile --version <add^_>So why is it installing the old version? <davexunit>do you have one version installed in /usr/local and the other in /usr? <add^_>Removed all installed guile data on my system.. Now installing again.. <add^_>But when I run ldconfig it tells me that libguile-2.0.so.22.7.2-gdb.scm is not an ELF file - it has the wrong magic bytes at the start. <davexunit>it's a known thing. hasn't harmed anything for me. <add^_>Haven't they been on recently or something? <sneek>wingo was here Apr 17 at 02:01 pm UTC, saying: er, meant to write :(, but maybe that was a freudian slip. <add^_>weird, I must have just missed <dsmith-work>add^_ : libguile-2.0.so.22.7.2-gdb.scm *isn't* an elf file. I'ts a scheme file. <davexunit>oh yeah, that's what it was. the new gdb guile support stuff. <jcca>Hi, Is there something like pyserial for guile? <jcca>for work with serial port. pyserial.sourceforge.net <wingo>i don't know of anything at that nice abstraction layer <wingo>of course you can open devices yourself but that's not as nice <jcca>ok, got it. thanks wingo <ft>jcca: If what you need from that is access to termios functionality for controlling baudrate and all that, I wrote https://github.com/ft/guile-termios - there's no fancy highlevel API as pyserial provides in there either, though. <civodul>dsmith-work: do you think sneek could join #guix and make friends with the rest of us? <jcca>ft: Thanks I will try it <jcca>ft: guile-termios looks good <davexunit>civodul: what resources will we need in order to have an ARM port of guix? <ft>jcca: I only tried it on linux, though. <davexunit>oops, wrong channel. thought I was in #guix. <ft>jcca: I wanted to try the bsds in virtual machines, but had quite some troubles building a recent guile version to try it on, so I gave up. <jcca>ft: I will try it on a ARM with debian, any issue I will let know you <civodul>dsmith-work: oh thanks, that'd be wonderful :-) <dsmith-work>civodul: However, channels are not distinguished. Messages left for #guile will appear in #guix <civodul>maybe it's not a problem in practice, no? <sneek>civodul, you have 1 message. <sneek>civodul, dsmith-work says: another another test <dsmith-work>civodul: I added him "by hand" with a ! command. I'll add that to the config when I'm at home. <sneek> 21:47:32 up 2 days, 21:55, 0 users, load average: 0.00, 0.01, 0.05