Re: [racket] [racket-dev] DrRacket automatic parentheses mode update

2012-12-04 Thread Laurent
Nice, thank you very much. I think I'll gonna use it now. Too bad for the delete key, it would be really useful to me :) Is it normal that it does not work in the interaction window? Laurent On Tue, Dec 4, 2012 at 4:42 AM, Robby Findler wrote: > Thanks, Nadeem! > > Robby > > On Mon, Dec 3, 20

Re: [racket] minimum spanning tree

2012-12-04 Thread Pierpaolo Bernardi
On Mon, Dec 3, 2012 at 5:07 PM, J. Ian Johnson wrote: > Graph algorithms are often meant to be very fast, and different algorithms > necessitate different representations. Two popular representations are > adjacency lists and shared structures. The representations usually used in general purpos

Re: [racket] Goldilocks: install too big, install-plain too slow

2012-12-04 Thread Daniel Farina
On Mon, Dec 3, 2012 at 9:17 AM, Matthew Flatt wrote: > > I have tried the install-plain make target and it is indeed much > > smaller, but it compiles/installs very little -- no raco, and > > apparently very little byte-compiling, because the racket REPL takes > > an age to load -- so it's basical

Re: [racket] Goldilocks: install too big, install-plain too slow

2012-12-04 Thread Sam Tobin-Hochstadt
On Wed, Nov 28, 2012 at 5:23 PM, Daniel Farina wrote: > > I have tried the install-plain make target and it is indeed much > smaller, but it compiles/installs very little -- no raco, and > apparently very little byte-compiling, because the racket REPL takes > an age to load -- so it's basically un

Re: [racket] Goldilocks: install too big, install-plain too slow

2012-12-04 Thread Sam Tobin-Hochstadt
Really? What happened with the command I posted? It certainly works for me here. On Tue, Dec 4, 2012 at 12:03 PM, Kevin Tew wrote: > On 12/04/2012 08:53 AM, Sam Tobin-Hochstadt wrote: >> >> On Wed, Nov 28, 2012 at 5:23 PM, Daniel Farina wrote: >>> >>> I have tried the install-plain make target

Re: [racket] [racket-dev] DrRacket automatic parentheses mode update

2012-12-04 Thread Ramakrishnan Muthukrishnan
On Tue, Dec 4, 2012 at 9:00 AM, Nadeem Abdul Hamid wrote: > Some improvements to DrRacket's "automatic parentheses" mode are now > available in the nightly build version and git repository. If you have > previous tried auto-parens and abandoned it, or if you have never tried it, > please do try it

Re: [racket] Goldilocks: install too big, install-plain too slow

2012-12-04 Thread Kevin Tew
On 12/04/2012 08:53 AM, Sam Tobin-Hochstadt wrote: On Wed, Nov 28, 2012 at 5:23 PM, Daniel Farina wrote: I have tried the install-plain make target and it is indeed much smaller, but it compiles/installs very little -- no raco, and apparently very little byte-compiling, because the racket REPL

Re: [racket] Goldilocks: install too big, install-plain too slow

2012-12-04 Thread Kevin Tew
Nevermind, my bad, I was using a "uninstalled racket3m" binary. ~/src/racket/build/racket/racket3m On 12/04/2012 10:06 AM, Sam Tobin-Hochstadt wrote: Really? What happened with the command I posted? It certainly works for me here. On Tue, Dec 4, 2012 at 12:03 PM, Kevin Tew wrote: On 12/04/

[racket] Custodians and Places

2012-12-04 Thread Ray Racine
Should a Place (a true locally spawned Place via dynamic-place) be eligible for Custodian management in a similar vein as with other resources such at threads, sockets, ports et al? Ray Racket Users list: http://lists.racket-lang.org/users

[racket] json module bug?

2012-12-04 Thread Scott Klarenbach
Is this a bug with the json module, or am I missing something about the implementation? It seems it crashes when serializing a hashtable that has strings for keys. Symbols work fine. ie, >> (jsexpr->string (hash "id" 1 "title" "core")) write-json: expected argument of type BUT this works: >>

Re: [racket] json module bug?

2012-12-04 Thread Carl Eastlund
The documentation for jsexpr? states that JS-expressions use symbols as keys for hash tables, and strings for all other JSON-strings. Presumably this is to improve the efficiency of hash table lookup. http://docs.racket-lang.org/json/index.html Carl Eastlund On Tue, Dec 4, 2012 at 2:21 PM, Sco

Re: [racket] Fwd: Most negative/positive fixnum

2012-12-04 Thread Eli Barzilay
Hi, I just checked the spam folder on the gmail account that filters the racket users list, and found a post that you sent (forwarded below). The reason that gmail said for this is just: Why is this message in Spam? It's similar to messages that were detected by our spam filters. Learn more

Re: [racket] Fwd: Most negative/positive fixnum

