Why not just pass a session id/key to the second URL* and allow that new page to retrieve the data you don't want exposed?
*or use a hidden field on a form submit.
BTW the limitations you're hitting have nothing to do with Arc or Closures, but rather are just limitations of Browser/HTTP technology (which are by design).
All this redirecting still doesn't get me what I want.
I would like this second link to be what shows up on the top of the browser as the new url. -- but I would also like that page to be initialized with parameters I could express so far only with a closure.
I don't want to pass those parameters to the second link, because then they'll be visible.
So now I need to first save these initialization parameters somewhere (much like saving a closure) and modify the second link to check if there are any scheduled parameters to initialize itself with for a particular user. Some sort of defop-init.
(Am I missing something?)
Down the drain go closures when combined with redirection.
I didn't know screen allowed you to keep a running log file. Had I known that before I probably could have solved a few head scratchers a little easier.
(Once you resolve this issue I'd also recommend switching to the Nu branch described in the above link. It's a much more clean and modern implementation.)
did you install the latest version of racket? there's an updated version since nicholas published his tutorial. i followed his instructions and everything worked fine.
Note though, while votejs* may be appropriately placed in the page header section, my understanding is that you want your google analytics script tags to occur after your body section (or at the end of your body section) such that the page display doesn't have to needlessly wait.
Look for votejs* in news.arc, how it's defined and where it's used. You can insert arbitrary javascript by similar means, including the analytics code.
Fun fact: if you used boxes, it would be really easy to associate the "withs" form with its expanded form, since the boxes would be the same.
The Nulan IDE already incrementally macroexpands as you're typing, and syntax-highlights boxes different colors depending on their scope. So this would be fairly trivial to add in.
If we syntax-highlight (withs ...) this way, since it expands into several (fn ...) forms it'll give a different color to each of its variables. But that's assuming we're able to perform some amount of macroexpansion frequently enough to be useful as the programmer edits, and it also assumes we can relate the original syntax to the transformed version returned by the macro.
It would be interesting to see a macro system tailor-made for purposes like these. Some hygienic macro systems might already apply, but I wonder what the options are here. I think Reactive Demand Programming would be an effective ingredient for this kind of incremental program visualization, but that's not a complete plan on its own.
"I wonder how the pursuit of this feature could impact the design of a language's macro system."
Whoa, how do you mean?
One idea I've been thinking about a lot is to attach metadata to code. We can do a lot to code (pretty-print, optimize, ...) besides just eval it, and metadata might help with those without affecting eval.
My favorite use for this idea is to give functions levels:
This can be used in a variety of ways by different tools. You could flag as errors any calls from a lower to a higher level, so that level 3 functions could only call functions in levels 1-3. You could tell tracers to trace everything until level x, not below. You could tell debuggers to automatically step past calls below level x and step _into_ calls above that level. In gdb I often accidentally hit 'next' when I meant 'step', and now I have to restart and laboriously try again from scratch.
You could syntax-highlight calls within a level to be more salient to calls to lower levels. We've all seen open source projects with this structure.
void main() {into
... // lots of option parsing crap
if (doSomething()) { // the actual app code
... // more crap
}
... // more crap
return -1;
}
Here wouldn't it be cool to be able to highlight the doSomething() compared to all the other calls?
In general, syntax highlighting sucks[1] because we simply highlight the things it's easiest to infer. Metadata might help reduce the inference burden and open up new uses for color.
Wow, this makes a lot of sense, and I don't think I've ever heard of it before. I wonder how the pursuit this feature could impact the design of a language's macro system.
Less optimistically, I wonder whether it'll distract too much from meaningful patterns that span across nesting levels (e.g. imperative code in continuation-passing style).
Why didn't I just include it in Arc/Nu? Because I think the new system is better, so in the long run I really do want people to switch to the new system.