Re: [racket-dev] 2htdp/image Feature Suggestion

2014-06-29 Thread Jos Koot
Thanks.
I always use DrRacket for editing racket code.
Jos.

> -Original Message-
> From: Greg Hendershott [mailto:greghendersh...@gmail.com] 
> Sent: domingo, 29 de junio de 2014 5:55
> To: Jos Koot
> Cc: dev; jja.k...@gmail.com
> Subject: Re: [racket-dev] 2htdp/image Feature Suggestion
> 
> On Mon, Jun 23, 2014 at 9:44 PM, Jos Koot  wrote:
> > style. Writing this, the idea comes up in my mind that it 
> should be possible
> > to do some transformations to the recommended style by 
> means of redex. Or
> > may be by means of syntax-case while limiting the 
> transformers to the
> > desired level of expansion. Both instuments are interesting 
> enough for me to
> > give it a try. If I am able to do something usefull in this 
> sense, you'll
> > hear of me, but give me some time, please.
> 
> If you use Emacs, check out Ryan's sexp-rewrite mode. IIUC he's
> implemented `syntax-parse`-like functionality in Elisp:
> 
>   https://github.com/rmculpepper/sexp-rewrite
> 
> 
> p.s. In a similar spirit, but for Clojure, and IIUC implemented
> leveraging paredit:
> 
>   https://github.com/clojure-emacs/clj-refactor.el

_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] 2htdp/image Feature Suggestion

2014-06-23 Thread Jos Koot
Hi Robby
Replacing if by cond is very stylisch indeed. Nowadays I use cond more than
if, especially if it is nested or if I need internal definitions in one or
more of the alternatives. Replacing the outer named let by a reference to a
function defined outside of the procedure is not too difficult, I think. I
have tried to follow the recommendations strictly for this piece of code,
especially avoiding the nesting of all let-forms (named or unnamed) of which
this piece of code has four levels, two named and two unnamed. When I try
that for all levels, I introduce bugs.

Don't understand me wrong. I do appreciate the recommendations. In fact the
style interests me much. I see the advantages of cooperators using the same
style. Writing this, the idea comes up in my mind that it should be possible
to do some transformations to the recommended style by means of redex. Or
may be by means of syntax-case while limiting the transformers to the
desired level of expansion. Both instuments are interesting enough for me to
give it a try. If I am able to do something usefull in this sense, you'll
hear of me, but give me some time, please.

Thanks for your reaction, Jos

PS Within DrRacket transformation to the recommended indentation is almost
trivial. 'Almost', for in some cases additional newlines may be neceessary.
And there is pretty-print, of course.

