Re: [racket] Continue: reentrant promises and custodian suicides

2011-07-16 Thread Jay McCarthy
2011/7/14 Dominic Pearson : >> >     thread: the custodian has been shut down: # >> >> I'm not sure about this one. Do you get a context/backtrace with this error? > > Unfortunately that is the only message printed to the console. If > there's a way to make this more verbose or helpful I am more th

Re: [racket] Periodic calls to collect-garbage?

2011-07-16 Thread Jay McCarthy
[I've been away from the computer] The Web server does this so that requests don't cause the GC to run and create a pause. Instead, the GC is always possibly running so that it will run when the server isn't being accessed. That's the idea at least. I didn't do very involved experiments to see tha

Re: [racket] Advice: simulating stateful API in functional setting

2011-07-16 Thread Stephen Bloch
On Jul 16, 2011, at 1:58 PM, Shriram Krishnamurthi wrote: > On Sat, Jul 16, 2011 at 11:16 AM, Stephen Bloch wrote: >> >> Here's another idea: provide a "sprite+picture" structure, and have all the >> operations take in and return it. > > This is unwieldy beyond measure in our syntax. Yes, th

Re: [racket] Advice: simulating stateful API in functional setting

2011-07-16 Thread Mark Engelberg
On Sat, Jul 16, 2011 at 7:33 AM, Stephen Bloch wrote: > These functions would presumably maintain the invariant that each name > corresponds to at most one sprite in a world.  Letting the kids manipulate > the list of sprites directly does NOT maintain that invariant, so I think I > have to do

Re: [racket] Advice: simulating stateful API in functional setting

2011-07-16 Thread Shriram Krishnamurthi
On Sat, Jul 16, 2011 at 11:16 AM, Stephen Bloch wrote: > > Here's another idea: provide a "sprite+picture" structure, and have all the > operations take in and return it. This is unwieldy beyond measure in our syntax. Shriram _ For list-related

[racket] struct-copy parent fields with provide/contract'ed struct

2011-07-16 Thread Nadeem Abdul Hamid
Am I missing something, or is this a bug? The following works as expected: Welcome to DrRacket, version 5.1.2.3--2011-07-13(41b66d3/a) [3m]. Language: racket; memory limit: 128 MB. > (module yup racket (struct a (x y) #:transparent) (struct b a (z) #:transparent) (provide (struct-out a

Re: [racket] what kind of Racket editor operations would you like to see?

2011-07-16 Thread Markku Rontu
Something that I forgot from my list was also visibility to the defined tests, their results and code coverage of said tests. Navigating to and back from a definition as well as to and back from test (of said definition). -Markku 2011/7/16 Ivanyi Peter > > > Robby Findler írta: > >I realize th

Re: [racket] what kind of Racket editor operations would you like to see?

2011-07-16 Thread Ivanyi Peter
Robby Findler írta: >I realize that Check Syntax requires some setup time, but speaking> purely in terms of functionality, is that getting at what you want?> I am not sure, as I have not tried Check Syntax yet, (now that I know of it I will try), but seeing the other e-mails I think we are con

Re: [racket] Advice: simulating stateful API in functional setting

2011-07-16 Thread Ivanyi Peter
Matthias Felleisen írta: > > And that leaves only one option: start with mathematical-style programming > because we know that this is mathematics and there is no transfer needed. It > is the *same* skill. Just my 2 cents. :-)) I fully agree with this. We teach "web programmers". They learn

Re: [racket] what kind of Racket editor operations would you like to see?

2011-07-16 Thread Stephen Chang
>> Also would be nice to be able to have >> visibility to all defined modules, requires, provides, functions, classes, >> structs etc. in a whole project and quick navigation within it. > > I also would like to vote for these. > - Project view. Yes, please. Somewhat related to this. I would like b

Re: [racket] what kind of Racket editor operations would you like to see?

2011-07-16 Thread Matthias Felleisen
p.s. As much as I use etags for such things in Emacs, I also know that it's "morally" wrong. On Jul 16, 2011, at 11:23 AM, Robby Findler wrote: > Well, that's something that we should work out, separately from DrRacket. > > Robby > > On Sat, Jul 16, 2011 at 10:21 AM, Matthias Felleisen > w

Re: [racket] what kind of Racket editor operations would you like to see?

2011-07-16 Thread Matthias Felleisen
Yes, and then the Dr should support it. On Jul 16, 2011, at 11:23 AM, Robby Findler wrote: > Well, that's something that we should work out, separately from DrRacket. > > Robby > > On Sat, Jul 16, 2011 at 10:21 AM, Matthias Felleisen > wrote: >> >> I think this is the notion of a *project*

Re: [racket] what kind of Racket editor operations would you like to see?

2011-07-16 Thread Robby Findler
Well, that's something that we should work out, separately from DrRacket. Robby On Sat, Jul 16, 2011 at 10:21 AM, Matthias Felleisen wrote: > > I think this is the notion of a *project*, which we don't support > linguistically. I have wanted this myself often. > > > On Jul 16, 2011, at 11:20 AM

Re: [racket] what kind of Racket editor operations would you like to see?

2011-07-16 Thread Matthias Felleisen
I think this is the notion of a *project*, which we don't support linguistically. I have wanted this myself often. On Jul 16, 2011, at 11:20 AM, Robby Findler wrote: > You want to have a renaming operator that connects provides and > requires? Since you can't find all the requiring files, per

Re: [racket] what kind of Racket editor operations would you like to see?

2011-07-16 Thread Robby Findler
You want to have a renaming operator that connects provides and requires? Since you can't find all the requiring files, perhaps you want to circle a group of files in the module browser or something to do the renaming? (Or do you have something else in mind?) Robby On Sat, Jul 16, 2011 at 10:16 A

Re: [racket] what kind of Racket editor operations would you like to see?

2011-07-16 Thread Sam Tobin-Hochstadt
I think the big difference, as someone who currently uses Check Syntax a lot, is that Peter is asking for refactoring that reaches to other files. Perhaps the right way to integrate this is via the module browser. On Jul 16, 2011 10:06 AM, "Robby Findler" wrote: > > I realize that Check Syntax re

Re: [racket] Advice: simulating stateful API in functional setting

2011-07-16 Thread Stephen Bloch
On Jul 16, 2011, at 10:33 AM, I wrote: > some version of [each sprite having a name] may be the least-bad idea so far, > including mine :-) Here's another idea: provide a "sprite+picture" structure, and have all the operations take in and return it. One could use it directly as a world in bi

