Re: [racket-dev] [plt] Push #23129: master branch updated

2011-07-26 Thread Jon Rafkind
On 07/26/2011 10:57 AM, Eli Barzilay wrote:
 25 minutes ago, rafk...@racket-lang.org wrote:
 4e8e184 Jon Rafkind rafk...@racket-lang.org 2011-07-24 16:43
 :
 | add lexer for honu
 :
   A collects/honu/core/read.rkt
 Is the C code going away?


That is the hope.
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


[racket-dev] Racket on Rockets

2011-07-26 Thread Jay McCarthy
I was recently telling some people that I thought 'Ruby on Rails' was
mostly an ORM plus a set of default dispatching rules with convenient
ways of extending the defaults.

I don't have a lot of expertise on the ORM side, but I think Snooze
would probably be awesome and my MongoDB-backed structs may be helpful
too.

On the side of default dispatching rules, I've made a little demo:

https://github.com/jeapostrophe/exp/tree/master/ror

[For the demo, the ORM is just hash tables of structs.]

This program:

#lang racket/base
(require ror.rkt)

(blast-off!
 [posts (title body)])

is an incredibly generic blog where you can see all the posts, add
new ones, and edit old ones. It sets up a slew of un-hygienic names
and allows you to override them to replace default behavior.

This program uses that overriding feature to replace the top-level index:

#lang racket/base
(require web-server/servlet
 ror.rkt)

