Re: [racket] scribble defproc formatting question

2012-04-30 Thread Neil Van Dyke
Some more info... I see that I am indeed stomping on the syntax location info for the "(or/c soundex-ordinal? #f)" syntax object, which I assume is a factor in it being formatted badly. I still have questions. First, I made a procedure to do a detailed dump of the syntax object: (define (de

[racket] scribble defproc formatting question

2012-04-30 Thread Neil Van Dyke
Can someone who knows Scribble internals point me in the right direction on this? I have a generated "defproc" syntax object that gets formatted badly by Scribble, as shown in screenshot: http://i.imgur.com/FmdQr.png The "defproc" syntax object is generated in this case by piecing together i

Re: [racket] typed racked questions

2012-04-30 Thread Ray Racine
See below. On Mon, Apr 30, 2012 at 10:57 AM, Bikal Gurung wrote: > Hi Ray, > > Are you using this in your day to day programming? > Most of my home programming is in Racket. Work is split 75%-10%-15% Scala, R and Racket respectively. > What sort of projects do you use this for ? > At work I

Re: [racket] Another PLaneTs crypto lib usage question?...

2012-04-30 Thread Doug Williams
Try calling cipher-encrypt, which is a lower-level interface, instead of the encrypt routine. The last part of Section 8.2 of the crypto document is an example. Here is the example modified with padding turned off. Note that in this case the message must a multiple of the block size (96 in the case

Re: [racket] tutorial: exploring the boundaries of outer space

2012-04-30 Thread Danny Yoo
On Mon, Apr 30, 2012 at 6:12 PM, Eli Barzilay wrote: > A few minutes ago, Danny Yoo wrote: >> I'll be releasing an update to my "outer" tutorial shortly, but >> would like to double check that the result I'm aiming toward is of >> good quality before I finish the text. > > I still think that the s

Re: [racket] Unit Testing Best Practice in Racket

2012-04-30 Thread Eli Barzilay
20 minutes ago, Chad Albers wrote: > Hi, > > As a Ruby dev, I really like unit testing.  I've been using RackUnit > to suits my needs.  I was wondering, though, about how people go > about writing their tests for Racket.  Many of the functions that I > write will not be part of the public API that

Re: [racket] Another macro question: making a lexically binding keyword?

2012-04-30 Thread Eli Barzilay
Yesterday, Danny Yoo wrote: > Let's say that I have the following toy iteration form for doing > something over a sequence of numbers: > [...] > > However, as Brian Mastenbrook notes, the use of syntax parameters > here can be troublesome because they don't necessarily work > lexically. It's wort

Re: [racket] Unit Testing Best Practice in Racket

2012-04-30 Thread Neil Van Dyke
Chad Albers wrote at 04/30/2012 06:38 PM: Is there a way to run unit test against these 'private functions', without making them public via a (provide) You want the submodules support that is scheduled for release in Racket 5.4 in August. You can start using submodules now in the nightly buil

[racket] Unit Testing Best Practice in Racket

2012-04-30 Thread Chad Albers
Hi, As a Ruby dev, I really like unit testing. I've been using RackUnit to suits my needs. I was wondering, though, about how people go about writing their tests for Racket. Many of the functions that I write will not be part of the public API that a want to share from a module. I can test the

Re: [racket] typed racked questions

2012-04-30 Thread Bikal Gurung
What are DrRacket and other racket libs written in ? typed/untyped racket ? On Mon, Apr 30, 2012 at 1:48 PM, Sam Tobin-Hochstadt wrote: > On Mon, Apr 30, 2012 at 12:51 AM, Bikal Gurung wrote: > > Hi All, > > > > I am investigating typed racket. I was wondering if someone could help > with > > an

Re: [racket] tutorial: exploring the boundaries of outer space

2012-04-30 Thread Eli Barzilay
A few minutes ago, Danny Yoo wrote: > I'll be releasing an update to my "outer" tutorial shortly, but > would like to double check that the result I'm aiming toward is of > good quality before I finish the text. I still think that the splicing stuff is unnecessarily(?) complicating things... (I'm

Re: [racket] typed racked questions

2012-04-30 Thread Bikal Gurung
hmmm ... I am getting some error. My repl session below. I am using 'db' module. > bind-prepared-statement . Type Checker: untyped top-level identifier lifted.474 in: bind-prepared-statement > Not sure what to make of it. My impression was the typed/untyped code mix well. Am i missing something ?

Re: [racket] tutorial: exploring the boundaries of outer space

2012-04-30 Thread Danny Yoo
I'll be releasing an update to my "outer" tutorial shortly, but would like to double check that the result I'm aiming toward is of good quality before I finish the text. I've ended up with: https://github.com/dyoo/outer-tutorial/blob/master/outer.rkt which takes components of Eli's solution

Re: [racket] setting environment with subprocess?

2012-04-30 Thread Eli Barzilay
Just now, Berthold Baeuml wrote: > Hi, > > when starting a new process from racket (e.g., using subprocess) is > there a way to set the environment for the new process, like C-libs > execve allows? Maybe, a keyword argument could be added to > subprocess? A better solution IMO is how Emacs deals

[racket] setting environment with subprocess?

2012-04-30 Thread Berthold Baeuml
Hi, when starting a new process from racket (e.g., using subprocess) is there a way to set the environment for the new process, like C-libs execve allows? Maybe, a keyword argument could be added to subprocess? All the best, Berthold --

Re: [racket] Bug in racket db module ??

2012-04-30 Thread Danny Yoo
> I am using the racket 'db' module to interact with my postgresql database. I > think there is some mismatch in the documentation towards the end of section > 1.1. Here is my sample repl session. > >> (define get-less-than-pst >     (prepare pgc "select n from the_numbers where n < $1")) > >> (que

Re: [racket] Constructors for sequences

2012-04-30 Thread Eli Barzilay
Yesterday, Galler wrote: > > try this: > > (require mzlib/defmacro) > > (define-macro (distribute . (f g . rest)) > `(,g ,@(map (λ (x) `(,f ,x)) rest))) Off-topic, but it bugs me to see posted examples that use `define-macro'... Note that using plain macros is not only more robust, it's a

Re: [racket] typed racked questions

2012-04-30 Thread Vincent St-Amour
The REPL prints types automatically: Welcome to Racket v5.3.0.4. -> vector-ref - : (All (a) ((Vectorof a) Integer -> a)) # -> (define: x : String "Hello") -> x - : String "Hello" -> Is this what you had in mind? Vincent At Mon, 30 Apr 2012 22:23:01 +0100, Bikal Gurung wrote: > > [1 ] > [1

[racket] Bug in racket db module ??

2012-04-30 Thread Bikal Gurung
Hi All, I am using the racket 'db' module to interact with my postgresql database. I think there is some mismatch in the documentation towards the end of section 1.1. Here is my sample repl session. > (define get-less-than-pst (prepare pgc "select n from the_numbers where n < $1")) > (query-

Re: [racket] typed racked questions

2012-04-30 Thread Bikal Gurung
Sam, Is there a function in racket which will - given a name - display the function/variable signature in the REPL? I am thinking about haskell prelude(REPL) that gives me the type signature when I enter :t in the repl? With Thanks Bikal On Mon, Apr 30, 2012 at 1:48 PM, Sam Tobin-Hochstadt wro

[racket] No v5.3 release

2012-04-30 Thread Robby Findler
Dear Racketeers, As we are preparing the v5.3 release, we notice unexplored corners of new and revised features. Two concerns stand out: the addition of sub-modules and the extensive injection of contracts into the class hierarchy in our run-time library. In short, our changes aren't ready for an

Re: [racket] typed racked questions

2012-04-30 Thread Bikal Gurung
Interesting. What is the status of this project? Is this going to be in the next release. Bikal On Mon, Apr 30, 2012 at 6:10 PM, Jay McCarthy wrote: > On Mon, Apr 30, 2012 at 8:57 AM, Bikal Gurung wrote: > > Hi Ray, > > > > Are you using this in your day to day programming? What sort of project

Re: [racket] typed racked questions

2012-04-30 Thread Jay McCarthy
On Mon, Apr 30, 2012 at 8:57 AM, Bikal Gurung wrote: > Hi Ray, > > Are you using this in your day to day programming? What sort of projects do > you use this for ? Do you use untyped racket in the beginning, i.e when you > are experimenting with ideas/algorithms and then migrate to typed racket ?

Re: [racket] Another PLaneTs crypto lib usage question?...

2012-04-30 Thread Rüdiger Asche
Thanks for the response, but I'm not sure if that answers my question... I now understand that #:padding depicts an optional named parameter, but (define dummy (encrypt cipher:aes-128 devicekey nonce #"1234567887654321" #:padding #f)) is not accepted by Racket, so how would I do it? Thanks!

[racket] Debugger for racket

2012-04-30 Thread Bikal Gurung
Hi All, Does anyone know if there is a debugger for racket that can be used outside the dr racket environment. I use emacs in conjunction with geiser and quack but haven't been able to find a suitable replacement with regards to debugging from the repl. Many Thanks Bikal - UK

Re: [racket] typed racked questions

2012-04-30 Thread Bikal Gurung
Hi Ray, Are you using this in your day to day programming? What sort of projects do you use this for ? Do you use untyped racket in the beginning, i.e when you are experimenting with ideas/algorithms and then migrate to typed racket ? Have you used typed racket when developing web applications wit

Re: [racket] Constructors for sequences

2012-04-30 Thread Matthias Felleisen
On Apr 30, 2012, at 8:23 AM, Sam Tobin-Hochstadt wrote: >> >> Another problem is that not all sequence types are polymorphic. For example, >> strings are sequences, but strings can contain only characters. So what >> would >> >> (sequence-map char->integer "abc") >> >> return? Custom sequence

Re: [racket] typed racked questions

2012-04-30 Thread Ray Racine
User Testimonial. I migrated exclusively to TR awhile back and prefer it immensely. On Mon, Apr 30, 2012 at 12:51 AM, Bikal Gurung wrote: > Hi All, > > I am investigating typed racket. I was wondering if someone could help > with answering the questions below. > > 1) Can we mix/import modules w

Re: [racket] typed racked questions

2012-04-30 Thread Sam Tobin-Hochstadt
On Mon, Apr 30, 2012 at 12:51 AM, Bikal Gurung wrote: > Hi All, > > I am investigating typed racket. I was wondering if someone could help with > answering the questions below. > > 1) Can we mix/import modules written in untyped racket to a module that is > used typed racket. I have experimented w

Re: [racket] typed racked questions

2012-04-30 Thread Vincent St-Amour
At Mon, 30 Apr 2012 05:51:00 +0100, Bikal Gurung wrote: > 1) Can we mix/import modules written in untyped racket to a module that is > used typed racket. I have experimented with a few modules using and they > seem to work in general but not really sure about the mechanism that makes > it work. How

Re: [racket] Constructors for sequences

2012-04-30 Thread Sam Tobin-Hochstadt
On Sun, Apr 29, 2012 at 6:47 PM, Ryan Culpepper wrote: > On 04/29/2012 04:33 PM, Matthias Felleisen wrote: >> >> >> On Apr 29, 2012, at 6:29 PM, Asumu Takikawa wrote: >> >>> On 2012-04-29 12:43:48 -0400, Matthias Felleisen wrote: What you're really saying is that sequence-map uses the wr

Re: [racket] Quick on-screen documentation

2012-04-30 Thread Laurent
Thank you both! The fixed version of the plugin has been uploaded. To avoid cluttering this mailing list with bugs of the Script Plugin and not of Racket or DrRacket, there is a "Report Bug" item in the script menu, that redirects to the PLaneT bug reporter with some automatically filled in info.

Re: [racket] Constructors for sequences

2012-04-30 Thread Jens Axel Søgaard
2012/4/30 Asumu Takikawa : > On 2012-04-29 12:43:48 -0400, Matthias Felleisen wrote: >> What you're really saying is that sequence-map uses the wrong kind of type. >> Specifically, it should be polymorphic in the sequence constructor instead >> of mapping everything to the top of the class hierar