Paul A. Steckler | 1 May 2008 01:04
Picon

Web site development

I've been working on a Web site written in PLT Scheme, and I'm
no longer able to do so.  What I've written so far uses a lot of
x-expressions and calls to Ryan's PostgreSQL library.

If anyone on the list wants to take over for me, let me know.

-- Paul
_________________________________________________
  For list-related administrative tasks:
  http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Eddie Sullivan | 1 May 2008 02:02
Picon
Favicon

Re: Class methods and class fields

Well, here's the scenario I had in mind when I originally posed the question 
about class variables. I've since come up with a way to accomplish this 
without using classes at all, so this may be a moot point, but here it is.

My idea was an x-expression based template library, where each template was 
enclosed in a class. The concept was based on some existing text templating 
languages, where a template can contain "blocks" that a derived template can 
override, and "parameters" that can be set on a per-instance basis. In this 
case the template expression would be associated with the class itself, 
while the parameter values would be associated with an instance.

I wanted a syntax where default block and parameter values could be 
specified in-line in the template rather than as default parameters to a 
function. And I wanted to be able to nest blocks.

I should mention that if this were to be implemented using protected static 
fields, they would be treated as read-only. I have not been able to come up 
with a realistic use case for *mutable* protected static fields, which in 
fact sound a little scary.

A simple example of one of these templates would look something like:

'(html
  (head
   (block: head
    (title (param: title "Page title"))
    (link ((rel "StyleSheet")
    ("/static/base.css"))
    (type "text/css"))))
   (block: morehead)) ; ... etc
(Continue reading)

Neil Van Dyke | 1 May 2008 02:21
Picon
Favicon

Re: Class methods and class fields

By the way, to anyone interested in Scheme-based HTML template languages...

I'm imminently releasing "html-template.scm", a new HTML template 
language implementation that does a lot of syntax-checking and 
formatting at Scheme syntax transformation time.

(It actually works already.  I just need 'a few hours' to finish 
documentation and herd the 4 interdependent packages into PLaneT.)

Eddie Sullivan wrote at 04/30/2008 08:02 PM:
 > Well, here's the scenario I had in mind when I originally posed the 
question about class variables. I've since come up with a way to 
accomplish this without using classes at all, so this may be a moot 
point, but here it is.
 >
 > My idea was an x-expression based template library, where each 
template was enclosed in a class.
[...]

_________________________________________________
  For list-related administrative tasks:
  http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Benjamin L. Russell | 1 May 2008 04:59
Picon
Favicon
Gravatar

Re: sicp exercise 2.23

Indeed; thank you for pointing that out.

After further thought, I came up with the following alternative solution last night (posted together with
the evaluation result):

