[racket] Unable to use Step in Dr. Racket

2011-09-14 Thread Anirudh Sanjeev
Hi, I am new to scheme. I am trying to run small programs from SICP on Dr. Racket. This is my code: (define (factorial n) (if (= n 1) 1 (* n (factorial (- n 1) (factorial 5) It runs fine. When I click the "Step" Button, I get an error like this: sequence-contract-violation: negativ

Re: [racket] Racket style guide (was Re: Argument order conventions (was: Variable naming conventions))

2011-09-14 Thread Veer
Thank you so much , it is really inspiring and helpful and will read again and again. Hope to change my style , which is basically no tests , and no documentation and poor code organization . On Thu, Sep 15, 2011 at 6:17 AM, Matthias Felleisen wrote: > > > For the past few months, I have been w

[racket] Racket style guide (was Re: Argument order conventions (was: Variable naming conventions))

2011-09-14 Thread Matthias Felleisen
For the past few months, I have been writing a style guide for new Racket PLTers. The current draft is available at http://www.ccs.neu.edu/home/matthias/Style/style/ I had hoped to complete it a bit more and polish it a bit more, but this discussion suggests that people might be interes

[racket] Argument order conventions (was: Variable naming conventions)

2011-09-14 Thread Rodolfo Carvalho
Are there any general "thoughts" written somewhere about the order of arguments? I find myself often calling functions and getting the order of the arguments wrong. (Maybe I just need to be more familiarized with them...) []'s Rodolfo Carvalho On Wed, Sep 14, 2011 at 19:00, Norman Gray wrote:

Re: [racket] srcloc structures, lists, vectors

2011-09-14 Thread Carl Eastlund
The srcloc struct is transparent. And the syntax/srcloc library helps with some of these issues -- it contains coercions to each type of source location (from any of the others), generic accessors for source location fields, and conversion to strings. Carl Eastlund On Wed, Sep 14, 2011 at 2:47 P

Re: [racket] Variable naming conventions

2011-09-14 Thread Asumu Takikawa
On 2011-09-14 16:14:50 -0500, Jeremy Kun wrote: >Are there any other significant naming conventions I may run across? >perhaps using some of ~ @ $ ^ & . _ + = . Is it considered bad form to use >full UTF characters in identifiers? If you use Racket's OO facilities you'll see: potato%

[racket] Racket in the world

2011-09-14 Thread Matt Jadud
Hi all, Start with the video of an installation piece at Ars Electronica: http://vimeo.com/29037809 This was announced on the Fluxus mailing list (where I lurk): http://lists.pawfal.org/pipermail/fluxus-pawfal.org/2011-September/004508.html Fluxus is notable because it is built using the Mz/Dr

Re: [racket] Variable naming conventions

2011-09-14 Thread Norman Gray
Jeremy, hello. On 2011 Sep 14, at 22:14, Jeremy Kun wrote: > Are there any other significant naming conventions I may run across? perhaps > using some of ~ @ $ ^ & . _ + = . Is it considered bad form to use full UTF > characters in identifiers? I've asked this same question in the past, and t

Re: [racket] Variable naming conventions

2011-09-14 Thread Neil Van Dyke
Pronounce the "/" as "with", and it usually makes sense. Sometimes it's for a variation of a behavior, or composition of behaviors, sometimes it's just as shorthand for the word "with", and sometimes it's something else. You might use "/" a little less often, now that you have keyword argumen

[racket] Variable naming conventions

2011-09-14 Thread Jeremy Kun
As I get deeper and deeper into Racket I notice a lot of interesting identifiers that seem to follow a naming convention, but I can't figure out what the convention is. For instance, extract-binding/single seems to use the slash to indicate that it only returns a single value, as opposed to a list

Re: [racket] invoke macro stepper from command line

2011-09-14 Thread Jon Rafkind
On the command line I think I can use xrepl to expand syntax. Would it be a lot of work to allow the macro stepper gui to be executed on its own? If its feasible I'll make a bug report for it. On 09/14/2011 02:37 PM, Ryan Culpepper wrote: > Not directly, but you can build a script that uses 'exp

Re: [racket] invoke macro stepper from command line

2011-09-14 Thread Ryan Culpepper
Not directly, but you can build a script that uses 'expand/step' or 'expand-module/step' from macro-debugger/stepper. You will need to set the current namespace to something suitable for what you're expanding. Ryan On 09/14/2011 02:17 PM, Jon Rafkind wrote: Is there a way to invoke the gui m

[racket] invoke macro stepper from command line

2011-09-14 Thread Jon Rafkind
Is there a way to invoke the gui macro stepper from the command line? _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

[racket] Check Syntax no longer works for SICP?

2011-09-14 Thread Neil Van Dyke
The small tweaks to Racket for SICP ("http://www.neilvandyke.org/racket-sicp/";) stopped working with Check Syntax at some point. Any pointers to how to quickly get it working again? * If using "#lang planet neil/sicp", then the "Check Syntax" button no longer appears. * If using "SICP (PLa

Re: [racket] srcloc structures, lists, vectors

2011-09-14 Thread Robby Findler
I think the other part is historical and an artifact of backwards compatibility. FWIW, I think the srcloc struct should be transparent or perhaps even a prefab, which would negate the benefit below. Robby On Wed, Sep 14, 2011 at 1:31 PM, Danny Yoo wrote: > I wanted to double check my understand

Re: [racket] Call racket with long code from racket

2011-09-14 Thread Danny Yoo
On Tue, Sep 13, 2011 at 8:03 AM, Noel Welsh wrote: > That is not one expression, but several. Wrap it in a (begin ...) and > it should work. I.e. Yikes! Don't continue to encourage him to use process here. At the very least, even the raw use of eval is probably safer than what's being proposed.

[racket] srcloc structures, lists, vectors

2011-09-14 Thread Danny Yoo
I wanted to double check my understanding on why source locations have several representations in Racket. One of them is the srcloc structure: http://docs.racket-lang.org/reference/exns.html#(def._((lib._racket/private/base..rkt)._srcloc)) But there's also the list and vector representations, all

Re: [racket] Call racket with long code from racket

2011-09-14 Thread Rodolfo Carvalho
As other people already said, this way of doing things is not the most "safe and beautiful" way of getting what you need done. If "long-code" is really long and important, I suggest investigating other solutions. As Eli pointed out there are many weird conventions to pay attention depending on yo

[racket] provide/doc for classes and methods?

2011-09-14 Thread Eduardo Bellani
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello there folks. I am trying to build in-source scribble documentation for classes and methods and I am a bit confused as to how to proceed. Usually to provide the contract and documentation for a procedure I code the following: (provide/doc (pro