[racket] Ubuntu PPA update for 6.1

2014-08-05 Thread Asumu Takikawa
Hi all, The Ubuntu PPA for Racket has been updated to v6.1: https://launchpad.net/~plt/+archive/ubuntu/racket There are only packages for trusty and precise this time (the others have been deprecated on the build server). Let me know if you have any issues. I may not respond very quickly

Re: [racket] Puzzled about type inference

2014-08-05 Thread Norman Gray
Matthias and Sam, hello. This has been a very useful brief thread for me, and also, I suspect, for others. On 2014 Aug 4, at 01:22, Matthias Felleisen matth...@ccs.neu.edu wrote: In a sense, you put your finger on a sore spot of TR from R -- we are still figuring out how to help

Re: [racket] Puzzled about type inference

2014-08-05 Thread Alexander D. Knauth
First of all, thank you all of you, I have had similar problems with not knowing what to annotate and what not to. On Aug 5, 2014, at 5:36 AM, Norman Gray nor...@astro.gla.ac.uk wrote: If I were to move this code to Typed Racket, I'd add a type declaration to each identifier just like in

Re: [racket] Puzzled about type inference

2014-08-05 Thread Matthias Felleisen
In principle your email summarizes it all. I would like to add two comments though: --- 1. There was no contradiction between Sam's email (happy birthday Sam) and mine. My initial reaction was to fix up your program in a 'least intrusive' manner. That's why I left in the cast and simply

Re: [racket] Performance. Higher-order function

2014-08-05 Thread Gustavo Massaccesi
I made another test, using begin-encourage-inlining. I copied the definition of build-string and compare the normal version with the inlined version in Racket 6.1 racket version: cpu time: 1326 real time: 1334 gc time: 78 cpu time: 1248 real time: 1262 gc time: 31 cpu time: 1264 real time: 1264

[racket] racket/gui: changing the background color

2014-08-05 Thread David Nelson
I am working on a manufacturing system to asynchronously program and test 16 USB devices. The main display is a grid of slot displays. Each slot display currently is a group box with the slot number in big digits, a status message in normal sized text, and a guage to display the progress. I'd like

[racket] on contract violation after adding 1471 strings to a BST

2014-08-05 Thread Daniel Bastos
After studying chapter 14 of HtDP, I decided to try putting strings into a BST. The code below works with a few strings. I have a file with 22064 strings --- one per line. Up until 1471 words, it works. With 1472 it yields a contract violation. (length (read-words)) 22064

Re: [racket] on contract violation after adding 1471 strings to a BST

2014-08-05 Thread Jens Axel Søgaard
What happens in create-bst-word, when the word to inserted is the same as (node-word bst) ? /Jens Axel 2014-08-05 21:56 GMT+02:00 Daniel Bastos dbas...@toledo.com: After studying chapter 14 of HtDP, I decided to try putting strings into a BST. The code below works with a few strings. I have a

Re: [racket] on contract violation after adding 1471 strings to a BST