2012-12-04 Thread Eli Barzilay
[Bah, please ignore this, I didn't change the email address. There's probably a second one that will follow...] 10 minutes ago, Eli Barzilay wrote: > Hi, > > I just checked the spam folder on the gmail account that filters the > racket users list, and found a post that you sent (forwarded below

[racket] Whats the difference between a predicate and a flat contract?

2012-12-04 Thread Harry Spier
Dear list members, I'm a little confused about the difference between the definition of a predicate and the definition of a flat contract. If someone could clear that up I'd appreciate it. 1) AT ALL PLACES in the documentation where it uses the term "predicate" does that mean a procedure th

Re: [racket] json module bug?

2012-12-04 Thread Danny Yoo
On Tue, Dec 4, 2012 at 12:21 PM, Scott Klarenbach wrote: > Is this a bug with the json module, or am I missing something about the > implementation? > > It seems it crashes when serializing a hashtable that has strings for > keys. Symbols work fine. > > According to the documentation in: htt

Re: [racket] json module bug?

2012-12-04 Thread Scott Klarenbach
My bad, thanks! On Tue, Dec 4, 2012 at 12:24 PM, Danny Yoo wrote: > > > On Tue, Dec 4, 2012 at 12:21 PM, Scott Klarenbach wrote: > >> Is this a bug with the json module, or am I missing something about the >> implementation? >> >> It seems it crashes when serializing a hashtable that has strings

Re: [racket] json module bug?

2012-12-04 Thread dman dus
I am a student in a Racket class would it be wrong to post any questions I have on this group mailing list if i need help a problem or two On Tue, Dec 4, 2012 at 3:39 PM, Scott Klarenbach wrote: > My bad, thanks! > > > On Tue, Dec 4, 2012 at 12:24 PM, Danny Yoo wrote: > >> >> >> On Tue, Dec 4

[racket] Asking questions

2012-12-04 Thread Danny Yoo
On Tue, Dec 4, 2012 at 1:52 PM, dman dus wrote: > I am a student in a Racket class would it be wrong to post any questions > I have on this group mailing list if i need help a problem or two > You may want to first check the policy of your class with regards to asking for help; some academic

[racket] TR Structure Matching

2012-12-04 Thread Ray Racine
How does one bind an identifier to the matched structure? In SML, Scala one can do something along the lines of s@S (x y z) #lang typed/racket (struct: Thing ()) (struct: Person Thing ([fname : String] [lname : String])) (: person-name (Person -> String)) (define (person-name p) (string-appen

Re: [racket] TR Structure Matching