(define (post-render id)
  (define obj (hash-ref *posts* id))
  `(div (h2 ,(posts-title obj))
,(posts-body obj)))

(define (index req)
  (response/xexpr
   `(html
 (head (title My Racket on Rockets blog))
 (body
  (h1 My Racket on Rockets blog)
  ,@(for/list ([last-post-n (in-range 5)])
  (define post-id (- (hash-count *posts*) (add1 last-post-n)))
  (if (negative? post-id)
  '(div)
  (post-render post-id)))
  (p (a ([href ,(to-url posts-new)]) New Post)  
 (a ([href ,(to-url posts-index)]) All Posts))

(blast-off!
 [posts (title body)])

You could also define posts-new or posts-index to control the
corresponding default functions.

In case what I had in mind wasn't clear... I hope this is.

Jay

-- 
Jay McCarthy j...@cs.byu.edu
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

The glory of God is Intelligence - DC 93
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


[racket-dev] drracket fails to start up properly

2011-07-26 Thread Matthias Felleisen

built from scratch this morning

error messages: 

[1] 847
[:~/Git/Ingenious] matthias% send: target is not an object: #f for method: 
change-children

 === context ===
/Users/matthias/plt/collects/racket/private/class-internal.rkt:4601:0: obj-error
/Users/matthias/plt/collects/drracket/private/module-language-tools.rkt:39:6: 
set-lang-toolbar-buttons method in ...e-language-tools.rkt:35:4
/Users/matthias/plt/collects/drracket/private/module-language-tools.rkt:134:6: 
move-to-new-language method in ...e-language-tools.rkt:93:4
/Users/matthias/plt/collects/drracket/private/module-language-tools.rkt:235:6: 
after-set-next-settings method in ...e-language-tools.rkt:93:4
/Users/matthias/plt/collects/drracket/private/unit.rkt:628:10: after-load-file 
method in ...ket/private/unit.rkt:525:8
/Users/matthias/plt/collects/framework/private/text.rkt:298:4: after-load-file 
method in ...ork/private/text.rkt:79:2
/Users/matthias/plt/collects/framework/private/frame.rkt:1170:2
/Users/matthias/plt/collects/racket/private/class-internal.rkt:3679:0: 
continue-make-super
/Users/matthias/plt/collects/racket/private/class-internal.rkt:3679:0: 
continue-make-super
/Users/matthias/plt/collects/racket/private/class-internal.rkt:3679:0: 
continue-make-super
/Users/matthias/plt/collects/framework/private/frame.rkt:621:2
/Users/matthias/plt/collects/racket/private/class-internal.rkt:3679:0: 
continue-make-super
/Users/matthias/plt/collects/racket/private/class-internal.rkt:3679:0: 
continue-make-super
/Users/matthias/plt/collects/framework/private/frame.rkt:1729:2
/Users/matthias/plt/collects/racket/private/class-internal.rkt:3679:0: 
continue-make-super
/Users/matthias/plt/collects/framework/private/frame.rkt:905:2
...



_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] drracket fails to start up properly

2011-07-26 Thread Robby Findler
It will be a bit before I can look into this, but I guess that if you
throw away your prefs it will start up (or even just edit them and
throw out the language level setting). Or it may even start up on a
second try, depending on what is actually going wrong there.

Robby

On Tue, Jul 26, 2011 at 1:12 PM, Matthias Felleisen
matth...@ccs.neu.edu wrote:

 built from scratch this morning

 error messages:

 [1] 847
 [:~/Git/Ingenious] matthias% send: target is not an object: #f for method: 
 change-children

  === context ===
 /Users/matthias/plt/collects/racket/private/class-internal.rkt:4601:0: 
 obj-error
 /Users/matthias/plt/collects/drracket/private/module-language-tools.rkt:39:6: 
 set-lang-toolbar-buttons method in ...e-language-tools.rkt:35:4
 /Users/matthias/plt/collects/drracket/private/module-language-tools.rkt:134:6:
  move-to-new-language method in ...e-language-tools.rkt:93:4
 /Users/matthias/plt/collects/drracket/private/module-language-tools.rkt:235:6:
  after-set-next-settings method in ...e-language-tools.rkt:93:4
 /Users/matthias/plt/collects/drracket/private/unit.rkt:628:10: 
 after-load-file method in ...ket/private/unit.rkt:525:8
 /Users/matthias/plt/collects/framework/private/text.rkt:298:4: 
 after-load-file method in ...ork/private/text.rkt:79:2
 /Users/matthias/plt/collects/framework/private/frame.rkt:1170:2
 /Users/matthias/plt/collects/racket/private/class-internal.rkt:3679:0: 
 continue-make-super
 /Users/matthias/plt/collects/racket/private/class-internal.rkt:3679:0: 
 continue-make-super
 /Users/matthias/plt/collects/racket/private/class-internal.rkt:3679:0: 
 continue-make-super
 /Users/matthias/plt/collects/framework/private/frame.rkt:621:2
 /Users/matthias/plt/collects/racket/private/class-internal.rkt:3679:0: 
 continue-make-super
 /Users/matthias/plt/collects/racket/private/class-internal.rkt:3679:0: 
 continue-make-super
 /Users/matthias/plt/collects/framework/private/frame.rkt:1729:2
 /Users/matthias/plt/collects/racket/private/class-internal.rkt:3679:0: 
 continue-make-super
 /Users/matthias/plt/collects/framework/private/frame.rkt:905:2
 ...



 _
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] [plt] Push #23119: master branch updated

2011-07-26 Thread Jay McCarthy
On Mon, Jul 25, 2011 at 12:38 AM, Eli Barzilay e...@barzilay.org wrote:
 Some comments:

 (1) why `se-path' and not some `xexpr-path'?

The 's' was intended to be 'simple'


 (2) also, it looks bad to use a keyword to look for something that is
    a symbols.  How about something like: '(form input #:attr name)?
    Or maybe think of each element as a kind of a selector, with
    integers specifying the nth element of a list and symbols do an
    assq-style search, so that becomes '(form input 0 name)?

This is really quick and dirty for what I need. In my mind, the
correct thing to do is use the sxml2 package and get real XPath
queries, but this lightweight.


 (3) I really think that there should be better support for tests in
    the documentation...  I've played with it in the past, and I
    noticed that you have the same (pretty verbose) code in both the
    documentation and test (of the test).

I 100% agree. Perhaps facets can make this easier.


 (4) any reason for this:

      (define (test-add-two-numbers -s)
        (define x  ...)
        (define xs ...)
        (define y  ...)
        (define ys ...)
        (define r0 ...)
        (define k0 ...r0...)
        (define i0 ...r0...)
        (define r1 ...k0 i0 xs...)
        (define k1 ...r1...)
        (define i1 ...r1...)
        (define r2 ...k1 i1 ys...)
        (define n  ...r2...)
        ...)

    over `let*' or just `set!'?  (The latter is kind of obvious since
    you're writing what the set!-using code conceptually expands to
    anyway...)

Because I dislike set! so much, I often program in single-static
assignment. It would be *really* nice if we could have define* from
racket/package in any definition context, because that's more like
what I really want anyways.

Jay

_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] [plt] Push #23119: master branch updated

2011-07-26 Thread Eli Barzilay
An hour ago, Jay McCarthy wrote:
 On Mon, Jul 25, 2011 at 12:38 AM, Eli Barzilay e...@barzilay.org wrote:
  Some comments:
 
  (1) why `se-path' and not some `xexpr-path'?
 
 The 's' was intended to be 'simple'