Re: [racket] what kind of Racket editor operations would you like to see?

2011-07-16 Thread Robby Findler
I realize that Check Syntax requires some setup time, but speaking purely in terms of functionality, is that getting at what you want? Robby 2011/7/16 Ivanyi Peter : >  Markku Rontu , ezt írta: >> A wish list, well I'd like "extract function" refactoring and more advanced >> renaming than search

Re: [racket] Advice: simulating stateful API in functional setting

2011-07-16 Thread Matthias Felleisen
On Jul 16, 2011, at 10:55 AM, Stephen Bloch wrote: > I have a hard time believing that EVERY CS educator who evangelizes for > something other than PBD "has no scruples". I made a typically Matthias-strong statement and I need to explain what I mean. 1. We want to teach every child how to

Re: [racket] what kind of Racket editor operations would you like to see?

2011-07-16 Thread Ivanyi Peter
Markku Rontu , ezt írta: > A wish list, well I'd like "extract function" refactoring and more advanced > renaming than search & replace. Also would be nice to be able to have > visibility to all defined modules, requires, provides, functions, classes, > structs etc. in a whole project and quick n

Re: [racket] Advice: simulating stateful API in functional setting

2011-07-16 Thread Stephen Bloch
On Jul 16, 2011, at 10:34 AM, Matthias Felleisen wrote: > Since these people have no scruples -- don't even understand that they dont > have any -- go for the imperative version. I have a hard time believing that EVERY CS educator who evangelizes for something other than PBD "has no scruples".

