How about this?:
On Tue, Feb 19, 2019, 9:57 PM Kees-Jochem Wehrmeijer
wrote:
> Basically when I call the function throw. So e.g.
>
> (define mygenerator (generator ()
>(with-handlers ([exn:fail? (lambda (e) 42)])
> (yield 1)
>
Basically when I call the function throw. So e.g.
(define mygenerator (generator ()
(with-handlers ([exn:fail? (lambda (e) 42)])
(yield 1)
(yield 2)
(yield 3
> (my
Speaking of things with no docs, the abnf package seems intriguing. Does
anyone have a short summary or example?
On Tue, Feb 19, 2019, 5:14 PM John Clements
wrote:
> Looks like… this is still the case? Specifically, reloading
> pkgs.racket-lang.org still shows that all packages are missing
> doc
Under what circumstances would you want it to throw? When the generator
runs out, or...?
On Tue, Feb 19, 2019, 3:59 PM Kees-Jochem Wehrmeijer
wrote:
> Hi,
>
> Python allows to call a .throw() method on a generator. I was wondering if
> Racket generators have a similar feature. From the docs it d
> On Feb 19, 2019, at 2:33 PM, Brian Adkins wrote:
>
> Awesome - that did the trick. I'm confused as to why it helped to inject STR
> into the lexical context - it ends up being just a string, and it was working
> fine with respect to loading the template. I would think the fix would be to
>
On Tuesday, February 19, 2019 at 5:06:32 PM UTC-5, Matthew Butterick wrote:
>
>
>
> On Feb 19, 2019, at 1:28 PM, Brian Adkins > wrote:
>
> Oops - I spoke too soon. It appears the lexical context is unavailable to
> the template when include-template is used in this manner.
>
>
> Ah right, one ha
I’m pleased to announce that I had a good reason to extend the glpk package to
provide an interface to glpk’s mixed integer programming package; this means
that if you can express your problem as a sequence of linear constraints on a
set of variables where some of them need to be integers, you c
Looks like… this is still the case? Specifically, reloading
pkgs.racket-lang.org still shows that all packages are missing documentation. I
thought I’d seen a message suggesting that this was resolved, but it appears I
was mistaken.
John
> On Feb 16, 2019, at 8:08 PM, David Storrs wrote:
>
> On Feb 19, 2019, at 1:28 PM, Brian Adkins wrote:
>
> Oops - I spoke too soon. It appears the lexical context is unavailable to the
> template when include-template is used in this manner.
Ah right, one has to inject STR into the same lexical context, like so:
#lang racket
(require web-s
On Tuesday, February 19, 2019 at 4:03:02 PM UTC-5, Brian Adkins wrote:
>
> On Tuesday, February 19, 2019 at 1:45:43 PM UTC-5, Matthew Butterick wrote:
>>
>>
>> On Feb 19, 2019, at 8:25 AM, Brian Adkins wrote:
>>
>> But, I'm guessing that the include-template macro is unable to consume
>> the ou
On Tuesday, February 19, 2019 at 1:45:43 PM UTC-5, Matthew Butterick wrote:
>
>
> On Feb 19, 2019, at 8:25 AM, Brian Adkins > wrote:
>
> But, I'm guessing that the include-template macro is unable to consume the
> output of my view macro. Is there anything I can do to get (view login) to
> be ex
Hi,
Python allows to call a .throw() method on a generator. I was wondering if
Racket generators have a similar feature. From the docs it doesn't seem to
have that. One way I could see around this is to set a parameter and then
check for that parameter in the generator and raise an exception ba
Hi
Is it possible to transfer code from "intermediate student with lamnda" to
"Pretty big"
for exmple :
(require 2htdp/image)
(require 2htdp/universe)
(define (join-together ls1 ls2)
(local
[; help : [ListOf X] -> [ListOf X]
; (help ls1) drops the invariant argument ls2
(define
> On Feb 19, 2019, at 8:25 AM, Brian Adkins wrote:
>
> But, I'm guessing that the include-template macro is unable to consume the
> output of my view macro. Is there anything I can do to get (view login) to be
> expanded prior to when include-template needs it?
Wrap `include-template` with yo
I would like to take the following web request handler:
(define (login request)
(render-string
(include-template "../views/authentication/login.html")))
and eventually get to something like:
(define (login request)
(render login))
My current lack of understanding with respect to macros i
15 matches
Mail list logo