skapata has quit [Remote host closed the connection]
lucasta has quit [Quit: Leaving]
<norm_tsp>
i suspect that i'm wrong, but i can't pin point the order of operations and evaluations here
codaraxis has joined #racket
codaraxis__ has joined #racket
codaraxis___ has joined #racket
codaraxis has quit [Ping timeout: 240 seconds]
codaraxis__ has quit [Ping timeout: 250 seconds]
codaraxis___ has quit [Ping timeout: 250 seconds]
codaraxis has joined #racket
codaraxis has quit [Ping timeout: 246 seconds]
codaraxis has joined #racket
codaraxis__ has joined #racket
codaraxis has quit [Ping timeout: 268 seconds]
codaraxis___ has joined #racket
codaraxis___ has quit [Remote host closed the connection]
codaraxis has joined #racket
codaraxis__ has quit [Ping timeout: 268 seconds]
codaraxis has quit [Remote host closed the connection]
codaraxis has joined #racket
codaraxis__ has joined #racket
codaraxis___ has joined #racket
codaraxis___ has quit [Remote host closed the connection]
codaraxis has quit [Ping timeout: 256 seconds]
codaraxis__ has quit [Ping timeout: 256 seconds]
mwnaylor has quit [Ping timeout: 250 seconds]
Tuplanolla has joined #racket
<norm_tsp>
not a lot of activity around here
<bremner>
norm_tsp: not too much. Alas most racket people seem to like shiny web things.
<bremner>
norm_tsp: did you have a racket question?
<norm_tsp>
yes, i will repost it
<norm_tsp>
<norm_tsp> i'm pretty clueless about racket, could someone please tell me if my interpretation of foldl functioning is wrong > http://pasterack.org/pastes/10933
<norm_tsp>
it probably is, but this construct is pretty tricky for people unfamiliar with functional style
<bremner>
norm_tsp: is it intended that your initial value is a function?
<norm_tsp>
yes
<norm_tsp>
i'm not sure why
<norm_tsp>
with i understood how this works
<norm_tsp>
wish*
<bremner>
right, it is pretty cryptic.
<norm_tsp>
looks like a good interview question
<bremner>
norm_tsp: are you by chance studying continuation passing style? because that is what it looks like to me
<norm_tsp>
it's just one of the examples of racket magic i came across, but now i want to understand it
<norm_tsp>
it's above my current understanding for sure
<norm_tsp>
i will get back to it once i reach continuations theory
<bremner>
norm_tsp: you can trace the execution of brainteaser in the debugger, maybe that helps
<norm_tsp>
you mean the "compiled" version?
<bremner>
the foldl happens at "compile" time, and generates a complicated function
<bremner>
yeah
<norm_tsp>
i can't read that either
<bremner>
just break at the call to brainteaser
<bremner>
(pause, in the jargon of drracket)
<bremner>
replacing + with cons makes the order of operations clear
<norm_tsp>
i guess something like that might work, maybe on a smaller list too
<norm_tsp>
application of g function in particular is puzzling to me, it certainly does something...
<bremner>
g is like a continuation in that it receives the result and does the remaining calculation
<norm_tsp>
that sounds plausible
<bremner>
if you replace + with cons, you get '((((5 . 4) . 3) . 2) . 1)
<bremner>
so things kindof happen backwards from how you might expect with foldl
<norm_tsp>
like i suspected, this functional style is beyond me at the moment
<norm_tsp>
gotta start small
<norm_tsp>
at least my expanded code seems to be correct
abrantesasf has joined #racket
abrantesasf has quit [Ping timeout: 248 seconds]
abrantesasf has joined #racket
abrantesasf has quit [Ping timeout: 246 seconds]
_abrantesasf_ has joined #racket
_abrantesasf_ has quit [Ping timeout: 265 seconds]
norm_tsp has quit [Quit: Leaving]
<samth>
cpli: quasisyntax/loc is like quasiquote, but with a few differences. first, it constructs a syntax object, not just a list. second, the unquote is spelled #, and third syntax objects have source location information and the first form tells what location to use
jeosol has joined #racket
Origin has joined #racket
FreeFull has joined #racket
morte_ has joined #racket
skapata has joined #racket
szkl has joined #racket
ec_ has quit [Remote host closed the connection]
ec_ has joined #racket
FreeFull has quit [Remote host closed the connection]
ec_ has quit [Ping timeout: 240 seconds]
szkl has quit [Quit: Connection closed for inactivity]
lucasta has joined #racket
pharonix71 has quit [Remote host closed the connection]
pharonix71 has joined #racket
skapate has joined #racket
skapate has quit [Remote host closed the connection]
skapata has quit [Ping timeout: 265 seconds]
mwnaylor has joined #racket
lucasta has quit [Remote host closed the connection]
mwnaylor has quit [Remote host closed the connection]
mwnaylor has joined #racket
abrantesasf has joined #racket
mwnaylor has quit [Remote host closed the connection]
mwnaylor has joined #racket
morte_ has quit [Remote host closed the connection]
morte_ has joined #racket
morte_ has quit [Ping timeout: 240 seconds]
morte_ has joined #racket
morte_ has quit [Remote host closed the connection]
jeosol has quit [Quit: Client closed]
mwnaylor has quit [Remote host closed the connection]
jeosol has joined #racket
abrantesasf has quit [Remote host closed the connection]