***sw2wolf is now known as Recursive{away}
***Recursive{away} is now known as Recursive
<cordawyn>I'm studying "foof-loop" library (in particular, "nested-foof-loop" part of it, and I'm trying to unfold "collect-list-reverse" macro. <cordawyn>Could anyone point me where "TAIL" is coming from in that syntax definition? <cordawyn>btw, speaking of marcos, is there a tracer or a debugger or some other kind of tool that could help me to see how the macros are processed, step-by-step? <wingo>lloda: use get-internal-run-time / get-internal-real-time for benchmarking <wingo>it usually has more precision and it doesn cons <wingo>i guess we should provide a time macro <ijp>cordawyn: it doesn't come from anywhere, it's a fresh identifier <ijp>like tmp in (define-syntax-rule (swap! a b) (let ((tmp a)) (set! a b) (set! b tmp))) <ijp>let doesn't enter into it <ijp>the variable is not in the lexical-scope of the macro, nor is it an argument, so it is treated as fresh at every macro usage <ijp>if it weren't, that tmp could be unintentionally captured <cordawyn>so, in that particular case, it doesn't seem to be used anyhow, does it? <cordawyn>unless... it gets into the scope of the expression that you match against the pattern? <ijp>it will be necessary because of the structure of iterate <cordawyn>but "iterate" has no references to tail as far as I can see <ijp>the name doesn't matter, it's the structure it will match on <cordawyn>neither iterate* or anything else does :) <cordawyn>so it'll be just a TAIL symbol for state then? <lloda>wingo: thx about guile-internal-etc, I take note. <wingo>lloda: you still have to divide by internal-time-units-per-second of course <wingo>the r7rs name is better ("jiffies") :) ***ijp is now known as the
***the is now known as Guest47157
***Guest47157 is now known as ijp
*DerGuteMoritz gets the jiffies <aleix>is there anyway that uri-encode uses uppercase hexadecimal characters? <aleix>i'm working on guile-oauth and yesterday couldn't get a valid signature until i realized oauth requires uppercase <fbs>i think its easiest to just modify the string yourself <fbs>if your strings are utf8 you might be able to just copy the code needed <aleix>but i only want that part (the percent encoded) to be upper case not the whole string <aleix>i think i'll submit a small patch for this <fbs>but for now you can do <mark_weaver>aleix: we should try to get at the bottom of this and find the right fix. is guile violating some spec by generating lowercase instead of uppercase? or is oauth violating the spec by requiring uppercase? <mark_weaver>aleix: do you know the answer off hand? would you be willing to look it up? <fbs>The uppercase hexadecimal digits 'A' through 'F' are equivalent to <fbs> the lowercase digits 'a' through 'f', respectively. If two URIs <fbs> differ only in the case of hexadecimal digits used in percent-encoded <fbs> octets, they are equivalent. <mark_weaver>well, it also says: "For consistency, URI producers and <mark_weaver> normalizers should use uppercase hexadecimal digits for all percent- <mark_weaver>so I guess that means that we should change guile to produce uppercase. <fbs>Hexadecimal characters in encodings MUST be upper case. Text names and values MUST be encoded as UTF-8 octets before percent-encoding them per [RFC3629]. <fbs>the patch for guile should be quite easy tho <fbs>(display (number->string byte 16) port) <aleix>mark_weaver: i'll take a look, but certainly OAuth requires uppercase <aleix>The two hexadecimal characters used to represent encoded <aleix> characters MUST be uppercase. <mark_weaver>my question is: is there a reasonable justification for that additional requirement on top of what RFC3629 requires. <mark_weaver>but we'll change guile to generate uppercase anyway. <aleix>i sent a patch so people can choose <mark_weaver>my guess is that oauth needs the URI in a canonical form, given that they also require that "Characters in the unreserved character set MUST NOT be encoded." <mark_weaver>aleix: you sent a patch to guile-devel that changes uri-encode to generate uppercase percent encodings? <mark_weaver>hmm, I don't know if we should add a keyword option. I think probably we should just generate uppercase always. <wingo>uppercase always sounds fine to me <aleix>mark_weaver: are you doing the change then? (i don't think i need to send a patch for this) <wingo>do you have commit access, aleix? <wingo>if not please ask for it at savannah <wingo>not required for this case but it seems like a good idea <mark_weaver>aleix: if you want to make the commit, please do. I like to see more names in the commit logs :) <microcode>uppercase is the sensible way to go for URI escapes <microcode>unless people start using non-tabular text figure numerals in URLs ;) <mark_weaver>RFC3629 states: "For consistency, URI producers and normalizers should use uppercase hexadecimal digits for all percent-encodings." *microcode suppresses the urge <aleix>ok, i'll do it in an hour or so, have to take my son to the daycare now! <microcode>wingo: thanks for all your work and blog posts on Guile, you actually got me interested in the internals rather than just as a user. <microcode>everyone else too, you're awesome for existing <microcode>the amount of emotional, psychological, and potentially financial benefit I extract from the existence and properties of guile is immense <mark_weaver>thanks for the kind words microcode. I agree that it's a really great, fun community to be a part of :) <microcode>I hope to be of some service to it in the near future <microcode>what's something that needs doing that would be of assistance with me getting to know the system a bit better? <wingo>is there something that interests you particularly? <wingo>it's tricky to recommend things, and our compiler is in an in-between state -- moving to a new vm and missing some pieces <wingo>it's possible to assist there but might be difficult to get started <microcode>lots of work on that code as well, so merging would be messy.. <wingo>one silly but useful thing would be to add docstrings to existing code -- basically a bunch of code reading <wingo>i think most of us think that there should be more docstrings <wingo>dunno, perhaps that sounds boring ;) <wingo>and anyway you'd want to start slow so that people agree on style <fbs> writing documentation is hard :/ <microcode>as I know next to nothing about your style etc. <wingo>civodul is the only one that has it all in his head i think ;-) <wingo>so if you want, take a look at boot-9.scm <wingo>it's an interesting read anyway <fbs>btw why is it all called *9? <wingo>and add a few docstrings and send it to the list <wingo>and we can go back and forth <fbs>find . -name 'boot-9' <wingo>microcode: module/ice-9/boot-9.scm <wingo>if you use emacs, geiser and rgrep are your friends <fbs>Some part of the Scheme programming language implementation GNU Guile is named ice-9 with regard to the crystallization effect of Vonnegut's invention <microcode>enormous (let) block with huge string literal <wingo>the string literals are actually docstrings <wingo>and wouldn't be recognized as such if they were elsewhere <aleix>mark_weaver: just sent a new patch for the uri-encode <microcode>I've not seen the form "lambda*" before, any specific meaning to it? <ijp>it's like lambda, but allows you to specify optionals and keyword arguments <ijp>the lambda equivalent is parsing rest args by hand <microcode>I imagine lambda* is optimized at the eval level as well <ijp>yes, the vm knows about optionals and keywords