Re: [racket] Preventing get-impure-port from url-encoding the query

2013-07-11 Thread Erik Pearson
I'd agree that a string and/or bytes value supplied as a query component would be the best solution. Let us shoot ourselves in our feet! In terms of a comprehensive url api, I think the argument would be that application/x-www-form-urlencoded query strings are the most common use case, but certainl

Re: [racket] Preventing get-impure-port from url-encoding the query

2013-07-11 Thread Neil Van Dyke
Even and I spoke offline, and although I don't have all the details (and something sounds odd), it currently sounds like the core problem here is that some server program (perhaps not stock Shibboleth itself) is unusually non-compliant in its handling of URLs.[*] Although the problem here does

Re: [racket] Profiling help

2013-07-11 Thread Robby Findler
Nothing comes to mind. If you know where the runtime is supposed to start you might try adding printfs in a few places that print out current-process-milliseconds (put a printf right before the call to profile-thunk too) and see if you can kind of hone in on something. You might find something sur

Re: [racket] Profiling help

2013-07-11 Thread Joe Gibbs Politz
On Thu, Jul 11, 2013 at 5:22 PM, Robby Findler wrote: > Is it possible that the time is being spent in the expander or in other > C-based code that would be hidden from the profiler? I don't know quite what C-based code we might be touching, but I do know that our parser down to a racket/base pro

Re: [racket] Profiling help

2013-07-11 Thread Robby Findler
Is it possible that the time is being spent in the expander or in other C-based code that would be hidden from the profiler? Robby On Thu, Jul 11, 2013 at 4:07 PM, Joe Gibbs Politz wrote: > We're trying to profile some slow running programs in a #lang, and > having some trouble getting believa

[racket] Profiling help

2013-07-11 Thread Joe Gibbs Politz
We're trying to profile some slow running programs in a #lang, and having some trouble getting believable results from the profiler. In particular, it claims that most (e.g. 60-80%) of the time is spent in /usr/lib/racket/collects/profile/main.rkt:29:2 We've tried on up to 15-20 second runs of p

Re: [racket] Preventing get-impure-port from url-encoding the query

2013-07-11 Thread Neil Van Dyke
Evan Donahue wrote at 07/11/2013 04:04 PM: I do think, however, that what strikes me as an increasing preponderance of 'creative' url interpretation in the age of SAAS may make a case for greater control over the path/query/fragment portion of the url, whether or not that falls under the offici

Re: [racket] Aging code

2013-07-11 Thread Grant Rettke
On Wed, Jul 10, 2013 at 9:41 PM, Asumu Takikawa wrote: > For `grep` there is `ack` for example. There are many versions of the > `locate` utility, many competing ntpds, fetchmails, many pagers, and so > on. It seems like in these cases what's more important is the "service" > (or perhaps "interfac

Re: [racket] Preventing get-impure-port from url-encoding the query

2013-07-11 Thread Evan Donahue
For what it's worth, the url in the query section is used for redirection after shibboleth authentication at a large institution. I don't anticipate that changing. I do think, however, that what strikes me as an increasing preponderance of 'creative' url interpretation in the age of SAAS may make a

Re: [racket] Splicing `values' in-place

2013-07-11 Thread Jay McCarthy
On Thu, Jul 11, 2013 at 1:52 PM, Stephan Houben wrote: > Hi Jay, > > So what about keyword return values? > Both because of symmetry and because getting three return values straight is > just as hard as getting three arguments straight. That's old news: https://github.com/jeapostrophe/exp/blob/m

Re: [racket] Splicing `values' in-place

2013-07-11 Thread Stephan Houben
Hi Jay, So what about keyword return values? Both because of symmetry and because getting three return values straight is just as hard as getting three arguments straight. Stephan Houben Op 11 jul. 2013 21:39 schreef "Jay McCarthy" het volgende: > I prefer to think of values as being justified

Re: [racket] Splicing `values' in-place

2013-07-11 Thread Jay McCarthy
I prefer to think of values as being justified by not restricting the arity of continuations. (let/cc k (k 1 2 3)) (let/cc k (k)) etc. define-values & let-values create N-arity continuations whereas call-with-values creates an any arity context Jay On Thu, Jul 11, 2013 at 12:23 PM, Laurent

Re: [racket] Preventing get-impure-port from url-encoding the query

2013-07-11 Thread Erik Pearson
(excuse me for butting in here...) I'd add my agreement that the referenced spec rfc 3986 supports Evan's usage with the definition being very clear on this point. The ? should not be encoded. On the other hand the preceding rfc 1738 (3.3) specifies that the ? is a reserved character in the "searc

Re: [racket] Splicing `values' in-place

2013-07-11 Thread Hendrik Boom
On Thu, Jul 11, 2013 at 08:23:01PM +0200, Laurent wrote: > Ah that unfortunately explains a lot. Thank you Matthew for this > explanation. > It's too bad that one needs to throw away nice semantics for speed... > > Neil's macro idea may then well be one of the best intermediate solutions > then. >

