Re: [racket-dev] Scribble Racket Code with Here Strings

2010-10-31 Thread Matthew Flatt
At Fri, 29 Oct 2010 15:53:57 -0600, Doug Williams wrote:
 I sometimes use here strings for readability when building queries, etc.
 [...]
 But I haven't found a good way to document this (as Racket code) in
 Scribble. Everything I've tried renders like:

I guess it's time for me to stop saying how this should be done and
just do it.

Scribble now provides `codeblock' from `scribble/manual'. The
`codeblock' form is similar to `racketblock', except that it works on
strings instead of S-expressions. Roughly, you use curly braces with
`codeblock' instead of square brackets. The code is typeset with the
formatting of the source strings as with `verbatim', and then coloring
and hyperlinking are applied on top of that --- more like DrRacket's
Check Syntax than the `read'-and-`write' approach of `racketblock'.

The example below produces the output you would expect, except that the
last `codeblock' and `racketblock' are not hyperlinked correctly (i.e.,
a bug that I haven't yet sorted out).

The Getting Started section of the Scribble manual is now
syntax-colored, since its source now uses `codeblock' instead of
`verbatim'.

The `#:expand' argument to `codeblock' isn't fully implemented, yet.
When you supply `expand', hyperlinks should be based on bindings as
they appear in the expanded code, but they currently use `for-label'
bindings in the context of the `codeblock' form. I'll get to that soon.
I expect there will be further generalizations eventually, such as
being able to include Scribble elements among the string arguments to
`codeblock'.



#lang scribble/manual
@(require scribble/private/manual-code
  (for-label racket/base
 scribble/manual))

@title{Examples of @racket[codeblock]}

The following an example illustrates how @racket[codeblock] handles
here strings:

@codeblock{
  #lang racket

  (define (explain-family name)
(printf #EOS
  They're creepy and they're kooky,
  Mysterious and spooky,
  They're all together ooky,
  The ~a Family.
  EOS
name))

  (explain-family Addams)
}


The @racket[codeblock] form is also good for showing Scribble examples
with syntax coloring:

@codeblock|{
 #lang scribble/manual
 @(require utils.rkt)

 @title{Example Scribble Code}

 You should use @racket[codeblock] instead of @racket[racketblock].
}|


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


Re: [racket-dev] GRacket2 builds

2010-10-31 Thread Doug Williams
I tried loaded it on my Windows 7 box and it doesn't run because of missing
dll files. The first one was zlib1.dll. I found that one and now it wants
libpng14-14.dll. I'll continue tracking them down.