As long as it deals with xexprs, I prefer the more obvious name.  (I
definitely would never remember `se-path' without the docs.)


  (2) also, it looks bad to use a keyword to look for something that
  is a symbols.  How about something like: '(form input #:attr
  name)?  Or maybe think of each element as a kind of a
  selector, with integers specifying the nth element of a list
  and symbols do an assq-style search, so that becomes '(form
  input 0 name)?
 
 This is really quick and dirty for what I need. In my mind, the
 correct thing to do is use the sxml2 package and get real XPath
 queries, but this lightweight.

Same here -- as long as xexprs are used, I really think that using
keywords is an abusive pun.  (And I really don't mind switching away
from xexprs if there's a good path up.)


  (3) I really think that there should be better support for tests in
     the documentation...  I've played with it in the past, and I
     noticed that you have the same (pretty verbose) code in both the
     documentation and test (of the test).
 
 I 100% agree. Perhaps facets can make this easier.

They obviously can -- in exactly the same way that they help with
`scribble/srcdoc'.  The hack that I played with in the past (the
documentation for `scribble/text') is getting a discount in that I
don't care for loading more code when the tests are run.


  (4) any reason for this:
 
       (define (test-add-two-numbers -s)
         (define x  ...)
         (define xs ...)
         (define y  ...)
         (define ys ...)
         (define r0 ...)
         (define k0 ...r0...)
         (define i0 ...r0...)
         (define r1 ...k0 i0 xs...)
         (define k1 ...r1...)
         (define i1 ...r1...)
         (define r2 ...k1 i1 ys...)
         (define n  ...r2...)
         ...)
 
     over `let*' or just `set!'?  (The latter is kind of obvious since
     you're writing what the set!-using code conceptually expands to
     anyway...)
 
 Because I dislike set! so much, I often program in single-static
 assignment.

I strongly prefer a `let*' over explicitly naming these.  (As Jay
knows...)


 It would be *really* nice if we could have define* from
 racket/package in any definition context, because that's more like
 what I really want anyways.

I would *love* that!  It's especially fitting with the new treatment
of bodies.

(A more radical change would be for `define*' to be called `define'
and add a new `define-rec' for the recursive cases -- but that of
course breaks more things and at the module level it makes more sense
for `define's to be recursive.)

-- 
  ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
http://barzilay.org/   Maze is Life!

_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] A basic package system

2011-07-26 Thread Jay McCarthy
Eli and I had a very useful conversation last night and we realized
that a lot of the ideal package system we are imagining is within our
reach very quickly. Today I made a demonstration of our ideas:

https://github.com/jeapostrophe/exp/tree/master/pkgs

There's a README there. Once you read it,

Run use/program.rkt

Then edit use/pkg-in.rkt and change the safe to unsafe

You'll see that it changes the meaning of racket/listy module
reference in use/program.rkt

I haven't implemented the module algebra, but it should be clear from
looking at the macro implementations that the existing identifier
algebra in require/provide will work transparently.

Jay

-- 
Jay McCarthy j...@cs.byu.edu
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

The glory of God is Intelligence - DC 93
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] A basic package system

2011-07-26 Thread Matthias Felleisen

It's probably just me, but this readme is a bit too dense. 
[I know the first bit. That's why I pushed the two-step. 
I know a bit more from Eli. But that's an accident.]


On Jul 26, 2011, at 5:49 PM, Jay McCarthy wrote:

 Eli and I had a very useful conversation last night and we realized
 that a lot of the ideal package system we are imagining is within our
 reach very quickly. Today I made a demonstration of our ideas:
 
 https://github.com/jeapostrophe/exp/tree/master/pkgs
 
 There's a README there. Once you read it,
 
 Run use/program.rkt
 
 Then edit use/pkg-in.rkt and change the safe to unsafe
 
 You'll see that it changes the meaning of racket/listy module
 reference in use/program.rkt
 
 I haven't implemented the module algebra, but it should be clear from
 looking at the macro implementations that the existing identifier
 algebra in require/provide will work transparently.
 
 Jay
 
 -- 
 Jay McCarthy j...@cs.byu.edu
 Assistant Professor / Brigham Young University
 http://faculty.cs.byu.edu/~jay
 
 The glory of God is Intelligence - DC 93
 _
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


[racket-dev] Pre-Release Checklist for v5.1.2, Second Call

2011-07-26 Thread Ryan Culpepper
Checklist items for the v5.1.2 release
  (using the v5.1.1.900 release candidate build)

Search for your name to find relevant items, reply when you finish an
item (please indicate which item/s is/are done).  Also, if you have any
commits that should have been picked, make sure that the changes are in.

Important: new builds are created without announcement, usually whenever
I pick a few commits.  If you need to commit changes, please make sure
you tell me to pick it into the release branch.

-- Release candidates are at
--   http://pre.racket-lang.org/release/installers

Please use these installers (or source bundles) -- don't test from
your own git clone (don't test v5.1.2.1 by mistake!).  To get
the tests directory in such a directory, you can do this:
  cd ...racket-root...
  git archive --remote=git://git.racket-lang.org/plt.git release \
  -- collects/tests | tar x

--

* John Clements cleme...@brinckerhoff.org
  - Stepper Tests
  Updates:
  - Stepper Updates: update HISTORY
  (updates should show v5.1.2 as the most current version; email me
  to pick the changes when they're done, or tell me if there are no such
  changes.)

* Eli Barzilay e...@barzilay.org
  - Plot Tests

* Carl Eastlund c...@ccs.neu.edu
  - Dracula Tests (confirm that Dracula runs from PLaneT)

* Mike Sperber sper...@deinprogramm.de
  - Stepper Tests

-- 
Ryan Culpepper
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev