Re: [racket-users] the Racket manifesto

2015-03-26 Thread Matthias Felleisen
On Mar 26, 2015, at 7:42 AM, Konrad Hinsen wrote: In my opinion, it would be interesting to develop a pedagogical approach to the language development theme in the form of tutorials, books, or presentations. Maybe even a teaching language with a simplified version of syntax/parse. The goal

Re: [racket-users] the Racket manifesto

2015-03-26 Thread Matthias Felleisen
On Mar 26, 2015, at 7:42 AM, Konrad Hinsen konrad.hin...@fastmail.net wrote: I must be missing something interesting. Is there some tutorial on the Rites of Racket? ;-) I meant to address this one but a separate message is better anyway. Here we go: 0. open drracket 1. type ( 2. hit

Re: [racket-users] manifesto move

2015-03-30 Thread Matthias Felleisen
upon request. On Sat, Mar 28, 2015 at 11:03 AM, Matthias Felleisen matth...@ccs.neu.edu wrote: Now that the scribble is mostly cleaned up, I have moved the manifesto to a less temporary place: http://www.ccs.neu.edu/home/matthias/manifesto/ -- Matthias -- You received this message

Re: [racket-users] Using Redex

2015-03-31 Thread Matthias Felleisen
Paul, it sounds to me like what you really want is an analysis tool that can validate claims or perhaps synthesize (valid) properties from programs in your specification and implementation languages. As Jonathan says (indirectly), that's not really what Redex is for. If you had an analysis

Re: [racket-users] Re: Arcs and lines being half-drawn

2015-03-26 Thread Matthias Felleisen
Could you point to the complete code base? Thanks -- Matthias On Mar 26, 2015, at 9:38 AM, chia kang ren kangren.c...@gmail.com wrote: Here is a clearer photo. In the original (and working) graphical editor you can select the entities to highlight them in red. The entities are weirdly

Re: [racket-users] the Racket manifesto

2015-03-25 Thread Matthias Felleisen
On Mar 24, 2015, at 11:15 PM, Matthias Felleisen matth...@ccs.neu.edu wrote: On Mar 24, 2015, at 10:34 PM, Neil Van Dyke wrote: Shortly after I declare that Racket is not a cult, Racket goes and issues a manifesto. Neil V. Neil, I wrote this paper _because_ academia perceives Racket

Re: [racket-users] Projects (was: the Racket manifesto)

2015-03-25 Thread Matthias Felleisen
Thank you Greg. I couldn't have said it any better (probably worse). This is exactly the point -- Matthias On Mar 25, 2015, at 12:07 PM, Greg Hendershott greghendersh...@gmail.com wrote: My personal/casual take on this: There are language systems where you to need to run some

Re: [racket-users] the Racket manifesto

2015-03-26 Thread Matthias Felleisen
On Mar 26, 2015, at 7:42 AM, Konrad Hinsen wrote: In my opinion, it would be interesting to develop a pedagogical approach to the language development theme in the form of tutorials, books, or presentations. Maybe even a teaching language with a simplified version of syntax/parse. The goal

[racket-users] manifesto move

2015-03-28 Thread Matthias Felleisen
Now that the scribble is mostly cleaned up, I have moved the manifesto to a less temporary place: http://www.ccs.neu.edu/home/matthias/manifesto/ -- Matthias -- You received this message because you are subscribed to the Google Groups Racket Users group. To unsubscribe from this group and

Re: [racket-users] the Racket manifesto

2015-03-27 Thread Matthias Felleisen
On Mar 27, 2015, at 4:11 AM, Konrad Hinsen wrote: Matthias Felleisen writes: A web site is an ad. As is a research paper. It's the audience that differs. I am sorry but you embrace modern CS departments too much, and there is push-back coming about. Don't bother me with papers

Re: [racket-users] Re: Arcs and lines being half-drawn

2015-03-26 Thread Matthias Felleisen
Could you point to the complete code base? Thanks -- Matthias On Mar 26, 2015, at 9:38 AM, chia kang ren kangren.c...@gmail.com wrote: Here is a clearer photo. In the original (and working) graphical editor you can select the entities to highlight them in red. The entities are weirdly

Re: [racket-users] Projects (was: the Racket manifesto)

2015-03-26 Thread Matthias Felleisen
Thanks for sending this, again. I was writing a response very much along these lines when your post came in. 1. No, we cannot and will not replace all tools. Quite the opposite, I foresee a future in which we will produce many more tools. [Your effort will make me think twice before I write a

Re: [racket-users] How to find most efficient constructs/instructions beside benchmarking?

2015-04-13 Thread Matthias Felleisen
1. Yes, you should consider the performance of your programs as you design them. Indeed, there is an entire hierarchy of performance considerations to observer, starting with the choice of data representation, the operations on it, amortized vs worst-case scenarios, distribution of operations

Re: [racket-users] Typed analog of integer-in contract

2015-04-21 Thread Matthias Felleisen
#lang typed/racket (define-type NDigit (U 0 1 2 3 4 5 6 7 8 9)) (define-type SDigit (U 'zero 'one 'two 'three 'four 'five 'six 'seven 'eight 'nine)) (: to-string (- NDigit SDigit)) (define (to-string i) (case i [(0) (displayln i) 'zero] [(1) (displayln i) 'zero] [(2) (displayln

Re: [racket-users] Racketeer - Continuous Testing Plugin for DrRacket

2015-04-25 Thread Matthias Felleisen
, Matthias Felleisen wrote: NICE! On Apr 25, 2015, at 8:10 PM, Mira Leung wrote: Racketeer is a plugin for DrRacket that integrates continuous testing with Racket development. This is aimed primarily at the context of usage within university-level programming courses, and has been

Re: off-topic --- Re: [racket-users] Racketeer - Continuous Testing Plugin for DrRacket

2015-04-26 Thread Matthias Felleisen
On Apr 26, 2015, at 3:13 PM, Alexander D. Knauth wrote: On Apr 26, 2015, at 2:39 PM, Matthias Felleisen matth...@ccs.neu.edu wrote: On Apr 26, 2015, at 9:18 AM, Alexander D. Knauth wrote: I wanted to see if it could work for tests within (module+ test …), and it does (even though

Re: [racket-users] convert to/from Sribble

2015-04-22 Thread Matthias Felleisen
No need for that. You can write your own renderer :-) On Apr 22, 2015, at 1:02 AM, Gour g...@atmarama.net wrote: Matthias Felleisen matth...@ccs.neu.edu writes: We'd love to have an additional renderer for Scribble. Good. Btw, is there something like Scribble-2 planned

Re: [racket-users] convert to/from Sribble

2015-04-21 Thread Matthias Felleisen
We'd love to have an additional renderer for Scribble. On Apr 21, 2015, at 7:05 AM, Neil Van Dyke n...@neilvandyke.org wrote: Gour wrote on 04/21/2015 06:50 AM: Another way to get to lots of different formats from Scribble would be to make Scribble generate more-plain HTML5 (i.e., less

[racket-users] Re: [racket] Unsafe version of require/typed?

2015-05-01 Thread Matthias Felleisen
unsafe and programs that turn it on can behave in arbitrarily weird ways (when an error is skipped over). Robby On Mon, Mar 23, 2015 at 2:12 PM, Matthias Felleisen matth...@ccs.neu.edu wrote: On Mar 20, 2015, at 5:10 PM, Robby Findler ro...@eecs.northwestern.edu wrote: Well, that's

Re: [racket-users] Environment Shuffling and 3D Syntax

2015-05-10 Thread Matthias Felleisen
Probably off-topic: you might be interested in http://repository.readscheme.org/ftp/papers/sw2003/Scmxlate.pdf Start with the title and then the summary at the end. Dorai has used this package to make his programs available in Schemes and Common Lisps. -- Matthias On May 8, 2015, at

Re: [racket-users] Strange behaviour of the eq? operator in racket repl

2015-05-18 Thread Matthias Felleisen
SICP isn' the bible, especially not on programming language knowledge. I'd recommend checking out relevant literature instead. On May 18, 2015, at 8:24 AM, Michael Tiedtke michael.tied...@o2online.de wrote: Structure and Interpretation of Computer Programs (sicp2) about sameness:

Re: [racket-users] Doing pattern matching by reader macro

2015-05-18 Thread Matthias Felleisen
#lang racket (define/match (f n) [(#t) 2] [(#f) 3] [(_) 0]) (list (f #t) (f #f) (f where's my homework)) On May 18, 2015, at 9:04 AM, Mianlai Zhou mianlai.resea...@gmail.com wrote: Hi Racketeers, I am a new user of Racket. I would want to be able to write the following segment

Re: [racket-users] Doing pattern matching by reader macro

2015-05-18 Thread Matthias Felleisen
from my original code above. Could you give me an answer? Thanks. M. On Mon, May 18, 2015 at 9:20 PM, Matthias Felleisen matth...@ccs.neu.edu wrote: #lang racket (define/match (f n) [(#t) 2] [(#f) 3] [(_) 0]) (list (f #t) (f #f) (f where's my homework)) On May 18

Re: [racket-users] A typo? HTDP2e/draft exercise 50 and the show function

2015-05-13 Thread Matthias Felleisen
Correct. The question is meaningless. Thanks for the correction. -- Matthias On May 13, 2015, at 11:44 AM, Li Junsong ljs.darkf...@gmail.com wrote: Hello, The `show' function above exercise 50 in HTDP2e draft (or exercise 52 in HTDP2e) is: (define (show x) (cond [(string? x)

Re: [racket-users] constant propagation

2015-05-18 Thread Matthias Felleisen
Constant propagation is not a property of a language but its implementation. Few implementations document which transformations they currently implement. -- Matthias On May 18, 2015, at 7:11 AM, Jos Koot wrote: Very nice constant propagation in Racket. For example the Racket compiler

Re: [racket-users] Organizing tests

2015-04-16 Thread Matthias Felleisen
Use different names for the various test modules. At the local level, you can use module+ test. For the integration tests, you may wish to use module+ integration. Then run raco test with the parameter that takes the name of the submodule you want. (If you really want to run unit tests together

Re: [racket-users] How to find most efficient constructs/instructions beside benchmarking?

2015-04-13 Thread Matthias Felleisen
On Apr 13, 2015, at 12:29 AM, George Neuner gneun...@comcast.net wrote: There are some obvious cases, but most programmer guesses at where high optimization is needed are simply wrong ... which is precisely why some people here are working on compiler/optimization coaching and profiling.

Re: [racket-users] Struggling with macros

2015-04-13 Thread Matthias Felleisen
Take a look at the PLAI language and define-type. I recommend you elaborate your syntax into PLAI constructs. On Apr 13, 2015, at 12:40 PM, Nils Van Geele nils.vge...@gmail.com wrote: On Monday, April 13, 2015 at 6:26:38 PM UTC+2, Alexis King wrote: What exactly is the difference here

Re: [racket-users] htdp/2e: exercises 336-338, feedback desired and questions

2015-04-05 Thread Matthias Felleisen
[[ Please switch to draft release. ]] On Apr 2, 2015, at 3:03 PM, Daniel Bastos wrote: ​​Exercise 336 ​Solution. It's not a proper use. It produces nothing. It doesn't terminate. Because (drop ls 0)​ returns a list not smaller than ls, hence the recursion of bundle doesn't reach the

Re: [racket-users] How to find most efficient constructs/instructions beside benchmarking?

2015-04-06 Thread Matthias Felleisen
You almost never have to worry about the efficiency of (second x) (cadr x) and (car (cdr x)). There are always bigger fish to fry than that. On Apr 6, 2015, at 3:37 AM, Lux glsdes...@gmail.com wrote: It is more efficient (second myList) or (car (cdr myList)) if it is any difference at

Re: [racket-users] compliment given to Racket's macro system from Haskell programmer

2015-04-08 Thread Matthias Felleisen
Jesse is a product of our NU lab. After a tour of Harvard (2x), he's back here so he sees good syntax extensions at work every day. -- Matthias On Apr 8, 2015, at 9:54 AM, Geoffrey S. Knauth ge...@knauth.org wrote: See:

Re: [racket-users] Constant syntax coloring?

2015-04-09 Thread Matthias Felleisen
In #lang languages syntax coloring happens on-line and is almost always close to correct. If you see a red dot in the bottom right of drracket, mouse over it, click to enable syntax checking. On Apr 9, 2015, at 2:59 AM, Jack Firth jackhfi...@gmail.com wrote: The DrRacket Check Syntax

Re: [racket-users] Storing functions in a hash

2015-05-20 Thread Matthias Felleisen
Yes, this is over-engineered. What do you not like about (define h1 (hash 'foo (lambda () (random 100)) 'bar (lambda () (random 500 (displayln h1) (displayln ((hash-ref h1 'foo))) (displayln ((hash-ref h1 'foo))) (displayln ((hash-ref h1 'bar))) (displayln ((hash-ref h1 'bar)))

Re: [racket-users] strange bug with racket/gui

2015-06-02 Thread Matthias Felleisen
You want to override on-paint: #lang racket (require racket/gui/base) (define frame (new frame% [label Example] [width 300] [height 300])) (define canvas ;; classes are first-class http://www.ccs.neu.edu/home/matthias/Tmp/Class/programming-with-class/ (new (class

Re: [racket-users] Removing duplicates from a list while maintaining order

2015-06-03 Thread Matthias Felleisen
In BSL: ;; - ;; [Listof X] - [Listof X] ;; remove duplicates ... ;; - ;; ... keeping the copy on the left (require racket/base) ;; to import

Re: [racket-users] strange bug with racket/gui

2015-06-02 Thread Matthias Felleisen
was started to get the code out of the body of a function. Is there a way I could run your solution with (send (send canvas get-dc) draw-rectangle 30 20 10 40) running in the top level? -Luke On Tue, Jun 2, 2015 at 3:43 PM, Matthias Felleisen matth...@ccs.neu.edu wrote: You want

Re: [racket-users] Re: Removing duplicates from a list while maintaining order

2015-06-03 Thread Matthias Felleisen
Apologies for posting a solution. Since the OP had some code, I thought I'd show him the essence .. throwing in (require racket) as the key to any instructor who'd grade (and care that a student had cheated). -- Matthias On Jun 3, 2015, at 8:07 PM, Prabhakar Ragde wrote: This is a

Re: [racket-users] Closing big-bang windows

2015-06-22 Thread Matthias Felleisen
close the windows? Matthias Felleisen: But people wanted it to stay open so that they could see the final score of their games etc. I guess I could add a close-on-stop clauses for programmers such as your son but it sounds almost like he's ready to move on to racket proper, as in use

Re: [racket-users] Closing big-bang windows

2015-06-23 Thread Matthias Felleisen
I have for years hoped to find time to think about 'distributing state' over handlers in big-bang because I am perfectly aware of the scaling up limitations. Your hashtable idea might be worth exploring. Tony and I are also considering his actor system as a source of ideas. This may also give

Re: [racket-users] drawing with canvas

2015-06-22 Thread Matthias Felleisen
[[ I am tempted to say that you misplaced the parentheses and brackets and broke lines at the wrong place. ]] Here is a re-ordering of the first don't work variant that kind of works: #lang racket (require slideshow racket/class racket/gui/base) (define my-frame (new frame% [label

Re: [racket-users] Defining contracts sanely

2015-06-21 Thread Matthias Felleisen
#lang racket (module server racket (provide (contract-out (fish% (class/c (update (-m degrees-of-freshness any/c)) (field [freshness degrees-of-freshness]) (define degrees-of-freshness (one-of/c 'fresh 'frozen 'edible 'rotten)) (define fish% (class

Re: [racket-users] Closing big-bang windows

2015-06-21 Thread Matthias Felleisen
It used to be that when you ran a program like this ;; isl+ (require 2htdp/image) (require 2htdp/universe) (big-bang 10 (to-draw (lambda (x) (circle (+ (* 10 x) 20) 'solid 'red))) (on-tick sub1) (stop-when zero?)) The window would shut down. But people wanted it to stay open so that

Re: [racket-users] Re: Converting a heterogenous list into a string

2015-06-21 Thread Matthias Felleisen
On Jun 21, 2015, at 7:44 PM, Jon Zeppieri wrote: I was just assuming that the input format was non-negotiable. So did Matthew a long time ago. And now we have Racket because of that :-) -- You received this message because you are subscribed to the Google Groups Racket Users group. To

Re: [racket-users] Closing big-bang windows

2015-06-21 Thread Matthias Felleisen
On Jun 21, 2015, at 2:54 PM, Alexis King wrote: I guess I could add a close-on-stop clauses for programmers such as your son but it sounds almost like he's ready to move on to racket proper, as in use the Windowing API directly. FWIW, despite big-bang’s position as a teaching tool, I

Re: [racket-users] Re: Converting a heterogenous list into a string

2015-06-21 Thread Matthias Felleisen
I think the proper way of thinking Racket-y is to re-consider the input representation: (define our-list '((a 1) (b 2.5) (c #t) (d hi))) (string-join (map (match-lambda [`(,l ,v) (format [~a=~a] l v)]) our-list)) You really want labels and values to be clearly paired, and the above

