Ryan Golbeck | 1 Sep 2010 02:04
Picon
Picon
Favicon

unpacking tarballs

Hi all again,

In the documentation I find functions for creating tar files
(http://docs.racket-lang.org/file/tar.html?q=tar#%28def._%28%28lib._file/tar..rkt%29._tar%29%29),
but none for unpacking them.

Is anyone aware of some library functions for unpacking tarballs?

Thanks,
-ryan
Shriram Krishnamurthi | 1 Sep 2010 04:49
Favicon
Gravatar

Re: Some questions regarding exercises in PLAI

Sorry for the delay.  In this case, Eric's interpretation is the one I
had in mind!

On Mon, Aug 30, 2010 at 9:40 AM, Eric Tanter <etanter <at> dcc.uchile.cl> wrote:
> Hi Ionut, Jay,
>
> I don't understand the question this way -- rather, how to maintain laziness without introducing an extra
variant of CFAE-Value, ie. reusing the Closure variant to implement expression closures.
>
> Maybe Shriram can confirm which interpretation is correct ;)
>
> -- Éric
>
>
> On Aug 30, 2010, at 9:21 AM, Jay McCarthy wrote:
>
>> Hi Ionut,
>>
>> In this section PLAI is asking you to write more of a meta-interpreter
>> where you use the thunks of the language you are writing the
>> interpreter in.
>>
>> Jay
>>
>> On Mon, Aug 30, 2010 at 2:23 AM, Ionut G. Stan <ionut.g.stan <at> gmail.com> wrote:
>>> Hi,
>>>
>>> I'm pretty sure this is not the best mailing list to ask about PLAI, but as
>>> I've found no other I decided to try here (I've found about PLAI on the
>>> original DrScheme mailing list, and racket-lang.org seems to mention PLAI in
(Continue reading)

Laurent | 1 Sep 2010 08:56
Picon

Using a splash screen with GRacket

Hi,

Is it possible to have a splash screen displayed while loading a GRacket program?
Much like DrRacket's in fact.
Because for some projects, it can take several seconds to initialize everything.
I tried to open up a frame at the very beginning of the code, but it only shows up
after everything is loaded too.

How is DrRacket splash screen shown up so early, while DrRacket is loading?

Thanks,
Laurent

<div><p>Hi,<br><br>Is it possible to have a splash screen displayed while loading a GRacket program?<br>Much like DrRacket's in fact.<br>Because for some projects, it can take several seconds to initialize everything. <br>I tried to open up a frame at the very beginning of the code, but it only shows up <br>

after everything is loaded too.<br><br>How is DrRacket splash screen shown up so early, while DrRacket is loading?<br><br>Thanks,<br>Laurent<br></p></div>
Neil Van Dyke | 1 Sep 2010 11:01
Picon
Favicon

Re: Optimizations at the library level.

Noel Welsh wrote at 08/31/2010 04:36 PM:
> In general this is a huge problem (equivalent, I think, to the "sufficiently smart compiler" problem,
which itself is equivalent to solving AI).
>   

What Noel said.  Though, it might be a useful thing for the Racket 
interpreter (compiler) to have hooks of some kind for pluggable 
optimizations.  Useful both for practical use and for increasing how 
Racket can be used as a language research platform.

As a user, would be nice if I could get a matrix library without special 
compiler optimizations by doing:

(require (planet foo/matrix))

Or, if I indicated that I wanted the special compiler optimizations 
provided by the module, like:

(require/hooks (planet foo/matrix))

then special optimization code from the foo/matrix module can hook 
itself into a compiler phase for my using module.  In this example, 
perhaps in a phase after macro expansion and with all (current) 
references resolved.  (I'm thinking of hooks covering only intra-module 
stuff for the using module, no access into other modules.)

I don't know how feasible it would be to provide these hooks in a 
particular version of Racket.  Regarding keeping such hooks from 
encumbering evolution of future versions of Racket, would it suffice for 
the compiler to not be obligated to call the hooks and, if it does call, 
to announce its version when calling the hooks?  The hook code would be 
responsible for doing the right thing (or nothing) for that particular 
Racket version.  So, in this example, when a new version of Racket comes 
out, the foo/matrix would likely run without requested hook 
optimizations until the developer of foo/matrix looks at any changes 
made to the internal representations exposed by the hooks in that 
version of Racket, and makes any necessary changes to the 
optimizations.  Importantly, Racket would make no commitment to maintain 
the representations between versions, nor to even to document any of the 
representations.