2014-08-05 Thread Daniel Bastos
On Tue, Aug 5, 2014 at 5:06 PM, Jens Axel Søgaard jensa...@soegaard.net wrote: What happens in create-bst-word, when the word to inserted is the same as (node-word bst) ? Aha! I see. It returns void because there is no case for when the string is equal. (void? (create-bst-word

Re: [racket] on contract violation after adding 1471 strings to a BST

2014-08-05 Thread Matthias Felleisen
Warning: you switched from a teaching language to full Racket. The former would have caught this mistake, which is why we designed them for HtDP. Racket is for grown-up parenthesis eaters -- who want the behavior of cond that you just experienced, or so I am told. -- Matthias On Aug 5,

[racket] syntax-parse question

2014-08-05 Thread Kevin Forchione
I’m interested in using syntax-parse to restructure the form (x (y … (z …) …)) but my coding of syntax-parse appears to be matching the (z …) as a y. I must be doing something wrong! Here’s the code: #lang racket (require (for-syntax syntax/parse)) (define-syntax (x stx) (syntax-parse stx

Re: [racket] on contract violation after adding 1471 strings to a BST

2014-08-05 Thread Daniel Bastos
Thanks for pointing this out. On Tue, Aug 5, 2014 at 5:43 PM, Matthias Felleisen matth...@ccs.neu.edu wrote: Warning: you switched from a teaching language to full Racket. The former would have caught this mistake, which is why we designed them for HtDP. Racket is for grown-up parenthesis

Re: [racket] syntax-parse question

2014-08-05 Thread Jens Axel Søgaard
Is this a step in the right direction? (define-syntax (x stx) (syntax-parse stx [(_ (y ... (z ...) w ...)) #'(xf (yf y ... (zf z ...) w ...))])) The pattern (z ...) ... will match a sequence of lists such as (4 5 6) (7 8) but it won't match (4 5 6) 7 8 from your example. /Jens Axel

Re: [racket] Puzzled about type inference

2014-08-05 Thread Norman Gray
Alexander, hello. On 2014 Aug 5, at 14:11, Alexander D. Knauth alexan...@knauth.org wrote: Well ann can’t add any detail, it can only make types less specific. Aha: I was thinking of this the wrong way round. If I type, say, #(1 2) into TR, it determines its type as #(1 2) - : (Vector

Re: [racket] Puzzled about type inference

2014-08-05 Thread Norman Gray
Matthias, hello. On 2014 Aug 5, at 14:23, Matthias Felleisen matth...@ccs.neu.edu wrote: --- 1. There was no contradiction between Sam's email (happy birthday Sam) and mine. On the contrary, I thought it was useful to see, between three alternatives, the contrast between a minimally- and a

Re: [racket] Puzzled about type inference

2014-08-05 Thread Raoul Duke
add type declarations to variables and fields and function and method signatures. A good motto, which I shall endeavour to remember. what i do not get about TR and other languages (ocaml, haskell, etc.) is: there are these rules of thumb that you must somehow learn to keep yourself out

Re: [racket] Puzzled about type inference

2014-08-05 Thread Alexander D. Knauth
On Aug 5, 2014, at 6:06 PM, Raoul Duke rao...@gmail.com wrote: add type declarations to variables and fields and function and method signatures. A good motto, which I shall endeavour to remember. what i do not get about TR and other languages (ocaml, haskell, etc.) is: there are

[racket] lists vs strings

2014-08-05 Thread jseb
Hello, It's too hot to go to the beach (anyway, no beach here). I'm having a look on Racket. I don't know anything about Lisp. I wonder the difference between: (list + 1 2) '(#procedure:+ 1 2) (list '+ 1 2) '(+ 1 2) What i've understood is that the first one interprets the + operator, and

Re: [racket] users Digest, Vol 107, Issue 99

2014-08-05 Thread Adam Emanon
Is there a way to sign up for a weekly digest? Several emails per day is too much for me. If not, I'll have to unsubscribe for now. On Mon, Jul 28, 2014 at 12:00 PM, users-requ...@racket-lang.org wrote: Send users mailing list submissions to users@racket-lang.org To subscribe or

[racket] ETAPS 2015 1st call for papers

2014-08-05 Thread Tarmo Uustalu
** CALL FOR PAPERS: ETAPS 2015 18th European Joint Conferences on Theory And Practice of Software London, UK, 11-18 April 2015 http://www.etaps.org/2015

Re: [racket] users Digest, Vol 107, Issue 99

2014-08-05 Thread Neil Van Dyke
Adam Emanon wrote at 07/28/2014 12:35 PM: Is there a way to sign up for a weekly digest? Several emails per day is too much for me. If not, I'll have to unsubscribe for now. I don't see one right now (just a daily digest), but the list can also be viewed through a few different Web

Re: [racket] lists vs strings

2014-08-05 Thread Norman Gray
jseb, hello. On 2014 Jul 27, at 12:51, jseb gmane2...@finiderire.com wrote: But i read that quote character is an alias for «list». Are there cases where it has different meaning ? (oh no, magic again :/ ). No, it's not an alias for 'list'; instead, it's syntactic sugar for 'quote' which is

Re: [racket] Puzzled about type inference

2014-08-05 Thread Robby Findler
On Tue, Aug 5, 2014 at 5:00 PM, Norman Gray nor...@astro.gla.ac.uk wrote: Simple, really -- cor, it's wall-to-wall epiphanies today This made my day. What better purpose could there possibly be for a mailing list than wall-to-wall epiphanies! Robby Racket Users list:

Re: [racket] Puzzled about type inference

2014-08-05 Thread Matthias Felleisen
You guys came up with some wonderful ideas. I think this particular one is easy to implement when the program type checks. But when it doesn't, what do you show? -- Matthias On Aug 5, 2014, at 6:13 PM, Alexander D. Knauth wrote: On Aug 5, 2014, at 6:06 PM, Raoul Duke

Re: [racket] Puzzled about type inference

2014-08-05 Thread Matthias Felleisen
(1) is already done. You must declare the types of all identifiers, in particular, variables, functions, fields, methods and structs as a whole. (2) is doable -- when the ti succeeds and I think we should at least provide the opption. On Aug 5, 2014, at 6:06 PM, Raoul Duke wrote:

Re: [racket] Puzzled about type inference

2014-08-05 Thread Robby Findler
Is TR's type checker organized in such a way that the decisions about what types are given to constants decided as a separate (first) phase? That is, no matter the context, is this constant: #(0 0) always going to be given the type (Vector Integer Integer), assuming there is no annotation?

Re: [racket] Puzzled about type inference

2014-08-05 Thread Matthias Felleisen
True because it is local inference. That's a thought -- Matthias On Aug 5, 2014, at 9:04 PM, Robby Findler wrote: Is TR's type checker organized in such a way that the decisions about what types are given to constants decided as a separate (first) phase? That is, no matter the context, is

Re: [racket] Puzzled about type inference

2014-08-05 Thread Robby Findler
Also because it is a decision that users a) have control over and b) may not guess TR's behavior correctly. Robby On Tue, Aug 5, 2014 at 8:08 PM, Matthias Felleisen matth...@ccs.neu.edu wrote: True because it is local inference. That's a thought -- Matthias On Aug 5, 2014, at 9:04 PM,