Re: [racket] Advice: simulating stateful API in functional setting

2011-07-16 Thread Matthias Felleisen
On Jul 16, 2011, at 10:16 AM, Stephen Bloch wrote: > I'm looking at our competition in the marketplace of ideas, and I want to > beat (or at least match) them at their own game. > > Who's with me? Since these people have no scruples -- don't even understand that they dont have any -- go for t

Re: [racket] Advice: simulating stateful API in functional setting

2011-07-16 Thread Stephen Bloch
Mark Engelberg wrote: > I see you're already representing the World as a picture and a list of > sprites, so just let the kids manipulate that directly. > > Since you want to support multiple sprites, what if each sprite in the > sprite list had a name, so the contract is: > move: String (sprite-

Re: [racket] Advice: simulating stateful API in functional setting

2011-07-16 Thread Stephen Bloch
On Jul 16, 2011, at 12:46 AM, Nadeem Abdul Hamid wrote: > Ah, right. How about you keep the picture separate, and functions like > 'move', 'rotate', etc. add to a list in the sprite structure; when the sprite > structure is passed to the draw handler, the draw handler updates the picture > bas

Re: [racket] what kind of Racket editor operations would you like to see?

2011-07-16 Thread Matthias Felleisen
On Jul 16, 2011, at 10:04 AM, José Lopes wrote: > The second feature is the ability to expand/collapse function definitions, > i.e., hide > the body of a function and just see the name and parameters. You can collapse S-expressions into dots in DrRacket. Perhaps we should offer a menu item to

Re: [racket] Advice: simulating stateful API in functional setting

2011-07-16 Thread Stephen Bloch
Carl Eastlund wrote: > Why is affecting the sprite "functional" and affecting the picture > "imperative"? Any part of a program can be mutated imperatively, and > likewise any part of a program can be passed around functionally. If > you need to modify the picture, why not pass around the pictur

Re: [racket] Advice: simulating stateful API in functional setting

2011-07-16 Thread Stephen Bloch
On Jul 15, 2011, at 3:12 PM, Matthias Felleisen wrote: > I don't understand your solution. But if students cannot test their event > handling functions in a functional style, then the answer to the last > question is YES, you're pregnant. Based on my toy examples so far, they can test their e

Re: [racket] what kind of Racket editor operations would you like to see?

2011-07-16 Thread Markku Rontu
Hi, A wish list, well I'd like "extract function" refactoring and more advanced renaming than search & replace. Also would be nice to be able to have visibility to all defined modules, requires, provides, functions, classes, structs etc. in a whole project and quick navigation within it. -Markku

Re: [racket] what kind of Racket editor operations would you like to see?

2011-07-16 Thread José Lopes
Hi, I would like to propose two features. I apologize if they are already implemented. When you are typing on the last line of a file the window keeps scrolling up and down as you insert or erase text. If there was some blank space after the last line the scrolling would not occur. The second f

Re: [racket] OpenGL (SGL) examples not working in Fedora

2011-07-16 Thread Matthew Flatt
Do you have libgdkglext and libgtkglext installed? At Sat, 16 Jul 2011 14:09:31 +0400, Daniil wrote: > Hello, Racket users. I was playing with SGL the other day and stumbled > upon a problem. > While everything was fine and working well on my Windows computer, I > had troubles running OpenGL code

[racket] OpenGL (SGL) examples not working in Fedora

2011-07-16 Thread Daniil
Hello, Racket users. I was playing with SGL the other day and stumbled upon a problem. While everything was fine and working well on my Windows computer, I had troubles running OpenGL code on my Fedora laptop. When I try to run gears.rkt (collects/sgl/examples/gears.rkt) I get the following error: