Re: [racket-dev] for loops with interleaved escape continuations

2014-06-27 Thread Danny Yoo
Hi Jay,

Have not been following Racket development too closely lately, but
perhaps you might find this helpful?

http://planet.racket-lang.org/display.ss?package=while-loop.pltowner=dyoo
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] seeing compile-time error for Whalesong on HEAD

2013-04-29 Thread Danny Yoo
I'm seeing the following error message on HEAD
(08dc0e10d934cb29b9830a94945c2e38c275a9d8):


application: procedure does not expect an argument with given keyword
  procedure: t-c/both
  given keyword: #:kind
  given arguments:
   Boolean
   #:kind 'impersonator
   #:seen (list (cons
#(struct:#syntax:/Users/dyoo/work/whalesong/whalesong/promise.rkt:13:20
MyPromise (Boolean (- g305) (U Sentinel g305))) #syntax rec5))
  context...:
   /Users/dyoo/local/racket/collects/racket/private/kw.rkt:1255:14
   
/Users/dyoo/local/racket/collects/typed-racket/private/type-contract.rkt:428:16:
for-loop
   parse-loop178
   /Users/dyoo/local/racket/collects/racket/private/map.rkt:21:13: map
   parse-loop1254
   
/Users/dyoo/local/racket/collects/typed-racket/private/type-contract.rkt:215:13
   /Users/dyoo/local/racket/collects/racket/private/map.rkt:21:13: map
   f902
   
/Users/dyoo/local/racket/collects/typed-racket/typecheck/provide-handling.rkt:54:2:
mk16
   /Users/dyoo/local/racket/collects/unstable/list.rkt:139:0: map/values
   
/Users/dyoo/local/racket/collects/typed-racket/typecheck/provide-handling.rkt:55:4:
mk-untyped-syntax
   
/Users/dyoo/local/racket/collects/typed-racket/typecheck/provide-handling.rkt:54:2:
mk16
   
/Users/dyoo/local/racket/collects/typed-racket/typecheck/provide-handling.rkt:143:2:
for-loop
   
/Users/dyoo/local/racket/collects/typed-racket/typecheck/provide-handling.rkt:49:0:
generate-prov
   
/Users/dyoo/local/racket/collects/typed-racket/typecheck/tc-toplevel.rkt:292:0:
type-check
   success...
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] seeing compile-time error for Whalesong on HEAD

2013-04-29 Thread Danny Yoo
There's something funky in typed-racket/private/type-contract.rkt,
with some non-uniformity in the following lines:

https://github.com/plt/racket/blob/master/collects/typed-racket/private/type-contract.rkt#L143-L149

where the keywords are being called #:kind, but the variable binding
is called flat, and it's done inconsistently between t-c and
t-c/both, and there's a use here:

https://github.com/plt/racket/blob/master/collects/typed-racket/private/type-contract.rkt#L432

that tries to use them interchangeably, and that looks off.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] seeing compile-time error for Whalesong on HEAD

2013-04-29 Thread Danny Yoo
I believe the right fix for this is:


https://github.com/dyoo/racket/commit/24d03f2bf308854deb365fe8bcf6599e8d84fab9

but I do not have enough comfort with TR to know if this will break
anything.  Can someone review this?  Thanks!
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] seeing compile-time error for Whalesong on HEAD

2013-04-29 Thread Danny Yoo
Ah, ok, I've reduced the test case to something more managable: two
files, promise.rkt and test-promise.rkt, with the following content:


;; promise.rkt
#lang typed/racket/base
(require (for-syntax racket/base))
(provide MyPromise)
(define-struct: (a) MyPromise ([thunk : (- a)])
  #:mutable)


;; test-promise.rkt
#lang racket/base
(require promise.rkt)


The untyped code just requires the typed module, forcing the type
contract code to generate.  It looks like #:mutable is necessary here:
if I take that out of the type, then I don't see the error.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] processing the internal-context of a mod?

2013-04-25 Thread Danny Yoo
 I'm trying to understand the case analysis so that I can properly
 generate the code to construct the namespace.  The documentation says
 I have four things to keep track of for internal-context:

 case 1: #f: it's empty
 case 2: #t: it's all the requires
 case 3: stx: it's the lexical context of the wrapped syntax object
 case 4: (vectorof stx): ???

 Case 2 seems fairly straightforward to me: to construct the namespace
 for a module, I take all the symbols defined in its prefix, and
 combine that with all the exports of all the required modules.

Followup:

I have yet to synthesize a case other than case 2 or 3, so I have to
admit I still don't understand.

In my own experiments, if the internal context is a syntax object,
then it's an object whose datum is #f, and whose wraps consist only of
module-rename wraps.  Am I guaranteed that the syntax objects
associated to the module's internal context only consist of
module-rename wraps?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Release Announcement for v5.3.4

2013-04-22 Thread Danny Yoo
Is mflatt's fix to NACK events getting in 5.3.4?  It's an important
enough fix that I need to deploy something like it in the very near
future.  I really would like to avoid manually patching my production
servers if I can avoid it.

See:

http://lists.racket-lang.org/users/archive/2013-April/057450.html
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Pre-Release Checklist for v5.3.4

2013-04-17 Thread Danny Yoo
Yes, Whalesong's running ok on it.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] module path resolver - module name resolver?

2013-04-12 Thread Danny Yoo
I'm reading the documentation for:

http://docs.racket-lang.org/reference/Module_Names_and_Loading.html#%28tech._module._path._resolver%29

and it looks to me like the term here should have been 'module name
resolver'.  I haven't been able to see other uses of 'module path
resolver' anywhere else in the documentation.

Am I reading this right?  If so, I'd like to change the use of 'module
path resolver' there to 'module name resolver', to avoid using two
terms for the same concept.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] how to define a custom null in typed racket

2013-04-11 Thread Danny Yoo
Perhaps something like this?


;
#lang typed/racket/base

(provide mynull mycar mycdr)

(struct: MyNull ())
(define mynull (MyNull))

