IRC channel logs

2014-06-26.log

back to list of logs

<davexunit>bye!
<janneke>ijp: i don't get it...why do you ask?
<janneke>you could do fun things lijk
<janneke>like
<janneke> ((lambda (f) (f (begin (display "launch the missiles\\n") 3))) display)
<janneke>launch the missiles
<ijp>janneke: will the missiles always be launched, no matter what f is?
<janneke>try cdr instead of display
<ijp>a simple yes/no will suffice
<janneke>i wonder about the 3 though...
<janneke>nope
<ijp>what makes you say that?
<janneke>uh?
<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
<janneke>ah, that's what you mean
<janneke>hmm
<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
<janneke>nice
<ijp>but, *and* does not do that
<ijp>(and #f (begin (display "launch the missiles\\n") 3)) will not launch any missiles
<janneke>exactly...bummer
<janneke>yes, not a function ... scary macro shit
<janneke>or syntax, whatever :-)
*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
<taylanub>(likewise for 'or' and '||')
<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
<taylanub>wait what?
<ijp>but scheme does not allow this
<taylanub>we first-class macros now or what do I miss? :P
<taylanub>oh
<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>ok, thanks
<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>I was rereading http://okmij.org/ftp/tagless-final/#tagless-final today, and in it they point out that much of the type work going on for doing typed-dsls in typed-languages with GADTs etc. just isn't necessary
<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?
<dsmith-work>Heh
<dsmith-work>sneek: later tell ijp lol
<sneek>Got it.
<dsmith-work>!uptime
<sneek> 00:03:43 up 2 days, 11 min, 0 users, load average: 0.01, 0.02, 0.05
<dsmith-work>Hmm.
<dsmith-work>Must have lost power..
<civodul>Hello Guilers!
<nalaginrut>heya
<taylanub>sneek: later tell ijp b-b-but Optimus Prime is the coolest!
<sneek>Got it.
<mario-goulart>Hi. Is this a bug? http://paste.call-cc.org/paste?id=08fceb546904ea386cf56c9fe11d299680896d9a
<davexunit>I'm not sure, but today I learned that there's a gap buffer implementation in guile. that's cool.
<mario-goulart>Here's the output: http://paste.call-cc.org/paste?id=08fceb546904ea386cf56c9fe11d299680896d9a#a1
<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, you have 2 messages.
<sneek>ijp, dsmith-work says: lol
<sneek>ijp, taylanub says: b-b-but Optimus Prime is the coolest!
<ijp>mario-goulart: ran your code, didn't reproduce
<mario-goulart>O_O
<ijp>mario-goulart: the code hasn't changed in N years, but what version are you using?
<mario-goulart>Here I have
<mario-goulart>$ guile-2.0 --version
<mario-goulart>guile (GNU Guile) 2.0.5-deb+1-3
<mario-goulart>I can also reproduce that issue with the CHICKEN's port (http://wiki.call-cc.org/egg/gap-buffer)
<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>Works in guile 1.8, indeed.
<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>Or some "unspecified" operation.
<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>sup dawgz
<ijp>mario-goulart: figure out the problem?
<mario-goulart>ijp: unfortunately no
<mario-goulart>ijp: are you the author of gap-buffer?
<daviid>mario-goulart: did you try with the very latest stable?
<ijp>mario-goulart: thankfully, no
<mario-goulart>daviid: of guile?
<daviid>yes
<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>but it runs on yours
<daviid>yep
<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
<mario-goulart>:-D
<mario-goulart>daviid: I'm gonna try on some VMs I have here.
<mario-goulart>I have one with Mint 16.
<mario-goulart>Does Thien-Thi Nguyen hang around here?
<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
<mario-goulart>I can reproduce the issue on 2.0.9 (mint 16)
<daviid>or install guile from source tree because debian is always [very] late
<ijp>hmm, weird
<ijp>check this out http://pastebin.com/m92QgVD9
<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
<dsmith-work>Didn't ttn do gap-buffer?
<dsmith-work>Looks like.
<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?
<add^_>ello all
<davexunit>hey add^_
<ijp>he's stuck in the 1.4 days
<add^_>:-)
<add^_>I wonder why..
<davexunit>for instance, he doesn't want to break compatibility with ancient versions of guile in guile-sdl.
<add^_>Yeah
<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^_>ooh
<add^_>I've been out for too long it seems
<add^_>Wait
<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>daviid: I currently depend on guile-sdl.
<davexunit>to be fair, he fixed bugs for me and made new releases.
<daviid>i know
<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?
<add^_>guile-wm? ;-)
<add^_>Dunno actually
<davexunit>guile-wm just needs a bit more work to be super awesome for regular use.
<davexunit>mwitmer, merge my pull request!
<add^_>define "a bit"
<davexunit>I like to pretend he's on #guile...
<add^_>:-/
<davexunit>add^_: a couple blocker bugs
<davexunit>sometimes it stops responding to key input
<add^_>oh
<add^_>ugh
<davexunit>need an escape sequence for the prefix key
<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^_>Ah
<add^_>I don't remember if I should be using branch 1) v2.1.0 or 2) stable-2.0 ...
<davexunit>stable-2.0 most likely
<add^_>Hm
<add^_>ok
<davexunit>if you want the latest stable code
<add^_>yeah
*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
<davexunit>make clean, autoreconf -if, make?
<add^_>didn't have it installed before on this system
<add^_>unless...
<davexunit>oh
<add^_>nope
<davexunit>your version should be 2.0.11
<add^_>weird
<davexunit>from the dir you built from, run meta/guile --version
<add^_>That is correct
<add^_>So why is it installing the old version?
*add^_ is confused
<davexunit>do you have one version installed in /usr/local and the other in /usr?
<add^_>Hmm
<davexunit>which guile
<add^_>Removed all installed guile data on my system.. Now installing again..
<add^_>It was 2.0.9
<add^_>Oh, now it's correct.
<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>add^_: yeah, happens to me, too
<add^_>why is that? :-/
<davexunit>it's a known thing. hasn't harmed anything for me.
<add^_>ah ok
<davexunit>I can't remember
<davexunit>if wingo or civodul were around they'd know
<add^_>mm
<add^_>Haven't they been on recently or something?
<davexunit>they have
<add^_>sneek: seen wingo?
<davexunit>but not now
<sneek>wingo was here Apr 17 at 02:01 pm UTC, saying: er, meant to write :(, but maybe that was a freudian slip.
<add^_>uh
<davexunit>april? he said that today.
<add^_>Oh
<add^_>ok
<davexunit>sneek: you've been drinking, haven't you?
<add^_>sneek: botdrink
<davexunit>glugluglug
<add^_>:-D
<add^_>brb
<add^_>weird, I must have just missed
<add^_>it
<add^_>and again
<janneke>guile-wm?
<janneke>that sounds cool!
<davexunit> https://github.com/mwitmer/guile-wm
<dsmith-work>add^_ : libguile-2.0.so.22.7.2-gdb.scm *isn't* an elf file. I'ts a scheme file.
<dsmith-work>add^_: Take a look at it.
<dsmith-work>add^_: It's extensions to gdb
<davexunit>oh yeah, that's what it was. the new gdb guile support stuff.
<dsmith-work>ldconfig is just being noisy
<jcca>Hi, Is there something like pyserial for guile?
<wingo>not familiar with pyserial
<wingo>what is that?
<jcca>for work with serial port. pyserial.sourceforge.net
<wingo>neat
<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?
<civodul>i regularly miss it
<jcca>ft: Thanks I will try it
<jcca>ft: guile-termios looks good
<ft>jcca: Great. :)
<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.
<jcca>yep, I use linux too
<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: :)
<jcca>ft: I will try it on a ARM with debian, any issue I will let know you
<ft>jcca: Great! :)
<dsmith-work>civodul: yeah, I can add that channel.
<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?
<dsmith-work>Probably not.
<dsmith-work>civodul: Hows that?
<dsmith-work>civodul: say something...
<dsmith-work>in #guile
<civodul>hello
<sneek>civodul, you have 1 message.
<sneek>civodul, dsmith-work says: another another test
<civodul>ok
<civodul>but that's fine
<dsmith-work>civodul: I added him "by hand" with a ! command. I'll add that to the config when I'm at home.
<dsmith-work>!uptime
<sneek> 21:47:32 up 2 days, 21:55, 0 users, load average: 0.00, 0.01, 0.05
<civodul>ok
<civodul>dsmith-work: just 2 days?
<civodul>mem leak or something?
<dsmith-work>must have lost power.
<dsmith-work>A tornado came through a few days ago.
<civodul>oh