Re: [racket-users] drawing with canvas

2015-06-25 Thread Matthias Felleisen
scientist, Mianlai From: Matthias Felleisen [matth...@ccs.neu.edu] Sent: 23 June 2015 6:07 To: Mianlai Zhou Cc: Racket-Users List Subject: Re: [racket-users] drawing with canvas [[ I am tempted to say that you misplaced the parentheses

Re: [racket-users] Moving an image with the keyboard

2015-06-27 Thread Matthias Felleisen
Patrick, I get the sense that this is your first experience with programming and programming languages. If so, Realm is not the best way to get started. As it says in the Preface, it's for people with a first course on programming under their belt (either How to Design Programs /HtDPor some

Re: [racket-users] rackunit

2015-06-19 Thread Matthias Felleisen
While Racket enables the construction of new frameworks and languages, indeed encourages it, I think rackunit has proven its value and many of us use it as a de factor standard. (Some also use Eli's test library, because they enjoy the simpler syntax. But it's not quite ready and I am

Re: [racket-users] Gear VR

2015-06-23 Thread Matthias Felleisen
We welcome all posts connected to Racket. Post away. -- Matthias p.s. The question is whether you get suitable feedback. My life is so abstract, I sometimes wonder what reality is :-) On Jun 23, 2015, at 7:36 PM, John Carmack wrote: The intersection of Gear VR owners and Racket users may

[racket-users] #true, #false, '()

2015-06-26 Thread Matthias Felleisen
Dear educators and users of our teaching languages, Dave Tompkins from Waterloo brought to our attention that I failed to properly warn about a change to the teaching languages of HtDP. Since the change may affect your teaching materials, we want -- to alert you now in case

Re: [racket-users] DrRacket stubbornly indents code as if it were Racket

2015-06-16 Thread Matthias Felleisen
You will need to find where drracket parses the first line and then install the mode that you want. I do not know whether a language per se can access this line. But we are moving toward #lang precisely for that purpose. I am sure Robby will welcome proposal on how to change this and even

Re: [racket-users] OK to post Redex and HtDP questions here?

2015-06-13 Thread Matthias Felleisen
Yes. On Jun 13, 2015, at 9:04 AM, Harold Carr wrote: Is it OK to post Redex and HtDP questions here? -- 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

Re: [racket-users] Racket modules in R6RS?

2015-06-11 Thread Matthias Felleisen
Let me rephrase Matthew. Racket is only related to Scheme. See http://racket-lang.org/new-name.html for an explanation of our move. Our understanding is that the Scheme community wants to move back to a world where the language is small while Racket wants to move to a world where programmers

Re: [racket-users] Racket modules in R6RS?

2015-06-11 Thread Matthias Felleisen
would love to hear it, but I’m a little too intimidated to have a crack at it myself, versus Chibi or various other small Schemes that are just a few files of C code. From: Matthias Felleisen [mailto:matth...@ccs.neu.edu] Sent: Thursday, June 11, 2015 7:05 PM To: John Carmack Cc: Racket

Re: [racket-users] Way to open DrRacket at a specific file line?

2015-05-28 Thread Matthias Felleisen
On May 28, 2015, at 12:20 PM, Josh Grams wrote: I asked how to build it from source, but just got pointed to the snapshot binaries instead of getting a real answer. That's a serious mistake and I apologize. It shouldn't happen -- Matthias -- You received this message because you are

Re: [racket-users] Way to open DrRacket at a specific file line?

2015-05-28 Thread Matthias Felleisen
On May 28, 2015, at 3:40 AM, Lux glsdes...@gmail.com wrote: I can not code anymore without DrRacket. +1 I know DrRacket has some downsides, but I sure wish many more people would see the light, use it, and help identify and better yet fix the problems. Thanks for the vote of confidence

Re: [racket-users] Iteration speed

2015-06-02 Thread Matthias Felleisen
On Jun 2, 2015, at 1:20 AM, Matthew Butterick m...@mbtype.com wrote: I've increasingly been using TR this way (= keeping code in a state where it can be easily toggled between typechecked and not). It works, though I'm still thinking about how to achieve better ergonomics with these issues,

Re: [racket-users] Gear VR

2015-07-01 Thread Matthias Felleisen
On Jul 1, 2015, at 7:07 AM, AJ Campbell a...@rocketsail.com wrote: JSON is probably going to be the go-to format to send/receive renderable 3D packets. The thought of doing it with XML makes me feel ill. I'm sure Racket can handle JSON data (it very well might already for all I know), It

Re: [racket-users] generalised set! in Racket

2015-06-30 Thread Matthias Felleisen
On Jun 30, 2015, at 6:43 PM, George Neuner wrote: On 6/30/2015 5:34 PM, 'John Clements' via Racket Users wrote: On Jun 30, 2015, at 8:10 AM, Alexey Cherkaev alexey.cherk...@gmail.com wrote: ... wouldn't it be beneficial to have such a generalised 'set!' system-wide? I understand

Re: [racket-users] API function naming

2015-07-03 Thread Matthias Felleisen
1. +1 on Neil's +sound and +set-position convention (as a private Racket citizen not the style guide author) 2. When I find myself writing such code now, I often write a syntactic extension that gives me some flexibility in how I want to do it: (commands (sound ...) (set-position ...)

Re: [racket-users] Gear VR

2015-07-02 Thread Matthias Felleisen
On Jul 1, 2015, at 1:13 PM, Neil Toronto neil.toro...@gmail.com wrote: On 07/01/2015 10:47 AM, John Carmack wrote: S-expressions actually are one of the core wins from my use of lisp so far -- embracing read/write (and the associated bandwidth cost) as a wire protocol over yet another

Re: [racket-users] on module: identifier already imported from a different source

2015-06-30 Thread Matthias Felleisen
On Jun 30, 2015, at 8:23 AM, Daniel Bastos dbas...@toledo.com wrote: At some point I should move to full-fledged Racket. I suppose after HtDP I should read another book. Perhaps Realm of Racket? When you have mastered a good part of HtDP, you should move on to Realm. -- Matthias -- You

Re: [racket-users] Emacs Lisp as a Racket Language?

2015-07-02 Thread Matthias Felleisen
Guile has adopted a lot of Racket ideas. So they are building the platform to which to port Emacs. Consider building Emacs in Racket and then building a sane API. This project probably requires an even longer time horizon. Tony Garnock-Jones of Marketplace and Minimart (see (fourth

Re: [racket-users] test amazes me

2015-05-24 Thread Matthias Felleisen
I didn't implement test-engine but worked with Kathy to design and occasionally add features and/or maintain it. As you may know, in *SL the test-engine library runs (test) automatically when a programmer runs a program. That works out perfectly. I never imagined this library used for plain

Re: [racket-users] typed/rackunit and test-case

2015-05-25 Thread Matthias Felleisen
The next release is in preparation. It should be out soon -- Matthias On May 25, 2015, at 2:11 AM, Lehi Toskin wrote: That's unfortunate. I'll wait until the next release and then try out test-case co. On Sunday, May 24, 2015 at 11:03:45 PM UTC-7, Alexis King wrote: Since test-case

Re: [racket-users] Simple Interdependent Units?

2015-05-25 Thread Matthias Felleisen
On May 25, 2015, at 5:52 AM, Michael Tiedtke wrote: As I had to find out Racket's module system doesn't support cyclic dependencies. In that case I should use units. But as far as I have understood the concept of full fledged units I must either write a lot of redundant code like

Re: [racket-users] Simple Interdependent Units?

2015-05-25 Thread Matthias Felleisen
On May 25, 2015, at 3:19 PM, Michael Tiedtke michael.tied...@o2online.de wrote: See, you're doing away with the class definitions and substitute them with unit definitions. This is what I meant when I wrote you recreated encapsulation and inheritance. (Because linking somehow resembles

Re: [racket-users] Simple Interdependent Units?

2015-05-25 Thread Matthias Felleisen
If you mean you want truly decoupled views and models, you'd end up in this position: #lang racket ;; decoupled model-view (module model racket (provide model%) (define model% (class object% (init-field view) (super-new) (define the-number 12)

Re: [racket-users] Generic collections in Racket

2015-05-25 Thread Matthias Felleisen
Alexis, think of a lazy sequence as something that the rest of the program will explore. In addition to a GUI-based exploration, I would love to see a programmatic one. Imagine (explore-lazy lazy-sequence:exp strictness-pattern:exp) where (the value of) strictness-pattern is a function

Re: [racket-users] Simple Interdependent Units?

2015-05-25 Thread Matthias Felleisen
No. On May 25, 2015, at 6:59 PM, Luke Whittlesey wrote: Would lazy-require work here? http://docs.racket-lang.org/reference/lazy-require.html On Mon, May 25, 2015 at 3:56 PM, Matthias Felleisen matth...@ccs.neu.edu wrote: On May 25, 2015, at 3:19 PM, Michael Tiedtke michael.tied

Re: [racket-users] Simple Interdependent Units?

2015-05-26 Thread Matthias Felleisen
On May 26, 2015, at 1:10 AM, Michael Tiedtke wrote: Sorry, ut I call it a workaround. Please read up on programming language design. -- You received this message because you are subscribed to the Google Groups Racket Users group. To unsubscribe from this group and stop receiving emails

Re: [racket-users] Typed racket equivalent of Haskell newtype?

2015-05-23 Thread Matthias Felleisen
Stuart, would a predicated refinement type work for you: -- http://docs.racket-lang.org/ts-reference/special-forms.html?q=define-predicate#%28form._%28%28lib._typed-racket%2Fbase-env%2Fprims..rkt%29._make-predicate%29%29 On May 23, 2015, at 6:14 PM, Alexander D. Knauth wrote: As far as I

Re: [racket-users] Flower Garden: Open Flowers

2015-05-23 Thread Matthias Felleisen
Why don't you put this into github and register it with the package server? On May 23, 2015, at 1:22 PM, Michael Tiedtke wrote: This is a feature release for those interested in solitaire card games. Keywords: message passing, solitaire, stateful objects, parallel objects, hint

Re: [racket-users] Scribble abstraction to attach styles

2015-05-21 Thread Matthias Felleisen
Isn't it the whole point of styles to allow this kind of fixes? I am playing with similar fixes for TeX output. Scribble is an UNCOL and all UNCOLs fail a little bit at least -- Matthias On May 21, 2015, at 2:19 PM, Shriram Krishnamurthi shri...@gmail.com wrote: Understood. But my

Re: [racket-users] test submodules vs tests in separate file

2015-05-22 Thread Matthias Felleisen
DOn't forget $ raco test --submoulde matthew-s-tests On May 22, 2015, at 3:12 PM, Matthew Butterick m...@mbtype.com wrote: Has this been an oversight? Do we need two official test submodules? One from the inside, and one from without. That’s a worthy point. I prefer to locate tests as

Re: [racket-users] API design 2 -- variadic styles

2015-07-07 Thread Matthias Felleisen
I'll second-third Alexis and Stephen. But if you really want these things to run in a Scheme in addition to Racket, you may wish to emulated big-bang and universe style keywords because Schemes don't do #:loop keywords. You won't have to change surface syntax or modify the reader of a Scheme

Re: [racket-users] Using the draw and plot packages with other languages

2015-08-15 Thread Matthias Felleisen
Hi -- nobody here is accusing you of anything. It's just that we are not used to the words profit and maximize profit on this mailing list. In general I agree with you that it would be wonderful if we could easily integrate tools across programming languages. Sadly, I think that this is

Re: [racket-users] My son's game in Racket

2015-08-24 Thread Matthias Felleisen
On Aug 24, 2015, at 12:27 PM, John Carmack jo...@oculus.com wrote: We “released” my 10 year old son’s game that was done in Racket: www.1k3c.com I’m still taking a little heat from my wife for using an obscure language instead of something mainstream that is broadly used in industry, but

Re: [racket-users] Macro that does substitution

2015-07-29 Thread Matthias Felleisen
On Jul 29, 2015, at 7:50 AM, Klaus Ostermann wrote: Thanks, Matthew and Matthias. The service on this mailing list is incredible! I know it is not cbn because it is local, but a better name didn't come to my mind and it is what I need to solve my problem. It's not about locality, the

Re: [racket-users] Full (fifth RacketCon) Program is up!

2015-07-29 Thread Matthias Felleisen
) is now available! [1] Don't forget to register! [2] RacketCon is a yearly event where members of the Racket community get together, featuring talks and demos about the things you do with Racket. On the menu is The Racket Manifesto by Matthias Felleisen, plus topics ranging of topics from music

Re: [racket-users] continuing after a user break

2015-07-28 Thread Matthias Felleisen
As Jay indicated, I believe in eating some of my dog food so I do use DrRacket for writing Racket programs. But yes, as he also said I tuned DrRacket to fit my taste a bit and it works reasonably well for maintaining my friends in the htdp package. And I will admit that on rare occasions I

Re: [racket-users] Macro that does substitution

2015-07-29 Thread Matthias Felleisen
(I was 2/3 there when I noticed Matthew's response.) Klaus, fwiw this is NOT cbn. A cbn let will run the thunks only when they show up in strict positions. Not every identifier shows up in strict positions. On Jul 29, 2015, at 7:37 AM, Matthew Flatt wrote: At Wed, 29 Jul 2015 06:28:48

Re: [racket-users] Macro that does substitution

2015-08-03 Thread Matthias Felleisen
Correct. There should never be an exception because the value never ends up in a strict position. -- Matthias On Aug 3, 2015, at 12:44 PM, Andrew Gwozdziewycz apg...@gmail.com wrote: On Wed, Jul 29, 2015 at 9:30 AM, Matthias Felleisen matth...@ccs.neu.edu wrote: On Jul 29, 2015

Re: [racket-users] eval PSA (was Sending Closures to Places)

2015-08-04 Thread Matthias Felleisen
I didn't really want to get involved in this kind of discussion but I need to take exception to this kind of statement. Code is not just written. Code is read. Code is read far more often than written. Code that uses a specific construct conveys a specific idea, and it thus helps the reader

Re: [racket-users] Comparing (delimited) continuations in Racket

2015-08-14 Thread Matthias Felleisen
On Aug 14, 2015, at 7:02 AM, Klaus Ostermann klaus...@gmail.com wrote: Robby, I think what I want is simple to say: If I have a Racket program and manually CPS-transform and then defunctionalize it, I would be able to compare and analyze continuations (and normal procedures, for that

Re: [racket-users] Bitmap drawing performance

2015-08-10 Thread Matthias Felleisen
On Aug 10, 2015, at 1:19 PM, John Carmack jo...@oculus.com wrote: We are just getting ready to “release” my son’s little Racket game, but after doing all the development on OS-X, I find that the windows performance is terrible. In hindsight, we should have just used bitmap / dc drawing

Re: [racket-users] How to use new 6.2.1 feature for true instead of #true, etc. ?

2015-08-12 Thread Matthias Felleisen
Open the language dialogue. Click 'choose details'. On the right side, you will see a radio button for true/false/empty vs #true/#false/'(). On Aug 12, 2015, at 8:43 AM, Charles Rich wrote: Hi, in the release notes for 6.2.1 it says: * For the How to Design Programs teaching

Re: [racket-users] is this a bug?

2015-08-06 Thread Matthias Felleisen
No, it's syntax. On Aug 6, 2015, at 11:09 AM, sagyo12341...@gmail.com wrote: In racket, the proc apply-or is needed. (or #f 1 2 #f 3 4 #f) 1 (apply or (list #f 1 2 #f 3 4 #f)) . or: bad syntax in: or (define (apply-or lst) (foldr or #t lst)) . or: bad syntax in: or (define (apply-or

Re: [racket-users] Macro to extract select subexpressions into other locations

2015-07-21 Thread Matthias Felleisen
Why not step back and design a notation where testing and documenting can share concepts instead of retro-actively extracting expressions from one place to put somewhere else. -- Matthias On Jul 21, 2015, at 3:23 PM, Alexander D. Knauth alexan...@knauth.org wrote: Oh. I checked that

Re: [racket-users] What limits would you put on racket?

2015-07-23 Thread Matthias Felleisen
On Jul 23, 2015, at 12:51 AM, Sayth Renshaw flebber.c...@gmail.com wrote: Hi Just getting reacquainted with Racket going back through HTDP 2nd edition and the edx intro course. Is there a point where you would say yeah Racket shouldn't go there, it's best at A B or C you should go to

Re: [racket-users] set a timeout to tcp-connect

2015-07-17 Thread Matthias Felleisen
On Jul 17, 2015, at 9:31 AM, mazert rom...@elgeekador.net wrote: #lang racket (define (foo) (let* ([a (thread (λ () (let-values ([(p-in p-out) (tcp-connect google.com 80)]) (kill-thread b] [b (thread (λ ()

Re: [racket-users] Canvas animation slowness

2015-07-16 Thread Matthias Felleisen
I conjecture method calls contribute to the expense. Here is a way to eliminate ~~ half the calls for the inner loop: (define (draw-to-dc dc) (send dc set-pen no-pen) (send dc set-brush brush-red) (send dc draw-rectangle 0 0 XMAX YMAX) (send dc set-brush brush-blue) (for* ([x

Re: [racket-users] My son's game in Racket

2015-08-24 Thread Matthias Felleisen
On Aug 24, 2015, at 3:40 PM, François Beausoleil francois.beausol...@gmail.com wrote: Le lundi 24 août 2015 12:28:07 UTC-4, John Carmack a écrit : ... Hello John, Thanks for sharing. Played a few levels and had fun :) I have a 10 year old daughter. Did your son show interest in

Re: [racket-users] Re: My son's game in Racket

2015-08-24 Thread Matthias Felleisen
On Aug 24, 2015, at 2:32 PM, John Carmack jo...@oculus.com wrote: The idea that you functionally compose images like this: (place-image image-1 x y (place-image image-2 x y (place-image image-3 x y))) Which draws image1 on top of image2 on top of image 3, which is

Re: [racket-users] adding meaning to boolean return values

2015-11-09 Thread Matthias Felleisen
Yes, this is correct. But it is not a problem for Typed Racket, which was designed to accommodate precisely this style of programming: #lang typed/racket (define-type [Option P] (U P False)) (define-type SPath String) (: file-exists-> (-> SPath [Option SPath])) (define (file-exists-> name)

Re: [racket-users] How to get information about where an error occurs, in a stack trace context?

2015-11-08 Thread Matthias Felleisen
Use drracket. Or if you insist on command line usage, use error trace. > On Nov 8, 2015, at 8:35 PM, Nota Poin wrote: > > I'll have code like this: > > #lang racket/base > > (define (baz foo) > (error 'whoops)) > > (define (bar ber) > (baz ber)) > > (define (foo

Re: [racket-users] Mandatory arguments for command-line

2015-11-13 Thread Matthias Felleisen
Glad to hear you got this far. Consider using something like this: #! /bin/sh #| exec racket -tm "$0" ${1+"$@"} |# #lang racket (provide main) (define main (case-lambda [(the-mandatory-argument . others) (displayln `(the-mandatory-argument:

Re: [racket-users] Mandatory arguments for command-line

2015-11-14 Thread Matthias Felleisen
It is not an either-or situation. Here is an alternative run where I combined case-lambda with command-line: > $ ./manage hello -t world -d good > (the-mandatory-argument: hello #t) > (-t #f) > (-d good) > (files: ()) The script is this now: #! /bin/sh #| exec racket -tm "$0" ${1+"$@"} |#

Re: [racket-users] Racket program that finds the number of sym bols, the number of numerical characters and the number of alphabetical characters in an inp ut string.

2015-11-16 Thread Matthias Felleisen
On Nov 16, 2015, at 2:58 PM, Merve Tektaş wrote: > > Example Output: > “PsPe4-3 ds** 9kKt??” > numbers: 3 > symbols: 5 > letters: 9 > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from

Re: [racket-users] Miscellaneous bugs/feature requests

2015-11-17 Thread Matthias Felleisen
On Nov 16, 2015, at 8:11 PM, Josh Grams wrote: > I've spent a week or two with 2htdp/universe in preparation for doing a > little intro to Racket talk. And...I have a few little things: > > - DrRacket: is there some way to set a key binding to rename a symbol? > It's

  1   2   3   4   5   6   >