> -Original Message-
> From: Robby Findler [mailto:ro...@eecs.northwestern.edu] 
> Sent: martes, 24 de junio de 2014 2:12
> To: Jos Koot
> Cc: Asumu Takikawa; Kevin Forchione; dev@racket-lang.org; 
> jja.k...@gmail.com
> Subject: Re: [racket-dev] 2htdp/image Feature Suggestion
> 
> I think that the prefer-define-over-let applies only to the first let
> in this program.
> 
> The style guide also would recommend 'cond' over 'if' here, but it
> becomes very very important to do that only if there were nested
> 'let's or 'begin's or the like and you don't have that.
> 
> Robby
> 
> On Mon, Jun 23, 2014 at 12:32 PM, Jos Koot  wrote:
> > In the recommendations of 
> http://docs.racket-lang.org/style/index.html it is
> > recommended to use (internal or module top-level) define 
> rather than named
> > let.
> > I use named let a lot. How would you rewrite the following? 
> For me it is
> > rather difficult to make the change without loosing track 
> of the scope of
> > the variables. I also have a rather distinct way of indenting.
> >
> > #lang racket
> >
> > #|
> > A rearrangement of a list L is a list with the same elements as L,
> > but possibly in another order.
> > Proc make-natural->rearrangement takes a list L and returns a proc.
> > Let N be the number of distinct rearrangements of L.
> > The returned proc takes an index K less than N and returns the K-th
> > distinct rearrangement of L. Two rearrangements R0 and R1 
> are distinct if
> > (not (andmap EQ? R0 R1)).
> > EQ? must be an equivalence relation on the elements of L.
> >
> > E = element
> > H = head of L
> > T = tail of L (append H T) = L
> > K = index
> > N = nr of distinct rearrangements of L.
> > |#
> >
> > (define (make-natural->rearrangement L (EQ? equal?))
> >  (let ((N (nr-of-rearrangements L EQ?)))
> >   (lambda (K)
> >(let rearrange ((L L) (K K) (N N) (result '()))
> > ; Look for the K-th rearrangement of L and put it's 
> elements in result.
> > (if (null? L) result
> >  (let pseudo-rotate ((H L) (T '()) (K K))
> >   ; Look in subsequent pseudorotations.
> >   (let ((E (car H)) (H (cdr H)))
> >(if (member E T EQ?)
> > ; Skip pseudorotation if it's car already was car 
> of a previous one.
> > (pseudo-rotate H (cons E T) K)
> > (let ((M (/ (* N (count-occurrences E L EQ?)) (length L
> >  ; M is the nr of rearrangements of (append H T)
> >  ; computed by means of a recurrent relation.
> >  (if (< K M)
> >   ; The rearrangement is in this pseudorotation.
> >   (rearrange (append H T) K M (cons E result))
> >   ; The rearrangement is not in this pseudorotation.
> >   ; Look in the following pseudorotation, but 
> decrease K by the
> >   ; nr of rearrangements of the skipped pseudorotation.
> >   (pseudo-rotate H (cons E T) (- K M
> >
> > (define (nr-of-rearrangements L EQ?) ...)
> > (define (count-occcurrences E L EQ?) ...)
> >
> >> -Original Message-
> >> From: dev [mailto:dev-boun...@racket-lang.org] On Behalf Of
> >> Asumu Taki

Re: [racket-dev] 2htdp/image Feature Suggestion

2014-06-23 Thread Jos Koot
In the recommendations of http://docs.racket-lang.org/style/index.html it is
recommended to use (internal or module top-level) define rather than named
let.
I use named let a lot. How would you rewrite the following? For me it is
rather difficult to make the change without loosing track of the scope of
the variables. I also have a rather distinct way of indenting. 

#lang racket

#|
A rearrangement of a list L is a list with the same elements as L,
but possibly in another order.
Proc make-natural->rearrangement takes a list L and returns a proc.
Let N be the number of distinct rearrangements of L.
The returned proc takes an index K less than N and returns the K-th
distinct rearrangement of L. Two rearrangements R0 and R1 are distinct if
(not (andmap EQ? R0 R1)).
EQ? must be an equivalence relation on the elements of L.

E = element
H = head of L
T = tail of L (append H T) = L
K = index
N = nr of distinct rearrangements of L.
|#

(define (make-natural->rearrangement L (EQ? equal?))
 (let ((N (nr-of-rearrangements L EQ?)))
  (lambda (K)
   (let rearrange ((L L) (K K) (N N) (result '()))
; Look for the K-th rearrangement of L and put it's elements in result.
(if (null? L) result
 (let pseudo-rotate ((H L) (T '()) (K K))
  ; Look in subsequent pseudorotations.
  (let ((E (car H)) (H (cdr H)))
   (if (member E T EQ?)
; Skip pseudorotation if it's car already was car of a previous one.
(pseudo-rotate H (cons E T) K)
(let ((M (/ (* N (count-occurrences E L EQ?)) (length L
 ; M is the nr of rearrangements of (append H T)
 ; computed by means of a recurrent relation.
 (if (< K M)
  ; The rearrangement is in this pseudorotation.
  (rearrange (append H T) K M (cons E result))
  ; The rearrangement is not in this pseudorotation.
  ; Look in the following pseudorotation, but decrease K by the
  ; nr of rearrangements of the skipped pseudorotation.
  (pseudo-rotate H (cons E T) (- K M

(define (nr-of-rearrangements L EQ?) ...)
(define (count-occcurrences E L EQ?) ...)

> -Original Message-
> From: dev [mailto:dev-boun...@racket-lang.org] On Behalf Of 
> Asumu Takikawa
> Sent: lunes, 23 de junio de 2014 7:35
> To: Kevin Forchione
> Cc: dev@racket-lang.org
> Subject: Re: [racket-dev] 2htdp/image Feature Suggestion
> 
> On 2014-06-22 20:27:21 -0700, Kevin Forchione wrote:
> >Thanks! Is there any documentation or guide on which 
> *styles* to prefer in
> >writing Racket code? I find myself scratching my head at 
> times in these
> >matters!
> 
> In recent Racket distributions and online docs there's now a style
> manual:
> 
>   http://docs.racket-lang.org/style/index.html
> 
> Cheers,
> Asumu
> _
>   Racket Developers list:
>   http://lists.racket-lang.org/dev

_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Proposal for a "no-argument"

2012-07-02 Thread Jos Koot
May be the discussion goes beyond my understanding, in which case sorry for
my noise. Where I need a value distinct from all other values (such as a
no-value), I prepare an empty struct type and export one single instance of
this struct together with its predicate (and nothing else)
Jos


_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Subnormal numbers?

2011-11-29 Thread Jos Koot
Normally I only read messages of this list. Now I feel I have to reply. I
have seen various floating point systems. Some of them would immediately
force an abort when forming an overflow or underflow. Others would abort
only after referring to underflowed or overflowed floating point (with
trouble to find out where the underflow or overflow was produced) The
systems that would not immediately abort when producing an underflow or
overflow, provided functions allowing to check for under- or overflow
without aborting. I am talking about fortran here. I think DrRacket does a
good job. You can check results to be inexact zero or nan or inf. When
implementing a calculation that might produce underflow or overflow, it is,
according to my meaning, the responsability of the programmer to take care
of these cases.  Scheme, and in particular DrScheme, does provide all tools
for this kind of precaution. For example you can capture a division by exact
zero. You can also detect division by inexact zero, just by checking that
the result is not infinity (or nan when dividing zero by zero). When dealing
with algorithms that may have these problems, it is the task of the
programmer to deal with them. I don't think there is any computational
system that could service all programmers as they are inclined to expect. A
programmer who is intensionaly using ploating points (id est inexact reals,
internally in fact represented by quasi exact rational numbers) should be
aware of the limitations of the numerical system. In some cases it may be
desirable to have exact representations for all square roots (as in parts of
group theory) This is possible, but as a programmer you cannot demand that
your language provides these tools without your own effort (although they
may be available in a planet contribution) If you need it you may have to
implement it by yourself.

Although for me the distinction betweeen exact and inexact seems rather
clear, may be the documentation should provide some more information on this
subjext. A good thing is that inexactness is contaguous. For example, when
giving data to a program and these data may be inexact (e.g. as obtained by
a measurement), make sure that each numerical datum has a period. 

Greetings, Jos

-Original Message-
From: dev-boun...@racket-lang.org [mailto:dev-boun...@racket-lang.org] On
Behalf Of Neil Toronto
Sent: martes, 29 de noviembre de 2011 20:39
To: dev@racket-lang.org
Subject: Re: [racket-dev] Subnormal numbers?

I can't answer the question about underflow. But if you don't mind 
installing a nightly build of Racket, you get the (currently 
undocumented) module `unstable/flonum', which exports these:

 flonum->bit-field
 bit-field->flonum
 flonum->ordinal; number of flonums away from 0 (+ or -)
 ordinal->flonum
 flstep; the flonum n steps away (by ordering fl<)
 flnext; next largest flonum (by ordering fl<)
 flprev; next smallest flonum (by ordering fl<)
 -max.0; negative flonum with greatest non-infinite magnitude
 -min.0; negative flonum with smallest nonzero magnitude
 +min.0; positive flonum with smallest nonzero magnitude
 +max.0; positive flonum with greatest non-infinite magnitude

Also, the `plot' module in the nightly build deals just fine with 
intervals that are too small to represent using flonums. For example, to 
illustrate floating-point discretization and the density of flonums at 
different ranges:

#lang racket

(require plot unstable/flonum)

(plot (function (λ (x) (inexact->exact (sin x)))
 (flstep 0.0 -10) (flstep 0.0 10)))

(- (flonum->ordinal 1.0) (flonum->ordinal 0.0))
(- (flonum->ordinal 2.0) (flonum->ordinal 1.0))
(- (flonum->ordinal 3.0) (flonum->ordinal 2.0))
(- (flonum->ordinal +max.0) (flonum->ordinal 1.0))

(parameterize ([plot-x-ticks  (log-ticks #:base 2)])
   (plot (function (compose flonum->ordinal exact->inexact) 1.0 8.0)))


Neil T


On 11/29/2011 09:32 AM, J. Ian Johnson wrote:
> I'm currently proctoring the freshmen's lab on inexact numbers and was
curious how to denote subnormal numbers in Racket.
> Turns out that's not possible, since there is no underflow. Why does
Racket follow the old standard of representing underflow with inexact zero?
> I imagine changing it now would break a lot of code, but I'm just curious.
> -Ian
> _
>For list-related administrative tasks:
>http://lists.racket-lang.org/listinfo/dev

_
  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] [racket-bug] all/11778: check syntax does not workwith path-up

2011-08-17 Thread Jos Koot
+1, jos 

-Original Message-
From: dev-boun...@racket-lang.org [mailto:dev-boun...@racket-lang.org] On
Behalf Of Matthias Felleisen
Sent: miércoles, 17 de agosto de 2011 22:34
To: Racket Dev
Subject: Re: [racket-dev] [racket-bug] all/11778: check syntax does not
workwith path-up


On Aug 17, 2011, at 4:22 PM, Sam Tobin-Hochstadt wrote:

> Now that we're all running Check Syntax all the time, 


I wanted to say that 'live' Check Syntax is better than Sliced Bread. 

THANK YOU ROBBY -- Matthias

_
  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] intro videos

2011-07-13 Thread Jos Koot
I enjoyed your videos. Very nice. Can you do something about the missing
menu bar? Also had a look to the first two videos of the computer science
section of khanacademy.org. The second one, because it is not functional,
immediately has to discern objects from copies of objects, which seems a
very good way to frighten beginning students off. I understand your
frustation and did not proceed to the other vidios of the computer science
section of khanacademy.org.

Do you intend to follow up on your videos?
Jos

-Original Message-
From: dev-boun...@racket-lang.org [mailto:dev-boun...@racket-lang.org] On
Behalf Of John Clements
Sent: miércoles, 13 de julio de 2011 18:16
To: plt-dev Developers
Subject: [racket-dev] intro videos

Frustrated by what I'm seeing on khanacademy.org, I've now recorded 8
*short* videos on getting started programming in DrRacket. 

http://www.youtube.com/playlist?list=PLD0EB7BC8D7CF739A

It gets through about half of the first page of HtDP 2e. I'm trying to
stress those things--interface details, understanding error messages--that
are a better fit for video.

Comments welcome.

John



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


Re: [racket-dev] interactive hack

2011-07-10 Thread Jos Koot
For racket?
jOS 

-Original Message-
From: dev-boun...@racket-lang.org [mailto:dev-boun...@racket-lang.org] On
Behalf Of Eli Barzilay
Sent: domingo, 10 de julio de 2011 19:52
To: Sam Tobin-Hochstadt; rafk...@cs.utah.edu; dev@racket-lang.org
Subject: Re: [racket-dev] interactive hack

Ok, `4racket' and a beer for anyone who knows why.

On 2011-07-10, Sam Tobin-Hochstadt  wrote:
> I agree -- this is not going to be something people write often; it
> goes into your .racketrc.  There's no reason to have a short and
> confusing name.
>
> On Sun, Jul 10, 2011 at 12:40 PM, Jon Rafkind  wrote:
>> command-repl +1
>> crepl -1
>>
>> On 07/10/2011 09:54 AM, Eli Barzilay wrote:
>>> It's no longer mine, and it's really been years since it was really a
>>> hack.
>>>
>>> I think that I'll go with a shortened command-repl: `crepl'.
>>>
>>>
>>> On 2011-07-10, Matthias Felleisen  wrote:
 how about ElisInteractiveHack


 On Jul 10, 2011, at 8:39 AM, Eli Barzilay wrote:

> 10 minutes ago, Sam Tobin-Hochstadt wrote:
>> Why not `interactive'?
> Interactive what?  -- It's way too generic.
>
>
>> And this is for the name of the module, right?
> A new toplevel collection.  Used similarly to readline.  (And
> supersedes it, hopefully, for casual users.)
>
> --
>          ((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

>>>
>>
>> _
>>  For list-related administrative tasks:
>>  http://lists.racket-lang.org/listinfo/dev
>>
>
>
>
> --
> sam th
> sa...@ccs.neu.edu
>
> _
>   For list-related administrative tasks:
>   http://lists.racket-lang.org/listinfo/dev
>


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

_
  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] racket vs. scheme vs. clojure (as it appears to others)

2011-05-06 Thread Jos Koot
 

> -Original Message-
> From: dev-boun...@racket-lang.org 
> [mailto:dev-boun...@racket-lang.org] On Behalf Of Eduardo Bellani
snip
> -- 
> Eduardo Bellani
> 
> omnia mutantur, nihil interit.

The word 'omnia' frequently leads to contradictions, particularly when
applying a sentence containing this word to itself. The sentence 'omnia
mutantur, nihil interit' implies that even the implication of this sentence
will be subjected to change :) 
Jos

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


Re: [racket-dev] Inline caching (was Re: my '312' this semester, how we compare to others)

2011-05-04 Thread Jos Koot
 

> -Original Message-
> From: dev-boun...@racket-lang.org 
> [mailto:dev-boun...@racket-lang.org] On Behalf Of Matthias Felleisen
> Sent: 04 May 2011 22:58
> To: Tony Garnock-Jones; D Herring
> Cc: dev List
> Subject: Re: [racket-dev] Inline caching (was Re: my '312' 
> this semester,how we compare to others)
> 
> 
> As I was reading a paper, I encountered the word 'cache' and 
> remembered that I had wanted to implement a caching version 
> of the central method in my central data structure. That took 
> me about 10 minutes, and I now have good times for the game: 
> 
> with contracts: 1.8s per game 
> without ctrcts: 1.2s per game 
> 
> I am now within 20% of the fastest Java implementation in my 
> class. That's good. 
> 
> -- Matthias
> 
> p.s. Okay, I'll say it: algorithms matter, too. 


That to me seems most important.
Of course inplementation of an algortithm requires wisdom too:

Is cashing of data faster than recomputing them?
How do we deal with shortage of RAM?
How do we optimize software? (nowadays surely not by hand)
Do software devellopers inspire hardware designers, or may/should it be the
orher way around?
There is a tendency to separate programmers from the hardware equipment they
are using. Is this wise?

I think hardware designers must understand programmers and vice versa.
Most important, both parties must understand their customers.

mho, Jos

> _
>   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] Alpha-equivalence for Racket

2011-03-25 Thread Jos Koot
I suppose Check Syntax already does alpha conversion. Anyway it
distinguishes between different bindings of the same identifier,
Jos 

> -Original Message-
> From: dev-boun...@racket-lang.org 
> [mailto:dev-boun...@racket-lang.org] On Behalf Of Carl Eastlund
> Sent: 25 March 2011 19:52
> To: Racket Developers
> Subject: [racket-dev] Alpha-equivalence for Racket
> 
> Has anyone ever implemented alpha-equivalence for fully expanded
> Racket programs?  It seems like it might be useful for testing macros,
> and I'd rather not duplicate effort if it's already been done.
> 
> Carl Eastlund
> _
>   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] Wikipedia on macros... sigh

2011-03-11 Thread Jos Koot
My main admiration is for Shriram Krishnamurthi of course.
But JohnClements gave me the pointer. Hence also credit for him.
Jos


  _  

From: Gregory Woodhouse [mailto:gregwoodho...@me.com] 
Sent: 11 March 2011 20:21
To: John Clements; Shriram Krishnamurthi
Cc: Jos Koot; 'PLT Developers'
Subject: Re: [racket-dev] Wikipedia on macros... sigh


Great talk! I believe that's the most informative presentation on Scheme
macros I've seen yet. 

On Mar 11, 2011, at 7:08 AM, John Clements wrote:


On Mar 11, 2011, at 3:14 AM, Jos Koot wrote:



Brown University Paper on Automata Macros


(http://www.cs.brown.edu/~sk/Publications/Papers/Published/sk-automata-macro


s/) of Shriram Krishnamurthi is an excellent addition.


Jos



Well, I won't take credit for adding this one.  If I had a bit more energy,
though, I'd clean up the citation.

John





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

Re: [racket-dev] Wikipedia on macros... sigh

2011-03-11 Thread Jos Koot
Brown University Paper on Automata Macros
(http://www.cs.brown.edu/~sk/Publications/Papers/Published/sk-automata-macro
s/) of Shriram Krishnamurthi is an excellent addition.
Jos

> -Original Message-
> From: dev-boun...@racket-lang.org 
> [mailto:dev-boun...@racket-lang.org] On Behalf Of John Clements
> Sent: 11 March 2011 08:24
> To: Eli Barzilay
> Cc: PLT Developers
> Subject: [racket-dev] Wikipedia on macros... sigh
> 
> Wikipedia's page on macros had really no history on it at 
> all. I added some, including references to Kohlbecker and 
> Clinger.  If anyone wants to make it better (or correct the 
> terrible guesses I made about FEXPRs), take a look at it:
> 
> http://en.wikipedia.org/wiki/Macro_%28computer_science%29#Lisp
_.2F_S-expression_macros
> 
> John 
> 
> 

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


Re: [racket-dev] Packaging

2011-02-18 Thread Jos Koot
I read your contribution with great interest. One problem that is not
addressed, as far as I have seen, is that any idiot, like me, can install
his/her contributions (modules/collections/packages or whatever)

For a simple windows 7 user as I it is rather difficult to use command line
instructions. I plead for an easy to use gui for making contributions. I
also plead for an option to delete contributions that have never been
dowloaded by anyone else than the contributor (would that be possible?) I
once contributed a module wrongly. I am sure it has never been dowloaded,
but I have no option to correct my silly mistake. All I could do is to
upload an empty version, but the former version is still there.

As for security, would it be possible to sandbox a download with some
restrictions/options of permissions (opening files, creating new files,
deleting files, renaming files, calling foreign applications, enter internet
or email, and so on)??? 

Jos

> -Original Message-
> From: dev-boun...@racket-lang.org 
> [mailto:dev-boun...@racket-lang.org] On Behalf Of Jay McCarthy
> Sent: 18 February 2011 22:21
> To: dev
> Subject: [racket-dev] Packaging
> 
> You may recall from the meeting over the summer that I promised a
> packaging Christmas present to Racket. I'm over a month late, but here
> it is:
> 
> http://faculty.cs.byu.edu/~jay/tmp/pkgs/spec.html
> 
> I lay out some goals for the new packaging system and make a 
> concrete proposal.
> 
> Please share your feedback so I can direct my efforts better.
> 
> Jay
> 
> -- 
> Jay McCarthy 
> Assistant Professor / Brigham Young University
> http://faculty.cs.byu.edu/~jay
> 
> "The glory of God is Intelligence" - D&C 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


Re: [racket-dev] irrelevant open problem reports

2011-02-17 Thread Jos Koot
Thanks to you and all other members of PLT.
Jos 

> -Original Message-
> From: robby.find...@gmail.com 
> [mailto:robby.find...@gmail.com] On Behalf Of Robby Findler
> Sent: 17 February 2011 14:54
> To: Jos Koot
> Cc: PLT Developers
> Subject: Re: [racket-dev] irrelevant open problem reports
> 
> Okay, thanks. I've closed the PR.
> 
> Robby
> 
> On Thu, Feb 17, 2011 at 2:32 AM, Jos Koot 
>  wrote:
> > No not all points of pr 9692 have been addressed, but after 
> using the search
> > & replace API for some time I got used to it and now I am 
> happy with it as
> > it is.
> > I use check syntax for looking up and replacing complete 
> identifiers.
> > Thanks, Jos
> >
> >> -Original Message-
> >> From: robby.find...@gmail.com
> >> [mailto:robby.find...@gmail.com] On Behalf Of Robby Findler
> >> Sent: 16 February 2011 22:30
> >> To: Jos Koot
> >> Cc: PLT Developers
> >> Subject: Re: [racket-dev] irrelevant open problem reports
> >>
> >> Thanks!
> >>
> >> I went back over these and closed all of them except 9692. Are you
> >> happy with the search & replace API overall? I' not sure 
> that all of
> >> those points have been addresssed.
> >>
> >> Robby
> >>
> >> On Wed, Feb 16, 2011 at 11:26 AM, Jos Koot
> >>  wrote:
> >> > A problem report query with originator "Jos Koot" shows 10
> >> open PRs. As far
> >> > as I can judge, all off them are already fixed or otherwise
> >> answered in a
> >> > satisfying way. As far as I am concerned, they can be closed.
> >> > Now I am enjoying 5.0.1.2.
> >> > Thanks to the whole PLT !!!
> >> > Jos Koot
> >> >
> >> >
> >> > _
> >> >  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] irrelevant open problem reports

2011-02-17 Thread Jos Koot
No not all points of pr 9692 have been addressed, but after using the search
& replace API for some time I got used to it and now I am happy with it as
it is.
I use check syntax for looking up and replacing complete identifiers.
Thanks, Jos

> -Original Message-
> From: robby.find...@gmail.com 
> [mailto:robby.find...@gmail.com] On Behalf Of Robby Findler
> Sent: 16 February 2011 22:30
> To: Jos Koot
> Cc: PLT Developers
> Subject: Re: [racket-dev] irrelevant open problem reports
> 
> Thanks!
> 
> I went back over these and closed all of them except 9692. Are you
> happy with the search & replace API overall? I' not sure that all of
> those points have been addresssed.
> 
> Robby
> 
> On Wed, Feb 16, 2011 at 11:26 AM, Jos Koot 
>  wrote:
> > A problem report query with originator "Jos Koot" shows 10 
> open PRs. As far
> > as I can judge, all off them are already fixed or otherwise 
> answered in a
> > satisfying way. As far as I am concerned, they can be closed.
> > Now I am enjoying 5.0.1.2.
> > Thanks to the whole PLT !!!
> > Jos Koot
> >
> >
> > _
> >  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] irrelevant open problem reports

2011-02-16 Thread Jos Koot
A problem report query with originator "Jos Koot" shows 10 open PRs. As far
as I can judge, all off them are already fixed or otherwise answered in a
satisfying way. As far as I am concerned, they can be closed.
Now I am enjoying 5.0.1.2.
Thanks to the whole PLT !!!
Jos Koot
 
 
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] Fwd: [racket-bug] drscheme/11585 impossible to enabletest suite coverage in main language

2011-02-04 Thread Jos Koot
It's ok on my windows 7 system.
Jos 

> -Original Message-
> From: dev-boun...@racket-lang.org 
> [mailto:dev-boun...@racket-lang.org] On Behalf Of John Clements
> Sent: 04 February 2011 02:20
> To: PLT Developers
> Subject: [racket-dev] Fwd: [racket-bug] drscheme/11585 
> impossible to enabletest suite coverage in main language
> 
> I conjecture that syntactic test suite coverage is broken on 
> all Macs.  Specifically, I see this behavior in the release 
> candidate on both of my macs, after moving out all racket 
> prefs, moving Library/Racket out of the way, and unsetting 
> PLTCOLLECTS. Apparently this doesn't happen on (at least one) 
> non-mac platform(s).
> 
> Would someone else with a mac try this? :
> 
> Choose the "Determine language from source" language.
> Click on "Show Details..."
> Choose the "Syntactic Test Suite Coverage" button
> Click OK.
> Re-open the language dialog.
> 
> Is the "Syntactic Test Suite Coverage" button still checked?
> 
> Thanks in advance,
> 
> John
> 
> Begin forwarded message:
> 
> > From: cleme...@racket-lang.org
> > Date: February 2, 2011 5:02:26 PM PST
> > To: cleme...@racket-lang.org, ro...@racket-lang.org
> > Subject: Re: [racket-bug] drscheme/11585 impossible to 
> enable test suite coverage in main language
> > Reply-To: b...@racket-lang.org
> > 
> > 
> > Responsible changed from "robby" to "clements" by clements 
> at Wed, 02 Feb 2011 20:02:26 -0500
> > Reason>>> only happens to me ?
> > 
> > State changed from "closed" to "open" by clements at Wed, 
> 02 Feb 2011 20:02:26 -0500
> > Reason>>> It's not fixed for me...
> > 
> > 
> > View:
> >  http://bugs.racket-lang.org/query/?cmd=view&pr=11585
> 
> 

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


Re: [racket-dev] racket-lang down?

2011-01-21 Thread Jos Koot
I can't enter racket-lang.org either.
Jos

> -Original Message-
> From: dev-boun...@racket-lang.org 
> [mailto:dev-boun...@racket-lang.org] On Behalf Of John Clements
> Sent: 20 January 2011 00:44
> To: plt-dev Developers
> Subject: [racket-dev] racket-lang down?
> 
> It looks like racket-lang.org is down. 
> 
> John
> 
> 

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


Re: [racket-dev] (round), etc. in Typed Racket

2010-12-14 Thread Jos Koot
I was not thinking of unsafe operations.
Jos 

> -Original Message-
> From: Vincent St-Amour [mailto:stamo...@ccs.neu.edu] 
> Sent: 13 December 2010 18:11
> To: Jos Koot
> Cc: 'Vincent St-Amour'; 'Noel Welsh'; dev@racket-lang.org
> Subject: Re: [racket-dev] (round), etc. in Typed Racket
> 
> At Mon, 13 Dec 2010 17:29:11 +0100,
> Jos Koot wrote:
> > When multiplying any number (nan and inf excepted) by exact 
> 0, should, 
> > of course produce exact 0.
> 
> If you're multiplying an integer that may or may not be zero (say, an
> index) by a float, you cannot assume that the result is a 
> float, even though in all cases but one, it will be. If 
> you're using unsafe operations for performance reasons, this 
> can break if you're not entirely careful.
> 
> Vincent

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


Re: [racket-dev] (round), etc. in Typed Racket

2010-12-13 Thread Jos Koot
 

> -Original Message-
> From: Vincent St-Amour [mailto:stamo...@ccs.neu.edu] 
> Sent: 13 December 2010 17:01
> To: Jos Koot
> Cc: 'Noel Welsh'; dev@racket-lang.org
> Subject: Re: [racket-dev] (round), etc. in Typed Racket
> 
> At Mon, 13 Dec 2010 16:43:58 +0100,
> Jos Koot wrote:
> > Would we not have the same problem with 'rational?'.
> > All reals, both exact and inexact ones are rationals (for 
> the obvious 
> > reason that we cannot represent every irrational number in finite 
> > memory) Would we not need the same distinction between 
> > 'exact-rational?' and 'inexact-rational?'. May be 
> 'rational?' should 
> > mean 'exact-rational?' and 'real?' should mean 
> 'inexact-real?' or 'inexact-rational?'.
> 
> I like that, it's consistent with exact-integer -> integer.
> 
> > And how about exact and inexact 'complex?'?
> 
> It's a bit more tricky, since there are potentially 4 kinds 
> of complexes, each part could be exact or inexact. However, 
> I'm not sure that complex numbers of the shape 
> exact+inexact*i are of any use, and apart from the special 
> case inexact+0i (inexact reals), I don't see much use for 
> inexact+exact*i either.
> 
> > I have the feeling that the numeric tower is tilting like 
> that of Pisa.
> 
> Sounds more like straightening it up to me.
> 
> > When it comes to efficiency, flonums may be preferred, but 
> it is not 
> > difficult to enforce a function to do all its computations 
> with flonums.
> 
> It can be tricky if you mix exacts and inexacts, the result 
> is not always inexact:
> (* 3.4 0) -> 0 ; not 0.0

When multiplying any number (nan and inf excepted) by exact 0, should, of
course produce exact 0.
There are more problems though. How about:
(let ((x 1.0)) (- x x))
Should it produce inexact or exact 0?
Don't ask me, for I am not sure, yet.  IIAR Racket produces 0.0.
Evidently the problem is located in the simulation of truly REAL
computations within a finite memory that necessarily must produce
approximations for many computations.
I am inclined to the idea that a programmer should be aware of when he or
she is using exact numbers or approximations of them.
Jos


> 
> Vincent

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


Re: [racket-dev] (round), etc. in Typed Racket

2010-12-13 Thread Jos Koot
That reassures me. Thanks.

Would we not have the same problem with 'rational?'.
All reals, both exact and inexact ones are rationals (for the obvious reason
that we cannot represent every irrational number in finite memory)
Would we not need the same distinction between 'exact-rational?' and
'inexact-rational?'. May be 'rational?' should mean 'exact-rational?' and
'real?' should mean 'inexact-real?' or 'inexact-rational?'.
And how about exact and inexact 'complex?'?

I have the feeling that the numeric tower is tilting like that of Pisa.

Nevertheless I see some advantage in the R6RS tower of numbers. Although all
numbers as stored in memory have exact representations (though may be
several of kilobytes), it remains useful to know whether or not along the
computation of a number, the system was forced to produce an approximation
(as in (sqrt 2)).

When it comes to efficiency, flonums may be preferred, but it is not
difficult to enforce a function to do all its computations with flonums.
Jos

> -Original Message-----
> From: Noel Welsh [mailto:noelwe...@gmail.com] 
> Sent: 13 December 2010 16:18
> To: Jos Koot
> Cc: dev@racket-lang.org
> Subject: Re: [racket-dev] (round), etc. in Typed Racket
> 
> At this point we're just talking about nomenclature. I think 
> round would still return an inexact integer, as it does at 
> the moment, but we wouldn't call this an integer.
> 
> (More broadly I find the numeric tower more hassle than help. 
> A lot of my code cares about efficiency and interacting with 
> C libraries, so perhaps I'm atypical.)
> 
> N.
> 
> On Mon, Dec 13, 2010 at 3:11 PM, Jos Koot 
>  wrote:
> > Does this also mean that procedures like round, floor and 
> ceiling will 
> > produce exact integers even when given an inexact argument? 
> I am not 
> > sure this would be a good idea. For example consider:
> > Now (round #i1e200) -> flonum of 64 bits.
> > But (inexact->exact (round #i1e200)) -> exact integer of 
> over 600 bits.
> > Nevertheless the idea of making a distinction between integer? and 
> > inexact-integer? (or whatever you want to name them) seems to be a 
> > good idea. However, we already have integer? and exact-integer?
> > Am I missing the pointe of the discussion?
> > Jos

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


Re: [racket-dev] (round), etc. in Typed Racket

2010-12-13 Thread Jos Koot
Does this also mean that procedures like round, floor and ceiling will
produce exact integers even when given an inexact argument? I am not sure
this would be a good idea. For example consider:
Now (round #i1e200) -> flonum of 64 bits.
But (inexact->exact (round #i1e200)) -> exact integer of over 600 bits.
Nevertheless the idea of making a distinction between integer? and
inexact-integer? (or whatever you want to name them) seems to be a good
idea. However, we already have integer? and exact-integer?
Am I missing the pointe of the discussion?
Jos

> -Original Message-
> From: dev-boun...@racket-lang.org 
> [mailto:dev-boun...@racket-lang.org] On Behalf Of Robby Findler
> Sent: 13 December 2010 14:29
> To: Sam Tobin-Hochstadt
> Cc: dev@racket-lang.org
> Subject: Re: [racket-dev] (round), etc. in Typed Racket
> 
> On Sat, Dec 11, 2010 at 9:53 PM, Robby Findler 
>  wrote:
> > [ ... talking about changing integer? to only recognize 
> exacts ... ] 
> > This seems like it would cause far too much breakage to far 
> too much 
> > code. I certainly wouldn't want to attempt it. Changing TR (as I 
> > suggest below) seems far easier.
> 
> Well, I went and took a look at the tree for uses of integer? 
> and I'm finding that most of them have exact? nearby and some 
> of the ones that don't probably should. (I used DrRacket's 
> find in files with the regexp [^-]integer[?].)
> 
> So, I'm changing my opinion to say that it would be feasible 
> to have integer? in #lang racket/base mean what the current 
> exact-integer?
> means. Probably we'd want to add an inexact-integer? and then 
> legitimate uses of the current integer? predicate would turn 
> into (lambda (x) (or (integer? x) (inexact-integer? x))).
> 
> It would be some work to make all of the changes in the tree 
> (and it would probably be polite to audit the latest version 
> of active planet
> packages) but it doesn't seem to be as deadly as I'd feared. 
> Also, after having that look, I definitely think that if we 
> got to do this one over that integer? accepting only exacts 
> is wise; it seems too easy to allow inexacts to flow around 
> when you didn't mean to with the current definition of the predicates.
> 
> Robby
> _
>   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] [racket] Exploratory programming?

2010-12-01 Thread Jos Koot
Under windows 7 premium home, this does show up with internet explorer but
not with firefox.
Jos 

> -Original Message-
> From: dev-boun...@racket-lang.org 
> [mailto:dev-boun...@racket-lang.org] On Behalf Of Matthias Felleisen
> Sent: 02 December 2010 04:21
> To: Eli Barzilay
> Cc: lukejor...@gmail.com; 'dev'
> Subject: Re: [racket-dev] [racket] Exploratory programming?
> 
> 
> In Safari this error doesn't show up. 
> 
> On Dec 1, 2010, at 9:52 PM, Eli Barzilay wrote:
> 
> > Four hours ago, engin...@alum.mit.edu wrote:
> >> 
> >> 2.  Search Manuals breaks the browser's Back button.  
> Here's a simple 
> >> example.
> >> a. Open http://docs.racket-lang.org/
> >> b. Type "modulus" in the "search manuals" box and hit Enter c. No 
> >> matches found, so change the highlighted text to "modulo"
> >> d. Click on one of the results
> >> e. Click the browser's back button
> >> f. I'm not "back" at the list of results
> >> 
> >> I have been very impressed with the level of documentation, but I 
> >> (and my students) have often found frustration in searching.
> > 
> > That's an issue with URLs and with how your browser decides to 
> > implement history navigation.  When you're done with (b), 
> you get to 
> > the search page with the query in the url "...?q=modulus".  You now 
> > change the string and follow a link, then go back -- to the 
> same url 
> > with the original query.  At this point, Chrome 
> reinitializes the page 
> > in a way that makes "modulus" re-appear in the input field, while 
> > FireFox preserves the state as you left it and will not do that.  I 
> > know how to make FF behave like Chrome, but that involves 
> > re-initializing the page, which means that using the back 
> button will 
> > be much more painful.
> > 
> > -- 
> >  ((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
> 
> _
>   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] How about adding this simple list-shuffling procedure to racket?

2010-11-11 Thread Jos Koot
 
When truly picking uniformally shuffled lists from a given list, see:

http://telefonica.net/web2/koot/natural-to-permutation.scm

and try

(require srfi/27) ; for random-integer
(require "natural-to-permutation.scm")

(let*
((lst (build-list 1000 (lambda (k) (round (quotient k 10)
 (shuffler (make-K->P lst eq?))
 (K (random-integer (nPs lst eq?
  (time (shuffler K)))

Where random-integer is assumed to produce a uniform distribution.

Jos




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


Re: [racket-dev] `cond' / `when' / `unless' / etc bodies

2010-10-12 Thread Jos Koot
Thanks. In lacked to see the introduction of this feature. I checked and it
works (OF COURSE)
Jos

> -Original Message-
> From: Matthew Flatt [mailto:mfl...@cs.utah.edu] 
> Sent: 12 October 2010 16:40
> To: Jos Koot
> Cc: dev@racket-lang.org
> Subject: Re: [racket-dev] `cond' / `when' / `unless' / etc bodies
> 
> At Tue, 12 Oct 2010 16:35:54 +0200, "Jos Koot" wrote:
> > We already have begin-with-definitions. Would there be a 
> great penalty 
> > to simply wrap every body-like sequence of expressions and 
> definitions 
> > with begin-with-definitions? The latter even allows more 
> freedom than 
> > (let () def ... expr ...), for it allows 
> (begin-with-definitions def-or-expr ...).
> 
> In 5.0.1, we changed `let' (and internal definitions in 
> general) to allow `(let () def-or-expr ...)'.
> 


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


Re: [racket-dev] `cond' / `when' / `unless' / etc bodies

2010-10-12 Thread Jos Koot
We already have begin-with-definitions. Would there be a great penalty to
simply wrap every body-like sequence of expressions and definitions with
begin-with-definitions? The latter even allows more freedom than (let () def
... expr ...), for it allows (begin-with-definitions def-or-expr ...). I am
not sure whether or how this would conflict with optimization.
Jos




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


Re: [racket-dev] `cond' / `when' / `unless' / etc bodies

2010-10-10 Thread Jos Koot
 
+1,
In macro definitions that produce code with bodies, I almost by routine
write (let () etc ...)
There may be a problem including the bodies of begin forms, for they may be
lifted out.
Jos

> -Original Message-
> From: dev-boun...@racket-lang.org 
> [mailto:dev-boun...@racket-lang.org] On Behalf Of Jay McCarthy
> Sent: 10 October 2010 22:28
> To: Matthias Felleisen
> Cc: dev@racket-lang.org
> Subject: Re: [racket-dev] `cond' / `when' / `unless' / etc bodies
> 
> Ditto.
> 
> On Sun, Oct 10, 2010 at 1:36 PM, Matthias Felleisen 
>  wrote:
> >
> > On Oct 10, 2010, at 2:43 PM, Robby Findler wrote:
> >
> >> I too am in favor of when, unless, and cond being 
> definition contexts.
> >
> > +1.
> >
> > I routinely wrap cond/when in let () for just that purpose.
> > _
> >  For list-related administrative tasks:
> >  http://lists.racket-lang.org/listinfo/dev
> >
> 
> 
> 
> --
> Jay McCarthy 
> Assistant Professor / Brigham Young University 
> http://teammccarthy.org/jay
> 
> "The glory of God is Intelligence" - D&C 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


Re: [racket-dev] alt-exp syntax

2010-08-26 Thread Jos Koot
One of the examples reads:
{lambda: [x] x(x)}
(lambda: [x] x(x))
Notice the curly brackets in the first line.
I am not sure I like this.
Nevertheless a nice idea to use colons in order to reduce the number of
parentheses.
Jos

> -Original Message-
> From: dev-boun...@racket-lang.org 
> [mailto:dev-boun...@racket-lang.org] On Behalf Of Everett
> Sent: 26 August 2010 20:10
> To: plt-dev Developers
> Subject: [racket-dev] alt-exp syntax
> 
> I don't know if anyone cares about this, but I made a reader 
> and #lang language for the alternate syntax I came up with 
> (direct, obvious conversion to s-exp but allows writing fewer 
> parens). Implementations are usually better appreciated than 
> mere proposals. You can get at it
> here: http://www.neptic.com/np/software/alt-exp.php
> 
> I noticed that one can provide a syntax colorer (the default 
> is fine for my #lang language), but is there a way to provide 
> an indenter since the default handling makes editing my 
> alt-exp syntax slightly annoying in DrRacket.
> 
> 
> Thanks,
> -Everett
> 
> _
>   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] can racket-lang.org survive a slashdotting?

2010-08-01 Thread Jos Koot
I think loosing schemecookbook is a loss.
Indeed it no longer responds adequately.
Sad
Jos

> -Original Message-
> From: dev-boun...@racket-lang.org 
> [mailto:dev-boun...@racket-lang.org] On Behalf Of Neil Van Dyke
> Sent: 01 August 2010 18:54
> To: Racket Dev List
> Subject: [racket-dev] can racket-lang.org survive a slashdotting?
> 
> Can the racket-lang.org Web server(s) handle a huge spike in 
> traffic, such as if it got on the front page of reddit.com?
> 
> schemecookbook.org somehow got onto the front page of 
> reddit.com briefly, which seems to have killed 
> schemecookbook.org.  This is no big loss, since I think 
> schemecookbook.org gives a bad impression even when it's 
> working.  However, I'd hate for racket-lang.org to get its 
> potential 15 minutes of fame, but burn out before sifting a 
> new batch of users out of the gazillion casual browsers.
> 
> --
> http://www.neilvandyke.org/
> 
> _
>   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] P4P: A Syntax Proposal

2010-07-28 Thread Jos Koot
With a good editor, like that of DrSceme, pardon me, RdRacket, I experience
no difficulty at all with parentheses. In fact I hardly see them. DrRacket
shows me the extent of a subsexpr very micely. I would have, may be, a
problem when parsing symbolic expressions lacking parenteses, unless, of
course, reading a sexpr with omission of unecessary parentheses would give
me an old fashioned parenthesized sexpr. I am not convinced, yet ...
Jos

> -Original Message-
> From: dev-boun...@racket-lang.org 
> [mailto:dev-boun...@racket-lang.org] On Behalf Of Shriram 
> Krishnamurthi
> Sent: 28 July 2010 19:45
> To: PLT Developers
> Subject: [racket-dev] P4P: A Syntax Proposal
> 
> I've been vexed for a while about parenthetical syntax: I 
> love it, appreciate what it offers, but also recognize that 
> no amount of teaching or arguing alters how people perceive 
> it.  With the switch to Racket, and our continuing interest 
> in user interface issues, I believe it is wise to consider an 
> optional alternate syntax.
> 
> I finally had a breakthrough last weekend on how to create a 
> syntax that may be more palateable without losing the essence 
> of parenthetical syntax.  As a preview, it does incorporate 
> indentation, but in a good way.  You'll see.
> 
> Feedback welcome.  The most important is whether you spot any 
> flaws regarding predictable parsing.
> 
> Here's a *non-permanent* URL where you can learn more:
> 
>   http://www.cs.brown.edu/~sk/tmp/P4P/
> 
> Shriram
> _
>   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] multiple key-press

2010-07-22 Thread Jos Koot
I don't want to initiate a war.
However, I want to say that Matthias does understand at least part of his
audience, me included, I am sure. Here I must admit I probably am not a
standard specimen of his audience. On the racket users list many people gave
me very good advice, including both you and Matthias.
Jos

> -Original Message-
> From: dev-boun...@racket-lang.org 
> [mailto:dev-boun...@racket-lang.org] On Behalf Of Shriram 
> Krishnamurthi
> Sent: 22 July 2010 15:39
> To: Matthias Felleisen
> Cc: PLT Developers
> Subject: Re: [racket-dev] multiple key-press
> 
> > As far as I know, at the lowest level there is no "multiple 
> key press"
> > event even in the OS.
> 
> Yes, that's why I had scare-quotes in my message.
> 
> > If they want to do that, they should change their world to 
> record the 
> > "current key press state":
> 
> I told them that.  But the problem is that inversion of 
> control makes the world structure and its logic 
> *significantly* uglier.
> 
> > I have considered this issue. I decided that these kinds of kids 
> > should be introduced to Universe programs as opposed to World 
> > programs. That's way cooler than silly one-keyboard games.
> 
> Doom is "silly"?  Duke Nukem 3D is "silly"?
> 
> Perhaps you do indeed know a great deal about games.  But 
> perhaps you have a more limited understanding of your audience.
> 
> Shriram
> _
>   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] srfi41 for racket

2010-07-19 Thread Jos Koot
Is it a good idea to adapt PLT-Scheme implementation of srfi41 to Racket?
In principle, this is trivial.
However, when I adapted srfi41 for PLT-Scheme, Eli Barzilay advised me not to 
double the code for promises.
I did not follow his advice.
I now intend to follow his advice.
This has consequences that at first sight may seem undesirable. For example it 
would no longer be possible to distinguish a stream from a plain promise. It is 
not possible to provide a reliable predicate for streams. This also holds for 
the standard implementation. For example:
 
#lang racket
(require srfi/41)
(define improper-stream ((stream-lambda () 1)))
(stream? improper-stream) ; -> #t
(stream-null? improper-stream) ; -> error
(stream-pair? improper-stream) ; -> error
 
Hence the claim that a stream is either stream-null or a stream-pair is not 
fulfilled.
The document of srfi41 also claims that stream-null is unique. It is not:
 
(define another-stream-null (stream-filter number? (stream 'a 'b 's)))
(equal? stream-null another-stream-null) ;-> #f, yet:
(stream-null? another-stream-null) ; -> #t
 
In the docs for a new implementation I would like to make a distinction between 
abstract streams (with abstract predicates but without true (complete) 
predicates) and concrete streams. A concrete stream would be:
 
concrete-stream ::= null
concrete-stream ::= promise (any promise, and forcing may yield anything)
concrete-stream ::= pair whose cdr is a concrete stream (and the car probably, 
but not necessarily a promise)
 
When using stream functions on concrete streams that do not satisfy the 
requirements of abstract streams, errors will be reported (just like in th 
standard implementation) It is possible to make a predicate for 
concrete-streams, but it seems rather useless to me.
 
In srfi41 attempts have been made to conceal the internally defined syntax 
stream-lazy. Yet stream-lazy can easily be exposed, as in:
(define-syntax my-stream-lazy
 (syntax-rules ()
  ((_ expr) ((stream-lambda () expr)
 
While it is possible to maintain almost all provided syntaxes and procedures of 
PLT's srfi41, some changes would be noticeable:
 
1:
(stream-lambda formals definition ... body ...1)
can also be written as
(lambda formals (lazy (let () definition ... body ...)))
To me this seems an improvement.
 
2:
stream-null would just be a synonym for null. There is no reason to wrap it in 
a promise.
 
3:
A stream-pair could be a promise that yieds a pair, but it could also be a pair 
whose cdr is a promise. There is no reason to wrap a pair of promises in 
another promise.
 
Your comments/critics/advises are welcome.
Thanks, Jos
 

Hartelijke groet, 
Jos Koot 
Carrer d'Argentona 17 baixos 
ES 08302 MATARO 
España/Spanje /Spain 

+34937412360 
+34679944599 

λ(x)(((x x)x)x)x)x)x)x)) 
   (λ(x)(λ(y)(x(x y) 
  (λ(x)(cons'greeting x))) 
'()) ; That's a lot of greetings. 

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

Re: [racket-dev] TeachScheme! wikipedia page update

2010-06-16 Thread Jos Koot
You did not mention yourself as first author of HtDP. Do you want me to add
your name?
Jos

> -Original Message-
> From: dev-boun...@racket-lang.org 
> [mailto:dev-boun...@racket-lang.org] On Behalf Of Matthias Felleisen
> Sent: 16 June 2010 20:00
> To: John Clements
> Cc: plt edu; plt-dev Developers
> Subject: Re: [racket-dev] TeachScheme! wikipedia page update
> 
> 
> Thanks for reminding me and for getting started.
> 
> I have made small changes to the page (de-emphasizing Scheme 
> some more).
> 
> The real question is whether we should abandon the name TeachScheme!  
> and move on. TeachRacket! comes to mind but Racketeering! and 
> others are available, too.
> 
> -- Matthias
> 
> 
> 
> On Jun 16, 2010, at 12:15 PM, John Clements wrote:
> 
> > I beat on the TeachScheme! wikipedia page, with reasonable but not 
> > stellar results.  In particular, sentences like 
> "TeachScheme doesn't 
> > depend on Scheme" become a bit more opaque after the Scheme->Racket 
> > substitution.
> >
> > Anyone else who feels like doing 5 minutes of outreach is 
> welcome to 
> > edit it.
> >
> > John
> >
> > _
> >  For list-related administrative tasks:
> >  http://lists.racket-lang.org/listinfo/dev
> 
> _
>   For list-related administrative tasks:
>   http://lists.racket-lang.org/listinfo/dev


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