Re: [racket] Splicing `values' in-place

2013-07-11 Thread Matthias Felleisen
On Jul 11, 2013, at 2:23 PM, Laurent wrote: > Then why not return lists instead of values? Error checking. See Dybvig's paper, which extensively explores multiple value implementations: > J. Michael Ashley and R. Kent Dybvig. An efficient implementation of multiple > return values in Sche

Re: [racket] Preventing get-impure-port from url-encoding the query

2013-07-11 Thread Sam Tobin-Hochstadt
First, I think in this particular case the RFCs agree with Evan here. In particular, see section 3.4 of RFC 3896: http://tools.ietf.org/html/rfc3986#section-3.4 which defines query strings as containing a sequence of either 'pchar', "/" or "?", where 'pchar' includes ":", ascii alphanumeric charact

Re: [racket] Splicing `values' in-place

2013-07-11 Thread Laurent
Ah that unfortunately explains a lot. Thank you Matthew for this explanation. It's too bad that one needs to throw away nice semantics for speed... Neil's macro idea may then well be one of the best intermediate solutions then. Jens, thanks for all the links, they are quite informative. Indeed, q

Re: [racket] Preventing get-impure-port from url-encoding the query

2013-07-11 Thread Jay McCarthy
This debate is bigger than you and me, but I don't see a spec here. I see a weird pseudo-code parsing algorithm with no specification. In any case, the net/url module implements the RFCs. If those aren't what you want, then it needs to be changed or a new module needs to be implemented. Given the b

Re: [racket] Preventing get-impure-port from url-encoding the query

2013-07-11 Thread Sam Tobin-Hochstadt
I'm not sure which spec you're looking at from there, but the URL spec that I linked to is the most current work on precisely specifying URLs. On Thu, Jul 11, 2013 at 2:14 PM, Jay McCarthy wrote: > I'm looking at the spec: http://www.w3.org/Addressing/ > > On Thu, Jul 11, 2013 at 11:59 AM, Sam To

Re: [racket] Preventing get-impure-port from url-encoding the query

2013-07-11 Thread Jay McCarthy
I'm looking at the spec: http://www.w3.org/Addressing/ On Thu, Jul 11, 2013 at 11:59 AM, Sam Tobin-Hochstadt wrote: > On Thu, Jul 11, 2013 at 1:46 PM, Jay McCarthy wrote: >> On Wed, Jul 10, 2013 at 5:27 PM, Evan Donahue wrote: >>> Hello, I am trying to use the racket networking libraries for a

Re: [racket] Preventing get-impure-port from url-encoding the query

2013-07-11 Thread Sam Tobin-Hochstadt
On Thu, Jul 11, 2013 at 1:46 PM, Jay McCarthy wrote: > On Wed, Jul 10, 2013 at 5:27 PM, Evan Donahue wrote: >> Hello, I am trying to use the racket networking libraries for a basic set of >> get and post requests. I need to send a url of the form: >> >> http://foo.com/?url=http://bar.com?baz=1000

Re: [racket] Preventing get-impure-port from url-encoding the query

2013-07-11 Thread Jay McCarthy
On Wed, Jul 10, 2013 at 5:27 PM, Evan Donahue wrote: > Hello, I am trying to use the racket networking libraries for a basic set of > get and post requests. I need to send a url of the form: > > http://foo.com/?url=http://bar.com?baz=1000 (NOT form encoded) As far as I can tell from URL specs, th

Re: [racket] Splicing `values' in-place

2013-07-11 Thread Jens Axel Søgaard
Hi Laurent, It is interesting to see the historical evolution of multiple values in Scheme. In June 1988 this proposal was posted: http://groups.csail.mit.edu/mac/ftpdir/scheme-mail/HTML/rrrs-1988/msg00230.html At the Snowbird meeting in July 1988 no concensus was found. 3.7. Add LAMBDA*. Not a

Re: [racket] Splicing `values' in-place

2013-07-11 Thread Hendrik Boom
On Thu, Jul 11, 2013 at 09:18:30AM -0600, Matthew Flatt wrote: > To elaborate on "currently not possible" (because this idea shows up > from time to time), allowing splicing of results in function-call > subexpressions would break equivalences that are currently exploited by > macros and the compil

Re: [racket] Aging code -- Algol 68

2013-07-11 Thread Hendrik Boom
On Thu, Jul 11, 2013 at 11:54:35AM -0400, Matthias Felleisen wrote: > > What is a type=theoretical program verifier? How does it related to > modern things such as Coq/HOL/friends? It was an attempt to do something like coq and agda. I managed to use it to verify a merge sort. This was in the

Re: [racket] Aging code

2013-07-11 Thread Matthias Felleisen
On Jul 10, 2013, at 10:41 PM, Asumu Takikawa wrote: > On 2013-07-10 18:03:07 -0400, Sean McBeth wrote: >> -- Embrace more of the Unix philosophy of small programs doing one thing >> well. You cannot deny that programs like ls, cd, mkdir, grep, etc. have >> lasted a very, very long time and have

Re: [racket] Aging code -- Algol 68

2013-07-11 Thread Matthias Felleisen
What is a type=theoretical program verifier? How does it related to modern things such as Coq/HOL/friends? On Jul 10, 2013, at 8:26 PM, Hendrik Boom wrote: > How can I resist this request to talk about ancient code? Even if it > seems off-topic? > > My own long-lived examples are a type-th

