Eli Barzilay | 1 Dec 2010 05:14
Favicon
Gravatar

Re: REPL crash

5 hours ago, Dmitry Chestnykh wrote:
> The following example from docs (11.9) crashes console REPL (but not
> gracket or DrRacket):
> 
>   (define-namespace-anchor anchor)
>   (parameterize ([current-namespace
>                   (namespace-anchor-≥namespace anchor)])
>    (expand
>     (datum->syntax
>      #f
>      '(delay (+ 1 2)))))

Namespace anchors are intended to be used from modules, when you're in
the REPL you don't really need to use them -- since you already have
the `current-namespace'.

The bug is still a bug, of course, just happens to be code that nobody
would try...  Here's a shorter version:

   (define-namespace-anchor anchor)
   (eval 1 (namespace-anchor-≥namespace anchor))

and in more primitive terms:

  (define tmp #f)
  (define r (#%variable-reference tmp))
  (eval 1 (variable-reference-≥namespace r))

--

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
(Continue reading)

Matthew Flatt | 1 Dec 2010 14:52
Picon
Favicon
Gravatar

Re: REPL crash

At Tue, 30 Nov 2010 23:51:57 +0100, Dmitry Chestnykh wrote:
> Seg fault (internal error) at 0x4
> Bus error
> 
> Mac OS X 10.6.5, same result on Racket 5.0.2 and 6c25210a6bb8 from git.

Fixed in the git repo.

Thanks for the report!
Matthew

Noel Welsh | 1 Dec 2010 16:41
Picon

Refactoring in-vector and friends

Hi all,

I spent (far too much) time this morning refactoring the definition of
in-vector to expose the building blocks to compose these
macro/functions. After refactoring the code for defining in-vector is:

  (define-:vector-like-gen :vector-gen unsafe-vector-ref)

  (define-in-vector-like in-vector
    "vector" vector? vector-length :vector-gen)

  (define-sequence-syntax *in-vector
    (lambda () #'in-vector)
    (make-in-vector-like #'vector?
                         #'unsafe-vector-length
                         #'in-vector
                         #'unsafe-vector-ref))

This could obviously be made smaller but it sufficient to enable reuse
for in-flvector (my goal), in-f64vector etc. In doing so I split
for.rkt into three (I couldn't handle refactoring the 1000+ lines of
for.rkt; I needed something smaller to understand it all). Since this
is a moderately large change I'm looking for comments/objections
before committing. If you have objections please let me know -- if I
don't hear any I'll commit tomorrow. Diff is attached.

N.
Attachment (vector.diff): application/octet-stream, 24 KiB
(Continue reading)

Jon Rafkind | 1 Dec 2010 22:36
Picon
Favicon

Re: code base metrics

And because I already started it, here is the entire collects tree (370k
file)

http://www.cs.utah.edu/~rafkind/tmp/racket-definitions.txt

On 11/29/2010 03:34 PM, Matthias Felleisen wrote:
> That makes sense. For now, I am fine with this very first-order approximation. Thanks 
>
>
> On Nov 29, 2010, at 5:32 PM, Jon Rafkind wrote:
>
>> There is one thing defined at phase 0, module-begin. The module exports
>> a bunch of stuff
>>
>> (provide (rename-out [module-begin #%module-begin])
>>         (except-out (all-from-out scheme/base) #%module-begin)
>>         (all-from-out scheme/unit)
>>         (all-from-out scheme/contract)
>>         (for-syntax (all-from-out scheme/base)))
>>
>> I realize you probably wanted something like 'only count exports of
>> things defined in the module' but thats a little harder to compute,
>> which is why the metric is a first approximation.
>>
>> On 11/29/2010 03:29 PM, Matthias Felleisen wrote:
>>> Thanks, that's great. But what does this mean: 
>>>
>>> "collects/racket/signature/lang.rkt defined 1 exported 2747"
>>>
>>> -- Matthias
(Continue reading)

engineer | 1 Dec 2010 23:51
Picon
Favicon

Re: [racket] Exploratory programming?

1.  I've been meaning for a long time to mention some things like this.
Another example is "modulus" (modulo and remainder work).  It'd be nice to
have a list of suggestions returned whenever certain words were typed or
whenever no results are returned.

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.

Constructively,
Paul

Btw, I know of no easy search in other languages (Java) other than Google.

> -----Original Message-----
> From: users-bounces@... [mailto:users-bounces@...]
> On Behalf Of Justin Zamora
> Sent: Tuesday, November 30, 2010 3:02 PM
> To: lukejordan@...
> Cc: users@...
> Subject: Re: [racket] Exploratory programming?
> 
(Continue reading)

John Clements | 2 Dec 2010 00:11
Gravatar

Re: [racket] Exploratory programming?


On Dec 1, 2010, at 2:51 PM, <engineer@...> wrote:

> 1.  I've been meaning for a long time to mention some things like this.
> Another example is "modulus" (modulo and remainder work).  It'd be nice to
> have a list of suggestions returned whenever certain words were typed or
> whenever no results are returned.
> 
> 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.

This might be another good chance to mention work that a student of mine has done on a tool, ErrRecorder, that
collects error messages automatically and allows users to suggest solutions for particular error messages.

http://li21-127.members.linode.com:8021/errrecorder

The new piece here is that it now does some clustering of error messages based on levenshtein distances, so
that errors can be grouped by frequency in some sensible way.  For the problem you mention, I see that you
really want to split up that big first category that holds all of the "undefined identifier" messages
generated in teaching languages.

(Continue reading)

Eli Barzilay | 2 Dec 2010 03:52
Favicon
Gravatar

Re: [racket] Exploratory programming?

Four hours ago, engineer@... 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!
Matthias Felleisen | 2 Dec 2010 04:21
Favicon

Re: [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, engineer@... 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.
> 
(Continue reading)

engineer | 2 Dec 2010 04:38
Picon
Favicon

Re: [racket] Exploratory programming?

My FF and IE behave as does Chrome.  I've heavily configure my FF and may
have messed it up, but my IE is quite vanilla.

-Paul

> -----Original Message-----
> From: Eli Barzilay [mailto:eli@...]
> Sent: Wednesday, December 01, 2010 9:52 PM
> To: engineer@...
> Cc: 'dev'; lukejordan@...
> Subject: Re: [racket-dev] [racket] Exploratory programming?
> 
> Four hours ago, engineer@... 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
(Continue reading)

Matthias Felleisen | 2 Dec 2010 04:40
Favicon

Re: code base metrics


Thanks. When I re-run my 'averaging' I get around 34% exports.  

BTW, your script is broken. Look for "view: name"

On Dec 1, 2010, at 4:36 PM, Jon Rafkind wrote:

> And because I already started it, here is the entire collects tree (370k
> file)
> 
> http://www.cs.utah.edu/~rafkind/tmp/racket-definitions.txt
> 
> On 11/29/2010 03:34 PM, Matthias Felleisen wrote:
>> That makes sense. For now, I am fine with this very first-order approximation. Thanks 
>> 
>> 
>> On Nov 29, 2010, at 5:32 PM, Jon Rafkind wrote:
>> 
>>> There is one thing defined at phase 0, module-begin. The module exports
>>> a bunch of stuff
>>> 
>>> (provide (rename-out [module-begin #%module-begin])
>>>        (except-out (all-from-out scheme/base) #%module-begin)
>>>        (all-from-out scheme/unit)
>>>        (all-from-out scheme/contract)
>>>        (for-syntax (all-from-out scheme/base)))
>>> 
>>> I realize you probably wanted something like 'only count exports of
>>> things defined in the module' but thats a little harder to compute,
>>> which is why the metric is a first approximation.
(Continue reading)


Gmane