IRC channel logs

2013-05-03.log

back to list of logs

<cordawyn>so... could anyone recommend a debugging tool to step through the code (esp. unfolding macros)? I read the info on debugging Guile, but is that all that Guile has available? ;)
<ijp>the best answer I can give you is, use racket :(
<ijp>their macro stepper is all sorts of awesome
<cordawyn>I sworn my allegiance to Guile... for now
<cordawyn>so, I'd like to stay with it, "until death do us part" :)
<cordawyn>it's just hand-stepping through those huge macro heaps in foof-loop is so... tiresome
<cordawyn>for a newbie like me, at least
<cordawyn>(or rather "mind-stepping ;)
<ijp>cps macros are teh suck
***fangism is now known as fangism-vacation
***Gues_____ is now known as Guest29720
<nalaginrut>morning guilers~
***Gues_____ is now known as Guest69356
<CaptainLex>I saw once someone recommend an editing environment for Guile here
<ft>emacs with paredit and geiser?
<Nafai>I still haven't taken the time to learn paredit :(
<davexunit>emacs + geiser works too (paredit is awesome but you can get by without it)
<mark_weaver>CaptainLex: emacs + geiser is highly recommended. paredit is a bit painful until you learn to use it properly, but I recommend taking the time to learn it at some point. it's well worth the effort.
<davexunit>I know a bit of paredit, but not enough to not get in weird situations where paredit refuses to delete a lone "
<mark_weaver>you can always delete lone parens or double quotes using C-w
<mark_weaver>but once you learn to use it properly, you will rarely need that, because you'll never insert unmatched quotes or parens in the first place.
<mark_weaver>you can also add unmatched parens or quotes by copying one and then pasting it with C-y. and also remember that M-x paredit-mode will toggle the mode, so you can always get out temporarily or permanently if you need to.
<mark_weaver>at this point, I can hardly remember how I lived without paredit. it has revolutionized by scheme editing.
<mark_weaver>s/by/my/
<davexunit>yeah I've done selections + C-w to fix things.
<davexunit>just want to get to the point where that stuff doesn't happen
<mark_weaver>the main way to avoid getting in that situation is to avoid using C-w to delete unmatched parens or quotes. the easiest way is to use C-k to delete most things. if you must use C-w, then use the sexp-moving commands like C-M-f and C-M-b to make sure the region has no unmatched parens.
<ijp>rather than pasting a lone one, just C-q )
<ijp>it's what C-q is for after all
<mark_weaver>ijp: ah, that is indeed nicer :)
<davexunit>ijp: ah yes C-q
<davexunit>thanks
<cordawyn>hello!
<mark_weaver>hi cordawyn!
<cordawyn>I'm trying hash tables from srfi-69:
<cordawyn>(define h (make-hash-table))
<cordawyn>(hash-table->list h)
<cordawyn>ERROR: In procedure hash-map->list: Wrong type argument in position 2 (expecting hash-table): #<srfi-69:hash-table real-table: #<hash-table 2787840 0/31> associator: #<procedure assoc (_ _)> size: 0 weakness: #f equivalence-function: #<procedure equal? (#:optional _ _ . _)> hash-function: #<procedure hash (_ _)>>
<cordawyn>this is somewhat confusing... "h" IS a hash table, is it not?
<cordawyn>(hash-table? h) => #t
<cordawyn>what am I doing wrong?
<mark_weaver>srfi-69 hash tables are not the same type as the core guile hash tables.
<cordawyn>uh, I was suspecting that
<mark_weaver>srfi-69 has 'hash-table->alist' though. (not 'hash-table->list'; not sure what that is or what it's supposed to do)
<cordawyn>erm
<ijp>does srfi 69 replace the definition of hash-table?
<cordawyn>indeed :-/
<cordawyn>probably my experiments have crawled in ;)
<cordawyn>hash-table->alist works fine
<ijp>#:replace (hash make-hash-table hash-table?)
<ijp>that's potentially confusing
<ijp>hmm, but that definition should only apply to srfi 69 hashtables
<mark_weaver>cordawyn: where is 'hash-table->list' from? I can't find that anywhere in the core guile sources.
<cordawyn>mark_weaver: as I've said it must've been one of my own definitions that I've been confusing with hash-table->alist
<cordawyn>hmm, let me check though
<ijp>there is a hash-map->list
<cordawyn>arrgh
<cordawyn>yep
<cordawyn>hash-map->list
<mark_weaver>ah yes, and that's a core procedure that works on the old core hash tables.
<cordawyn>so, hash-map->list doesn't work with srfi-69
<ijp>which takes two arguments anyway
<mark_weaver>we really need to clean up Guile's hash tables. we should unify all of these types, and fix the manual to point users to SRFI-69 and/or R6RS hash tables for new code.
<mark_weaver>IMO anyway.
<ijp>srfi-69 probably, it's one less layer of indirection
<mark_weaver>I don't see why there needs to be another layer of indirection though. but admittedly I haven't researched the issue.
<cordawyn>anyway, thanks guys
<cordawyn>I'll go back to my stuff for now ;-)
<mark_weaver>cordawyn: okay, happy hacking!
<ijp>mark_weaver: so what's new with you? TODO list still miles long :)
<mark_weaver>hehe, it keeps growing and growing :)
<mark_weaver>about to go "on mic" at the radio station, bbiab.
<mark_weaver>sadly, I need to spend some time working with django and javascript for the radio station, in order to maintain my strong position here. but at the moment I'm procrastinating by finishing off "TAR" from guile 100.
<ijp>oh, you were the one that got that?
<ijp>that certainly seemed like the most appealing one
<mark_weaver>in mike's reply to me, it sounded like no one else stepped forward for TAR.
<mark_weaver>but several people have started working on LZW.
<ijp>I thought I did, but I don't see the mail in my archive
<ijp>ah, no, there it is
<mark_weaver>you sent mike mail about TAR, and never got a response?
<mark_weaver>if so, when did you send it?
<ijp>2nd april
<ijp>I did get a response though
<mark_weaver>well, to be more precise, mike wrote "No one has tried TAR yet."
<mark_weaver>so if you volunteered but never followed up, that would be consistent with what he wrote.
<ijp>well, I wasn't sure if he expected us to just start coding or what
<mark_weaver>I guess he did expect that.
*ijp shrugs
<ijp>"> Each week, on Monday, I'll announce a coding project and ask for > volunteers.  On Wednesday, a volunteer will be chosen at random from > all entrants.  The volunteer will have two weeks to complete the task."
<ijp>that was the way his original mail went
<ijp>the current page at http://www.lonelycactus.com/guile100/volunteers.html seems more consistent with what you said though
<ijp>maybe it changed in between his first mail, and my email to him for tar