Re: [racket] Splicing `values' in-place

2013-07-11 Thread Neil Van Dyke
FWIW, several years ago, I implemented a wrapper for "#%app" that supported this, as an exercise and without actually using it, but I kept it in mind. I use multiple-values a lot, including in named-"let" recursion, and, since that multiple-value-splicing "#%app" exercise, I have noticed time

Re: [racket] Splicing `values' in-place

2013-07-11 Thread Matthew Flatt
To elaborate on "currently not possible" (because this idea shows up from time to time), allowing splicing of results in function-call subexpressions would break equivalences that are currently exploited by macros and the compiler. For example, many macros assume that (rator rand1 rand2 ... rand

Re: [racket] Splicing `values' in-place

2013-07-11 Thread Laurent
On Thu, Jul 11, 2013 at 4:42 PM, Matthias Felleisen wrote: > > Your uses of values are covered in apply/map/append/list trickeries. Yes, for example (+ (values 1 2) (values 3 4)) would need to be written (apply + (append (call-with-values (lambda()(values 1 2)) list) (call-with-values (lambda()(

Re: [racket] Macro + function automation

2013-07-11 Thread Marc Feeley
On 2013-07-10, at 10:49 PM, Roman Klochkov wrote: > Do you think, that Racket will do pure calculations in compile-time? > > For example, if I write > > (+ x (* 2 3 4) (sin 20)) > > will it be optimized to > > (+ x 24.912945250727628) ? > > Or I have to use define-syntax to do it? I doub

Re: [racket] Macro + function automation

2013-07-11 Thread Vincent St-Amour
At Thu, 11 Jul 2013 02:45:44 -0400, Carl Eastlund wrote: > Racket will do many pure calculations at compile-time, without any work on > your part. I don't know exactly what it will and won't do. I know the > Typed Racket optimization coach will help you make use of the extra > optimizations that

[racket] Rosetta Code: 700 tasks implemented

2013-07-11 Thread Tim Brown
700 Tasks have now been implemented on Rosetta Code. Remaining at #2, and pulling away from Python. Now only 46 behind TCL! Good going folks, Tim https://plus.google.com/104522910766067522260/posts/fTxSDnoQDQM -- Tim Brown | City Computing Limited| T: +44 20 8770 2110

Re: [racket] Splicing `values' in-place

2013-07-11 Thread Matthias Felleisen
Your uses of values are covered in apply/map/append/list trickeries. Using values might be more elegant, but yes, it's currently not possible. On Jul 11, 2013, at 8:56 AM, Laurent wrote: > In some postfix languages, if a procedure returns multiple values, these > values can be used directly

Re: [racket] Wasting Time?

2013-07-11 Thread Matthias Felleisen
Live a balanced life: live a little, code a little, love a little. On Jul 10, 2013, at 10:32 PM, Steve Lett wrote: > How do I convince my computer-illiterate wife that I'm not wasting time on > learning to program? > > Also: Just started HtDP today and came up with this thought. "Except ye

[racket] Splicing `values' in-place

2013-07-11 Thread Laurent
In some postfix languages, if a procedure returns multiple values, these values can be used directly as multiple arguments to another procedure call, i.e., they are "spliced" in the latter call. In an extended Racket, this would look like this: (+ (values 1 2) (values 3 4)) would be equivalent to

Re: [racket] HtDP2

2013-07-11 Thread Robby Findler
http://www.ccs.neu.edu/home/matthias/HtDP/Worldv300/rocket-s.jpg ? On Thu, Jul 11, 2013 at 6:47 AM, Steve Lett wrote: > Where do I get a pic of the rocket of chapter 1 in HtDP? > > > Racket Users list: > http://lists.racket-lang.org/users > > Rac

[racket] HtDP2

2013-07-11 Thread Steve Lett
Where do I get a pic of the rocket of chapter 1 in HtDP? Racket Users list: http://lists.racket-lang.org/users

Re: [racket] slides unit testing

2013-07-11 Thread Laurent
Here's a much longer talk that might be of interest to you: https://www.youtube.com/watch?feature=player_embedded&v=kkTFx3-duc8 It's about moving (partly) from OOP to FP, discusses the advantages of the latter for design, mutation, but also the cases where OO is still useful. It's by Martin Oders

Re: [racket] Aging code

2013-07-11 Thread Thomas Chust
On 2013-07-11 00:03, Sean McBeth wrote: > [...] > The opposite side of this coin: a game I started writing in Microsoft > XNA, that I am still terribly keen to complete, but now XNA is a dead > platform. So *technological progress made the underlying API obsolete, > /but not the project itself/* (i

Re: [racket] Wasting Time?

2013-07-11 Thread Robby Findler
+1 On Wed, Jul 10, 2013 at 9:36 PM, Sean McBeth wrote: > make time for her. > > > On Wed, Jul 10, 2013 at 10:32 PM, Steve Lett wrote: > >> How do I convince my computer-illiterate wife that I'm not wasting time >> on learning to program? >> >> Also: Just started HtDP today and came up with this