> Ben: if you have an example of the bad hash/dc error message I'd be
> interested to see it.
>
> Robby
Here's the kind of message that turned me off:
```
ctc.rkt:34:0: broke its own contract
promised: (hash/dc (k (or/c (quote a) (quote b) (quote c))) (v (k)
(config-value/c k)) #:immutable #t #
Hi,
I am currently using hash tables a lot, so inevitably I end up writing
general functions. I wrote the following `hash-filter`:
```
(define (hash-filter
ht
#:predicate [predicate #f]
#:predicate/key [predicate/key
(if predicate
> On Oct 30, 2020, at 1:46 PM, Kevin Forchione wrote:
>
> Thanks, Matthew! Understanding dawns. So the padding of lines is relative to
> the “{“ and not from the beginning of the editor line as I was assuming. How
> very clever. That makes alignment much easier than I’d thought!
>
> Is thi
Hello fellow Racketeers,
during the spring and summer I worked on a side project to test what can
be done in pure Racket when it comes to raster graphics rendering. You
can imagine it like demo or game programming before the advent of GPUs.
It turned out that quite a lot can be achieved and it al
> On Oct 30, 2020, at 12:25 PM, Matthew Butterick wrote:
>
> Spaces at the beginning of body lines do not appear in the resulting
> S-expressions, but the column of each line is noticed, and all-space
> indentation strings are added so the result has the same indentation … If the
> first str
Thanks for the feedback! Some of these were not concerns for my use case, so
I’ll do a bit more design before submitting something.
--
Sent from my phoneamajig
> On Oct 30, 2020, at 12:36, George Neuner wrote:
>
>
>> On 10/30/2020 3:08 PM, William J. Bowman wrote:
>> Let me aid this discuss
On 10/30/2020 3:08 PM, William J. Bowman wrote:
Let me aid this discussion by copying in the ~10 lintes of code in question:
> (define-syntax (dictof syn)
> (syntax-parse syn
> [(_ (k:id pred?) ...)
> (quasisyntax/loc syn
>(dictof/proc `((k . ,pred?) ...)))]))
>
> (define (
On Fri, Oct 30, 2020 at 2:08 PM William J. Bowman
wrote:
> Let me aid this discussion by copying in the ~10 lintes of code in
> question:
>
> > (define-syntax (dictof syn)
> > (syntax-parse syn
> > [(_ (k:id pred?) ...)
> > (quasisyntax/loc syn
> >(dictof/proc `((k . ,pred?) ..
> On Oct 29, 2020, at 9:04 PM, Kevin Forchione wrote:
>
> I’ve noticed that the elements being sent to a pollen tag don’t preserve the
> spacing when the text spans multiple lines for any space occurring before
> characters on the subsequent line, although does preserve the spacing between
>
Let me aid this discussion by copying in the ~10 lintes of code in question:
> (define-syntax (dictof syn)
> (syntax-parse syn
> [(_ (k:id pred?) ...)
> (quasisyntax/loc syn
>(dictof/proc `((k . ,pred?) ...)))]))
>
> (define ((dictof/proc spec) h)
> (and (eq? (dict-keys h) (d
On 10/30/2020 1:14 PM, William J. Bowman wrote:
Thanks! One follow-up:
> 1. make these functions, not macros
The main implementation is a procedure, but I think I need a macro to get the
syntactic interface I want.
Is there some reason to avoid macros?
You certainly can use macros in the im
I've wanted this several times (and written more than one ad-hoc partial
version): a general-purpose combinator would be great!
On Fri, Oct 30, 2020 at 1:14 PM William J. Bowman
wrote:
> > 1. make these functions, not macros
> The main implementation is a procedure, but I think I need a macro to
I didn't look at the code yet myself, but generally you want to minimize
the amount of code you compile into (and so using a function is pretty
minimal). Another reason is that a lot of stuff "just works" when you use
functions (because they would be documented as functions and so come with
certain
Thanks! One follow-up:
> 1. make these functions, not macros
The main implementation is a procedure, but I think I need a macro to get the
syntactic interface I want.
Is there some reason to avoid macros?
--
You received this message because you are subscribed to the Google Groups
"Racket User
If I remove my pollen.rkt from the directory and use:
#lang pollen
A B
C D
I get:
'(root "A B" "\n" "C D”)
But if I use:
#lang pollen
◊(define foo "foo")
A B
C D
I get:
'(root " " "A B" "\n" " " "C D")
> On Oct 29, 2020, at 9:21 PM, Sorawee Porncharoenwase
> wrote:
>
> Whoops. I meant:
>
> #lang pollen
>
> ◊(define (vb . s) s)
>
> ◊vb{ A B
>C D}
> and the output is:
>
> '(" A B" "\n" " " "C D")
>
> On Thu, Oct 29, 2020 at 9:19 PM Sorawe
On 10/29/20, William J. Bowman wrote:
> I'm considering implementing, maybe as a library or a pull-request to
> racket/dict, contracts for (partially) specifying which keys exist in a
> dictionary and a contract for the value on that key.
Great!
Please make the contract error messages point out
17 matches
Mail list logo