It's fortunate that Matthew has seemingly infinite time for all the work 
that people would like him to do. :)

I still like the idea of doing the matrix optimizations in pure Racket 
with internally-optimizing ADTs with lazy operations, rather than with 
syntax extension mini-language, an entire front-end language, or 
compiler hooks.

--

-- 
http://www.neilvandyke.org/
Robby Findler | 1 Sep 2010 14:00
Gravatar

Re: Using a splash screen with GRacket

A minimal amount of stuff is loaded (roughly what is loaded when
gracket itself starts up) and then the splash screen is opened and the
rest of drracket is loaded via a dynamic-require. Also, progress on
the splash screen's gauge% is made each time a file is loaded, which
is monitored by the load-handler.

Robby

On Wed, Sep 1, 2010 at 1:56 AM, Laurent <laurent.orseau <at> gmail.com> wrote:
> Hi,
>
> Is it possible to have a splash screen displayed while loading a GRacket
> program?
> Much like DrRacket's in fact.
> Because for some projects, it can take several seconds to initialize
> everything.
> I tried to open up a frame at the very beginning of the code, but it only
> shows up
> after everything is loaded too.
>
> How is DrRacket splash screen shown up so early, while DrRacket is loading?
>
> Thanks,
> Laurent
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users
>
_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/users
Laurent | 1 Sep 2010 14:11
Picon

Re: Using a splash screen with GRacket

Excellent! Thanks a lot!
By any chance, do you remember the name of the file that does that?
(Don't take more than 10s for this question, it's not worth it.)

On Wed, Sep 1, 2010 at 14:00, Robby Findler <robby-5YcgHWA4rVnfxgxxWyf0drK6bRJNSFrb@public.gmane.org> wrote:
A minimal amount of stuff is loaded (roughly what is loaded when
gracket itself starts up) and then the splash screen is opened and the
rest of drracket is loaded via a dynamic-require. Also, progress on
the splash screen's gauge% is made each time a file is loaded, which
is monitored by the load-handler.

Robby

On Wed, Sep 1, 2010 at 1:56 AM, Laurent <laurent.orseau-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hi,
>
> Is it possible to have a splash screen displayed while loading a GRacket
> program?
> Much like DrRacket's in fact.
> Because for some projects, it can take several seconds to initialize
> everything.
> I tried to open up a frame at the very beginning of the code, but it only
> shows up
> after everything is loaded too.
>
> How is DrRacket splash screen shown up so early, while DrRacket is loading?
>
> Thanks,
> Laurent
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users
>

<div>
<p>Excellent! Thanks a lot!<br>By any chance, do you remember the name of the file that does that? <br>(Don't take more than 10s for this question, it's not worth it.)<br><br></p>
<div class="gmail_quote">On Wed, Sep 1, 2010 at 14:00, Robby Findler <span dir="ltr">&lt;<a href="mailto:robby <at> eecs.northwestern.edu">robby@...</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">A minimal amount of stuff is loaded (roughly what is loaded when<br>
gracket itself starts up) and then the splash screen is opened and the<br>
rest of drracket is loaded via a dynamic-require. Also, progress on<br>
the splash screen's gauge% is made each time a file is loaded, which<br>
is monitored by the load-handler.<br><br>
Robby<br><div>
<div></div>
<div class="h5">
<br>
On Wed, Sep 1, 2010 at 1:56 AM, Laurent &lt;<a href="mailto:laurent.orseau <at> gmail.com">laurent.orseau@...</a>&gt; wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; Is it possible to have a splash screen displayed while loading a GRacket<br>
&gt; program?<br>
&gt; Much like DrRacket's in fact.<br>
&gt; Because for some projects, it can take several seconds to initialize<br>
&gt; everything.<br>
&gt; I tried to open up a frame at the very beginning of the code, but it only<br>
&gt; shows up<br>
&gt; after everything is loaded too.<br>
&gt;<br>
&gt; How is DrRacket splash screen shown up so early, while DrRacket is loading?<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Laurent<br>
&gt;<br>
</div>
</div>&gt; _________________________________________________<br>
&gt; &nbsp;For list-related administrative tasks:<br>
&gt; &nbsp;<a href="http://lists.racket-lang.org/listinfo/users" target="_blank">http://lists.racket-lang.org/listinfo/users</a><br>
&gt;<br>
</blockquote>
</div>
<br>
</div>
Robby Findler | 1 Sep 2010 14:16
Gravatar

Re: Using a splash screen with GRacket

collects/drracket/drracket.rkt does something similar to set up
compilation handlers and (optionally) a profiler that I use for
performance debugging, and then it loads
drracket/private/drracket-normal.rkt which does the splash screen bit.

Robby

On Wed, Sep 1, 2010 at 7:11 AM, Laurent <laurent.orseau <at> gmail.com> wrote:
> Excellent! Thanks a lot!
> By any chance, do you remember the name of the file that does that?
> (Don't take more than 10s for this question, it's not worth it.)
>
> On Wed, Sep 1, 2010 at 14:00, Robby Findler <robby <at> eecs.northwestern.edu>
> wrote:
>>
>> A minimal amount of stuff is loaded (roughly what is loaded when
>> gracket itself starts up) and then the splash screen is opened and the
>> rest of drracket is loaded via a dynamic-require. Also, progress on
>> the splash screen's gauge% is made each time a file is loaded, which
>> is monitored by the load-handler.
>>
>> Robby
>>
>> On Wed, Sep 1, 2010 at 1:56 AM, Laurent <laurent.orseau <at> gmail.com> wrote:
>> > Hi,
>> >
>> > Is it possible to have a splash screen displayed while loading a GRacket
>> > program?
>> > Much like DrRacket's in fact.
>> > Because for some projects, it can take several seconds to initialize
>> > everything.
>> > I tried to open up a frame at the very beginning of the code, but it
>> > only
>> > shows up
>> > after everything is loaded too.
>> >
>> > How is DrRacket splash screen shown up so early, while DrRacket is
>> > loading?
>> >
>> > Thanks,
>> > Laurent
>> >
>> > _________________________________________________
>> >  For list-related administrative tasks:
>> >  http://lists.racket-lang.org/listinfo/users
>> >
>
>
_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/users
Laurent | 1 Sep 2010 14:27
Picon

Re: Using a splash screen with GRacket

Thanks again! Very helpful.

On Wed, Sep 1, 2010 at 14:16, Robby Findler <robby-5YcgHWA4rVnfxgxxWyf0drK6bRJNSFrb@public.gmane.org> wrote:
collects/drracket/drracket.rkt does something similar to set up
compilation handlers and (optionally) a profiler that I use for
performance debugging, and then it loads
drracket/private/drracket-normal.rkt which does the splash screen bit.

Robby

On Wed, Sep 1, 2010 at 7:11 AM, Laurent <laurent.orseau-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Excellent! Thanks a lot!
> By any chance, do you remember the name of the file that does that?
> (Don't take more than 10s for this question, it's not worth it.)
>
> On Wed, Sep 1, 2010 at 14:00, Robby Findler <robby-5YcgHWA4rVnfxgxxWyf0drK6bRJNSFrb@public.gmane.org>
> wrote:
>>
>> A minimal amount of stuff is loaded (roughly what is loaded when
>> gracket itself starts up) and then the splash screen is opened and the
>> rest of drracket is loaded via a dynamic-require. Also, progress on
>> the splash screen's gauge% is made each time a file is loaded, which
>> is monitored by the load-handler.
>>
>> Robby
>>
>> On Wed, Sep 1, 2010 at 1:56 AM, Laurent <laurent.orseau-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> > Hi,
>> >
>> > Is it possible to have a splash screen displayed while loading a GRacket
>> > program?
>> > Much like DrRacket's in fact.
>> > Because for some projects, it can take several seconds to initialize
>> > everything.
>> > I tried to open up a frame at the very beginning of the code, but it
>> > only
>> > shows up
>> > after everything is loaded too.
>> >
>> > How is DrRacket splash screen shown up so early, while DrRacket is
>> > loading?
>> >
>> > Thanks,
>> > Laurent
>> >
>> > _________________________________________________
>> >  For list-related administrative tasks:
>> >  http://lists.racket-lang.org/listinfo/users
>> >
>
>

<div>
<p>Thanks again! Very helpful.<br><br></p>
<div class="gmail_quote">On Wed, Sep 1, 2010 at 14:16, Robby Findler <span dir="ltr">&lt;<a href="mailto:robby <at> eecs.northwestern.edu">robby@...</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">collects/drracket/drracket.rkt does something similar to set up<br>
compilation handlers and (optionally) a profiler that I use for<br>
performance debugging, and then it loads<br>
drracket/private/drracket-normal.rkt which does the splash screen bit.<br><br>
Robby<br><div>
<div></div>
<div class="h5">
<br>
On Wed, Sep 1, 2010 at 7:11 AM, Laurent &lt;<a href="mailto:laurent.orseau <at> gmail.com">laurent.orseau@...</a>&gt; wrote:<br>
&gt; Excellent! Thanks a lot!<br>
&gt; By any chance, do you remember the name of the file that does that?<br>
&gt; (Don't take more than 10s for this question, it's not worth it.)<br>
&gt;<br>
&gt; On Wed, Sep 1, 2010 at 14:00, Robby Findler &lt;<a href="mailto:robby <at> eecs.northwestern.edu">robby@...</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; A minimal amount of stuff is loaded (roughly what is loaded when<br>
&gt;&gt; gracket itself starts up) and then the splash screen is opened and the<br>
&gt;&gt; rest of drracket is loaded via a dynamic-require. Also, progress on<br>
&gt;&gt; the splash screen's gauge% is made each time a file is loaded, which<br>
&gt;&gt; is monitored by the load-handler.<br>
&gt;&gt;<br>
&gt;&gt; Robby<br>
&gt;&gt;<br>
&gt;&gt; On Wed, Sep 1, 2010 at 1:56 AM, Laurent &lt;<a href="mailto:laurent.orseau@...">laurent.orseau@...</a>&gt; wrote:<br>
&gt;&gt; &gt; Hi,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Is it possible to have a splash screen displayed while loading a GRacket<br>
&gt;&gt; &gt; program?<br>
&gt;&gt; &gt; Much like DrRacket's in fact.<br>
&gt;&gt; &gt; Because for some projects, it can take several seconds to initialize<br>
&gt;&gt; &gt; everything.<br>
&gt;&gt; &gt; I tried to open up a frame at the very beginning of the code, but it<br>
&gt;&gt; &gt; only<br>
&gt;&gt; &gt; shows up<br>
&gt;&gt; &gt; after everything is loaded too.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; How is DrRacket splash screen shown up so early, while DrRacket is<br>
&gt;&gt; &gt; loading?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Thanks,<br>
&gt;&gt; &gt; Laurent<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _________________________________________________<br>
&gt;&gt; &gt; &nbsp;For list-related administrative tasks:<br>
&gt;&gt; &gt; &nbsp;<a href="http://lists.racket-lang.org/listinfo/users" target="_blank">http://lists.racket-lang.org/listinfo/users</a><br>
&gt;&gt; &gt;<br>
&gt;<br>
&gt;<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
Stephen Bloch | 1 Sep 2010 15:14
Favicon

What is inexactness about?

I've been having an interesting discussion off-list with David Kay, but have concluded that we need the
expertise of somebody more knowledgeable about Scheme/Racket and its philosophy.

The "#i" indicates that a number is inexact, and that further computation based on it should be interpreted
accordingly.  The Scheme/Racket numeric libraries automatically mark as "inexact" most results of
trig, exponential, log, sqrt, and similar functions, even if the inputs were exact, because the
mathematically correct answers to these are irrational.  Likewise, 

The question is under what circumstances (if any) you would want to mark something as inexact that DIDN'T
come from an irrational-valued library function or constant.  An example in my textbook is

(define TANK-CAPACITY-GALLONS #i13.6)
(define MPG #i28)

because the capacity of a gas tank, and miles-per-gallon fuel efficiency, are based on physical
measurements and therefore inherently inexact.  On the other hand, you could work through this entire
example using exact numbers, and everything would come out correctly (since the only arithmetic
involved is addition, subtraction, multiplication, and division), so the argument could be made that
putting #i in there is distracting and pedantic.

Opinions?  Corrections?

Stephen Bloch
sbloch@...

Stephen Bloch | 1 Sep 2010 15:24
Favicon

Re: What is inexactness about?

On Sep 1, 2010, at 9:14 AM, I wrote:

> The "#i" indicates that a number is inexact, and that further computation based on it should be
interpreted accordingly.  The Scheme/Racket numeric libraries automatically mark as "inexact" most
results of trig, exponential, log, sqrt, and similar functions, even if the inputs were exact, because
the mathematically correct answers to these are irrational and don't have exact representations in any
common, convenient computer representation.  Likewise, 

A sentence got cut off here, saying that the predefined constants pi and e are marked as inexact.

Stephen Bloch
sbloch@...


Gmane