(define-type MyListof (All (A) (Rec X (U MyNull (Pair A X)

(: mycar : (All (A) ((MyListof A) - A)))
(define (mycar lst)
  (if (MyNull? lst)
  (error 'mycar given list is empty)
  (car lst)))

(: mycdr : (All (A) ((MyListof A) - (MyListof A
(define (mycdr lst)
  (if (MyNull? lst)
  (error 'mycdr given list is empty)
  (cdr lst)))
;

where mynull is the singleton instance of the opaque structure type MyNull.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] Confusion of difference of evaluating syntax vs compiled code?

2013-04-04 Thread Danny Yoo
I'm running into dynamic evaluation behavior that I don't quite
understand yet.  My example is:

https://gist.github.com/dyoo/5314045

It's meant as an experiment to see whether it's possible to avoid 3d
syntax in certain places like the gui-debugger.  I try to throw in a
wrench on lines 52-54:

https://gist.github.com/dyoo/5314045#file-annotation-example-rkt-L52-L54

but thankfully, when I evaluate this in DrRacket, I get the results I expect.


However, that's when I'm evaluated the annotated+compiled code.  If I
modify the example so I'm evaluating just the annotated code, by
modifying lines 117-119
https://gist.github.com/dyoo/5314045#file-annotation-example-rkt-L117-L119

from:

;; But we can evaluate it in ns:
(printf evaluating the annotated code\n)
(eval compiled-code ns)

to:

;; But we can evaluate it in ns:
(printf evaluating the annotated code\n)
(eval annotated-code ns)


I get the unexpected shadowing I'm trying to avoid.  Why am I getting
the clash here, and not in the compiled code?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Right-paren behavior on Definitions window still looks funky

2013-04-03 Thread Danny Yoo
On Tuesday, April 2, 2013, Robby Findler wrote:

 I've just pushed a fix for this, but when you say still, do you mean
 that you've reported this before?


I'm sorry: I should have reported it as a bug much sooner.  I noticed it
some time after 5.3.3, but thought you were experimenting with something,
so I kept quiet.  But the release pre-announcement triggered my concern.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Fix to module reader?

2013-04-03 Thread Danny Yoo
 In general, if you want to add a test to DrDr, all you do is commit
 the file somewhere. I'd put that file in something like
 collects/tests/syntax/module-reader-bad-pos.rkt

Ok, I've put it into
collects/tests/syntax/module-reader-synthetic-pos.rkt.  I don't think
it's technically bad.  I expected to be able to pass a
transplant-input-port-sourced input-port to read-syntax without an
issue.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] Measuring # of waiters on a port?

2013-04-02 Thread Danny Yoo
I'm trying to isolate a 503 error coming from WeScheme occasionally,
and I think I've isolated the problem down to the number of allowed
waiters on a port.

I see that web-server has the default set to 40.

Is there a good way to tell whether or not we do reach this limit at
runtime, or is that not observable from Racket?  I suspect I'm hitting
this limit, but if there's a good way to surface this, I'd be more
comforted.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Fix to module reader?

2013-04-02 Thread Danny Yoo
Following up: I haven't received any input on this yet.

On Fri, Mar 29, 2013 at 1:28 PM, Danny Yoo d...@hashcollision.org wrote:
 I'm running into an internal error with the syntax/module-reader
 library with the given test program, and wanted to double check with
 someone else before committing the fix upstream.


 The test file is:

 https://gist.github.com/dyoo/5272982


 When I run this under an unpatched module reader, I see the following error:

 128-110-73-138:Desktop dyoo$ raco test prepend-lang-line.rkt
 testing prepend-lang-line.rkt
 -: contract violation
   expected: number?
   given: #f
   argument position: 2nd
   other arguments...:
16
   context...:
/Applications/Racket
 v5.3.2/collects/syntax/module-reader.rkt:173:2: wrap-internal
wrap-internal/wrapper
/Users/dyoo/Desktop/prepend-lang-line.rkt: [running body]
/Applications/Racket v5.3.2/collects/compiler/commands/test.rkt:
 [running body]
/Applications/Racket v5.3.2/collects/raco/raco.rkt: [running body]
/Applications/Racket v5.3.2/collects/raco/main.rkt: [running body]




 My proposed patch is:


 https://github.com/dyoo/racket/commit/9322570e3e0210b99ec8a85dca52b62b4dde66fd




 Does this look ok?  Also, if I do push this upstream, how do I attach
 my test file so it gets run as part of the DrDr regression suite?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] Right-paren behavior on Definitions window still looks funky

2013-04-02 Thread Danny Yoo
In the version of DrRacket in HEAD, when I press the two characters
[ ] in sequence in the Definitions pane, I visually see that the
paren fixing is happening on the ] in a very distracting way: it
visually switches between ], }, and finally ).

I don't see this behavior on the Interactions pane.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] The next Racket release is about to begin

2013-04-02 Thread Danny Yoo
Are there high priority bugs that deserve attention?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] Fix to module reader?

2013-03-29 Thread Danny Yoo
I'm running into an internal error with the syntax/module-reader
library with the given test program, and wanted to double check with
someone else before committing the fix upstream.


The test file is:

https://gist.github.com/dyoo/5272982


When I run this under an unpatched module reader, I see the following error:

128-110-73-138:Desktop dyoo$ raco test prepend-lang-line.rkt
testing prepend-lang-line.rkt
-: contract violation
  expected: number?
  given: #f
  argument position: 2nd
  other arguments...:
   16
  context...:
   /Applications/Racket
v5.3.2/collects/syntax/module-reader.rkt:173:2: wrap-internal
   wrap-internal/wrapper
   /Users/dyoo/Desktop/prepend-lang-line.rkt: [running body]
   /Applications/Racket v5.3.2/collects/compiler/commands/test.rkt:
[running body]
   /Applications/Racket v5.3.2/collects/raco/raco.rkt: [running body]
   /Applications/Racket v5.3.2/collects/raco/main.rkt: [running body]




My proposed patch is:


https://github.com/dyoo/racket/commit/9322570e3e0210b99ec8a85dca52b62b4dde66fd




Does this look ok?  Also, if I do push this upstream, how do I attach
my test file so it gets run as part of the DrDr regression suite?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] processing the internal-context of a mod?

2013-03-27 Thread Danny Yoo
So I'm revisiting some of the Whalesong code, and finally realized
that I'd been missing a crucial detail in the internal-context field
of modules.


http://docs.racket-lang.org/raco/decompile.html#%28def._%28%28lib._compiler%2Fzo-structs..rkt%29._mod%29%29

I got it wrong because I didn't have to deal with namespaces before.
But since I'm trying to get the repl to work now, now I really do need
to get it righter.


I'm trying to understand the case analysis so that I can properly
generate the code to construct the namespace.  The documentation says
I have four things to keep track of for internal-context:

case 1: #f: it's empty
case 2: #t: it's all the requires
case 3: stx: it's the lexical context of the wrapped syntax object
case 4: (vectorof stx): ???

Case 2 seems fairly straightforward to me: to construct the namespace
for a module, I take all the symbols defined in its prefix, and
combine that with all the exports of all the required modules.


It's the other two cases that I don't quite understand yet.

I'm a little less sure of case 3.  I am guessing that I need to walk
the stx object and get the context entirely from it, not doing
anything like case 2.  I have a guess that case 4 is just an
accumulation over case 3, but I'm not positive.  I'm using the
following code to fiddle with internal-context to try
reverse-engineering its meaning:

;
#lang racket
(require compiler/zo-parse)

(define (inspect-internal-context code)
  (define op (open-output-bytes))
  (write (parameterize ([current-namespace (make-base-namespace)])
   (compile code))
 op)
  (define parsed
(zo-parse (open-input-bytes (get-output-bytes op
  ;; Let's look at that internal context.
  (mod-internal-context (compilation-top-code parsed)))

(wrapped-wraps
 (stx-encoded
  (inspect-internal-context '(module foo racket/base
   (#%require (only racket first))


#;(inspect-internal-context '(module foo '#%kernel
 (#%require (prefix list: racket/list)
(prefix bool: racket/bool))
 (define-values (a-variable) 42)))
;



where I'm seeing a list of four wrapped values coming back at me, but
I don't yet discern any difference between the items, so I don't know
what this means yet.  Here's what I'm seeing:


'(#s((module-rename wrap 0 zo 0)
 0
 normal
 139427
 (#s((all-from-module zo 0) #module-path-index 0 0 () #f ())
#s((all-from-module zo 0) #module-path-index 0 0 () #f ()))
 ((first . #s((exported-module-binding module-binding 0 zo 0)
#module-path-index #module-path-index)))
 ()
 #f)
  #s((module-rename wrap 0 zo 0)
 0
 normal
 139427
 (#s((all-from-module zo 0) #module-path-index 0 0 () #f ())
#s((all-from-module zo 0) #module-path-index 0 0 () #f ()))
 ((first . #s((exported-module-binding module-binding 0 zo 0)
#module-path-index #module-path-index)))
 ()
 #f)
  #s((module-rename wrap 0 zo 0)
 0
 normal
 139427
 (#s((all-from-module zo 0) #module-path-index 0 0 () #f ())
#s((all-from-module zo 0) #module-path-index 0 0 () #f ()))
 ((first . #s((exported-module-binding module-binding 0 zo 0)
#module-path-index #module-path-index)))
 ()
 #f)
  #s((module-rename wrap 0 zo 0)
 0
 normal
 139427
 (#s((all-from-module zo 0) #module-path-index 0 0 () #f ())
#s((all-from-module zo 0) #module-path-index 0 0 () #f ()))
 ((first . #s((exported-module-binding module-binding 0 zo 0)
#module-path-index #module-path-index)))
 ()
 #f))

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


Re: [racket-dev] Tweaked doc pages

2013-03-06 Thread Danny Yoo
On Wed, Mar 6, 2013 at 9:59 AM, Eli Barzilay e...@barzilay.org wrote:
 I have the minimal things that I wanted in a working state now:

 * Links to the PDF versions next to the version.

 * A selection box for different versions of documents.

 * A google custom search.

 All of this is now visible on newdocs.racket-lang.org, but the older
 versions go to the right place on docs.racket-lang.org so you'll get
 to the current version of the pages.


Sweet.  1+!!

The other thing that would be nice is if the prior versions of the
docs also included these updates too, but if that can't happen easily,
oh well.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] A standard for testing Racket's libraries?

2013-02-27 Thread Danny Yoo
On Wed, Feb 27, 2013 at 7:01 AM, Jay McCarthy jay.mccar...@gmail.com wrote:
 The tests are run by running main.rkt, which has no rerrors when you
 run it. It is a bit strange that those errors happen when run that
 way, but I think it just means that eval should control the context
 of the sub-programs more.


Ok.

Is there anything that can be done to regularize how all the
collections in Racket are to be tested?  It doesn't have to be as
strict as forcing use of rackunit or eli-tester: just having a
convention like Run the test-all.rkt at the toplevel of a collection
to run all its tests would be a major improvement.

At the moment, each collection follows its own rules for testing it.
The non-uniform structure of the testing infrastructure makes it
difficult to develop and maintain Racket's libraries.   I can make a
bug fix, but without a fixed point of entry to test the changes I've
made, I get nervous: maybe I'm running all the tests for this
collection, but maybe I've missed something.

I had assumed that all of Racket's automated test suite would be
driven by collects/tests/run-automated-tests.rkt, but it only runs
some of the core Racket tests: it doesn't hit the entire collects
tree.  In absence of that, I thought raco test was the way to go, but
that doesn't currently work either.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] datalog tests failing on HEAD?

2013-02-26 Thread Danny Yoo
I'm seeing some severe failures of the datalog test suite on HEAD.  Is
anyone else seeing this?

Here's what I'm seeing on my end:


128-110-92-136:datalog dyoo$ pwd
/Users/dyoo/local/racket/collects/tests/datalog
128-110-92-136:datalog dyoo$ ~/local/racket/bin/raco test .

[lots of output]

Datalog  eval 
/Users/dyoo/local/racket/collects/tests/datalog/./examples  revpath
revpath
FAILURE
name:   check-equal?
location:   eval.rkt:16:4
actual: '()

expected:   '(path(a, a).
  path(a, d).
  path(a, c).
  path(a, b).
  path(b, b).
  path(b, a).
  path(b, d).
  path(b, c).
  path(c, c).
  path(c, b).
  path(c, a).
  path(c, d).
  path(d, d).
  path(d, c).
  path(d, b).
  path(d, a).)

Check failure
  context...:
   /Users/dyoo/local/racket/collects/rackunit/private/check.rkt:183:8
   /Users/dyoo/local/racket/collects/rackunit/private/check.rkt:110:21:
check-equal?2417889
   /Users/dyoo/local/racket/collects/rackunit/private/result.rkt:99:3
   /Users/dyoo/local/racket/collects/rackunit/private/test-suite.rkt:28:2
   /Users/dyoo/local/racket/collects/tests/datalog/eval.rkt:24:4: for-loop
   the-tests
   /Users/dyoo/local/racket/collects/rackunit/private/test-suite.rkt:60:0:
apply-test-suite
   run/inner
   the-tests
   /Users/dyoo/local/racket/collects/rackunit/private/test-suite.rkt:60:0:
apply-test-suite
   run/inner
   the-tests
   /Users/dyoo/local/racket/collects/rackunit/private/test-suite.rkt:60:0:
apply-test-suite
   /Users/dyoo/local/racket/collects/rackunit/text-ui.rkt:224:0: run-tests14
   /Users/dyoo/local/racket/collects/tests/datalog/main.rkt: [running body]
   
/Users/dyoo/local/racket/collects/compiler/commands/../../racket/private/map.rkt:53:19:
loop...



Datalog  eval 
/Users/dyoo/local/racket/collects/tests/datalog/./examples  says
says
FAILURE
name:   check-equal?
location:   eval.rkt:16:4
actual: '()

expected:   '(says(tpme1, m1).)

Check failure
  context...:
   /Users/dyoo/local/racket/collects/rackunit/private/check.rkt:183:8
   /Users/dyoo/local/racket/collects/rackunit/private/check.rkt:110:21:
check-equal?2417889
   /Users/dyoo/local/racket/collects/rackunit/private/result.rkt:99:3
   /Users/dyoo/local/racket/collects/rackunit/private/test-suite.rkt:28:2
   /Users/dyoo/local/racket/collects/tests/datalog/eval.rkt:24:4: for-loop
   the-tests
   /Users/dyoo/local/racket/collects/rackunit/private/test-suite.rkt:60:0:
apply-test-suite
   run/inner
   the-tests
   /Users/dyoo/local/racket/collects/rackunit/private/test-suite.rkt:60:0:
apply-test-suite
   run/inner
   the-tests
   /Users/dyoo/local/racket/collects/rackunit/private/test-suite.rkt:60:0:
apply-test-suite
   /Users/dyoo/local/racket/collects/rackunit/text-ui.rkt:224:0: run-tests14
   /Users/dyoo/local/racket/collects/tests/datalog/main.rkt: [running body]
   
/Users/dyoo/local/racket/collects/compiler/commands/../../racket/private/map.rkt:53:19:
loop...



[lots of error failures]

180 success(es) 12 failure(s) 0 error(s) 192 test(s) run
12
raco test: ./paren-examples/add1.rkt
raco test: ./paren-examples/ancestor.rkt
raco test: ./paren-examples/bidipath.rkt
raco test: ./paren-examples/empty.rkt
raco test: ./paren-examples/laps.rkt
raco test: ./paren-examples/long.rkt
raco test: ./paren-examples/path.rkt
raco test: ./paren-examples/pq.rkt
raco test: ./paren-examples/req.rkt
raco test: ./paren-examples/revpath.rkt
raco test: ./paren-examples/says.rkt
raco test: ./paren-examples/sym.rkt
raco test: ./paren-examples/true.rkt
raco test: ./paren-examples/tutorial.rkt
raco test: ./parse.rkt
raco test: ./pretty.rkt
raco test: ./private/env.rkt
raco test: ./private/lex.rkt
raco test: ./private/subst.rkt
raco test: ./private/unify.rkt
raco test: ./private/variant.rkt
raco test: ./racket.rkt
raco test: ./runtime.rkt
raco test: ./test-docs-complete.rkt
raco test: ./tool/syntax-color.rkt
raco test: ./util.rkt
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] I'd like to add a sidebar link to all documentation versions in docs.racket-lang.org.

2013-02-24 Thread Danny Yoo
On Sun, Feb 24, 2013 at 3:16 PM, Eli Barzilay e...@barzilay.org wrote:
 Two hours ago, Eli Barzilay wrote:
 I think that this should be reverted, and instead make the older
 docs more available: I'll make another column in the all-versions
 page (main page  download  all versions).

 Done, now.  See the new links on the all versions page, and there's
 also a link in the specific version download page:

   http://download.racket-lang.org/all-versions.html
   http://download.racket-lang.org/racket-v5.2.html


It would be nice if this were discoverable.  The main problem I'm
seeing is that if I'm looking for the documentation of previous
versions of Racket, Download is not the first thing that comes to
mind.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] I'd like to add a sidebar link to all documentation versions in docs.racket-lang.org.

2013-02-24 Thread Danny Yoo
On Sun, Feb 24, 2013 at 3:55 PM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 How about the docs link on the front page go to a page with the versions
 all listed, and those links go to pages that look like the current
 docs.racket-lang.org/ ?

No, I do like that the default is to show the docs for the current version.

I do like Eli's updates to the old pages: those doc links are right.

I think your earlier suggestion of making the version at the upper
right somehow selectable would address my discoverability concern.  A
select box right below the Version 5.3.3 which allows the user to
select different versions would be one way to do it.  It would be
similar to what the Python folks do; see the top bar of
http://docs.python.org/3/ and note how they make it easy to see older
versions of their documentation.  I think that's the right idea.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] [plt] Push #26328: master branch updated

2013-02-20 Thread Danny Yoo
On Wed, Feb 20, 2013 at 3:54 PM,  stch...@racket-lang.org wrote:
 stchang has updated `master' from 5fcc96e41a to bd1141c670.
   http://git.racket-lang.org/plt/5fcc96e41a..bd1141c670


Is there a test case that checks this correction?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] I'd like to add a sidebar link to all documentation versions in docs.racket-lang.org.

2013-02-19 Thread Danny Yoo
I always have a difficult time looking for the documentation for
previous versions of Racket.  For example, I wanted to compare API
documentation for 5.2.1 vs. the latest.  I visited:

http://docs.racket-lang.org/

and immediately got stuck.  I had no idea what to do next here.


It turns out that prior versions of documentation are linked from the
Download section:

http://download.racket-lang.org/docs/


Preferably, this link should show up somewhere on the sidebar of the
main documentation site.  I'm proposing:


https://github.com/dyoo/racket/commit/87a5280b13f7092f730145028fcbdea8a8cc5519


Is this ok?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Fix for PR13305 displays oddly in Opera

2013-02-18 Thread Danny Yoo
Ok, I'm reverting most of what I did here for PR 13305, but I do
introduce a change in the sequence:

span class=mywbr nbsp;/span

where the discretionary word breaks are supposed to happen: the nbsp;
is what I've adding.  The extra nbsp; entity is bizarre, but I've
seen it recommended elsewhere on the web when wbr is being simulated
via css tricks.  Adding it corrects the peculiar layout issue that
Eric was seeing with the display of _gcpointer.  I've used
browsershots.org to observe that this is compatible with the major
browsers.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Fix for PR13305 displays oddly in Opera

2013-02-15 Thread Danny Yoo
On Fri, Feb 15, 2013 at 2:37 PM, Asumu Takikawa as...@ccs.neu.edu wrote:
 Hi all,

 A few days ago, PR 13305 was fixed in commit
 29031f0972ead0d3cd26d61f163b5e5b59e9ffce. Unfortunately, the fix makes
 some identifiers in the docs display oddly in Opera. I've attached some
 screenshots that demonstrate the issue.

Drats. That's my regression then.  But Quirksmode said that
zero-width-space works under Opera.
(http://www.quirksmode.org/oddsandends/wbr.html)

Should I revert the change?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] need help with pr-13350: readline busy polling vs callback fix?

2013-02-09 Thread Danny Yoo
On Sat, Feb 9, 2013 at 6:12 AM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 I can't really help with the other questions, but yes, I expect it is the
 newline after the require. Read doesn't read past that matching paren:


I'm observing that if I try to set the file-stream-buffer-mode during
module-load time, it seems ineffective for readline.  I can observe
this with the following program rl.rkt at the console repl.

https://gist.github.com/dyoo/4743135

If I do:

slab:Desktop dyoo$ racket
Welcome to Racket v5.3.2.
 (require rl.rkt)
 (start)

then the port seems ok, and the readlines work.

But if modify rl.rkt by uncommenting the toplevel call to setup-io,
and comment out the setup-io in start,

https://gist.github.com/dyoo/4746640

then the readline breaks very badly when I do:

slab:Desktop dyoo$ racket
Welcome to Racket v5.3.2.
 (require rl-broken.rkt)
 (start)

I observe that sync/enable-break in the readline loop reports that the
port is available, but the underlying C world doesn't think so, hence
rl-callback-read-char blocks when it tries to look at stdin.

So I'm left with a puzzle: why does doing the file-stream-buffer-mode
at require run time not have the same effect as doing it after the
module load?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] need help with pr-13350: readline busy polling vs callback fix?

2013-02-09 Thread Danny Yoo
Ok.  I can dodge this problem by re-routing the getc-like function
that readline uses with Racket-aware stuff.

(set-ffi-obj! rl_getc_function libreadline (_fun _pointer - _int)
  (lambda (_)
(define next-byte (read-byte))
(if (eof-object? next-byte) -1 next-byte)))

If I do this, then everything appears to work fine.  I'll do that, and
avoid the fight with the input port buffering for now.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] need help with pr-13350: readline busy polling vs callback fix?

2013-02-08 Thread Danny Yoo

 However, when I try using this in the larger context of xrepl, I've
 found that I've completely broken it.

 ###
 $ ~/local/racket/bin/racket
 Welcome to Racket v5.3.3.1.
 (require xrepl)
 - hello
 - world
 - help
 ###



There's something funny with buffered input going on.  If I do the
following interaction on my pr-13350 branch, then the results are much
better:

#
128-110-82-95:readline dyoo$ ~/local/racket/bin/racket
Welcome to Racket v5.3.3.1.
 (file-stream-buffer-mode (current-input-port) 'none)
 (require xrepl)
-
   1
1
- 2
2
- 3
3
#


So part of the problem I'm running into seems related to how Racket is
block-buffering the standard input port.  This probably messes with
readline, which needs to look at the raw stdin object to make sense of
it.

I'm still very confused!  How do FFI-wrapped C functions deal with
standard input?  Does that mean that they normally need to access
stdin via Racket itself, since the port is probably eating blocks of
stdin already?



There are still a few oddities.

* It's off by a little because of the extra newline, which I don't
understand yet.  Is that the newline right after the (require xrepl)
that hasn't been consumed yet?

* If I try to set file-stream-buffer-mode within an xrepl module, I
see no benefit yet.  I seem to have to do this at the REPL, before
loading xrepl.  Very confused... :(
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] 5.3.3

2013-02-06 Thread Danny Yoo
On Wed, Feb 6, 2013 at 1:17 PM, Matthias Felleisen matth...@ccs.neu.edu wrote:
 Dear all

 DrRacket v5.3.2 has a bug that causes the highlighting to become corrupted 
 when the program contour is visible. We are planning to release 5.3.3 with 
 just a fix for this bug in the next few days.


Would it be possible to include other bugs fixes as well?  The PLaneT2
one is bad: if I try to use PLaneT2 under DrRacket under 5.3.2, I have
a high likelihood of completely messing up the collects badly.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] 5.3.3

2013-02-06 Thread Danny Yoo
On Wed, Feb 6, 2013 at 3:39 PM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 This one seems maybe okay:

 https://github.com/dyoo/racket/commit/3e3608ccb82de7e14b0b3aed223d95c7d5a500ba

 but the other one definitely seems like too much. And I'm not sure that that
 one is a good idea. I think it is, but I'd want to try something like that
 for a while before releasing it.


But the other one is the more critical one.  It's the one that keeps
the PLaneT2 install from triggering a raco setup on the main collects
root in the context of DrRacket.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] 5.3.3

2013-02-06 Thread Danny Yoo
 How likely is that authors of planet2 packages use the released version 
 rather than the git head version?


Ok, I rescind my point then, since PLaneT2 is in beta.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] request for code review on fix for pr 13471

2013-02-04 Thread Danny Yoo
 I've put this in my branch 'pr13471':

 https://github.com/dyoo/racket/tree/pr13471

 After someone takes a look and says ok, I can push the fix upstream.

 It looks ok to me.


Ok, good.  Pushed.  I don't think I have privileges to close the bug
in the bug tracker.  At least, the last time I tried, the bug tracker
completely broke on me.  Can someone close PR13471 for me?  Thanks!
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Running in DrRacket changes behavior of the `compiler/cm` library

2013-02-03 Thread Danny Yoo
On Sun, Feb 3, 2013 at 8:23 PM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 Why do you think it should include so much stuff? I would have said it
 should include only the directories where we know that collections live.

Can those other directories are also potential places where
collections could be installed?  If not, then never mind, and I can
leave the directory list as it stands.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] raco pkg and github

2013-02-02 Thread Danny Yoo
On Sat, Feb 2, 2013 at 9:19 AM, Ray Racine ray.rac...@gmail.com wrote:
 I saw a blurb this week where Microsoft is using http://libgit2.github.com/
 to add git support into their tooling (Visual Studio no less) and their devs
 have been committing to fill in any MS specific git gaps.  It looks like a
 top quality project,  claiming to be small, clean, no-deps, and cross
 platform smooth.  Is the option to use Racket's FFI to libgit2 just a time
 and resources thing?

I think so.  It's one of the Intro Projects listed in the wiki:

https://github.com/plt/racket/wiki/Intro-Projects

It looks like Joan Arnaldich has started work on it:

https://github.com/jarnaldich/racket-git
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] Why is the Systems Programming guide using console-oriented Racket?

2013-01-31 Thread Danny Yoo
Is there a pedagogic reason why the Systems Programming guide
explicitly discourages running through DrRacket?

There's a leading paragraph in the intro:

To get into the spirit of this tutorial, we suggest that you set
DrRacket aside for a moment, and switch to raw racket in a terminal.

But frankly, I don't get this.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Why is the Systems Programming guide using console-oriented Racket?

2013-01-31 Thread Danny Yoo
On Thu, Jan 31, 2013 at 4:01 PM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote:
 It emphasizes that Racket is broadly applicable, and works both in an
 IDE environment, and in a text editor/shell environment, each of which
 is preferred by large groups of developers.

Ok, this idea is important.  I'm just not sure that it should be
introduced in the Systems Programming guide.


It might (has!) lead to some confusion, especially since by using
enter!, it implicitly involves module paths.  If you look closely at
the user transcript in:

http://lists.racket-lang.org/users/archive/2013-January/056208.html

the user did some pretty reasonable looking things, but all hitting
module path vs. regular paths issue.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Why is the Systems Programming guide using console-oriented Racket?

2013-01-31 Thread Danny Yoo
On Thu, Jan 31, 2013 at 8:23 PM, Eli Barzilay e...@barzilay.org wrote:
 Also, no matter what you do, there are a certain kind of hackers that
 will never dump their console for all the gui in the world.  (And the
 size of this crown is not negligible.)


Ok.  I think Matthew's note is good enough then.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Racket learning page videos

2013-01-29 Thread Danny Yoo
On Tue, Jan 29, 2013 at 9:35 AM, Nick Shelley nickmshel...@gmail.com wrote:
 I recently came across a presentation on the Racket way by Matthew Flatt
 (http://www.infoq.com/presentations/Racket) and thought that it would be
 nice to be able to discover this and similar things more easily. I really
 like how all the publications are available on the Racket learning page.
 Would it be a good idea to also add links to videos such as this one? I also
 think Racket-con videos (or at least the link to the YouTube channel) would
 be good to have there.


I like this idea.  It does seem like this kind of page would be more
dynamic than the static pages on the main web site.  Maybe it could
fit into the wiki at https://github.com/plt/racket/wiki, and then if
the content crystalizes, then reorganized into the main site?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] attacks on the plt web server?

2013-01-22 Thread Danny Yoo
I've noticed that one of my plt servers is being hit hard
occassionally, with the following output coming out of the Racket web
server before it crashes.  I'm including a portion of the output.
This is on Racket 5.3.  Can it be that somehow something is escaping
the custodian cleanup?


dyoo@web4 ~]$ tail -100 debug-crash.txt
read-byte: input port is closed
  context...:
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
read-byte: input port is closed
  context...:
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
read-byte: input port is closed
  context...:
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
read-byte: input port is closed
  context...:
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
read-byte: input port is closed
  context...:
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
read-byte: input port is closed
  context...:
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
read-byte: input port is closed
  context...:
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
read-byte: input port is closed
  context...:
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
read-byte: input port is closed
  context...:
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
read-byte: input port is closed
  context...:
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
read-byte: input port is closed
  context...:
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
read-byte: input port is closed
  context...:
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
read-byte: input port is closed
  context...:
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
read-byte: input port is closed
  context...:
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
read-byte: input port is closed
  context...:
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
read-byte: input port is closed
  context...:
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
read-byte: input port is closed
  context...:
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
read-byte: input port is closed
  context...:
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
read-byte: input port is closed
  context...:
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
read-byte: input port is closed
  context...:
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
read-byte: input port is closed
  context...:
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
read-byte: input port is closed
  context...:
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
read-byte: input port is closed
  context...:
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
read-byte: input port is closed
  context...:
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
read-byte: input port is closed
  context...:
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
read-byte: input port is closed
  context...:
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
make-request: contract violation
  expected: (or/c #f bytes?), given: #eof
  in: the 5th argument of
  (-
   bytes?
   url?
   (listof header?)
   (promise/c (listof binding?))
   (or/c #f bytes?)
   string?
   number?
   string?
   request?)
  contract from:
  collects/web-server/http/request-structs.rkt
  blaming:
  collects/web-server/http/request.rkt
  context...:
   /home/ubuntu/racket/collects/racket/contract/private/blame.rkt:89:0:
raise-blame-error
   /home/ubuntu/racket/collects/web-server/http/request.rkt:32:0
   
/home/ubuntu/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
Racket virtual machine has run out of memory; aborting
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Release Announcement for v5.3.2

2013-01-18 Thread Danny Yoo
 information and list your packages on the new index
 [https://pnr.racket-lang.org/]. We anticipate it will leave beta
 during the next release.

Woohoo!


But pnr.racket-lang.org is being flagged as unsafe in Google Chrome
and Firefox (and probably the other browsers too).  What needs to be
done to correct this?  The exact error is:



pnr.racket-lang.org uses an invalid security certificate.

The certificate is not trusted because it is self-signed.
The certificate is not valid for any server names.

(Error code: sec_error_untrusted_issuer)
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] request to move cfg-parser from algol60 into parser-tools

2013-01-16 Thread Danny Yoo
 Cut-and-paste worries me. Instead of copying the documentation for X to
 Y, usually it works better to document X as Like Y, except Could
 that work in this case?


Ok, I can change it so it just documents the delta.  How does this look?

https://github.com/dyoo/racket/commit/3a3b0f90084b2292afee52f00317ea484f76fad8
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] more planet2 feedback

2013-01-10 Thread Danny Yoo
Hi Jay,

Some more usability feedback:


1.  When updating checksums of my existing packages, I can't tell what
gets updated, as the page for:

https://plt-etc.byu.edu:9004/manage

can look the same before and after Update checksums, so I don't know
if I actually did anything, or if the server timed out during the
request.  I know that there's a red start next to new package, but if
it was already new to begin with, before Update checksums, then
there's no visible delta as far as the Manage page is concerned.

Also, if it's possible to mark the Update checksums URL so that it's
sent as a POST rather than a GET, that would be great.


2.  The login page makes the automatic assumption that if you're
logging in as someone who doesn't exist, that it must be a
subscription request.  I think this is the wrong default, as it is
unforgiving of typos.  e.g. I put in 'dyoo' instead of
'd...@hashcollision.org' for my email, and now the system is sending
spurious email out there.

Perhaps add one additional stage to the interaction, where it says
something like I don't know this user: send a subscription request?
or so?



3.  We talked privately about the error message that shows up when
uploading a package with a malformed name.  e.g. I tried uploading
ragg with the name ragg: a Racket AST Generator Generator, and got a
stack trace error message from the web server of the form:

---
Exception
The application raised an exception with the message:

planet2: Illegal character in name; only alphanumerics, plus '-' and
'_' allowed: ragg: a Racket AST Generator Generator
Stack trace:

edit-details at:
  line 424, column 2, in file
/home/plt-etc/local/galaxy/meta/planet2-index/official/main.rkt
---

I argue that the error message is too low-level when presented by
the web application because it's the result of a stack trace, rather
than the result of constraints on the form elements on the submission
page.  Though the error message does correctly mention that it's the
'name' that is at fault, still the mechanism for reporting the error
is fairly indistinguishable from any other internal error in a
web-servlet.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Need a good way to fix location on cfg-parser

2013-01-08 Thread Danny Yoo
On Fri, Jan 4, 2013 at 5:46 PM, Danny Yoo d...@hashcollision.org wrote:
 I've caught a bug with regards to the source locations constructed by
 cfg-parser, but I don't know quite what the right patch is.  I do know
 what the _wrong_ patch is, so maybe that will help?  :)


Ok, I needed to do a bit more work to produce better locations: the
parser now also keeps track of the last consumed token, which allows
it to use the right token when computing end-pos.  The change is large
enough that I'd like someone else's eyes on it to make sure it's sane
before I merge it in.

   
https://github.com/dyoo/racket/commit/e92e51bfa2444b85b99c0c81b6b4c4346d6a88a9
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] Working on Ragg. Suggestions?

2013-01-01 Thread Danny Yoo
Hi everyone,

I've been working on a parsing framework with the design goal to be
easy to use.  I'm calling it ragg: Racket AST Generator Generator.
(It used to be called 'autogrammar', but that was too much of a
mouthful. Thanks to Joe Politz for the new name!)


The current source code uses PLaneT2 conventions:

https://github.com/dyoo/ragg

The beginnings of its documentation can be read here:

http://hashcollision.org/ragg/


Major features:

* Ragg provides a #lang for writing extended BNF grammars.  Modules
written in #lang ragg automatically generate a parser.  It tries to
follow HTDP doctrine, for the structure of the grammar informs the
structure of the parser's output: the generated parsers produces
native Racket syntax objects in the same shape as the rules.

The documentation link above shows a trivial example, and I'll put
more substantive examples and uses in:

https://github.com/dyoo/ragg/blob/master/ragg/examples
https://github.com/dyoo/ragg/blob/master/ragg/test

(Note: the Python parser example works!  It's basically a copy and
paste of the one in the original Python source tree.)

* The language uses an uppercase convention to determine if a
production is a terminal token or not.  Tokens can optionally provide
location, and the generated syntax objects will have source location
if the tokens do.

* Ragg should work on ambiguous grammars.  I'm using a parser based
(hilariously enough) on the cfg-parser from the algol60 collection,
rather than the more finicky LALR parser in parser-tools/yacc.

---

I need to polish ragg.  I'm going to get most of the test cases, error
traps, and documentation done by the end of this week.  I would really
like some comments and suggestions before I release this on PLaneT2,
because I do want this to be useful to other people.  In my view, the
big thing missing is a story about lexers, which I don't quite know
what to do yet, and if anyone has ideas, I'd love to hear them.

Other work: I don't know if cfg-parser has been optimized yet.  I'll
have to investigate that.


Hope this helps!
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] scribble/doclang example?

2012-12-13 Thread Danny Yoo
 I suggest that you pick a new name for the language that you'd like to
 have, and fix the docs to talk about that one. Then, we can leave
 `scribble/doclang' alone, documenting it as only for backward
 compatibility.

Ok, done.  I've pushed up a scribble/doclang2 and documentation that
describes how to use both scribble/doclang2 and scribble/doclang.

Hurrah for syntax/parse; it made the keyword processing less painful
than I expected.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] scribble/doclang example?

2012-12-13 Thread Danny Yoo
 Ok, done.  I've pushed up a scribble/doclang2 and documentation that
 describes how to use both scribble/doclang2 and scribble/doclang.

Ugh; I feel bad that I forgot to write proper test cases.  Where are
the existing test cases for doclang?  I'll add some for doclang2, but
I don't know where to find the existing ones.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] scribble/doclang example?

2012-12-12 Thread Danny Yoo
I'm reading the documentation on how scribble/doclang works,

 http://docs.racket-lang.org/scribble/doclang.html

but it doesn't say really what it needs to work.

That is, a program written in scribble/doclang must provide a few
elements besides the chunks of document: it needs to also provide the
name of the id it's going to bind the document to, some function to
post-process after decoding, and some leading expressions.  I see that
other readers such as scribble/jfp take advantage of this to do extra
stuff.


Here's a small example I've ben able to figure out:


#lang racket
(module* example scribble/doclang
  doc
  values
  ()
  (require scribble/base)
  (provide (all-defined-out))
  (define foo (para hello again))
  hello world, this is an example document
  (para note the  (bold structure)))

(module+ main
  (require (submod .. example))
  (printf I see doc is: ~s\n\n doc)
  (printf I see foo is: ~s foo))


and I was about to add this example to the doclang documentation, but
paused; the current interface seems awfully error-prone: it took me
several minutes to figure out why (module example scribble/doclang
hello world) didn't work.


Would it acceptable if I hack up the language so that it takes those
three values as keyword arguments, and provide reasonable defaults?


That is, I'd like to be able to write:


(module example scribble/doclang
  hello world, this is an example document)


and have it Just Work.


If we need to override the defaults, we should be able to provide them
as keywords at the beginning of the module:


(module example scribble/doclang
  #:id doc
  #:post-process values
  #:exprs ()

  hello world, this is an example document)



Does that seem reasonable?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] getting error on syntax-local-module-exports with a planet 2 package

2012-12-04 Thread Danny Yoo
I'm running into the following error when trying to install my red-black
tree package from planet2:


bash-3.2$ ~/local/racket/bin/raco pkg install data-red-black

[some output later]

syntax-local-module-exports: unknown module
  module name: #resolved-module-path:(submod /Users/dyoo/Library/Racket/
5.3.1.9/pkgs/installed/data-red-black/data/red-black/red-black.rkt
uncontracted)
  context...:
   /Users/dyoo/local/racket/collects/racket/private/reqprov.rkt:78:13: t
   /Users/dyoo/local/racket/collects/racket/require-transform.rkt:266:2:
expand-import
   /Users/dyoo/local/racket/collects/racket/private/reqprov.rkt:594:5
   /Users/dyoo/local/racket/collects/racket/require-transform.rkt:266:2:
expand-import
   try-next
   /Users/dyoo/local/racket/collects/racket/private/reqprov.rkt:242:2
   /Users/dyoo/local/racket/collects/racket/private/modbeg.rkt:46:4
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:353:0: compile-zo*
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:560:26
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:553:42
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:518:0: maybe-compile-zo
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:631:2: do-check
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:712:4
   /Users/dyoo/local/racket/collects/setup/parallel-do.rkt:418:20: loop


Anyone know what's going on there?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] getting error on syntax-local-module-exports with a planet 2 package

2012-12-04 Thread Danny Yoo
syntax-local-module-exports: unknown module

   module name: #resolved-module-path:(submod /Users/dyoo/Library/Racket/
 5.3.1.9/pkgs/installed/data-red-black/data/red-black/red-black.rkt
 uncontracted)
   context...:



... never mind. I'm an idiot, as usual.  It's a problem in one of my helper
modules.  Sorry!
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] Other PLaneT 2 questions

2012-12-04 Thread Danny Yoo
* Will there be a procedure for package revocation?  For example, if I put
something up, I may want to take it down, either because it should be
renamed, or it's bitrotted code.


* Will there be an easy way to pull a full list of packages
programmatically from the central repositories?  One of the things I want
is the ability to provide separate views of the packages, say to overlay
something like ratings, or comments.  So if the central repository web site
can't provide this, still make it possible for people to pull the relevant
content programmatically.


* Will there be a consistent convention for declaring a package's test
cases?  In Perl's CPAN, for example, we know how to run the test cases for
any CPAN'ed package.  They even trust it well enough that it's usually part
of the installation process, so that if the test cases fail, the
installation fails reliably.  It would be nice if Racket packages supported
the same convention.


* I think I remember seeing comments about having the documentation
available before installing.  What's the status of this?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Planet 2 package names

2012-12-03 Thread Danny Yoo
 Planet 1 packages and Racket collections also don't use A-Z (with one or
 two exceptions on Planet).  In theory, we could disallow those characters
 and gain compatibility with case-insensitive mediums such as the default
 Mac OS X filesystem.  I'm not particularly attached to this second
 proposal, but since it leads to potential errors I thought it was worth
 bringing up.  If we leave both cases in, we at least need to make sure
 programs that run on Windows and Unix don't break on Mac due to package
 names conflicting on the filesystem.


One of those exceptions is probably UPPERCASE.plt,


http://planet.racket-lang.org/display.ss?package=UPPERCASE.pltowner=dyoo

but as it's intended only as a joke, please ignore it.  :)
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Planet 2 Beta Release

2012-12-02 Thread Danny Yoo
 Exactly. That student is going to get an error message when DrRacket
 starts up saying that the handin tool is broken. They complain to
 someone, and so on.


Or, even worse, the student can get the error message at Check Syntax time,
after which because it's an internal error, DrRacket goes unresponsive and
the user can't even save their program anymore.  (I've had this happen a
few times, and it's one of the worse case scenarios I've run into.)
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] augmented rb-tree with customizable combinator

2012-11-30 Thread Danny Yoo
Hi Matthew,

Ok, I've generalized the code so you can use a custom node combinator to
compute the metadata at each node.  I've tried to write comprehensive
documentation's in collects/syntax-color/augmented-red-black.scrbl.  Maybe
it's a candidate for the data collection?


I don't think the red-black trees should replace the splay trees anymore:
although they have similar performance, the splay tree is just slightly
faster despite not being as balanced.  I believe the overhead of
maintaining all the pointers in the rb tree structure contributes to this.
 Still, the rb-tree stuff should hopefully be helpful to someone out there.
 :)

Should I keep collects/syntax-color/private/red-black.rkt
and collects/syntax-color/private/rb-token-tree.rkt in the repository, or
should I drop those two?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] String search in mred/private/wxme: knuth-bendix?!

2012-11-29 Thread Danny Yoo
I'm staring at do-find-string-all's implementation, and right before the
string-matching logic, there's a mysterious comment Knuth Bendix in
there.  I'm staring at the code some more, and it looks more like KMP
(Knuth-Morris-Pratt) to me.

(I have no idea what the Knuth-Bendix algorithm looks like, but I'm pretty
sure it has little to do with string matching: it's supposed to be an
algorithm for solving a system of equations...)

Assuming that it is KMP, is there a reason why we're not using Boyer-Moore
here instead?  My understanding was BM was faster than KMP for common
situations.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] indentation: the rb tree didn't help, but a hack to stick-to-next-sexp might

2012-11-26 Thread Danny Yoo
On Mon, Nov 26, 2012 at 11:31 AM, Robby Findler ro...@eecs.northwestern.edu
 wrote:

 That kind of thing makes a lot of sense to me.

 I'd probably write the code a little bit differently, having a
 function that takes a string and sees if the text starting at
 start-pos matches that string instead of having to special case the
 numbers 1, 2, 3, 5, and 7. This will also let you just put the call to
 forward-match in the second arm of the 'and', so you can avoid the
 promise.



Can you elaborate what you mean?  Do you mean to say to do:

(get-text pos (min (last-position) (+ pos K)))

for sufficiently large enough K, and then do the string matching from there?


Also do you have an intuition as to why forward-match is expensive?  My
understanding is that it only tokenizes the portion of the buffer that got
dirty, so there should be so much reuse of the existing tokens that this
shouldn't be that bad.  I guess I need to stare at the code some more.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] indentation: the rb tree didn't help, but a hack to stick-to-next-sexp might

2012-11-26 Thread Danny Yoo
 and call it a bunch (inside an 'or', one branch for each of those
 strings that are currently in the second argument to member; or well,
 even use a for/or, I guess). Or, if you wanted, you could change your
 existing code to push the 'or' inside the 'and' and then drop the
 promise.



Ok, I'll rewrite the code without the promise, and push to master.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] indentation: the rb tree didn't help, but a hack to stick-to-next-sexp might

2012-11-25 Thread Danny Yoo
At least, as far as I can tell, it does not perform any better than the
splay tree.  It's actually about a second slower when indenting
drracket/private/unit.rkt.  Darn it.


However, I did find something that's slightly nutty: the following patch
appears to greatly improve indentation:


https://github.com/dyoo/racket/commit/36670d335d72bb164f3e5dbd97763d69664337a2


This crazy code is motivated by the following snippets from the profiler,
when a profile call is wrapped around tabify-selection:



  loop [34]
0.1%
  get-backward-sexp method in
...k/private/racket.rkt:425:2 [28]   99.9%
 [37] 50648(61.1%) 0(0.0%)  stick-to-next-sexp? method in
...k/private/racket.rkt:425:2 ...
  do-forward-match method in
...rk/private/color.rkt:71:2 [50] 99.9%

...


  get-forward-sexp method in
...k/private/racket.rkt:425:2 [38]17.1%
  stick-to-next-sexp? method in
...k/private/racket.rkt:425:2 [37] 82.9%
 [50] 61043(73.6%)53(0.1%)  do-forward-match method in
...rk/private/color.rkt:71:2 ...
  colorer-driver method in
...rk/private/color.rkt:71:2 [66]   99.8%
  match-forward method in paren-tree% [72]
 0.1%



If I'm reading the profiler output correctly, this is saying that 61% of
the time is being spent in stick-to-next-sexp?, and that in
stick-to-next-sexp?, the majority of the time goes through
do-forward-match.  In the diff above, I made the code speculatively match
the text: if it fails, there's no need to call do-forward-match.  I
reasoned that it looked expensive to call: maybe we can avoid it in the
common case.

I'm seeing indentation times cut by 50%; I've been staring at this all day,
so I don't trust myself yet.  Can anyone else confirm that that they see a
similarly dramatic improvement in tabification when this hack is in place?


I have not committed this yet because it's kludgy code.  :)  I know the
above is not quite the right way to solve the problem, but it seems like it
would be worthwhile to do something like this.  Of course, it would be
better to fix forward-match so it isn't so expensive.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] [plt] Push #25720: master branch updated

2012-11-22 Thread Danny Yoo
On Tue, Nov 20, 2012 at 8:58 AM, Robby Findler
ro...@eecs.northwestern.eduwrote:

 Yes, I think that's the eventual plan.


Ok, I've added documentation.  Is red-black.rkt something that I should
move into the data collection now, or should I wait?  I was also going to
change the name of the module to positional-red-black.rkt, since it has a
position-centric view of the world.


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


[racket-dev] Wow; racket master at least 2x faster than 5.3.1 on my rb tree benchmark?

2012-11-18 Thread Danny Yoo
I'm doing some micro-optimizations on my rb-tree implementation.  One thing
I'm testing is inserting the entire contents of /usr/share/dict/words.
 It's heavily dominated by structure-mutation code.

Under 5.3.1, I see the following times:

Timing construction of /usr/share/dict/words:
inserting 235886 words at the end...
cpu time: 446 real time: 446 gc time: 0
dropping all those words...
cpu time: 355 real time: 374 gc time: 0
inserting 235886 words at the front...
cpu time: 437 real time: 436 gc time: 0


Out of curiosity, I wanted to see how fast this ran under Racket under git
(8d30f173).  Under that version, I'm seeing:

Timing construction of /usr/share/dict/words:
inserting 235886 words at the end...
cpu time: 195 real time: 195 gc time: 0
dropping all those words...
cpu time: 203 real time: 217 gc time: 0
inserting 235886 words at the front...
cpu time: 200 real time: 199 gc time: 0


So I don't know what exactly happened between then and now, but whatever it
is, keep doing it!  :)
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Wow; racket master at least 2x faster than 5.3.1 on my rb tree benchmark?

2012-11-18 Thread Danny Yoo
On Sun, Nov 18, 2012 at 4:24 PM, Pierpaolo Bernardi olopie...@gmail.comwrote:

 How does compare to builtin mutable hashes?



The following code represents a rough hashtable equivalent of what my rb
code would be enabling (quick search for word by position):


  ;; We might be curious as to the overhead of the tree structure.
  ;; (of course, it's worth it because we are dealing with a dynamic
set here.)
  ;; Still, let's compare with inserting into a native hash:
  (printf just for comparison: inserting in a native hash:\n)
  (let ([ht (make-hash)])
(time
  (for/fold ([acc 0]) ([word (in-list (force all-words))])
(hash-set! ht acc word)
(+ acc (string-length word)


It's also useful to compare this vs the existing splay tree approach in
syntax-color/token-tree:

  (printf just for comparison: inserting in the original token
tree:\n)
  (let ([t (new token-tree%)])
(time
  (for ([word (in-list (force all-words))])
(insert-last-spec! t (string-length word) word


Here's the output of the insertion benchmark:

;; (from the rb-tree insertion)
inserting 235886 words at the end...
cpu time: 204 real time: 205 gc time: 0

just for comparison: inserting in a native hash:
cpu time: 108 real time: 107 gc time: 0

just for comparison: inserting in the original token tree:
cpu time: 51 real time: 51 gc time: 0


So compared to the rb-tree version, insertions into the hashtable are about
twice as fast.  And as one might expect, the splay tree bulk insertion is
the fastest: it doesn't deal with balance at insertion time and can it
delay that work until we start searching the structure.

The rb-tree (as well as the original splay code) allows for much more
flexible searches and dynamic updates into the sequence structure than the
hash, so it's definitely worth the extra complexity.  My conjecture is that
the non-allocating nature of the rb-tree, as well as its always-balanced
structure, will be worth the cost of the extra insertion time vs splays.  I
just hope I can show it!  :)  I'll see tomorrow when I code up a
token-tree% implementation and start measuring times in DrRacket.

I just got done with the fundamental rb-tree data structures this evening.
 Thank goodness Robby strongly recommended me to write a randomized testing
approach.  It caught a lot of things I hadn't even considered.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Replacing the splay tree token-tree% with an rb-tree?

2012-11-16 Thread Danny Yoo
 I wanted to surprise you by getting this all working by mid-week, but it's
 taking longer than I thought... :)  So I might as well run it by you to
 make sure the idea is sound before I go further on this track.


The core rb implementation is almost done.  The search-by-position,
insert-before, insert-after, and delete operations appear to be solid now.
 Hopefully I can get concat and split done by today (or tomorrow).

There are some operations in the original token-tree% that aren't directly
applicable to rb-trees.  In particular, I assume that the
add-to-root-length and remove-root functions can be replaced with some
alternative behavior that preserves the final effect on the editor state.
 I should be able to simulate the splay tree's use of the root and replace
that with a focused node in the rb tree.

Is there a particular splay-tree property that we're really depending on?

On the other hand, the rb implementation should support tree concatenation
and in-place insertion, not limited just to inserting at the beginning and
end of the tree.  (And concatenation of two trees is O(log(n)).  I'm not
familiar enough with the lexer state management to know if these additional
operations would be useful.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Replacing the splay tree token-tree% with an rb-tree?

2012-11-14 Thread Danny Yoo
On Tue, Nov 13, 2012 at 6:15 PM, Robby Findler
ro...@eecs.northwestern.eduwrote:

 That sounds fantastic! Thanks!

 In your stress test, try doing random insertions/deletions to try to
 find things that break the red/black invariant.


Of course!


https://github.com/dyoo/new-token-tree/commit/7264f76cf3f05ebb3c8e8630efd807e413fa75ae


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


[racket-dev] More Scribble optimization; contracts?

2012-11-09 Thread Danny Yoo
I've been hammering on the problem of speeding up scribble.  One of the
things that's a surprise is that the contract checks on the part/element
structure appear to be significant because Scribble documents are so
granularly structured.

I focus on extract-part-style-files in scribble/base-render.rkt, which is
called on the entire part structure to collect information on what style
files are mentioned in the document.  On my system, when running Scribble
on reference.scrbl, it took about 1.2 seconds for a single call to
extract-part-style-files.  This made me blink: extract-part-style-files
should just be a simple, linear walk through the tree structure to look for
style file declarations (modulo dealing with delayed, traverse, and
part-relative blocks, which look more complicated).

The contract checks appear to take a significant chunk of that time.  I've
judiciously added a few unsafe accessors, and the runtime of
extract-part-style-files goes down from 1.2 seconds to 800 milliseconds.
 That is, about 400 milliseconds, or 30% of the time of
extract-part-style-files, is dedicated to contract checking alone.  My hack
is up here:

https://github.com/dyoo/racket/tree/scribble-speed

I haven't pushed these optimizations upstream yet because I'd like a review
to see if this is actually the right way to approach this particular
problem.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] [plt] Push #25666: master branch updated

2012-11-09 Thread Danny Yoo
On Fri, Nov 9, 2012 at 5:40 PM, Robby Findler
ro...@eecs.northwestern.eduwrote:

 Was it actually faster?


Unfortunately I couldn't observe the change switching from display to
write-string: it was within the margin of noise.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] [plt] Push #25660: master branch updated

2012-11-08 Thread Danny Yoo
On Wed, Nov 7, 2012 at 10:23 PM, Eli Barzilay e...@barzilay.org wrote:

 5 hours ago, Danny Yoo wrote:
  Somewhat small change.  But it was low-hanging fruit, and I needed
  to make some kind of progress.  :)

 Last time I benchmarked this kind of IO, using `write-string' and/or
 `write-bytes' was even faster (and they feel right for this kind of
 optimization work).


Agreed!  I completely forgot about those functions.  Ok, I'll use those
when I pass through that module again.



  Another thing to try, though not a low hanging
 thing, is to see how the output of `scribble/html' compares to this --
 it's undocumented, still, but I vaguely want to try moving the
 scribble rendering to it.


What's the current status with scribble/html?  I understand that it's
undocumented, but is it feature-complete?




  The place where Scribble documentation generation uses a lot of time
  appears to be the evaluations that feed @interactions.  (I have some
  ideas on pushing the computation for @interactions off to
  compile-time, but haven't cooked and taste-tested the ideas yet.)

 This time is spent on the sandboxes.  Like Robby, I don't think that
 there will be any benefit to doing the work at compile time -- the
 setup process re-runs files only when needed, and that happens when
 they need to be recompiled, so you end up doing the same work at the
 same time.



I was thinking that if one were modifying some scribble files and rerunning
raco setup, subsequent builds of the documentation might be faster.  The
canonical example would be the Reference, which includes sections from
several other scribble files.  But if the setup process is already smart
enough not to re-run the runtime portions of sections of the reference that
haven't changed, then there's no benefit to what I was thinking.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Planet 2 Beta Release

2012-11-08 Thread Danny Yoo
On Thu, Nov 8, 2012 at 10:12 AM, Neil Toronto neil.toro...@gmail.comwrote:

 On 11/08/2012 06:16 AM, Jay McCarthy wrote:

 Now that the 5.3.1 release is finished, I've just pushed the beta
 release of Planet 2 to the Racket core.


 I just read the docs. This is friggin' awesome.



Quick comment: the install instructions should not be shown with hover.
 Here's why: I view the page for a package.  Cool, new package.  Let me
open up DrRacket.  Oh, wait, my window focus isn't over that link anymore,
so I can't see the install instructions.  :)

What about putting the install instructions in the right margin, similar to
a margin-note?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] [plt] Push #25660: master branch updated

2012-11-07 Thread Danny Yoo
I added a (time ...) around the call to write-xexpr, and watched how long
it took to render the whole Racket Reference.  Before those changes, the
write-xexpr call took about 2 seconds on my machine; afterwards, it's now
taking about 1 second.

Are there other examples of stress tests in the Racket test suite I can
look at?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] [plt] Push #25660: master branch updated

2012-11-07 Thread Danny Yoo
Somewhat small change.  But it was low-hanging fruit, and I needed to make
some kind of progress.  :)

I'll look into the stress tests and will try to add an appropriate one for
the xexpr displaying function.


The place where Scribble documentation generation uses a lot of time
appears to be the evaluations that feed @interactions.  (I have some ideas
on pushing the computation for @interactions off to compile-time, but
haven't cooked and taste-tested the ideas yet.)


There's a surprising amount of time spent turning the part/element
structure into the xexprs (about 9 seconds), and I was going to look into
that next.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] bug tracker won't let me query anymore

2012-11-06 Thread Danny Yoo
I logged into the bug tracker at bugs.racket-lang.org.  What I see upon
login now is the following:



default  User: dyoo  Access: listdb *Racket
Bugs*http://bugs.racket-lang.org/query/?database=default
LoginYou do not have access to database: default.
Please log in to another database


I can't even log out anymore, so I don't know what do to do besides clear
out my session cache or something.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] Fwd: [DrDr] R25581 (timeout 2) (unclean 1) (stderr 3) (changes 59)

2012-10-31 Thread Danny Yoo
Does anyone know why one of the tests in DrDr is failing?
http://drdr.racket-lang.org/25581/collects/redex/tests/gen-test.rkt



-- Forwarded message --
From:  d...@racket-lang.org
Date: Wed, Oct 31, 2012 at 4:48 PM
Subject: [DrDr] R25581 (timeout 2) (unclean 1) (stderr 3) (changes 59)
To: d...@racket-lang.org


DrDr has finished building push #25581 after 1.25h.

http://drdr.racket-lang.org/25581/

Push #25581 (which you did) contained a NEW condition that may need inspecting.
  stderr
http://drdr.racket-lang.org/25581/collects/redex/tests/gen-test.rkt

  timeout
http://drdr.racket-lang.org/25581/collects/tests/framework/main.rkt
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] [DrDr] R25564 (timeout 1) (unclean 0) (stderr 4) (changes 57)

2012-10-28 Thread Danny Yoo
I received the following report from DrDr:


On Sun, Oct 28, 2012 at 5:52 PM,  d...@racket-lang.org wrote:
 DrDr has finished building push #25564 after 1.24h.

 http://drdr.racket-lang.org/25564/

 Push #25564 (which you did) contained a NEW condition that may need 
 inspecting.
   stderr
 http://drdr.racket-lang.org/25564/collects/tests/gracket/paramz.rktl




I don't understand the error message yet; all I pushed was
documentation.  :)  Help?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] chaperones in 5.3.1?

2012-10-26 Thread Danny Yoo
 I ran the above, and it seemed to work well, until I got to the
 conform.rkt test, when it spewed a *lot* of output like this:

 _62969@http://localhost:8371/eval:4681
 _63082@http://localhost:8371/eval:2199
 _63901@http://localhost:8371/eval:6925
 _63932@http://localhost:8371/eval:6052
 _63900@http://localhost:8371/eval:6625
 _63899@http://localhost:8371/eval:6945
 _63080@http://localhost:8371/eval:4579
 _62961@http://localhost:8371/eval:4702


Huh; no idea what's going on there yet.  that looks like a stack trace
coming out of JavaScript land.  That shouldn't be right.  What browser
was it running under?

Are your patches on master or release now?  I'll go ahead and check to
see if I can replicate the stack trace you're seeing.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] chaperones in 5.3.1?

2012-10-25 Thread Danny Yoo
On Wed, Oct 24, 2012 at 8:19 PM,  sstri...@ccs.neu.edu wrote:
 I've pushed a change which fixes this.

Ok, thank you.

Whalesong is still not working, but it got further this time.  I'm
hitting the following exception now:


###
ensure-const-value: broke its contract
 Attempted to use a higher-order value passed as `Any`
 in: the 1st argument of
  (recursive-contract
   (-
any-wrap/c
   
###


Here's sample test code to emit the contract error.  I don't know how
to fix it yet.

;;;
;;; test-const-value.rkt
;;;
#lang typed/racket/base
(require const-value.rkt)
(require/typed helper.rkt
   [ensure-const-value (Any - const-value)]
   [a-constant-value Any])
(ensure-const-value a-constant-value)




;;;
;;; const-value.rkt
;;;
#lang typed/racket
(provide (all-defined-out))
(struct: Constant ([v : Any]))
(define-type const-value
  (Rec C
   (U Symbol
  String
  Number
  Boolean
  Void
  Null
  Char
  Bytes
  Path
  (Pairof C C)
  (Vectorof C)
  (Boxof C



;;;
;;; helper.rkt
;;;
#lang racket/base

(provide ensure-const-value
 a-constant-value)
(require const-value.rkt)
(define (ensure-const-value x)
  (cond
   [(symbol? x)
x]
   [(boolean? x)
x]
   [(string? x)
x]
   [(number? x)
x]
   [(void? x)
x]
   [(null? x)
x]
   [(char? x)
x]
   [(bytes? x)
x]
   [(path? x)
x]
   [(pair? x)
(begin (ensure-const-value (car x))
   (ensure-const-value (cdr x))
   x)]
   [(vector? x)
(begin (for-each ensure-const-value (vector-list x)))
x]
   [(box? x)
(ensure-const-value (unbox x))
x]
   [else
(error 'ensure-const-value Not a const value: ~s\n x)]))

(define a-constant-value (Constant '(check-expect (greet danny)
hello danny)))
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] chaperones in 5.3.1?

2012-10-25 Thread Danny Yoo
 ;;; test-const-value.rkt

Whoops, I made an incorrect reduced test case. I broke something when
trying to make the reduced test case from what I'm seeing in
Whalesong.  Let me follow up when I produce a correct reduced test
case.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] chaperones in 5.3.1?

2012-10-25 Thread Danny Yoo
On Thu, Oct 25, 2012 at 12:36 PM, Danny Yoo d...@hashcollision.org wrote:
 ;;; test-const-value.rkt

 Whoops, I made an incorrect reduced test case. I broke something when
 trying to make the reduced test case from what I'm seeing in
 Whalesong.  Let me follow up when I produce a correct reduced test
 case.

Ok, I got the reduced test case.  Sorry about the confusion!

Here are the three files zipped:

http://hashcollision.org/tmp/test-case.tar.gz

Run test-const-value: you'll see that the function works on some
inputs, but breaks with regards to paths.  I'm not sure why.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] chaperones in 5.3.1?

2012-10-25 Thread Danny Yoo
On Thu, Oct 25, 2012 at 2:55 PM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote:
 Hi Danny,

 I'm looking into your code. Can you provide some instructions for how
 I can test Whalesong myself, so that I can reduce the cycle time on
 this issue?

Sure, no problem.  From scratch:

   $ git clone git://github.com/dyoo/whalesong.git
   $ raco planet link dyoo whalesong.plt 1 20 whalesong
   $ raco setup -P dyoo whalesong.plt 1 20
   $ cd whalesong/tests
   $ racket run-more-tests.rkt

The last command should open up a new web browser window.  Leave the
window opened and in focus: the test harness will send testing
commands and run the compiler on the files within
whalesong/tests/more-tests.

If the compiler fails on any particular file in
whalesong/tests/more-tests, you can run the compiler on a single file
with:

   $ racket whalesong-cmd.rkt build [name-of-test-program]

which should produce a better stack trace if compilation fails.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] What's the process for adding a project to DrDr

2012-10-25 Thread Danny Yoo
On Tue, Oct 23, 2012 at 9:56 PM, Jay McCarthy jay.mccar...@gmail.com wrote:
 DrDr has the capability of doing that [installing packages], but
 installing Planet packages requires running raco setup which could
 break the parallelism and cause changes that are unsafe to the other
 tests. Also, I'd have to change it to go run all the files inside the
 package, which is do-able.


Would it be able to do things like open up a web browser window during
DrDr running?  Much of the test suite uses a web browser to make sure
that Whalesong generates JavaScript that works on the browser.  If
not, I need to make a separate test script that just drives the
compiler without evaluating the Javascript.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] What's the process for adding a project to DrDr

2012-10-25 Thread Danny Yoo
On Thu, Oct 25, 2012 at 3:22 PM, Jay McCarthy jay.mccar...@gmail.com wrote:
 DrDr gives you access to an X11 display, so I suppose you could run
 Firefox or something else that you could script. I don't really know
 anything about that and/or getting the results back to the Racket
 script to signal success or failure.

That part should be mostly fine; I already tackled that problem with
the browser-evaluate package
(http://planet.racket-lang.org/package-source/dyoo/browser-evaluate.plt/1/0/planet-docs/manual/index.html);
so long as I can get a browser up, I should be ok.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] chaperones in 5.3.1?

2012-10-24 Thread Danny Yoo
On Tue, Oct 23, 2012 at 9:42 PM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 Is it possible that one of those vectors is mutable and the other is 
 immutable?

I'm not sure yet.  Sorry about not replying immediately; I'm still
trying to figure out where the error is occurring.  It's at a contract
boundary as far as I can tell.  I got a slightly better error trace
now:


--
prop:chaperone-contract: expected a chaperone of
'#(#path:/Users/dyoo/work/whalesong/tests/more-tests/js-binding.rkt
401 14 10 9), got
'#(#path:/Users/dyoo/work/whalesong/tests/more-tests/js-binding.rkt
401 14 10 9)
  context...:
   /Users/dyoo/local/racket/collects/racket/contract/private/prop.rkt:233:10
   /Users/dyoo/local/racket/collects/racket/contract/private/prop.rkt:233:10
   /Users/dyoo/work/whalesong/compiler/compiler.rkt:124:0: compile
   /Users/dyoo/work/whalesong/compiler/compiler.rkt:1924:2: in-other-context
   /Users/dyoo/work/whalesong/compiler/compiler.rkt:124:0: compile
   /Users/dyoo/work/whalesong/compiler/compiler.rkt:124:0: compile
   /Users/dyoo/work/whalesong/compiler/compiler.rkt:772:0: compile-lambda-body
   /Users/dyoo/work/whalesong/compiler/compiler.rkt:44:0: -compile
   ...
--

I'm hacking into Whalesong to see if I can nail this down more precisely.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] chaperones in 5.3.1?

2012-10-24 Thread Danny Yoo
 I'm hacking into Whalesong to see if I can nail this down more precisely.


Ok, I've got a better test case for you that boils down what I'm encountering.


Here's a set of three files test.rkt, structs.rkt, and builder.rkt:


;; test.rkt
#lang typed/racket/base
(require structs.rkt)
(require/typed builder.rkt
   [make-fresh-constant-1 (- Constant)]
   [make-fresh-constant-2 (- Constant)]
   [ensure-symbol-or-vector-value (Any - (U Symbol
(Vectorof Symbol)))])
(ensure-symbol-or-vector-value (Constant-v (make-fresh-constant-1)))
(ensure-symbol-or-vector-value (Constant-v (make-fresh-constant-2)))


;; structs.rkt
#lang typed/racket/base
(provide (all-defined-out))
(struct: Constant ([v : Any]))



;; builder.rkt
#lang racket
(require structs.rkt)
(provide make-fresh-constant-1
 make-fresh-constant-2
 ensure-symbol-or-vector-value)

(define (make-fresh-constant-1)
  (Constant (gensym)))

(define (make-fresh-constant-2)
  (Constant #(hello world)))

(define (ensure-symbol-or-vector-value v)
  (cond
[(symbol? v)
 v]
[(and (vector? v) (for/and ([elt v]) (symbol? elt)))
 v]
[else
 (error 'ensure-symbolic-value Not a symbol or vectorof symbol: v)]))




Essentially, I'm going from the untyped to typed world when I'm
parsing bytecode with zo-parse, and have helpers to manage that
boundary.  Those helpers no longer are working and are raising
chaperone errors.  What should I do instead?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] Is this a type error?

2012-10-23 Thread Danny Yoo
The following program is generating a type error in 5.3.1, but I don't
understand it yet.

;;;
#lang typed/racket/base

;; We may have more information about the lambda's name.  This will show it.
(define-struct: LamPositionalName ([name : Symbol]
   [path : String];; the source of the name
   [line : Natural]
   [column : Natural]
   [offset : Natural]
   [span : Natural]) #:transparent)


(: current-defined-name (Parameterof (U Symbol LamPositionalName)))
(define current-defined-name (make-parameter 'unknown))
;;;


I see the following error message:

. Type Checker: Expected (Parameterof (U Symbol
LamPositionalName)), but got (Parameterof (U Symbol LamPositionalName
'unknown)) in: (make-parameter (quote unknown))


which I didn't expect because 'unknown should be a symbol.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Is this a type error?

2012-10-23 Thread Danny Yoo
On Tue, Oct 23, 2012 at 5:14 PM, Danny Yoo d...@hashcollision.org wrote:
 The following program is generating a type error in 5.3.1, but I don't
 understand it yet.

 ;;;
 #lang typed/racket/base

 ;; We may have more information about the lambda's name.  This will show it.
 (define-struct: LamPositionalName ([name : Symbol]
[path : String];; the source of the 
 name
[line : Natural]
[column : Natural]
[offset : Natural]
[span : Natural]) #:transparent)


 (: current-defined-name (Parameterof (U Symbol LamPositionalName)))
 (define current-defined-name (make-parameter 'unknown))



To add, I can work around this behavior by doing:



(: UNKNOWN Symbol)
(define UNKNOWN 'unknown)

(: current-defined-name (Parameterof (U Symbol False LamPositionalName)))
(define current-defined-name (make-parameter UNKNOWN))



but I'd still like to know why the earlier code doesn't work in 5.3.1.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] chaperones in 5.3.1?

2012-10-23 Thread Danny Yoo
I'm seeing the following error deep within Whalesong when I'm running
its test suite:


. . 
../../../Library/Racket/planet/300/5.3.0.900/cache/dyoo/browser-evaluate.plt/1/0/browser-evaluate.rkt:145:0:
prop:chaperone-contract: expected a chaperone of
'#(#path:/Users/dyoo/work/whalesong/tests/more-tests/js-binding.rkt
401 14 10 9), got
'#(#path:/Users/dyoo/work/whalesong/tests/more-tests/js-binding.rkt
401 14 10 9)


I'm confused (as usual), because my browser-evaluate library shouldn't
be doing anything to chaperoned values.  The error makes it appear
that some value got incorrectly unwrapped somehow.  I'll try to trace
this down better, but has anyone else seen this before?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Pre-Release Checklist for v5.3.1, Second Call

2012-10-22 Thread Danny Yoo
 * Danny Yoo d...@cs.wpi.edu
   - Whalesong Tests (confirm that Whalesong runs from PLaneT)

Does not run, but can you take this out of the checklist anyway?

I'll follow up with a request on how to add Whalesong as a DrDr test
so that it's continually tested as opposed to tested only at
release-branch time.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] What's the process for adding a project to DrDr

2012-10-22 Thread Danny Yoo
During release testing for 5.3.1, I found that Whalesong broke in a
few ways.  I'd like to detect the problem in a better way than what
I've been doing now.  What's involved in getting into the DrDr
automatic build bot, and how would I get it to track Whalesong as I
continue to develop it?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] build problems on plt/release branch?

2012-10-17 Thread Danny Yoo
Does anyone else see severe build problems on the plt/release branch?
 I'm seeing a lot of compile-time errors during 'raco setup'; it's
making it difficult to test things because when a problem occurs, I'm
not sure if it's my fault or if the repo is just in a weird state.

I made sure to clean my local repository by doing:

   git clean -fdx

at the root of the git repo, just to make sure nothing else was
interfering with the build.


I'm at 513f85baa2051cd7428ac008e5b2d1e6858f52d6.  I'm including a
sampling of the output below:



raco setup: 0 making: tmp/racket/collects/2htdp (HtDP/2e Teachpacks)
image.rkt:37:9: module: identifier already imported from: (all-except
../mrlib/image-c...
  at: render-image
  in: private/image-more.rkt
  context...:
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:350:0: compile-zo*
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:551:26
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:544:42
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:509:0: maybe-compile-zo
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:622:2: do-check
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:696:4
   /Users/dyoo/local/racket/collects/setup/parallel-do.rkt:419:20: loop

order.rkt:17:0: define-generics: bad syntax
  in: (define-generics (ordered-dict gen:ordered-dict
prop:ordered-dict ordered-dict? #:defined-table dict-def-table
#:prop-defined-already? #f) (dict-iterate-least ordered-dict)
(dict-iterate-greatest ordered-dict) (dict-iterate-least/?
ordered-dict key) (d...
  context...:
   /Users/dyoo/local/racket/collects/racket/private/modbeg.rkt:46:4
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:350:0: compile-zo*
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:551:26
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:544:42
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:509:0: maybe-compile-zo
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:622:2: do-check
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:696:4
   /Users/dyoo/local/racket/collects/setup/parallel-do.rkt:419:20: loop


raco setup: 0 making: tmp/racket/collects/errortrace/private
namespace-attach-module: unknown module (in the source namespace)
  name: 
#resolved-module-path:/Users/dyoo/local/racket/collects/errortrace/errortrace-key.rkt
  context...:
   
/Users/dyoo/local/racket/collects/tmp/racket/collects/errortrace/errortrace-lib.rkt:474:0:
make-errortrace-compile-handler
   
/Users/dyoo/local/racket/collects/tmp/racket/collects/errortrace/errortrace-lib.rkt:
[running body]
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:350:0: compile-zo*
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:551:26
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:544:42
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:509:0: maybe-compile-zo
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:622:2: do-check
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:696:4
   /Users/dyoo/local/racket/collects/setup/parallel-do.rkt:419:20: loop


raco setup: 0 making: tmp/racket/collects/honu/core
define-honu-syntax: expected argument of type procedure (arity 1);
given: #procedure:...syntax-parse.rkt:13:2
  context...:
   /Users/dyoo/local/racket/collects/honu/core/private/transformer.rkt:18:0:
make-honu-transformer
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:350:0: compile-zo*
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:551:26
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:544:42
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:509:0: maybe-compile-zo
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:622:2: do-check
   /Users/dyoo/local/racket/collects/compiler/cm.rkt:696:4
   /Users/dyoo/local/racket/collects/setup/parallel-do.rkt:419:20: loop
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] Can get-pure-port's signature be expanded to consume strings too?

2012-10-05 Thread Danny Yoo
I keep finding myself writing:

(get-pure-port (string-url ...))

where the call to get-pure-port always has a string-url there.  I was
wondering if something like the following patch would be acceptable:


https://github.com/dyoo/racket/commit/3aa1467a168be758c20e36ee7afad190f3af0ad0
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Segmentation fault 11?

2012-09-18 Thread Danny Yoo
On Tuesday, September 18, 2012, Matthew Flatt wrote:

 I wasn't able to replicate the crash. Does it happen consistently for
 you in v5.3? In v5.3.0.24?



It's consistent for me in 5.3.  I can come in the morning with the laptop
to show you.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] Segmentation fault 11?

2012-09-17 Thread Danny Yoo
I'm seeing weirdness when trying to import Dave Herman's memoize
package on Racket 5.3:

;;;
 (require (planet dherman/memoize:3:1))
WARNING: collected information for key multiple times: '(index-entry
(mod-path (planet schematics/sake))); values: Segmentation fault: 11
;;;

I'm on a Macbook Air running 10.7.




The following includes the stack trace I'm seeing under gdb.  What
else can I do to help with debugging information?

#
(gdb) 204-99-169-77:~ dyoo$ gdb racket
GNU gdb 6.3.50-20050815 (Apple version gdb-1820) (Sat Jun 16 02:40:11 UTC 2012)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as x86_64-apple-darwin...Reading symbols for
shared libraries ... done

(gdb) handle SIGSEGV nostop noprint
SignalStop  Print   Pass to program Description
SIGSEGV   NoNo  Yes Segmentation fault
(gdb) run
Starting program: /Applications/Racket v5.3/bin/racket
Welcome to Racket v5.3.
 (require (planet dherman/memoize:3:1))
Reading symbols for shared libraries .. done
Reading symbols for shared libraries . done
WARNING: collected information for key multiple times: '(mod-path
(planet schematics/sake)); values: '#((Build files) (mod-path
(planet schematics/sake)) (2)
#path:/Users/dyoo/Library/Racket/planet/300/5.3/cache/schematics/sake.plt/1/0/doc/sake/Build_files.html
#t) '#((The Sake API) (mod-path (planet schematics/sake)) (3)
#path:/Users/dyoo/Library/Racket/planet/300/5.3/cache/schematics/sake.plt/1/0/doc/sake/The_Sake_API.html
#t)
WARNING: collected information for key multiple times: '(index-entry
(mod-path (planet schematics/sake))); values:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x2566d2f4
0x002142fb in chaperone_struct_ref ()
(gdb) bt
#0  0x002142fb in chaperone_struct_ref ()
#1  0x001ad91c in setup_graph_table ()
#2  0x001ad934 in setup_graph_table ()
#3  0x001ad74b in setup_graph_table ()
#4  0x001ad934 in setup_graph_table ()
#5  0x001ad74b in setup_graph_table ()
#6  0x001ad74b in setup_graph_table ()
#7  0x001ad6c0 in setup_graph_table ()
#8  0x001b6efb in print_to_string ()
#9  0x001b7d55 in print_to_string_k ()
#10 0x00075b1e in scheme_top_level_do_worker ()
#11 0x00075d48 in scheme_top_level_do ()
#12 0x0004743d in error_write_to_string_w_max ()
#13 0x00047566 in scheme_make_provided_string ()
#14 0x001fd398 in scheme_do_format ()
#15 0x001fd9b7 in sch_eprintf ()
#16 0x00367d6d in ?? ()
#17 0x0007bf7f in _apply_native ()
#18 0x0008206d in scheme_apply_chaperone ()
#19 0x0006043b in _scheme_apply_multi_from_native ()
#20 0x011f663c in ?? ()
#21 0x0005ccfe in scheme_do_eval ()
#22 0x00060329 in _scheme_apply_multi_from_native ()
#23 0x011f89a8 in ?? ()
#24 0x0005ccfe in scheme_do_eval ()
#25 0x00060529 in _scheme_apply_from_native ()
#26 0x00366f20 in ?? ()
#27 0x00357ac4 in ?? ()
#28 0x0005ccfe in scheme_do_eval ()
#29 0x00060329 in _scheme_apply_multi_from_native ()
#30 0x00367962 in ?? ()
#31 0x00357ac4 in ?? ()
#32 0x0005ccfe in scheme_do_eval ()
#33 0x0007d718 in scheme_finish_apply_for_prompt ()
#34 0x0007d8cc in scheme_apply_for_prompt ()
#35 0x0008838f in call_with_prompt ()
#36 0x003509d3 in ?? ()
#37 0x003551d4 in ?? ()
#38 0x00356e84 in ?? ()
#39 0x0005ccfe in scheme_do_eval ()
#40 0x0007d718 in scheme_finish_apply_for_prompt ()
#41 0x0007d8cc in scheme_apply_for_prompt ()
#42 0x0008838f in call_with_prompt ()
#43 0x003509d3 in ?? ()
#44 0x011f6364 in ?? ()
#45 0x0005ccfe in scheme_do_eval ()
#46 0x000760ba in apply_k ()
#47 0x00075c78 in scheme_top_level_do_worker ()
#48 0x00075ee4 in scheme_apply_thread_thunk ()
#49 0x00243c4d in start_child ()
#50 0x00247b5d in make_subprocess ()
#51 0x00247d96 in scheme_thread_w_details ()
#52 0x00247c5b in scheme_thread_w_details ()
Previous frame inner to this frame (gdb could not unwind past this frame)
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] Fwd: [New comment] Chinese Whispers in Go, Racket and Other Languages

2012-08-15 Thread Danny Yoo
-- Forwarded message --
From: *Yi Wang's Tech Notes*
Date: Wednesday, August 15, 2012
Subject: [New comment] Chinese Whispers in Go, Racket and Other Languages
To: d...@hashcollision.org


**
  cxwangyi commented: Thanks for the update, and I am now looking forward
to v5.3.0.18. One more thing: I just compared v5.2.1 with v5.3.0.17, and
found the latter runs times slower. $time racket-5.2.1 /tmp/a.rkt real
0m35.430s user 0m26.235s sys 0m5.334s $time ~/racket-5.3   Respond to this
comment by replying above this line
  New comment on *Yi Wang's Tech Notes http://cxwangyi.wordpress.com*
http://cxwangyi.wordpress.com http://gravatar.com/cxwangyi

*cxwangyi* 
commentedhttp://cxwangyi.wordpress.com/2012/07/29/chinese-whispers-in-racket-and-go#comment-478on
Chinese
Whispers in Go, Racket and Other
Languageshttp://cxwangyi.wordpress.com/2012/07/29/chinese-whispers-in-racket-and-go.


 in response to *Danny Yoo*:

Yes, looks like things will be a lot better. See Matthew Flatt’s analysis
and results in the thread here:
http://lists.racket-lang.org/users/archive/2012-August/053458.html

Thanks for the update, and I am now looking forward to v5.3.0.18. One more
thing: I just compared v5.2.1 with v5.3.0.17, and found the latter runs
times slower. $time racket-5.2.1 /tmp/a.rkt real 0m35.430s user 0m26.235s
sys 0m5.334s $time ~/racket-5.3.0.17/bin/racket /tmp/a.rkt real 1m54.070s
user 0m47.368s sys 0m27.836s

Replyhttp://cxwangyi.wordpress.com/2012/07/29/chinese-whispers-in-racket-and-go?replytocom=478#respond
Commentshttp://cxwangyi.wordpress.com/2012/07/29/chinese-whispers-in-racket-and-go

*Want less email?* Modify your Subscription
Optionshttps://subscribe.wordpress.com/?key=0f998c11da684a48ebd0700c9504a5e0email=dyoo%40hashcollision.orgoption=comments.

 Thanks for flying with WordPress.com http://wordpress.com
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] seeing segfaults on build on 64-bit ubuntu

2012-08-01 Thread Danny Yoo
 I've pushed the change to the git repo's master branch. Please let me
 know whether a build on your machine works with this change.


Sorry for the delay!  I confirm that I'm not seeing the crash under
master (44161d73c8bdce0374718d1ab0bc20fbebc1fec2) on my system.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] seeing segfaults on build on 64-bit ubuntu

2012-07-29 Thread Danny Yoo
I tried building from scratch again from
c9d0319a11cb2aae6d1e81d0c6465b4241a4ecff  and see the following:


raco setup: 1 running: plot/scribblings/plot.scrbl
raco setup: 2 running: preprocessor/scribblings/preprocessor.scrbl
raco setup: 2 running: scribblings/quick/quick.scrbl
raco setup: 2 running: r5rs/r5rs.scrbl
raco setup: 2 running: r6rs/scribblings/r6rs.scrbl
*** glibc detected *** racket/racket3m: double free or corruption
(!prev): 0x2afccc1395e0 ***
*** glibc detected *** racket/racket3m: double free or corruption
(!prev): 0x2afccc1395e0 ***
=== Backtrace: =
=== Backtrace: =
/lib/x86_64-linux-gnu/libc.so.6(+0x7e626)[0x2afca64ad626]
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0(pixman_image_unref+0x17)[0x2afce1314a97]
/usr/lib/x86_64-linux-gnu/libcairo.so.2(+0x21fd1)/usr/lib/x86_64-linux-gnu/libcairo.so.2(+0x293cc/usr/lib/x86_64-linux-gnu/libcairo.so.2(cairo_stroke_preserve+0x20)[0x2afce102e250]
/usr/lib/x86_64-linux-gnu/libcairo.so.2(cairo_stroke+0x9)[0x2afce102e269]
racket/racket3m(/usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call+0x1e5)[0x2afca600f435]
racket/racket3m(scheme_do_eval+0x295)[0x454bd5]
racket/racket3m(ffi_do_call+0x70b)[0x6485eb]
racket/racket3m(scheme_do_eval+0x295)[0xAborted (core dumped)
make[1]: *** [install-3m] Error 134
make[1]: Leaving directory `/home/dyoo/local/racket/src/build'
make: *** [install] Error 2



dyoo@grom:~/local/racket/src/build$ gdb racket/racket3m core
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show copying
and show warranty for details.
This GDB was configured as x86_64-linux-gnu.
For bug reporting instructions, please see:
http://bugs.launchpad.net/gdb-linaro/...
Reading symbols from /home/dyoo/local/racket/src/build/racket/racket3m...done.

warning: core file may not match specified executable file.
[New LWP 8450]
[New LWP 6091]
[New LWP 6090]
[New LWP 8455]
[New LWP 6092]
[New LWP 8454]
[New LWP 8448]
[New LWP 8453]
[New LWP 8449]
[New LWP 8451]
[New LWP 8452]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library /lib/x86_64-linux-gnu/libthread_db.so.1.
Core was generated by `racket/racket3m -X
/home/dyoo/local/racket/collects -N raco setup -l- setup --n'.
Program terminated with signal 6, Aborted.
#0  0x2afca6465445 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) where
#0  0x2afca6465445 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x2afca6468bab in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x2afca64a2e2e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x2afca64ad626 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x2afce1314a97 in pixman_image_unref ()
   from /usr/lib/x86_64-linux-gnu/libpixman-1.so.0
#5  0x2afce103c965 in ?? () from /usr/lib/x86_64-linux-gnu/libcairo.so.2
#6  0x2afce103e3cc in ?? () from /usr/lib/x86_64-linux-gnu/libcairo.so.2
#7  0x2afce103f6eb in ?? () from /usr/lib/x86_64-linux-gnu/libcairo.so.2
#8  0x2afce103fe8b in ?? () from /usr/lib/x86_64-linux-gnu/libcairo.so.2
#9  0x2afce105d642 in ?? () from /usr/lib/x86_64-linux-gnu/libcairo.so.2
#10 0x2afce1036fd1 in ?? () from /usr/lib/x86_64-linux-gnu/libcairo.so.2
#11 0x2afce102e250 in cairo_stroke_preserve ()
   from /usr/lib/x86_64-linux-gnu/libcairo.so.2
#12 0x2afce102e269 in cairo_stroke ()
   from /usr/lib/x86_64-linux-gnu/libcairo.so.2
#13 0x2afca600fa14 in ffi_call_unix64 ()
   from /usr/lib/x86_64-linux-gnu/libffi.so.6
#14 0x2afca600f435 in ffi_call ()
   from /usr/lib/x86_64-linux-gnu/libffi.so.6
#15 0x006485eb in ffi_do_call (data=optimized out,
argc=optimized out, argv=0x2afcddc01998) at xsrc/foreign.c:5246
#16 0x00454bd5 in scheme_do_eval (obj=0x2afd28d11328, num_rands=1,
rands=0x2afcddc01998, get_value=-1)
at ../../../racket/gc2/../src/eval.c:2991
#17 0x00458603 in _scheme_apply_multi_from_native (
rator=optimized out, argc=1, argv=optimized out)
at ../../../racket/gc2/../src/schnapp.inc:87
#18 0x2afca87502fb in ?? ()
#19 0x2afcbe3260f0 in ?? ()
#20 0x2afcd7e34aa2 in ?? ()
#21 0x in ?? ()
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] seeing segfaults on build on 64-bit ubuntu

2012-07-26 Thread Danny Yoo
On Wed, Jul 25, 2012 at 7:07 AM, Matthew Flatt mfl...@cs.utah.edu wrote:
 This looks like a crash that I've seen, but only a couple of times over
 months. For the crash I saw, control was in libpixman via libcairo
 during the rendering of the Plot manual, but I haven't been able to
 replicate it to investigate further.

 Are you seeing the crash frequently? Can you get a core file and/or
 stack trace?


I'll try to get both tonight when I come home.  To get a core file and
a good stack trace during 'make install', what do I need to do?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Pre-Release Checklist for v5.3, second call

2012-07-26 Thread Danny Yoo
 * Danny Yoo d...@cs.wpi.edu
   - Whalesong Tests (confirm that Whalesong runs from PLaneT)

Just wanted to confirm that Whalesong in development is running under 5.2.900.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] seeing segfaults on build on 64-bit ubuntu

2012-07-24 Thread Danny Yoo
I'm seeing segfaults when trying to build the release on my uber
64-bit Ubuntu box.  (I'm on c9d0319a11cb2aae6d1e81d0c6465b4241a4ecff)


raco setup: 2 running: picturing-programs/picturing-programs.scrbl
raco setup: 1 running: plai/scribblings/plai.scrbl
raco setup: 2 running: planet/planet.scrbl
raco setup: 1 running: plot/scribblings/plot.scrbl
raco setup: 2 running: preprocessor/scribblings/preprocessor.scrbl
raco setup: 2 running: scribblings/quick/quick.scrbl
raco setup: 2 running: r5rs/r5rs.scrbl
Seg fault (internal error) at 0x2adfc19cb850
SIGSEGV SEGV_ACCERR SI_CODE 2 fault on 0x2adfc19cb850
Seg fault (internal error) at 0x2adfe25045a0
SIGSEGV SEGV_ACCERR SI_CODE 2 fault on 0x2adfe25045a0
Aborted (core dumped)
make[1]: *** [install-3m] Error 134
make[1]: Leaving directory `/home/dyoo/local/racket/src/build'



What can I do to help provide more debugging info?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] testing for v5.3

2012-07-23 Thread Danny Yoo
On Fri, Jul 20, 2012 at 2:55 PM, Ryan Culpepper r...@cs.utah.edu wrote:
 Just a reminder that testing for release v5.3 begins Monday.

Ok, understood!  Unfortunately, Whalesong won't initially have support
for submodules.

I'm currently addressing type errors that I'm getting from the new
verson of Typed Racket.  I'll let folks know if I can't resolve these
problems.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] building WeScheme using Eclipse

2012-06-17 Thread Danny Yoo
On Sat, Jun 16, 2012 at 5:01 PM, John Clements
cleme...@brinckerhoff.org wrote:
 I'm trying to build WeScheme locally, and wrestling with Eclipse. 
 Specifically, I've completed all of the steps given in the README, and I'm 
 now trying to figure out how to deploy it.  It appears to me that I'll need 
 to use Eclipse, in order to make use of the GWT resources that we installed 
 as part of an earlier step.

 1) Do I need to use eclipse to deploy it locally, or can I just do it using 
 something else… tomcat?
 2) If so, is there a reasonable way to import the whole project, instead of 
 manually going through, deleting resources from a sample project and 
 importing them directory-by-directory from my git repo?


It's tied to Eclipse and Google AppEngine.  You can load it into
Eclipse by importing it.  Do the following to import it into
Eclipse:

1.  Choose Import from the File menu.

2.  Select the General/File system option.  Select the toplevel
WeScheme directory in the file chooser.  Finish the import.

3.  When you rebuild the project, you may need to Quick Fix to
correct library dependencies, since the project depends on a few
Google Appengine libraries that might not have loaded properly during
the import.

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


  1   2   >