Re: [racket-users] Weirdness with typed racket and hashes

2016-05-23 Thread Matthew Eric Bassett
Thank you, Brian, that was very helpful. On 05/23/2016 03:46 PM, Brian LaChance wrote: > Hi, Matthew > > I'm pretty sure the problem you're having is that, even when you make > a hash table using hash, TR can't tell that it's immutable. It only > has one hash table type, HashTable, which is used

[racket-users] coloured text in scribble

2016-05-23 Thread Hendrik Boom
Can someone give me an example of coloured text in scribble? -- hendrik -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[racket-users] Re: new user, simple question: cannot run simple example: (cons 1 2)

2016-05-23 Thread 'Leo Rokon' via Racket Users
On Monday, May 23, 2016 at 12:47:10 PM UTC-5, Leo Rokon wrote: > I just downloaded DrRacket, and it mostly works for me. > > However, I tried an example: > > (cons 1 2) > > And get this error message: > > cons: second argument must be a list, but received 1 and 2 > > > > The example

Re: [racket-users] new user, simple question: cannot run simple example: (cons 1 2)

2016-05-23 Thread Ben Greenman
You are probably using a student language instead of #lang racket To fix put "#lang racket" at the top of your program or click the language button at the bottom-left of your Dr.Racket window and pick a non-teaching language. On Mon, May 23, 2016 at 1:47 PM, 'Leo Rokon' via Racket Users <

[racket-users] new user, simple question: cannot run simple example: (cons 1 2)

2016-05-23 Thread 'Leo Rokon' via Racket Users
I just downloaded DrRacket, and it mostly works for me. However, I tried an example: (cons 1 2) And get this error message: cons: second argument must be a list, but received 1 and 2 The example here:

[racket-users] Arrows and syntax parameters

2016-05-23 Thread Tim Brown
Folks, I have a simple anaphoric macro, `awhen`, defined as: --- #lang racket (require racket/stxparam) (define-syntax-parameter it (λ (stx) (raise-syntax-error #f "use of “it” outside anaphor" stx))) (define-syntax (awhen

Re: [racket-users] Weirdness with typed racket and hashes

2016-05-23 Thread Brian LaChance
Hi, Matthew I'm pretty sure the problem you're having is that, even when you make a hash table using hash, TR can't tell that it's immutable. It only has one hash table type, HashTable, which is used for both mutable and immutable variants. You'll see a similar problem with your cons examples if

[racket-users] Weirdness with typed racket and hashes

2016-05-23 Thread Matthew Eric Bassett
Hi all, I noticed something weird today when playing around with typed racket (and flirting with the idea of using it in production). If I do something like: -> (ann (cons 'a 1) (Pairof Any Any)) - : (Pairof Any Any) '(a . 1) That works as expected. As does: -> (define t (cons 'a 1)) -> (ann