> On Apr 27, 2016, at 3:01 PM, Sam Tobin-Hochstadt wrote:
>
> The exceptions raised by `match` are indeed not transparent. But I
> don't understand why they need to be in order for the handin server to
> handle them properly.
(caveat: this is my reading of the code below)
The handin server wan
The exceptions raised by `match` are indeed not transparent. But I
don't understand why they need to be in order for the handin server to
handle them properly.
Sam
On Wed, Apr 27, 2016 at 5:58 PM, 'John Clements' via Racket Users
wrote:
>
>> On Apr 22, 2016, at 1:47 PM, 'John Clements' via Racke
> On Apr 22, 2016, at 1:47 PM, 'John Clements' via Racket Users
> wrote:
>
> Currently, the handin-server runs student expressions in an ‘eval’ which
> intercepts errors and re-raises them with a message that includes the failing
> expression. All good.
>
> However, it doesn’t catch all of t
On Wed, Apr 27, 2016 at 01:52:24PM -0600, Jerry Jackson wrote:
> I'd really be interested in how the two forms look when they've both been
> reduced to some canonical internal format.
You can use `raco expand` the result after macro expansion, and `raco decompile`
to look at the result of decompili
I appreciate the responses; at this point, however, I'm trying to figure
out what to do with my intuition. If those two pieces of code don't compile
to the same thing, I'm not sure how I should approach code style. I tend to
favor ((if x y z) foo) over (if x (y foo) (z foo)) because it avoids
redun
> On Apr 27, 2016, at 2:38 PM, Matthew Butterick wrote:
>
> For the first time, I used `syntax-local-introduce` to solve a problem. But I
> don't understand whether I'm using it correctly or just relying on a spooky
> side effect. (I did the read the docs, but I'm looking for a higher-level
>
For the first time, I used `syntax-local-introduce` to solve a problem. But I
don't understand whether I'm using it correctly or just relying on a spooky
side effect. (I did the read the docs, but I'm looking for a higher-level "why
this exists and what its idiomatic use is")
The problem I had
In addition to my previous mail:
Did you notice that allDiff? is, or at least must be, symmetrical in its two
arguments?
That is (allDiff? list1 list2) always must return the same answer as
(allDiff? list2 list1)
Jos
-Original Message-
From: Jos Koot [mailto:jos.k...@gmail.com]
Sent: mi
I dont get the error when running your example.
Notice that your function (allDiff? '() '(1 2 3)) returns '()
I suppose you want #t in this case.
Why the line( if (null? (cdr list1)) ?
Simpler is:
(define (allDiff? list1 list2)
(if (null? list1) #t
(if (memq (car list1) list2) #f
(a
On Wednesday, April 27, 2016 at 8:55:29 AM UTC-4, Alex Knauth wrote:
> I'm not sure if this is what you wanted, but here's a version of your monad
> file with much less weird macro stuff. It used syntax-local-introduce in two
> places right next to each other, and it doesn't use datum->syntax,
>
When you have a program that's surprisingly fast (or slow), you can use
the optimization coach in DrRacket (in the "view" menu) to see what
optimizations Racket applies to your code.
For your program, the coach confirms Matthew's diagnosis that inlining
is what makes `fib2` faster.
Vincent
On W
The compiler inlines the call to `aux` in `fib2` because that call is
readily apparent. It's not so apparent in the other cases that the
function `aux` is always called.
At Wed, 27 Apr 2016 06:42:03 -0700 (PDT), Jerry Jackson wrote:
> Hello all,
>
> I was experimenting a bit yesterday and discove
Hello all,
I was experimenting a bit yesterday and discovered something that surprised me.
Here are two fibonacci functions:
(define fib1
(letrec ([aux (lambda (i n)
(if (< n 2)
1
(+ (fib1 i (- n 2)) (fib1 i (- n 1)])
(let (
> On Apr 27, 2016, at 2:55 AM, Nicholas Labich wrote:
>
> Thanks for the feedback. Attached is the solution applied to my original
> implementation (only 65loc, documented). A couple of interesting points:
>
> - My simplified example didn't show this, but I have to
> `syntax-local-introduce'
14 matches
Mail list logo