On Sat, Oct 30, 2010 at 4:44 PM, Eli Barzilay e...@barzilay.org wrote:

 In case you want to try out the new gracket2 functionality, you can do
 that by using pre-made installers from

  http://pre.racket-lang.org/gr2/installers/

 I will make new builds from time to time, as the branch is updated.

 --
  ((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

Re: [racket-dev] GRacket2 builds

2010-10-31 Thread Matthew Flatt

You can get the libraries from github.com/mflatt/gracket-libs.

Unfortunately, I think I broke the Windows build in other ways that I  
have been trying to fix this morning.




On Oct 31, 2010, at 11:59 AM, Doug Williams m.douglas.willi...@gmail.com 
 wrote:


I tried loaded it on my Windows 7 box and it doesn't run because of  
missing dll files. The first one was zlib1.dll. I found that one and  
now it wants libpng14-14.dll. I'll continue tracking them down.


On Sat, Oct 30, 2010 at 4:44 PM, Eli Barzilay e...@barzilay.org  
wrote:

In case you want to try out the new gracket2 functionality, you can do
that by using pre-made installers from

 http://pre.racket-lang.org/gr2/installers/

I will make new builds from time to time, as the branch is updated.

--
 ((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] GRacket2 builds

2010-10-31 Thread Doug Williams
I loaded GTK+ 2.20.0, which seems to have all of the libraries. But, it dies
with the following error on my Windows 7 (64-bit) box.

ffi-obj: couldn't get pango_layout_get_line from libpangocairo-1.0-0.dll
(Th
e specified procedure could not be found.; errno=127)

 === context ===
C:\Program Files (x86)\Racket-5.0.2.2\collects\ffi\unsafe.rkt:176:2:
get-ffi-obj
*
C:\Program Files (x86)\Racket-5.0.2.2\collects\racket\draw\unsafe\pango.rkt:
[ru
nning body]
C:\Program Files (x86)\Racket-5.0.2.2\collects\racket\draw\private\font.rkt:
[tr
aversing imports]
C:\Program Files
(x86)\Racket-5.0.2.2\collects\racket\draw\private\post-script-d
c.rkt: [traversing imports]
C:\Program Files (x86)\Racket-5.0.2.2\collects\racket\draw.rkt: [traversing
impo
rts]
C:\Program Files (x86)\Racket-5.0.2.2\collects\mred\private\const.rkt:
[traversi
ng imports]
C:\Program Files (x86)\Racket-5.0.2.2\collects\mred\private\check.rkt:
[traversi
ng imports]
C:\Program Files (x86)\Racket-5.0.2.2\collects\mred\mred.rkt: [traversing
import
s]
C:\Program Files (x86)\Racket-5.0.2.2\collects\mred\main.rkt: [traversing
import
s]
C:\Program Files (x86)\Racket-5.0.2.2\collects\racket\gui\base.rkt:
[traversing
imports]
C:\Program Files (x86)\Racket-5.0.2.2\collects\drracket\drracket.rkt:
[traversin
g imports]


[Exited. Close box or Ctrl-C closes the console.]


On Sun, Oct 31, 2010 at 12:39 PM, Matthew Flatt mfl...@cs.utah.edu wrote:

 You can get the libraries from github.com/mflatt/gracket-libs.

 Unfortunately, I think I broke the Windows build in other ways that I have
 been trying to fix this morning.



 On Oct 31, 2010, at 11:59 AM, Doug Williams m.douglas.willi...@gmail.com
 wrote:

 I tried loaded it on my Windows 7 box and it doesn't run because of missing
 dll files. The first one was zlib1.dll. I found that one and now it wants
 libpng14-14.dll. I'll continue tracking them down.

 On Sat, Oct 30, 2010 at 4:44 PM, Eli Barzilay  e...@barzilay.org
 e...@barzilay.org wrote:

 In case you want to try out the new gracket2 functionality, you can do
 that by using pre-made installers from

   http://pre.racket-lang.org/gr2/installers/
 http://pre.racket-lang.org/gr2/installers/

 I will make new builds from time to time, as the branch is updated.

 --
  ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
 http://barzilay.org/http://barzilay.org/
 Maze is Life!
 _
  For list-related administrative tasks:
   http://lists.racket-lang.org/listinfo/dev
 http://lists.racket-lang.org/listinfo/dev


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


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

Re: [racket-dev] GRacket2 builds

2010-10-31 Thread Doug Williams
And, it gets the same error with the gracket-libs from git.

On Sun, Oct 31, 2010 at 12:46 PM, Doug Williams 
m.douglas.willi...@gmail.com wrote:

 I loaded GTK+ 2.20.0, which seems to have all of the libraries. But, it
 dies with the following error on my Windows 7 (64-bit) box.

 ffi-obj: couldn't get pango_layout_get_line from
 libpangocairo-1.0-0.dll (Th
 e specified procedure could not be found.; errno=127)

  === context ===
 C:\Program Files (x86)\Racket-5.0.2.2\collects\ffi\unsafe.rkt:176:2:
 get-ffi-obj
 *
 C:\Program Files
 (x86)\Racket-5.0.2.2\collects\racket\draw\unsafe\pango.rkt: [ru
 nning body]
 C:\Program Files
 (x86)\Racket-5.0.2.2\collects\racket\draw\private\font.rkt: [tr
 aversing imports]
 C:\Program Files
 (x86)\Racket-5.0.2.2\collects\racket\draw\private\post-script-d
 c.rkt: [traversing imports]
 C:\Program Files (x86)\Racket-5.0.2.2\collects\racket\draw.rkt: [traversing
 impo
 rts]
 C:\Program Files (x86)\Racket-5.0.2.2\collects\mred\private\const.rkt:
 [traversi
 ng imports]
 C:\Program Files (x86)\Racket-5.0.2.2\collects\mred\private\check.rkt:
 [traversi
 ng imports]
 C:\Program Files (x86)\Racket-5.0.2.2\collects\mred\mred.rkt: [traversing
 import
 s]
 C:\Program Files (x86)\Racket-5.0.2.2\collects\mred\main.rkt: [traversing
 import
 s]
 C:\Program Files (x86)\Racket-5.0.2.2\collects\racket\gui\base.rkt:
 [traversing
 imports]
 C:\Program Files (x86)\Racket-5.0.2.2\collects\drracket\drracket.rkt:
 [traversin
 g imports]


 [Exited. Close box or Ctrl-C closes the console.]



 On Sun, Oct 31, 2010 at 12:39 PM, Matthew Flatt mfl...@cs.utah.eduwrote:

 You can get the libraries from github.com/mflatt/gracket-libs.

 Unfortunately, I think I broke the Windows build in other ways that I have
 been trying to fix this morning.



 On Oct 31, 2010, at 11:59 AM, Doug Williams m.douglas.willi...@gmail.com
 wrote:

 I tried loaded it on my Windows 7 box and it doesn't run because of
 missing dll files. The first one was zlib1.dll. I found that one and now it
 wants libpng14-14.dll. I'll continue tracking them down.

 On Sat, Oct 30, 2010 at 4:44 PM, Eli Barzilay  e...@barzilay.org
 e...@barzilay.org wrote:

 In case you want to try out the new gracket2 functionality, you can do
 that by using pre-made installers from

   http://pre.racket-lang.org/gr2/installers/
 http://pre.racket-lang.org/gr2/installers/

 I will make new builds from time to time, as the branch is updated.

 --
  ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
 http://barzilay.org/http://barzilay.org/
 Maze is Life!
 _
  For list-related administrative tasks:
   http://lists.racket-lang.org/listinfo/dev
 http://lists.racket-lang.org/listinfo/dev


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



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

Re: [racket-dev] try the GRacket2 branch

2010-10-31 Thread Doug Williams
I got GRacket2 running under Ubuntu. In general, things work as expected. It
is my animations that I'm most concerned about and some work and some don't.
I've only tried the ones that are available on PLaneT - I haven't even
checked any of the others yet.

The animated-canvas library that I have on PLaneT has two examples. The
histogram-test.rkt example works as expected. The lines.rkt example draws a
few lines and then locks up. Adding a (yield) after (send canvas
swap-bitmaps) in line 55 gets it to run - sort of. The animation is fairly
smooth for 10 sets of lines, but is really strange at 50 (for example) -
with this machine on the old GRacket it would be smooth at 100. And, my stop
button implementation doesn't work will - it just sets a global and the
graphics routines exit when they see it set - it eventually stops, but may
require 10 to 15 seconds or so. I suspect that the animated-canvas
functionality for double-buffering may not be needed anymore and the 'flush'
operations are what I need to look at.

The interactions.ss file in the simulation package on PLaneT also required a
(yield) after line 107 to give the animation effect - there is no double
buffering or anything here. But, with that added, it seems to run fine.

I guess I need a better understanding of how the new canvas is working in
order to deprecate the animated-canvas capability for my animations. Any
thoughts, Matthew?

Doug

On Thu, Oct 28, 2010 at 12:25 AM, Matthew Flatt mfl...@cs.utah.edu wrote:

 The git repository now includes a gr2 branch for the new
 implementation of `racket/gui', which we've been informally calling
 GRacket2.

 ...
 _
  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] try the GRacket2 branch

2010-10-31 Thread Matthew Flatt
At Sun, 31 Oct 2010 16:29:08 -0600, Doug Williams wrote:
 The interactions.ss file in the simulation package on PLaneT also required a
 (yield) after line 107 to give the animation effect - there is no double
 buffering or anything here. But, with that added, it seems to run fine.
 
 I guess I need a better understanding of how the new canvas is working in
 order to deprecate the animated-canvas capability for my animations. Any
 thoughts, Matthew?

You shouldn't have to add a `yield', but I see that it's currently
necessary to get canvas updates for Gtk and Win32. I'll work on that.

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