IRC channel logs

2013-10-25.log

back to list of logs

<davexunit>good evening guilers.
<add^_>Good night :-)
*add^_ goes to sleep
<mark_weaver>hi davexunit!
<mark_weaver>sorry for not yet responding to your latest alist->hash-table patch. let me summarize here the remaining issues (which I should have caught during the first review, but I missed them).
<mark_weaver>first, the position of the curly braces doesn't follow the GNU coding conventions.
<davexunit>mark_weaver: it's all good. you're very busy with hacking on Guix.
<davexunit>damn. and I tried my best to get them right.
<mark_weaver>another thing is that it would cut the number of hash table lookups in half if you used 'scm_hash_create_handle_x' and friends.
<mark_weaver>I would call that with an 'init' as SCM_UNDEFINED
<mark_weaver>and then, if the cdr of the handle you receive is SCM_UNDEFINED, then it means the key wasn't already present, so you can set the cdr to the value.
<mark_weaver>(use SCM_UNBNDP to check whether the cdr is SCM_UNDEFINED)
<davexunit>mark_weaver: thanks. I looked at the docs for scm_hash_create_handle_x but didn't think to use SCM_UNDEFINED as a value.
<davexunit>makes sense now.
<mark_weaver>admittedly, that's a slight hack, but I think it will be okay.
<mark_weaver>an alternative would be to keep a private cons cell that's used for this purpose and nothing else.
<mark_weaver>but I'd try to the SCM_UNDEFINED thing first.
<davexunit>alright I will give it a try. thanks for all of the help.
<davexunit>and finding all of the little things (and some big things) that I'm doing wrong.
<mark_weaver>no problem! looking forward to adding your name to the THANKS file :)
<davexunit>:)
***christianabryant is now known as caveryb
<davexunit>I'm implementing something similar to Emacs' modes and buffers for guile-2d and it looks like I'll need some sort of dynamic scoping to make it work. Parameters are what I want, right?
<nalaginrut>morning guilers~
<ijp>good afternoon
<atheia>good afternoon
<atheia>You are the author of the venerable portable rnrs quickcheck library no?
<atheia>(found on Github I think...)
<atheia>ijp ^
<ijp>it's not actually portable
<ijp>though that is fixable
<atheia>Ah, is it not... fine for me - it seems to work on Guile :-)
<ijp>and I presume you are the person that emailed me about it a few weeks ago, and that I promptly forgot to reply to
<atheia>But I was going to ask, if you don't mind...
<atheia>No I'm not actually
<atheia>I noticed the symbol's generated by $symbol are prefixed by #{ and followed by }#
<atheia>Why is that?
<atheia>Is it some form of escaping sequence?
<ijp>basically
<mark_weaver>it's the guile syntax for reading/writing symbols that could not otherwise be read/written because of special characters in them.
<ijp>symbols are generated from arbitrary strings, which may contain special characters like (
<ijp>(string->symbol "(")
<ijp>$3 = #{\\x28;}#
<ijp>(symbol->string $3)
<ijp>$4 = "("
<atheia>Aha
<atheia>Cool, I think that clears things up a bit for my purposes.
<atheia>Thanks both!
<mark_weaver>np!
<dsmith-work>Happy Friday, Guilers!!
<add^_>Happy Friday :-)
<add^_>Meh, I wish I knew how to write unicode symbols in emacs (and erc) without having to resort to a table where I copied the characters I wanted...
<add^_>Actually, ijp, I think I've seen you do that, how do you do that?
<add^_>If I may ask..
<add^_>Hm
<add^_>I should have asked this in #emacs .. Oh well, too late now..
<jao>C-x 8 RET
<add^_>Woohoo, thanks jao :-)
<jao>welcome
<mark_weaver>add^_: you can also add new key bindings. for example, I have this in my .emacs file:
<mark_weaver>(defun insert-lambda-symbol ()
<mark_weaver> (interactive)
<mark_weaver> (insert "λ"))
<mark_weaver>(global-set-key "\\C-cl" 'insert-lambda-symbol)
<mark_weaver>maybe there's a better way; I'm not much of an elisp hacker
<add^_>Yeah, in a lisp-buffer I just type lambda to get a lambda symbol.
<add^_>But that's just one symbol.