--
(define nil '())
;Value: nil

(define (for-each proc items)
  (if (null? items)
      nil
      (cond ((or (proc (car items)) #t) (for-each proc (cdr items))))))
;Value: for-each

(for-each (lambda (x) (newline) (display x) nil) (list 1 2 3))

1
2
3
;Value: ()

--

This doesn't use "begin", captures "for-each" in a single procedure, ignores the result of "(proc (car
items))", and uses side-effects.

Benjamin L. Russell

--- On Wed, 4/30/08, Jos Koot <jos.koot@...> wrote:
(Continue reading)

Derick Eddington | 1 May 2008 10:29
Picon

Re: connection reset on pre.plt-scheme.org

Something similar also happens to me nearly every time I try to download
anything from pre.plt-scheme.org.  It only works like once every 20
times.  It's been like this for a while; I always thought the problem
was on my end.  It blasts the first few hundred Kb then the transfer
rate just drops to 0.  I don't get "Connection reset by peer" and the
connection doesn't seem to be lost because wget's ETA keeps going up.

$ wget http://pre.plt-scheme.org/installers/plt-3.99.0.23-bin-i386-linux-ubuntu-feisty.sh
--01:12:34--  http://pre.plt-scheme.org/installers/plt-3.99.0.23-bin-i386-linux-ubuntu-feisty.sh
           => `plt-3.99.0.23-bin-i386-linux-ubuntu-feisty.sh'
Resolving pre.plt-scheme.org... 129.10.115.117
Connecting to pre.plt-scheme.org|129.10.115.117|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 31,730,046 (30M) [application/x-sh]

 1% [                                                ] 338,594       --.--K/s ETA 12:45:56

On Wed, 2008-04-30 at 18:17 -0400, Tom Schouten wrote:
> hello,
> 
> i'm not sure if this is the right spot to report it, but there seems to be a 
> problem with the web server hosting pre.plt-scheme.org
> 
> i get connection resets when downloading the nightly builds.. 
> this has been going on for a while. the first time i remember this happening 
> was dowloading 3.99.0.10 on 2008-02-11
> 
> tom <at> klimop:~$ wget http://pre.plt-scheme.org/installers/full-3.99.0.23-bin-i386-linux-ubuntu.sh
> --21:07:34--  http://pre.plt-scheme.org/installers/full-3.99.0.23-bin-i386-linux-ubuntu.sh
>            => `full-3.99.0.23-bin-i386-linux-ubuntu.sh'
(Continue reading)

Ewan Higgs | 1 May 2008 12:00
Picon
Favicon

[ANN:Scheme UK Meeting] : "Fluxus: scheme livecoding" 28 May <at> 7pm

Scheme UK is back on!!

The next meeting for the Scheme UK user's group will
be held on Wednesday, 28 May from 7pm till we leave
for the pub. The meeting will take place at the
offices of LShift(see
http://www.lshift.net/contact.html for directions).

Dave Griffiths: "Fluxus: Scheme Livecoding" 
Livecoding is the name given to improvised
programming, usually in front of an audience, with
screen projection to allow viewers to connect the
construction of a program along with it's
audio/visual/olfactory output.

Fluxus is a rapid prototyping, livecoding and
playing/learning environment for 3D graphics and
games. It extends PLT Scheme with graphical commands
and can be used within it's own livecoding environment
or from within the DrScheme IDE.

Date: 28 May
Time: 7:00pm
Venue: 
  LShift Ltd
  Hoxton Point
  1st Floor Office
  6 Rufus Street
  London N1 6PE
Map: http://www.lshift.net/contact
(Continue reading)

Matthias Felleisen | 1 May 2008 14:11
Favicon

Re: continuation marks


  ... and useful. -- Matthias

On Apr 30, 2008, at 4:55 PM, Robby Findler wrote:

> Because one mark will clobber another if their corresponding
> with-continuation-mark expressions are in tail-position wrt to each
> other (indeed, that is the magic property that makes
> with-continuation-mark primitive).
>
> Robby
>
> On Wed, Apr 30, 2008 at 3:27 PM, John Leuner
> <jewel@...> wrote:
>> Why does the output differ for these two cases:
>>
>>   mzscheme -t
>>  test.ss
>>  Welcome to MzScheme v372 [3m], Copyright (c) 2004-2007 PLT Scheme  
>> Inc.
>>  (4 2)
>>  (4)
>>
>>  John Leuner
>>
>>
>> _________________________________________________
>>   For list-related administrative tasks:
>>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>
(Continue reading)

Matthias Felleisen | 1 May 2008 16:15
Favicon

Re: Class methods and class fields


Yes, this scenario makes sense in principle.

No, I wouldn't use Scheme classes to do templates UNLESS the number  
of defaults is large and yet overriding a few of them at a time is  
needed. Even then, I'd consider keyword arguments with default values  
instead to do what you want to do.

And also see Neil's answer.

-- Matthias

On Apr 30, 2008, at 8:02 PM, Eddie Sullivan wrote:

> Well, here's the scenario I had in mind when I originally posed the  
> question about class variables. I've since come up with a way to  
> accomplish this without using classes at all, so this may be a moot  
> point, but here it is.
>
> My idea was an x-expression based template library, where each  
> template was enclosed in a class. The concept was based on some  
> existing text templating languages, where a template can contain  
> "blocks" that a derived template can override, and "parameters"  
> that can be set on a per-instance basis. In this case the template  
> expression would be associated with the class itself, while the  
> parameter values would be associated with an instance.
>
> I wanted a syntax where default block and parameter values could be  
> specified in-line in the template rather than as default parameters  
> to a function. And I wanted to be able to nest blocks.
(Continue reading)

Matthew Flatt | 1 May 2008 17:25
Picon
Favicon
Gravatar

update on R6RS support

PLT Scheme's R6RS is now (in SVN) backed by a minimally competent test
suite --- and there are many fewer bugs than there were a week ago.
The test suite is in

 collects/tests/r6rs

Also, as of a week or two ago, the R6RS document is wired into to the
PLT documentation. For example, running DrScheme's Check Syntax on

  #!r6rs
  (import (rnrs))
  cons

provides a link from `cons' to the R6RS description of `cons'.

Known non-conformance with the standard in the current implementation:

 * When `guard' catches an exception that no clause matches, the
   exception is re-`raise'ed without restoring the continuation to the
   one that raised the exception.

   This difference can be made visible using `dynamic-wind'. According
   to R6RS, the following program should print "in" and "out" twice,
   but each prints once using PLT Scheme:

        (guard (exn [(equal? exn 5) 'five])
           (guard (exn [(equal? exn 6) 'six])
             (dynamic-wind
               (lambda () (display "in") (newline))
               (lambda () (raise 5))
(Continue reading)

Stephen De Gabrielle | 2 May 2008 14:59
Favicon

finder:common-get-file-list

Hi, I'm trying to use the Framework (to select a folder), but I'm
having trouble getting the args right; I think I'm doing the minimum
sufficient to get a 'select files' dialog, but I'm getting a contrat
error that I don't quite understand - it doesn't seems to match the
contract in the manual.

Can anyone make any suggestions as to what I'm doing wrong?
[I'm using 3.99.0.23 [3m], built from source and running on Eee Xandros(debian)]

> (finder:common-get-file-list
  #f
  "get-folder"
  #f
  "not right"
  #f)

. framework broke the contract
  (->*
   ()
   ((or/c false/c path?)
    string?
    (or/c false/c byte-regexp?)
    string?
    (or/c
     false/c
     (is-a?/c interface:top-level-window<%>)))
   (or/c (listof path?) false/c))
on finder:common-get-file-list; expected <(or/c (listof path?)
false/c)>, given: #<void>
>
(Continue reading)


Gmane