2012-12-04 Thread Asumu Takikawa
On 2012-12-04 17:53:57 -0500, Ray Racine wrote: >How does one bind an identifier to the matched structure? You can use an `and` pattern. In your example: (define js (Person "Joe" "Smith")) (: do-it (Thing -> String)) (define (do-it thing) (match thing ;; shadow `thing` here

Re: [racket] TR Structure Matching

2012-12-04 Thread Vincent St-Amour
You can use an `and' pattern: (: do-it (Thing -> String)) (define (do-it thing) (match thing ((and p [Person fn ln]) (displayln fn) (person-name p Vincent At Tue, 4 Dec 2012 17:53:57 -0500, Ray Racine wrote: > > [1 ] > [1.1 ] > How does one bind an

Re: [racket] Custodians and Places

2012-12-04 Thread Matthew Flatt
At Tue, 4 Dec 2012 13:31:38 -0500, Ray Racine wrote: > Should a Place (a true locally spawned Place via dynamic-place) be eligible > for Custodian management in a similar vein as with other resources such at > threads, sockets, ports et al? Yes, places are managed by custodians. _

Re: [racket] Custodians and Places

2012-12-04 Thread Ray Racine
Good to know. May have missed it, but the Custodian doc does not mention Place as a managed resource. On Dec 4, 2012 6:56 PM, "Matthew Flatt" wrote: > At Tue, 4 Dec 2012 13:31:38 -0500, Ray Racine wrote: > > Should a Place (a true locally spawned Place via dynamic-place) be > eligible > > for Cu

Re: [racket] DRRacket right-click menu fragility in Linux.

2012-12-04 Thread Stephen Chang
On Fri, Nov 2, 2012 at 9:33 PM, Robby Findler wrote: > I've pushed a fix to this. Thanks to Matthew for looking into it and > sorting it out and sorry for the delay. I'm using git head and I'm still seeing this problem (Ubuntu 11.10). I can't reliably reproduce it but in case it helps, it most re

Re: [racket] Whats the difference between a predicate and a flat contract?

2012-12-04 Thread Robby Findler
Flat contracts includes more things than contracts. For example: [robby@yanpu] ~/git/plt/collects/scribblings/reference$ racket Welcome to Racket v5.3.1.9. > (flat-contract? 'x) #t > (procedure? 'x) #f The flat-contract function is a holdover from the days when flat contracts weren't able to be u

Re: [racket] [racket-dev] Identifier macros

2012-12-04 Thread Matthias Felleisen
On Dec 4, 2012, at 8:08 PM, Carl Eastlund wrote: > The following program works just fine: > > #lang racket > (define-syntax (foo stx) #`(quote-syntax #,stx)) > (list foo) #lang racket (define-syntax (foo stx) #'7) (list foo) Hmph. Racket Users list: http://lists.racket

Re: [racket] Whats the difference between a predicate and a flat contract?

2012-12-04 Thread Carl Eastlund
On Tue, Dec 4, 2012 at 7:49 PM, Robby Findler wrote: > Flat contracts includes more things than contracts. For example: > > [robby@yanpu] ~/git/plt/collects/scribblings/reference$ racket > Welcome to Racket v5.3.1.9. > > (flat-contract? 'x) > #t > > (procedure? 'x) > #f > > The flat-contract funct

Re: [racket] Whats the difference between a predicate and a flat contract?

2012-12-04 Thread Robby Findler
On Tue, Dec 4, 2012 at 7:28 PM, Carl Eastlund wrote: > On Tue, Dec 4, 2012 at 7:49 PM, Robby Findler > wrote: >> >> Flat contracts includes more things than contracts. For example: >> >> [robby@yanpu] ~/git/plt/collects/scribblings/reference$ racket >> Welcome to Racket v5.3.1.9. >> > (flat-contr

[racket] how can I save screen to a file?

2012-12-04 Thread 김태윤
Hello, I am using DrRacket on Windows 7 I wonder how can I save screen to a file. There might be some ways. the way I tried is simulate PrintScreen keystroke and save clipboard to image file. referring to racket document, I tried (define ke (new key-event%)) (send ke set-key-code 'print) or (send

Re: [racket] DRRacket right-click menu fragility in Linux.

2012-12-04 Thread Robby Findler
On Tue, Dec 4, 2012 at 6:11 PM, Stephen Chang wrote: > On Fri, Nov 2, 2012 at 9:33 PM, Robby Findler > wrote: >> I've pushed a fix to this. Thanks to Matthew for looking into it and >> sorting it out and sorry for the delay. > > I'm using git head and I'm still seeing this problem (Ubuntu 11.10).

Re: [racket] Whats the difference between a predicate and a flat contract?

2012-12-04 Thread Harry Spier
OK I see the docs to flat-contract? but not flat-contract http://docs.racket-lang.org/reference/contract-utilities.html#(def._((lib._racket/contract/private/misc..rkt)._flat-contract~3f)) mention that flat-contracts are more than predicates. Those docs don't mention it, but it appears from experim

Re: [racket] Whats the difference between a predicate and a flat contract?

2012-12-04 Thread Robby Findler
It does that for symbols, but not everything. This is the place you should be looking, I think. http://docs.racket-lang.org/reference/contracts.html Robby On Tue, Dec 4, 2012 at 8:38 PM, Harry Spier wrote: > OK I see the docs to flat-contract? but not flat-contract > http://docs.racket-lang.or

Re: [racket] how can I save screen to a file?

2012-12-04 Thread Ben Goetter
You're going to have to synthesize a PrtSc keystroke and send that directly to the PC's keyboard driver. Take the code in Q240653 (http://support.microsoft.com/?kbid=240653) and translate it from VB to Racket's FFI. On 12/4/2012 6:02 PM, 김태윤 wrote: Hello, I am using DrRacket on Windows 7 I w

Re: [racket] DRRacket right-click menu fragility in Linux.

2012-12-04 Thread Ray Racine
Yea, I didn't want to make a big deal out of it, but the up/down button change did not fix the issue. In fact I'd say no impact positive or negative. It seems to happen when there is additional drawing 'complexity' in co-occurrence with the pop up drawing area. I.e. the pop up menu is drawing w

Re: [racket] Whats the difference between a predicate and a flat contract?

2012-12-04 Thread Harry Spier
Are flat-contract and flat-contract-predicate equivalent? > ((flat-contract 'x) 'x) #t > ((flat-contract-predicate 'x) 'x) #t > ((flat-contract 'x) 'y) #f > ((flat-contract-predicate 'x) 'y) #f > Harry On Tue, Dec 4, 2012 at 9:41 PM, Robby Findler wrote: > It does that for symbols, but not ever

Re: [racket] Whats the difference between a predicate and a flat contract?

2012-12-04 Thread Robby Findler
Yes ..., I think so (well, eq? probably messes things up, as usual). But that's a funny question! What's really going on there is that flat-contract is coercing the value into a contract, and flat contracts also acts as predicate functions (matching what the contracts match). flat-contract-predica

Re: [racket] DRRacket right-click menu fragility in Linux.

2012-12-04 Thread Neil Toronto
Could what you're experiencing have anything to do with tooltips? It seems my right-click menu doesn't stay up whenever there's a tooltip out. Which is, like, every time I want it. Neil ⊥ On 12/04/2012 07:55 PM, Ray Racine wrote: Yea, I didn't want to make a big deal out of it, but the up/dow