IRC channel logs

2013-04-09.log

back to list of logs

<nalaginrut>morning guilers~
***ijp` is now known as ijp
<ijp>morning
<nalaginrut>heya
<mike121>Good evening.
<proxhotdog>finally installed guile 2, what a long compilation process
<youlysses>proxhotdog: Depends on the box and your perception of a "long" time, I suppose. It's about 30mins on average, on my end. :-P
<mike121>Nah. Compare to pretty much any package I compile, Guile takes a long time. Mostly trying to compile psyntax-pp to bytecodes.
<ijp>boot-9 usually takes longer than psyntax
<mike121>Challenge #5 for Guile 100 is posted: PHP-style GUILE. http://www.lonelycactus.com/guile100/html/Problem-5.html
<ijp>:O
<nalaginrut>Seems I've already done a simple one: https://github.com/NalaGinrut/artanis/blob/master/artanis/tpl.scm
<proxhotdog>ya, the most time-consuming part is the boot-9
<proxhotdog>btw, how do you mention my nickname in IRC chat? (actually new to IRC)
<nalaginrut>and the TAG could be changed in config, anyway I'd like to see a better one, and I'll integrate it into artanis ;-P
<nalaginrut>proxhotdog: yes boot-9 is verrrrry slow
<nalaginrut>is it accepted if Set-Cookie end with a semicolon? say, "a=1;b=2;c=3;Secure;HttpOnly;"
<DerGuteMoritz>nalaginrut: RFC 6265 says no
<nalaginrut>DerGuteMoritz: thanks
<nalaginrut>is there anything like %b in 'format' to backspace one char? I'd like to use such a trick to drop the ended semicolon
<nalaginrut>well, it's '\\b'
<DerGuteMoritz>why not make a list and turn it into a string interposed with semicolons?
<nalaginrut>DerGuteMoritz: yes, that could be, I'm just too elegant pursuing, list is not so pretty than 'format'
<DerGuteMoritz>hmhm
<nalaginrut>if there's no other way to go, I have to rewrite the logic
<DerGuteMoritz>I feel exactly the opposite way hehe
<DerGuteMoritz>format reeks of stringly typed programming
<nalaginrut>yes, looks a bit Perl
<DerGuteMoritz>right
<janneke>what does this mean? `("%gvalue-set!" "Can't make ~a into ~a" (#<<gdk-event-type> 18b3940 key-press> #<<gvalue-class> <gdk-event>>) ())'.
<nalaginrut>DerGuteMoritz: hmm...no, I realized use list will increase complexity of this code
<nalaginrut>since there's no pattern for the cookie
<DerGuteMoritz>how do you represent a header then?
<nalaginrut>DerGuteMoritz: http://pastebin.com/KrvuyVht
<janneke>Hmm, do we need a gdk_vector_to_event ?
<nalaginrut>janneke: sorry I don't know
<nalaginrut>DerGuteMoritz: just a little redundant semicolon, push me to rewrite the whole logic? hmm...
<DerGuteMoritz>ah I see, you're using a record
<DerGuteMoritz>ok and some attributes are boolea
<DerGuteMoritz>n
<nalaginrut>yes, any approach to get rid of the last semicolon?
<nalaginrut>looks a just little problem...
<DerGuteMoritz>just a sec
<DerGuteMoritz>what's ~:{~a=~a;~}~?
<nalaginrut>nvp is name-value-pairs
<nalaginrut>so '((a 1) (b 2) (c 3)) ==> "a=1;b=2;c=3"
<nalaginrut>that's it
<DerGuteMoritz>ah
<DerGuteMoritz>understood
<nalaginrut>so I prefer 'format' way..
<nalaginrut>alright, I found string-drop-right, but looks ugly to try
<nalaginrut>if 'format' could do that, it's better
<cky>janneke: No, no vectors seem to be involved.
<cky>janneke: At least according to the error message.
<lloda>there's an escape sequence in format...
<cky>All that prints is: %gvalue-set!: Can't make #<<gdk-event-type> 18b3940 key-press> into #<<gvalue-class> <gdk-event>>
<lloda>it is ~^
<cky>Whoa. :-)
<janneke>cky: yeah, but there's no way to make a <gdk-event>
<cky>It's amazing what format can do.
<cky>janneke: Does <gdk-event-type> subclass <gdk-event>? If so, you still win.
<janneke>cky: no, an event-type is not an event
<janneke>but there's event->vector, so that's why i think we need vector->event
<nalaginrut>lloda: yes, I know, but I tried seems didn't solve the problem
<nalaginrut>lloda: I'll try it again
<lloda>(format #f "~{~{~a~^=~}~^;~}" '((a 1) (b 2) (c 3))))
<lloda>=>
<lloda>"a=1;b=2;c=3"
<nalaginrut>lloda: but it's valid when there's only a list
<nalaginrut>alright, ~^; again
<DerGuteMoritz> http://moritz.twoticketsplease.de/paste/format-free.scm.html :-P
<DerGuteMoritz>ah it's not completely format-free, hehe
<nalaginrut>lloda: thanks ,but for my situation, the result is not as expect
<nalaginrut>DerGuteMoritz: nice~I'll consider it if 'format' way is deadend
<DerGuteMoritz>nalaginrut: feel free
<DerGuteMoritz>ah note that I use string-intersperse which might be a chickenism
<DerGuteMoritz>but I'm usre there is an equivalent in guile
<nalaginrut>lloda: http://pastebin.com/QsczA0WM
<nalaginrut>DerGuteMoritz: yes, it's string-join in Guile
<DerGuteMoritz>good
<nalaginrut>lloda: it not work as expected
<lloda>here ~{~{~a~^=~}~^;~}~^;~
<lloda>you have two nested lists but three ~^ escapes
<lloda>each ~^ must be inside a ~{ ~} pair
<lloda>(I think)
<lloda>s/two nested lists/a list within a list/
<DerGuteMoritz>that's why I prefer staying out of this, it's a whole language of its own!
<nalaginrut>lloda: everything's almost right, I modified other patterns, but only the ~^ escapes in list
<nalaginrut>(format #f "Set-Cookie: ~{~{~a~^=~}~^;~}~@[Expires=~a~^;~]~@[Path=~a~^;~]~@[Domain=~a~^;~]~:[~;Secure~^;~]~:[~;HttpOnly~]" '((a 1) (b 2) (c 3)) 1 #f #f #f #f)
<nalaginrut>result is "Set-Cookie: a=1;b=2;c=3Expires=1"
<nalaginrut>if I add ~^; out of ~}, it print "...c=3;"
<nalaginrut>almost there, this is the only issue
<DerGuteMoritz>the goggles, they do nothing!!
<lloda>I'm not sure what you want
<DerGuteMoritz>(system "perl") I guess :-)
<lloda>if you want "Set-Cookie: a=1;b=2;c=3;Expires=1" just replace the ~^; escape by ;
<cky>DerGuteMoritz: "My eyes! The goggles do nothing!" :-) (apparently oft-misquoted)
<lloda>DerGuteMoritz: ;-p
<DerGuteMoritz>cky: ah thanks for canonicalizing :-)
<DerGuteMoritz>nalaginrut: for real though, this format string has way exceeded manageable complexity
<nalaginrut>lloda: I want "a=1;b=2" and "a=1;b=2;Expires=...", each result has no semicolon in the end
<nalaginrut>DerGuteMoritz: yes, but it's almost there, so I don't want to rewrite one
<DerGuteMoritz>it's super fragile, I wouldn't spot a missing semicolon at a glance in there anymore, for example
<cky>nalaginrut: Easy. Put Expires, Path, Domain, etc. into the alist too.
<DerGuteMoritz>nalaginrut: I wrote up my Scheme version in 5 minutes and it is much simpler!
<DerGuteMoritz>format is easy in the not-simple way
<cky>DerGuteMoritz: Yay for simpler. :_)
<DerGuteMoritz>cky: you mean as opposed to "more simple"? :-)
<nalaginrut>cky: but it needs to output nothing if Expires/Path/Domain... is #f
<DerGuteMoritz>filter-map
<lloda>yup
<lloda>put all the a=b in the same list, including Expires, Path, everything
<lloda>then use the simple ~{~{~a~^=~}~^;~} format.
<DerGuteMoritz>well
<nalaginrut>trying...
<nalaginrut>and filter-map?
<DerGuteMoritz>then you can just map and use string-join to begin with :-P
<civodul>'lo Guilers!
<DerGuteMoritz>nalaginrut: see my implementation, it combines filter-map with append-map
<nalaginrut>heya civodul
<DerGuteMoritz>which gives you a list of "foo=bar" strings
<DerGuteMoritz>which you can then join with ","
<DerGuteMoritz>";"
<nalaginrut>DerGuteMoritz: hmm...I have to say farewell to my six-lines implementation huh?
<nalaginrut>besides, the cookie is not all name-value pair, how about Secure and HttpOnly
<DerGuteMoritz>nalaginrut: I handle that with boolean?
<DerGuteMoritz>nalaginrut: 12 lines of simple code are preferable to 6 lines of complex code IMHO
<DerGuteMoritz>but it's yours to choose (and maintain)
<lloda>format is only good for highly structured stuff
<lloda> ~{~{~a~^=~}~^;~} looks reasonable to me
<lloda>but if you have to start branching and such, then clearly no
<nalaginrut>lloda: but it won't add ';' if there's still things appended to it
<DerGuteMoritz>I find even that one too hard to grok
<DerGuteMoritz>but that might be my unfamiliarity with the format language
<DerGuteMoritz>the thing to note is that format strings are a whole separate language embedded in Scheme
<nalaginrut>even worse, our format has low efficient according to my bug-report before...
<DerGuteMoritz>another indicator that you should limit its use to very simple cases
<civodul>Shinn's 'fmt' FTW
<nalaginrut>oh~guys...I just want to drop the ended semicolon...
<DerGuteMoritz>yeah that one is good, too
<DerGuteMoritz>nalaginrut: in your format based approach you're conflating normalization / transformation of the data with serialization
*nalaginrut rewriting with list handling..
<DerGuteMoritz>if you first transform and normalize your data, serialization is simple
<DerGuteMoritz>separating these things makes for simple code, not separating them may make for shorter (and thus seemingly "easier") but certainly more complex code
<DerGuteMoritz>check this talk: http://www.infoq.com/presentations/Simple-Made-Easy-QCon-London-2012 :-)
<DerGuteMoritz>ok got to leave for a bit, ttyl
<nalaginrut>DerGuteMoritz: alas, your implementation can't handle "Secure" which is not a pair
<DerGuteMoritz>nalaginrut: it should
<DerGuteMoritz>try it
<DerGuteMoritz>I assume cookie-secure returns a boolean
<DerGuteMoritz>is that right?
<nalaginrut>DerGuteMoritz: alright~it's OK now
<nalaginrut>DerGuteMoritz: thanks for that~I'll write test cases later~
<cky>DerGuteMoritz: No, I mean that I like that you have a simpler way. :-)
<DerGuteMoritz>nalaginrut: so it works as expected?
<DerGuteMoritz>cky: ah :-)
<nalaginrut>DerGuteMoritz: it appears so, that's why I have to write test-cases
<DerGuteMoritz>k
<DerGuteMoritz>the nvp function takes care of handling non-pairs like that
<nalaginrut>DerGuteMoritz: I like nvp function ;-D
<DerGuteMoritz>:-)
<fbs>o/
<nalaginrut_>is there any XMPP lib?
<nalaginrut_>or parser
***nalaginrut_ is now known as nalaginrut
<ijp>xmpp is just xml, isn't it?
<civodul>yep
<DerGuteMoritz>now you have two problems
<DerGuteMoritz>:-D
<ijp>nah, xml isn't a problem when you have sxml
<DerGuteMoritz>+1
<DerGuteMoritz>well when namespaces enter the mix, maybe you still do
<DerGuteMoritz>which I think is the case with XMPP
<nalaginrut>well, so there's no...
<DerGuteMoritz>s,you still do,it still is,
<DerGuteMoritz> https://github.com/zzkt/gibberish
<nalaginrut>anyway, I love SXML
<nalaginrut>and I wish there's markdown->sxml (praying...)
<DerGuteMoritz>there is in lowdown
<DerGuteMoritz>porting it to guile is probably some work though :-/
<nalaginrut>DerGuteMoritz: ah~nice, that's what I want~
<nalaginrut>DerGuteMoritz: and how about markdown?
<ijp>the scheme community has wasted so much time porting code from other schemes
<DerGuteMoritz>nalaginrut: lowdown is the name of the markdown parser implementation
<nalaginrut>ijp: yup, why not RnRS compatible
<DerGuteMoritz>yeah I hope R7RS adoption will be broader than R6RS
<nalaginrut>DerGuteMoritz: ok~
<DerGuteMoritz>what's guile's take on that?
<DerGuteMoritz>nalaginrut: find the code here: https://bitbucket.org/DerGuteMoritz/lowdown
<nalaginrut>DerGuteMoritz: well, I'm still not sure about r7rs in guile
<nalaginrut>maybe mark knows
<nalaginrut>IIRC it's in his TODO
<DerGuteMoritz>no defintive plans, yet?
<DerGuteMoritz>good, good
<DerGuteMoritz>:-)
<nalaginrut>DerGuteMoritz: there're some work listed in mark's TODO, but I don't know if it's all
<ijp>I have little confidence in broad r7rs adoption (by users, not implementations)
<nalaginrut>r7rs is completed?
<nalaginrut>I haven't checked out for it
<nalaginrut>well, I like R5RS way, cleaner, but lack of powerful
<nalaginrut>hmm...powerful is personal view ;-)
<DerGuteMoritz>nalaginrut: the "small" version is about to be ratified AFAIK
<ijp>"large" is expected sometime 2030
<DerGuteMoritz>:-D
<nalaginrut>ijp: porting maybe another heavy work for guildhall ;-|
<nalaginrut>but worthy
<ijp>dorodango is portable r6rs
<nalaginrut>ijp: I mean packages porting, I know guildhall itself is r6rs
<nalaginrut>DerGuteMoritz: oh~you didn't write it with PEG, no?
<ijp>anyway, I have no intention of touching r7rs in the near to mid term future
<DerGuteMoritz>nalaginrut: parser combinators
<ijp>I can (and do) write code that runs on multiple Schemes.
<nalaginrut>I'll stick to r5rs
<ijp>nalaginrut: so you don't intend to use any files?
<ijp>because I can list you all the ways that isn't r5rs portable
<nalaginrut>ijp: POSIX+r5rs ;-)
<nalaginrut>ijp: but r6rs is so complicated
<ijp>bull
<ijp>most of it is just the paperwork the r5rs left out
<nalaginrut>hmm...
<ijp>of course, I don't expect to convince you, since you've already made up your mind
<nalaginrut>ijp: why do you think I can't use any files
<nalaginrut>IMO, r5rs work with most of the common things, except network or stat
<nalaginrut>of course, accompany with srfi
<ijp>oh, you can use files, but 1) it is unspecified what with-input-from-file/call-with-input-file do when the file does not exist. 2) it is unspecified what with-output-to-file/call-with-output-file do when the file does not exist 3) you are not guaranteed that read-char will be able to read any particular character from said file
<ijp>you cannot test if a file exists; you can't flush (so there goes networking even if networking was exposed via a file on your os)
<nalaginrut>hmm...I thought file-exists is r5rs
<ijp>in short. You can absolutely use files, but it would be irresponsible to
<ijp>nalaginrut: which would be susceptible to race conditions anyway
<ijp>of course, binary IO is out of the question
<nalaginrut>does r7rs different with r6?
<nalaginrut>I mean very different
<tupi``>hello guilers. since i did ask, the answer to the texinfo quiz i made yesterday is to use @/, for example: @set UGUILE http://www.gnu.org/@/software/guile et voilà :)
<ijp>in short, unspecified behaviour is the devil
<ijp>or it would be, if Schemers deigned to use more than one implementation
<ijp>so we sit here, waiting for r7rs to get things perfect, and when it doesn't, we'll have a hue and cry and demand r8rs
<nalaginrut>ijp: oh~I see, doom day is coming soon!
*nalaginrut scared...
<ijp>nah, the precendent with r6rs is that it gets a few years and if only seven or eight implementations adopt it, it's a failure
<ijp>so we have till at least 2015
<nalaginrut>even Guile doesn't adopt it totally
<ijp>nalaginrut: a huge number of implementations don't support r5rs totally
<DerGuteMoritz>wasn't the problem with R6 mainly that it wasn't built on consensus?
<nalaginrut>ijp: yeah~that means almost all Scheme implementations don't follow the standard~
<nalaginrut>frankly, I don't like r6rs lib interface at all
<ijp>the r7rs wasn't being done by concensus
<nalaginrut>well, take easy, there's no any standard done by consensus
<nalaginrut>it's an art of trade-off
<ijp>right, and schemers hate trade offs
<ijp>anyway, enough ranting for one day
*nalaginrut go for supper
<DerGuteMoritz>ijp: what I mean is http://www.r6rs.org/ratification/results.html
<ijp>DerGuteMoritz: it's not like the ratification process was a surprise, it was known beforehand
<ijp>
<ijp>If you agree on 2/3 beforehand, its sour grapes to then moan it wasn't a consensus.
<ijp>or whatever the agreed upon number was
<DerGuteMoritz>60%
<DerGuteMoritz>who chose that ratification process though? AFAIK before R6RS it had to be unanimous
<ijp>good question, I would need to go look it up
<ijp>but unanimous doesn't mean necessarily mean everyone who voted for it liked it
<ijp>c.f. multiple values
<DerGuteMoritz>yeah, but it is more like "I can live with the tradeoffs for the greater good of having a common standard"
<ijp>huh, interesting that tom lord voted for the r6rs, given his opinions...
<DerGuteMoritz>heh
<ijp>anyway, what really bothers me, even now, is that the effort was squandered come r7rs
<ijp>I am not even convinced all the people on the r7rs committee have even read the r6rs
*DerGuteMoritz is reading http://lists.scheme-reports.org/pipermail/scheme-reports/2011-May/001077.html
<ijp>yes, foof is one of the exceptions
<ijp>but the whole split into two was inherently problematic, since it basically gave a license not to make hard decisions
<ijp>this is why I gave jcowan such a hard time round about the fourth draft regarding exceptions
<ijp>and I _hate_ that they want to make large be a pic'n'mix
*ijp mumbles about unspecified behaviour some more
<DerGuteMoritz>thanks for your efforts ijp
<DerGuteMoritz>I as a mere user really appreciate the time and nerve you guys put in there
<ijp>I honestly don't know how scheme has survived to be almost 40
<DerGuteMoritz>heh
<DerGuteMoritz>it's very different from how other language standards are managed it seems
<DerGuteMoritz>so I think that's why it's worth keeping it that way in itself
<ijp>standards are wierd things
<DerGuteMoritz>if anything, the scheme-reports archive makes for some exiciting debate! :-)
<nalaginrut>DerGuteMoritz: does scheme-reports discuss by any Schemer?
<DerGuteMoritz>what
<nalaginrut>is it a closed discussion?
<nalaginrut>hmm...seems no
*nalaginrut never subscribed the mail-list of rnrs
<proxhotdog>sometimes I saw people in IRC channel can reply some user by quoting their name in the message, how to do this?
<DerGuteMoritz>proxhotdog: usually you type the first character of the name you want to address and then hit TAB (in most clients)
<proxhotdog>DerGuteMoritz: like this?
<ijp>you can also just type it in by hand, if you're not into the whole "tab completion" thing
<DerGuteMoritz>proxhotdog: yep
<DerGuteMoritz>right, what ijp said
<DerGuteMoritz>it's merely a convention
<nalaginrut>hmm...the small language still suspended huh?
<nalaginrut>anyone can open http://trac.sacrideo.us/wg/ ?
<nalaginrut>DerGuteMoritz: are your blog based on any Scheme thing?
<DerGuteMoritz>nalaginrut: yep
<nalaginrut>oh~really?
<DerGuteMoritz>also based on Hyde but I think I didn't put my blog's code online
<nalaginrut>hmm...hyde the python?
<DerGuteMoritz>no the chicken
<DerGuteMoritz>didn't we talk about it the other day? or was that somebody else?
<nalaginrut>DerGuteMoritz: yes~just kidding
<civodul>"the python? - no the chicken" :-)
<nalaginrut>DerGuteMoritz: but surprisingly, I think your blog has very similar style with python hyde main-site
<nalaginrut>the color style
<nalaginrut>that's why I asked so ;-P
<DerGuteMoritz>nalaginrut: wait where did you find my blog? :-D
<nalaginrut>scheme planet
<nalaginrut> http://www.scheme.dk/planet/
<DerGuteMoritz>oh, I wasn't aware that I'm listed there
<DerGuteMoritz>or I forgot heh
<DerGuteMoritz>well the color theme is based on zenburn
<nalaginrut>oh~how complex connection ;-)
<nalaginrut>anyway, I want to build a perfect blog for myself, that's why I'm busy these days...
<nalaginrut>and I want to build it in all scheme way
<bitdiddle>nalaginrut: you might want to look at tekuti, it's very usable
<DerGuteMoritz>I commend this approach
<nalaginrut>bitdiddle: yes, I'm following tekuti way
<nalaginrut>how to get second from the result of strptime?
<nalaginrut>ok, I see, it's wrong way, I need parse-date
<civodul>hmm, where are mark_weaver & wingo?
<DerGuteMoritz>wingo timed out half an hour ago
<civodul>ok
<civodul>time for 2.0.8?
<DerGuteMoritz>I say yes!
<civodul>:-)
<davexunit>yay!
<stis>tjohooo
<ijp>*grumble* I wish people wouldn't link to the one page version of the manual *grumble*
<civodul>yeah, it tends to kill w3m
*civodul starts builds on SPARC & HP-PA
*ijp pretends he has heard of HP-PA
<civodul>:-)
<civodul>a fringe RISC CPU
<civodul>i've never interacted with such a machine phisically
<civodul>*physically
<ijp>according to wikipedia, this is the last year HP will support PA-RISC servers
<civodul>oh, too bad ;-)
<civodul>i found a mips64 to test on, for dsmith ;-)
*civodul goes for dinner
<civodul>i hope i'll be able to reconnect, because the connection is very sloppy here
<dsmith-work>civodul: I've basically given up on my mips box.
<mark_weaver>hi folks!
<dsmith-work>Though the weirdness started when I upgraded etch -> wheezy
<dsmith-work>Greetin's mark_weaver
<mark_weaver>civodul: in case you haven't yet seen my email, I think 2.0.8 is ready!
*dsmith-work will probably order a raspberry pi today
<mark_weaver>cool!
<dsmith-work>Yey!
<davexunit>dsmith-work: I got one recently. it's a neat little thing.
<ijp>I keep thinking about getting one, but I have no idea what I'd actually do with it :/
<dsmith-work>davexunit: How much was shipping?
<mark_weaver>dsmith-work: don't forget to get an SD card and a power supply.
<davexunit>and now I have an idea: guile library for gpio
<dsmith-work>ijp: Mine will be home for sneek
<davexunit>dsmith-work: element14 screwed me on shipping. they shipped my pi in one box and the rest of the stuff in another, then charged my nearly $20
<mark_weaver>davexunit: btw, I vaguely remember you wanting something to handle keyword arguments from C. 2.0.8 will have nice support for that.
<dsmith-work>Yeah. They always get you on shipping.
<davexunit>mark_weaver: oooh neat! I'm currently using some undocumented function to do that.
<mark_weaver>davexunit: see http://git.savannah.gnu.org/gitweb/?p=guile.git;a=commitdiff;h=a16d4e82e949954805bf2cd42cfbb519fcf4012d
***17WABEPVC is now known as cordawyn
<dsmith-work>I've been messing about building guitar amps, and ordering parts is always a pain with shipping. I need this .35 diode and need to spend $10 to ship. Bah!
<davexunit>yuck
<mark_weaver>dsmith-work: yeah, it really pays to find everything you might possibly need, and get it all in one order :)
*dsmith-work nods
<davexunit>I went to microcenter (us electronics store) for the first time last weekend, and they had all sorts of neat stuff like breadboards and raspberry pi kits.
<dsmith-work>Oh?
<dsmith-work>Verrry Interesting
<davexunit>I'm not used to seeing physical electronics stores with neat things anymore.
<davexunit>and the prices were comparable to buying online too.
<mark_weaver>some radio shacks also still have small parts like diodes, resistors, capacitors, transistors, voltage regulators, etc.
<mark_weaver>of course I prefer to buy online, but as you say that shipping can kill you if the order isn't big enough.
<mario-goulart>dsmith-work: I used to do that too.
<davexunit>I haven't done much work with electronics, but I've never gone to a radio shack and found what I wanted.
<davexunit>mark_weaver: scm_c_bind_keyword_arguments looks great!
<mario-goulart>I wish I were brave enough to play with tube amps.
<dsmith-work>$39 5 in stock.
<mark_weaver>20 years ago radio shack (or at least the ones near me) actually had a pretty decent selection of electronic components. not so much anymore, but the ones near MIT still have some things.
<dsmith-work>yes
<ijp>hmm, odd. We seem to be accruing chicken users
<dsmith-work>I still have some 4000 series cmos ICs I got from RS.
<ijp>madness I tells ya
<mario-goulart>odd?
<fbs>i get all my parts from digikey :>
<davexunit>mark_weaver: seems to be nicer to use tan scm_get_keyword as well.
<mark_weaver>davexunit: and better error reporting.
<dsmith-work>fbs: Yeah, digikey is great.
<davexunit>s/tan/than/
<davexunit>mark_weaver: many thanks to you
<fbs>usa -> nl <72h after order
<mark_weaver>No problem. I had an ulterior motive :)
*dsmith-work remembers when the digikey catalog used staples
<davexunit>mark_weaver: but of course
<mark_weaver>namely that I needed it to do this: http://git.savannah.gnu.org/gitweb/?p=guile.git;a=commit;h=3ace9a8e4e1de7082ceec4aea0813a6adaa913bf
<davexunit>the particle struct in my project has a lot of properties, so using keyword arguments lets me only set the properties I want when emitting particles.
<dsmith-work>mark_weaver: Nice.
<davexunit>scm_get_keyword had an argument for the default value, but it looks like now I should use the SCM_UNBNDP macro?
<mark_weaver>davexunit: or set the variable to the default value before calling scm_c_bind_keyword_arguments.
<mark_weaver>either way is fine.
<mark_weaver>but if you use SCM_UNBNDP, remember to set the variable to SCM_UNDEFINED before calling scm_c_bind_keyword_arguments.
<davexunit>ah, the variable won't be overwrriten by scm_c_bind_keyword_arguments? neat.
<mark_weaver>right
<davexunit>I'll initialize them with defaults then. much cleaner.
<mark_weaver>yeah, I think that's usually the best way, unless the default value is expensive to compute.
<mark_weaver>civodul: I updated THANKS.
<davexunit>yeah. my defaults are mostly integers or short lists.
<mark_weaver>it might be worth using the SCM_UNDEFINED and SCM_UNBNDP thing for the short lists.
<davexunit>it's just:
<davexunit>SCM scale = scm_get_keyword (kw_scale, kwargs,
<davexunit> scm_list_2 (scm_from_int (1), scm_from_int (1)));
<mark_weaver>it's probably not a big deal either way.
<davexunit>okay
<mark_weaver>it really depends on how quick this procedure is. if it already does a bunch of allocations, then two more cons cells is hardly noticeable.
<mark_weaver>if it's a very minimal procedure, then maybe the two extra cons cells will be noticed. dunno.
<davexunit>it might be worth it to only do assignment afterwards since it's a function that will be called a ton.
<mark_weaver>if you never mutate that 'scale' list, then you could also create it during initialization, and use the same one every time.
<davexunit>that's very true.
<davexunit>I like that idea the best.
<mark_weaver>that's the best of both worlds.
<davexunit>will reduce gc potentially as well.
<mark_weaver>yep
<davexunit>which is my biggest goal.
<davexunit>I've thought about how to best leverage guile as an awesome scheme implementation while still having a usable game library.
<davexunit>I'm going back and writing a very small C library that will just handle collision detection and particle simulation.
<davexunit>and everything else can be pure guile.
<mark_weaver>sounds reasonable
<mark_weaver>if you could use integer math, that would help a lot.
<davexunit>I've ditched tons of C code so far.
<davexunit>yeah
<davexunit>that is a bit trickier to achieve
<mark_weaver>it'll also help a lot when we have a compiler that can deal with unboxed floating-point numbers.
<davexunit>yeah if that were to happen I could perhaps eliminate the C library entirely.
<davexunit>the C library gives me a place to crunch numbers very efficiently.
<mark_weaver>Yeah, I suspect that future Guile will allow you to ditch C entirely, but it'll probably be at least another year, maybe two, before we're there.
<mark_weaver>davexunit: makes sense. I appreciate your efforts. You are a brave soul!
<davexunit>I haven't had much time to hack lately, but I have not only my personal bullet-hell specific game library in the works, but a guile binding for Allegro 5 as well.
<davexunit>which could perhaps encourage others to write a game with guile :)
<davexunit>especially with figl to use raw opengl calls.
<ijp>mark_weaver: did you get guile running on your pi?
<mark_weaver>I'd think that building on top of guile-figl is the most promising idea.
<wingo>evening
<mark_weaver>ijp: "apt-get install guile-2.0" :)
<davexunit>mark_weaver: allegro provides neat stuff like window management, font loading, image loading, sound loading and playing, it uses opengl for rendering under the hood so you can use any opengl stuff with it that you want. :)
<mark_weaver>hi wingo!
<mark_weaver>wingo: I took care of updating THANKS.
<ijp>ah, no special tweaking required
<wingo>mark_weaver: ah great, thanks!
<mark_weaver>ijp: it's running Debian testing.
<mark_weaver>although its a custom port optimized for the specific ARM processor in the Raspberry Pi. It's called "Raspbian"
<mark_weaver>wingo: np :)
<davexunit>I need to install guile on my pi
<davexunit>the raspberry pi people promote python a lot. it's right on the xfce desktop when you start it up.
<davexunit>python has a gpio library. does guile? might be a fun thing for someone to make. :)
<mark_weaver>davexunit: based on our past conversations, it sounds like the impedance mismatch between Scheme data and Allegra C data types is painful, as well as the issues regarding garbage collection, etc.
<mark_weaver>davexunit: but admittedly, I haven't looked closely at the issues.
<davexunit>mark_weaver: using the ffi has been much more pleasant
<mark_weaver>davexunit: it seems like it would be much more promising to write a new game library on top of guile-figl, guile-gstreamer, etc.
<davexunit>a lot of the headache that I ran into came from my own code.
<davexunit>mark_weaver: oh okay, I get you. yeah that would be very cool too.
*davexunit puts that on to-look-into list
<mark_weaver>hehe
<davexunit>it would be like pyglet for python.
<davexunit>I agree that would be excellent.
<mark_weaver>admittedly it is more work, but I suspect the results would be much nicer.
<davexunit>I think so too.
<davexunit>looks like I have a new forever project :P
<mark_weaver>haha
<mark_weaver>My interest in being able to write games in Guile is mostly for education. I'm interested in teaching kids to program from a relatively young age, and it seems like writing games would be a good way to get them motivated.
<mark_weaver>this approach I'm suggesting would not perform competitively until we have a better compiler, so it would require a willingness to accept lower performance in the short term. but I think in a couple of years it could be awesome.
<ijp>I'm not particularly interested in games, but I did preorder the "Realm of Racket" by the "Land of Lisp" guy
<mark_weaver>ijp: ha. I hadn't heard of that. funny video.
<mark_weaver>*videos
<taylanub>Is our module system somehow language-agnostic, or tied to Scheme ?
<ijp>yes
<taylanub>:D
<mark_weaver>it's language-agnostic
<taylanub>I wonder how other languages could make use of it, then. Hrm, I should read the modules section of the API section of the manual.
<mark_weaver>what problem do you see?
<ijp>there are vm instructions for referencing/setting module level variables
<ijp>mark_weaver: well, you need to filter macros for a start :P
<taylanub>I just can't imagine how I could use modules in e.g. Elisp. Is it a matter of defining a couple syntax forms ?
<mark_weaver>ijp: I don't see that as having to do with the module system.
<mark_weaver>ijp: I could just as easily say: you need to filter out any procedure that accept or return scheme-specific types.
<mark_weaver>*procedures
<ijp>I suppose
<civodul>hey hey!
<civodul>hey mark_weaver
<mark_weaver>taylanub: elisp doesn't support modules. so first, you'd need to design a module system for elisp.
<mark_weaver>civodul: hi civodul!
<civodul>i've seen your notes :-)
<taylanub>Oh I see.
<ijp>taylanub: right now, you can access guile procedures directly from elisp via the guile-ref form
<taylanub>Aha.
<mark_weaver>civodul: I'm still uncertain of how best to order things. It's hard to be objective about such things.
<civodul>maybe wingo has an idea?
<wingo>hello!
<mark_weaver>I'm sure wingo would do an awesome job. he has a knack for writing. but I also know that he's very busy these days.
<wingo>what's the question? :)
<civodul>how are you? :-)
<wingo>i'm great :0
<wingo>:)
<wingo>& yourself? :)
<civodul>thanks!
<civodul>;-)
<civodul>good, good
<civodul>i'm in Biglooland
<wingo>hehe
<civodul>can you imagine?
<civodul>making a Guile release from Biglooland...
<wingo>i'm in c++land, biglooland sounds like an improvement ;)
<civodul>heh :-)
<civodul>WebKit?
<wingo>i have some hours now if something needs doing
<mark_weaver>wingo: well, the NEWS could probably go out as is, but if you had time to work your magic on it, you could probably improve the presentation and ordering.
<civodul>NEWS, basically, if you feel like doing some cleanup
<wingo>ok i'll take a look
<mark_weaver>wingo: I'm pretty sure everything is in there, anyway.
<wingo>i'm sure it's fine but i'll stir the bits around anyway :)
<civodul>:-)
<mark_weaver>cool, thanks much :)
*civodul reports success on hppa2.0-unknown-linux-gnu
<mark_weaver>excellent!
<mark_weaver>In "Lluís Batlle i Rossell", is "Rossell" the surname?
*mark_weaver wonders how to line it up in THANKS.
<ijp>civodul: great, now I wonder if any one actually take advantage of it :)
<wingo>mark_weaver: "battle i rossell"
<wingo>er
<wingo>batlle
<wingo>mark_weaver: "batlle i rossell", is what i meant to say
<civodul>yes, Lluís is the first name
<wingo>living in catalunya has thus solved this practical issue
<wingo>mission accomplished
<mark_weaver>ah, thanks!
<mark_weaver>ugh, well fixed now. more commits than I'd like, but that's what happens when you rush :-/
<wingo>so i still get that net-db failure
<wingo>haven't been following things too closely; sorry about that
<wingo>unexpected error code: -11 "System error"
<wingo>FAIL: net-db.test: getaddrinfo: no name
<wingo>that one
<wingo>mark_weaver: do you think a global THANKS file makes sense?
<wingo>it seems to me to make more sense to put it in the NEWS; though dunno
<mark_weaver>I'm not sure. I think it can't hurt, and probably helps provide motivation.
<mark_weaver>I suspect that some people find it very gratifying to be added there.
<wingo>oh recognition is great
<wingo>definitely +1 to that
<wingo>but it's tough to maintain a one document that recognizes people, and is difficult to put contributions in context
<wingo>whereas if they were in a NEWS entry associated with a particular release, it would give more information
<mark_weaver>we should probably give thanks in both places.
<wingo>and be easier to maintain
<wingo>probably, yes
<wingo>i am thinking we should trim our AC_CHECK_FUNCS at some point, given that many of the functions we check for have gnulib replacements, some of which we actually use
<civodul>wingo: does your net-db.test failure have a connection with the bug report about that?
<mark_weaver>my autofoo is weak, but certainly if we could remove unneeded tests that would be good.
<wingo>civodul: it's probably a libc bug i guess
<wingo>2.17-0experimental2, heh
<civodul>i have 2.17 too
<wingo>well, i'll ignore it for now...
<wingo>it's related to the mdns foo we talked about
<cordawyn>hello, all!
<wingo>hello cordawyn :)
<civodul>wingo: you should send the bug report to Poettering :-)
<mark_weaver>hi cordawyn!
<wingo>hehe
<cordawyn>thought I'd ask a couple of questions, as usual ;-)
<wingo>not sure who works on avahi these days
<mark_weaver>cordawyn: sure, what's up?
<cordawyn>I'm trying to get a few packages into guildhall, progressing quite smoothly
<cordawyn>guile-dbi and guile-dbd-* ones, to be precise
<cordawyn>as they're Guile bindings to C, I guess I'll have to deal with "needs-source?" hook
<mark_weaver>cordawyn: do those include C code? guildhall can only cope with pure scheme libraries, I'm afraid. at least for now.
<cordawyn>ah, I see now ;)
<mark_weaver>with the dynamic
<mark_weaver>with the dynamic FFI in Guile 2.0.x, it is possible to writing bindings in pure scheme, but I guess guile-dbi predates that.
<mark_weaver>*write
<cordawyn>hmm
<ijp>the correct response would be for me to figure out that part of guildhall, and document it
<cordawyn>perhaps I'll have to tweak guile-dbi to use FFI instead
<cordawyn>ok, so what is that "needs-source?" hook made for?
<mark_weaver>cordawyn: sounds more like a new project than a tweak.
<mark_weaver>but a good idea nonetheless.
<cordawyn>mark_weaver: ok, "a new project" then ;)
<mark_weaver>sounds great!
<cordawyn>unless there's another lib for connecting to the DBs?
<cordawyn>well, I saw several ones, but they do not provide a uniform API, as DBI does
<cordawyn>ijp: about "needs-source?" hook... :)
<mark_weaver>cordawyn: if you make a new project, please consider allowing the use of an s-expression syntax for SQL, instead of strings. I haven't looked closely at it, but maybe something like this: http://www.more-magic.net/posts/lispy-dsl-ssql.html
<cordawyn>mark_weaver: ok, that sounds reasonable, I'll aim for that
<mark_weaver>that way, users can use quasiquote for templates, and not have to worry about nasty details like escaping strings.
<davexunit>learning about quasiquote was one of the coolest things.
<wingo>civodul: i have a patch to remove some configure.ac AC_CHECK_FUNCS checks
<cordawyn>I see they're looking at ActiveRecord for comparison... perhaps there's AREL clone in the Guile world?
<wingo>not very many in the end
<wingo>should I wait until after the release? probably so, no?
<mark_weaver>wingo: IMO, that should wait until after the release.
<ijp>cordawyn: I'm told there is a relational db in slib, but I don't know if it has a relational algebra api, or a sqlish one
<wingo>the checks I removed were for select, pipe, times, and strftime
<wingo>allowed us to actually use times from gnulib in the stime.c
<cordawyn>mark_weaver, ijp: thanks for the tips, I guess I've had enough for today ;) need time to think it over
<civodul>wingo: go ahead, but be careful ;-)
<mark_weaver>wingo: does the removal improve anything other than reducing the time needed to run ./configure?
<mark_weaver>well, if civodul thinks it's okay, that's good enough for me.
<wingo>mark_weaver: it does; it is equivalent to defining HAVE_TIMES to 1 in stime.c
<civodul>and what will happen then?
<civodul>(i just built libguile on NetBSD and it went fine)
<mark_weaver>oh, I see. so even though gnulib has stimes, we failed to use it?
<mark_weaver>s/stimes/times/
<wingo>mark_weaver: right, because HAVE_TIMES was 0 even though gnulib provided a copy
<civodul>ah ok
<wingo>so we fell back on some other interfaces
<civodul>makes sense then
<mark_weaver>wingo: ah, okay. hmm.
<mark_weaver>that certainly sounds like a compelling change.
<mark_weaver>given the amount of last-minute stuff I crammed into this release, it would be hypocritical of me to argue :)
<wingo>that's not a good argument ;)
<wingo>i'll push that patch now and let hydra have a go at it
<mark_weaver>civodul: hydra builds only on nixos, right?
<mark_weaver>well, nix I mean.
<mark_weaver>it's not quite the same as users testing builds in a more typical environment, is what I mean.
<mark_weaver>I'm not particularly worried about this AC_CHECK_FUNCS thing. It's probably fine, but I'm still curious about hydra.
<civodul>mark_weaver: yes
<civodul>well it uses Nix and its layout, but that's normally not significant
<wingo>uf
<wingo>i think my last patch wasn't quite correct...
<mark_weaver>the layout probably isn't significant, but if it's using mostly libraries that were compiled with nix, that's different than using libraries that users got from their distro.
<civodul>but distros are insignificant ;-)
<mark_weaver>I guess my point is that while I'm very glad to have hydra, and it tests some diversity in kernels and C libraries(?), I guess it is mostly monoculture above that.
<mark_weaver>gotta go afk for a while, ttyl!
<civodul>well yeah, i see what you mean
<taylanub>Is it valid, in a file, to define a function then use it in a procedural macro ? In the REPL, it works line-by-line but not in a (let () ...).
<civodul>hmm segfault in foreign.test on NetBSD
<taylanub>(OK, tested it. Invalid.)
*civodul reports 1 failure on GNU/Hurd: FAIL: time.test: internal-time-units-per-second: versus times and sleep
<civodul>that's before your patch, wingo, so it could be related
<wingo>yeah sorry about that
<civodul>wingo: are you done, BTW?
<wingo>civodul: let me upload a NEWS patch
<wingo>apologies for the delay, had something come up here..
<civodul>no problem, i was waiting for builds to complete
<civodul>20 failures on x86_64-unknown-netbsd5.1, mostly i18n-related
<civodul>i guess i won't fix it this time
<civodul>but it's actually better than i expected
<wingo>civodul: ok, uploaded NEWS patch
<civodul>thanks!
<wingo>np
<wingo>thanks much to you and mark for handling the latter part of this release
*civodul takes the lock on the repo
<taylanub>(On correction, what I said above fails to compile, although it works on uncompiled code.)
<wingo>taylanub: there is a section in the manual about this point
<wingo>"Eval When"
<wingo>6.10.8
<taylanub>Indeed, I went through it actually, I guess I needed to experience it!
<wingo>Unpacking objects: 100% (16/16), done.
<wingo>From git.sv.gnu.org:/srv/git/guile
<wingo> 14f2e47..47ad34f stable-2.0 -> origin/stable-2.0
<wingo> * [new tag] v2.0.8 -> v2.0.8
<wingo>woo :)
<civodul>:-)
<ijp>doing it tonight? or leaving it till the morning?
<civodul>ijp: it's done, but the announcements will be sent tomorrow morning
<civodul>to maximize the impact, at least for Europe & co.
<civodul>:-)
<mark_weaver>civodul: yay!
<civodul>hurrah!
<civodul>BTW you can test the tarball, just in case
<dsmith-work>Yey!!
<ijp>perhaps I've not been paying enough attention, but does stis usually write code like he does in the "Fun with guile"?
<dsmith-work>See "Inlinable Procedures" in the manual, for more.
<dsmith-work>
<dsmith-work>More what?
<dsmith-work>** `(ice-9 binary-ports)': XXX, in the manual
<dsmith-work>The NEWS looks funny.
<dsmith-work>The top section of changes is:
<dsmith-work>Changes in 2.0.1 (since 2.0.0):
<dsmith-work>Odd
<mark_weaver>civodul: I just tried to build the tarball. during configure, I got: ./configure: line 50334: ./guile-readline/LIBGUILEREADLINE-VERSION: No such file or directory
<dsmith-work> git describe
<dsmith-work>v2.0.0-217-gbeb958d
<dsmith-work>
<dsmith-work>Is that right?
<fangism>do I smell release 2.0.8?
<dsmith-work>Doh!
<dsmith-work>(I was on a branch)
<civodul>mark_weaver: hmm!
<civodul>mark_weaver: i have it too, grrrr
<dsmith-work>(nevermind)
<mark_weaver>civodul, wingo: also, it looks like wingo's 'times' changes broken the mingw build on hydra
<dsmith-work>$ git describe
<dsmith-work>v2.0.8
<dsmith-work>
<dsmith-work>Whew
<mark_weaver>civodul: see http://hydra.nixos.org/build/4715389/log
<mark_weaver>../../guile-2.0.7.335-40e2a-dirty/libguile/stime.c:178:14: error: storage size of 'time_buffer' isn't known
<civodul>nice