Hi, all.
Why does the following typecheck:
#lang typed/racket
(provide group)
(define #:forall (A)
(group [list : (Listof A)]
[count : Exact-Positive-Integer]) : (Listof (Listof A))
(: group-step (All (A) ((Listof A) (Listof A) (Listof (Listof A)) ->
(Listo
Interesting. FWIW, my particular interest is something that I can
reliably send to other tools like Unix's bc or C's scanf. Going down
this line, however, did make me question using `number->string` all
over the place in demo Web programs.
On Fri, Apr 22, 2016 at 10:22 AM, Robby Findler
wrote:
>
Perhaps you should introduce a library of functions with names that
specifically point to Unix/Linux compatibility — Matthias
> On Apr 25, 2016, at 8:37 AM, Jay McCarthy wrote:
>
> Interesting. FWIW, my particular interest is something that I can
> reliably send to other tools like Unix's bc
Annoying that you cannot send them the floating point bits and have to
rely on their (probably complex) number parsing routines!
Robby
On Mon, Apr 25, 2016 at 7:37 AM, Jay McCarthy wrote:
> Interesting. FWIW, my particular interest is something that I can
> reliably send to other tools like Uni
I agree that the spec for printing inexacts needs to be clarified.
The current output format for flonums is consistent with scanf(), at
least for non-infinity and non-NaN values, since it's produced by
sprintf("%g", ...). Using "%g" means that the number sometimes prints
with an "e..." part and so
Thank you Matthew. The new docs are crystal clear on what I want. Thank you.
Jay
On Mon, Apr 25, 2016 at 10:50 AM, Matthew Flatt wrote:
> I agree that the spec for printing inexacts needs to be clarified.
>
> The current output format for flonums is consistent with scanf(), at
> least for non-in
On Apr 24, 2016, at 7:35 PM, Matthias Felleisen wrote:
>
> From the hip: Can your name-producing macro consume (val-producing-macro) and
> then just directly generate the case-2 macro call directly:
Can this be generalized? As a rule of thumb, is this accurate:
You can NEVER use a macro in
> On Apr 25, 2016, at 3:43 PM, Matthew Butterick wrote:
> On Apr 24, 2016, at 7:58 PM, Alex Knauth wrote:
>> One way to do this would be to make `(name-parsing-macro x "," y "," z)` a
>> match-expander
>> Does this work for you? Or is your case more complicated?
>
> Right, `match` is somewha
>> On Apr 25, 2016, at 3:43 PM, Matthew Butterick wrote:
>> ;;
>> #lang racket
>>
>> (define-syntax-rule (binding-form _topid (_id ...))
>> (define (_topid)
>> (let ([_id '_id] ...)
>> (displayln (format "~a bound ~a" '_topid _id)) ...)))
>>
>> (binding-form foo (a b c))
>>
>> A macro that wants to put identifiers in a binding position MUST produce the
>> whole binding form for those identifiers.
>
> Well, that's pretty much what match expanders are. Although the `match` forms
> have to recognize these match expanders specially, and expand them itself,
> one step
> On Apr 25, 2016, at 5:05 PM, Matthew Butterick wrote:
>> I was about to try to apply its awesome power to your example, but I just
>> realized that in your new example, the s-expression `(id-maker a ZIM b ZAM
>> c)` isn't actually used in a binding position. Instead the individual ids
>> wi
> That's why I think of `match` as special: it has its own means of extending
> its interface, namely with match expanders.
>
> What I'm curious about is the more general situation of composing macros that
> hold identifiers.
It is my understanding that this is what Jack Firth’s
generic-syntax
On Apr 25, 2016, at 3:43 PM, Matthew Butterick wrote:
> A macro that wants to put identifiers in a binding position MUST produce the
> whole binding form for those identifiers.
In the end and in general, yes.
Since the kernel is very small and expands all surface language to a rather
small
I'm trying to write a small monad transformer library with macros.
My goal:
(define-monad IdM
[(return a) a]
[(bind m f) (f m)]
[(foo) 'id-foo])
(define-trans ListT
[(return a) (returnₘ (list a))]
[(bind m f) (bindₘ m (λ (loa) (foldl (λ (a m′) (returnₘ (append (f a)
On Apr 25, 2016, at 3:08 PM, Alexis King wrote:
>
> Even more generally, if you want macros to compose in a more arbitrary
> and less structured way, you can call local-expand from the containing
> macro in order to “flip” evaluation order as I believe you described
> in your original message.
Did you see this earlier email? I got a similar "identifier tainted by macro
expansion" error, but changing `define-syntax-rule` to `define-simple-macro`
fixed it:
> On Apr 25, 2016, at 5:03 PM, Alex Knauth wrote:
>
>
>>> On Apr 25, 2016, at 3:43 PM, Matthew Butterick wrote:
>
>>> ;
On Apr 25, 2016, at 3:08 PM, Matthias Felleisen wrote:
>> A macro that wants to put identifiers in a binding position MUST produce the
>> whole binding form for those identifiers.
>
> In the end and in general, yes.
>
> In the special case when you already have a macro whose interface can be
Late to the party, because I've been ignoring most of my email for a week.
I'm the one at the U of U that has started working on the problem as Jay
mentioned. But with classes and other study on related, tangentially
related, or simply tangential topics I haven't gone beyond the very
simplest of
18 matches
Mail list logo