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

2011-08-17 Thread Marijn
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 08/16/11 20:54, Stephen Bloch wrote:
 Wouldn't it be even better to put curly-braces around the body of the
 C macro, so people using it don't have to know that it expands into
 multiple statements?

I read a long time ago (I think it was on LWN, but I can't find the
article) about some tricks that are used in the linux kernel to mitigate
weaknesses of the C preprocessor. You wrap multiple statement macros in
do { } while(0), so that you don't have to think about whether you
need curly braces and it will absorb (and need) a semicolon, so that it
won't break your if-statements. You can read more about it here:

https://www.securecoding.cert.org/confluence/display/seccode/PRE10-C.+Wrap+multi-statement+macros+in+a+do-while+loop

HTH,

Marijn

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5LgLEACgkQp/VmCx0OL2xATgCeIdh5rtE6SqCmKXZ6UYxBBTDV
1xIAoLlXT3M9od0S1T3pNnoO0b8jAu+d
=Ea5K
-END PGP SIGNATURE-
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


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

2011-08-17 Thread Casey Klein
On Wed, Aug 17, 2011 at 7:23 AM,  mfl...@racket-lang.org wrote:
 mflatt has updated `master' from a221e4bba2 to dfd58a2cdd.
  http://git.racket-lang.org/plt/a221e4bba2..dfd58a2cdd

 =[ 1 Commits ]==

 Directory summary:
  91.2% collects/racket/
   8.7% collects/tests/racket/

 ~~

 dfd58a2 Matthew Flatt mfl...@racket-lang.org 2011-08-17 06:18
 :
 | adjust sandbox to give S-expression input original status
 :
  M collects/racket/sandbox.rkt        |   19 ---
  M collects/tests/racket/sandbox.rktl |    5 +

 =[ Overall Diff ]===

 collects/racket/sandbox.rkt
 ~~~
 --- OLD/collects/racket/sandbox.rkt
 +++ NEW/collects/racket/sandbox.rkt
 @@ -474,11 +474,24 @@
                       (loop (cdr inps) (and n (add1 n))
                             ;; 1st at line#1, pos#1, 2nd at line#2, pos#2 etc
                             ;; (starting from the `n' argument)
 -                            (cons (datum-syntax
 -                                   #f (car inps)
 -                                   (list source n (and n 0) n (and n 1)))
 +                            (cons (add-location (car inps)
 +                                                (list source n (and n 0) n 
 (and n 1)))

Why does syntax always get column 0 and position 1 (if they're set at all)?

                                   r]

 +(define orig-stx (read-syntax 'src (open-input-string 0))) ; for is 
 original? property
 +(define (make-orig x loc) (datum-syntax #f x loc orig-stx))
 +
 +(define (add-location x loc)
 +  (cond
 +   [(null? x) null]
 +   [(pair? x) (make-orig (cons (add-location (car x) loc)
 +                               (add-location (cdr x) loc))
 +                         loc)]
 +   [(vector? x) (make-orig (for/vector ([i (in-vector x)])
 +                             (add-location i loc))
 +                           loc)]
 +   [else (make-orig x loc)]))
 +
  (define ((init-hook-for-language language))
   (cond [(or (not (pair? language))
              (not (eq? 'special (car language

 collects/tests/racket/sandbox.rktl
 ~~
 --- OLD/collects/tests/racket/sandbox.rktl
 +++ NEW/collects/tests/racket/sandbox.rktl
 @@ -493,6 +493,11 @@
         =err out of mem+o(?:ry)
         b = 1))

 +   --top--
 +   (make-base-evaluator!)
 +   --eval--
 +   (syntax-original? #'x) = #t
 +
    ))

  (report-errs)


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


[racket-dev] SSL problem with the webserver?

2011-08-17 Thread Kathi Fisler
I've just updated a web app that used to run under 4.0.1 to 5.1.3.
Now, when we start up the app with ssl/https, I get the error below.

Anyone experienced with SSL clients recognize the problem here?

thanks,
Kathi

-
SSLv23_client_method: implementation not found; no arguments provided

 === context ===
/home/turnin/plt-5.1.3/lib/racket/collects/openssl/mzssl.rkt:322:2:
ssl-make-client-context
/home/turnin/plt-5.1.3/lib/racket/collects/web-server/web-server.rkt:52:0: core
/home/turnin/plt-5.1.3/lib/racket/collects/web-server/servlet-dispatch.rkt:81:0:
core
/home/turnin/turnin/startup.rkt: [running body]
--
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] SSL problem with the webserver?

2011-08-17 Thread Jay McCarthy
This means that the underlying libssl can't be found at the correct
version. These are the versions it looks for:

 (ffi-lib libssl-so '( 1.0 1.0.0a 0.9.8b 0.9.8 0.9.7)

which do you have? Is it in a place that Racket can find it?

Jay

On Wed, Aug 17, 2011 at 1:46 PM, Kathi Fisler kfis...@gmail.com wrote:
 I've just updated a web app that used to run under 4.0.1 to 5.1.3.
 Now, when we start up the app with ssl/https, I get the error below.

 Anyone experienced with SSL clients recognize the problem here?

 thanks,
 Kathi

 -
 SSLv23_client_method: implementation not found; no arguments provided

  === context ===
 /home/turnin/plt-5.1.3/lib/racket/collects/openssl/mzssl.rkt:322:2:
 ssl-make-client-context
 /home/turnin/plt-5.1.3/lib/racket/collects/web-server/web-server.rkt:52:0: 
 core
 /home/turnin/plt-5.1.3/lib/racket/collects/web-server/servlet-dispatch.rkt:81:0:
 core
 /home/turnin/turnin/startup.rkt: [running body]
 --
 _
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev




-- 
Jay McCarthy j...@cs.byu.edu
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

The glory of God is Intelligence - DC 93

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

Re: [racket-dev] [racket-bug] all/11778: check syntax does not work with path-up

2011-08-17 Thread Matthias Felleisen

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

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


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

THANK YOU ROBBY -- Matthias

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


Re: [racket-dev] sporadic failure when building PLaneT docs

2011-08-17 Thread Robby Findler
Is this the released 5.1.3? (so it doesn't have the recent change I
made to the planet module name resolver)?

Robby

On Wed, Aug 17, 2011 at 3:44 PM, Danny Yoo d...@cs.wpi.edu wrote:
 I'm seeing the following error message when I'm compiling Whalesong:

 
 require: unknown module: 'program
 raco setup: error: during Building docs for
 /home/dyoo/.racket/planet/300/5.1.3/cache/dyoo/closure-compile.plt/1/2/manual.scrbl
 


 Wait, that's odd!  I thought that my closure-compile package compiled
 cleanly.  I tested this!



 I removed the closure-compile.plt package, and then tried reinstalling
 that package directly.  To my dismay: I couldn't reproduce the error:
 the transcript below shows that I don't get a error about unknown
 module:

 
 dyoo@kfisler-ra1:~$ planet install dyoo closure-compile.plt 1 2
 downloading dyoo/closure-compile:1 from planet.racket-lang.org via HTTP

 = Installing closure-compile.plt on Wed, 17 Aug 2011
 16:27:15 =
 raco setup: Unpacking archive from
 /home/dyoo/.racket/planet/300/packages/dyoo/closure-compile.plt/1/2/closure-compile.plt
 raco setup:   unpacking COPYING in
 /home/dyoo/.racket/planet/300/5.1.3/cache/dyoo/closure-compile.plt/1/2/./
 raco setup:   unpacking compiler.jar in
 /home/dyoo/.racket/planet/300/5.1.3/cache/dyoo/closure-compile.plt/1/2/./
 raco setup:   unpacking info.rkt in
 /home/dyoo/.racket/planet/300/5.1.3/cache/dyoo/closure-compile.plt/1/2/./
 raco setup:   unpacking main.rkt in
 /home/dyoo/.racket/planet/300/5.1.3/cache/dyoo/closure-compile.plt/1/2/./
 raco setup:   unpacking manual.html in
 /home/dyoo/.racket/planet/300/5.1.3/cache/dyoo/closure-compile.plt/1/2/./
 raco setup:   unpacking manual.scrbl in
 /home/dyoo/.racket/planet/300/5.1.3/cache/dyoo/closure-compile.plt/1/2/./
 raco setup:   making directory planet-docs in
 /home/dyoo/.racket/planet/300/5.1.3/cache/dyoo/closure-compile.plt/1/2/./
 raco setup:   making directory manual in
 /home/dyoo/.racket/planet/300/5.1.3/cache/dyoo/closure-compile.plt/1/2/./planet-docs/
 raco setup:   unpacking index.html in
 /home/dyoo/.racket/planet/300/5.1.3/cache/dyoo/closure-compile.plt/1/2/./planet-docs/manual/
 raco setup:   unpacking racket.css in
 /home/dyoo/.racket/planet/300/5.1.3/cache/dyoo/closure-compile.plt/1/2/./planet-docs/manual/
 raco setup:   unpacking scribble-common.js in
 /home/dyoo/.racket/planet/300/5.1.3/cache/dyoo/closure-compile.plt/1/2/./planet-docs/manual/
 raco setup:   unpacking scribble-style.css in
 /home/dyoo/.racket/planet/300/5.1.3/cache/dyoo/closure-compile.plt/1/2/./planet-docs/manual/
 raco setup:   unpacking scribble.css in
 /home/dyoo/.racket/planet/300/5.1.3/cache/dyoo/closure-compile.plt/1/2/./planet-docs/manual/
 raco setup:   unpacking racket.css in
 /home/dyoo/.racket/planet/300/5.1.3/cache/dyoo/closure-compile.plt/1/2/./
 raco setup:   unpacking scribble-common.js in
 /home/dyoo/.racket/planet/300/5.1.3/cache/dyoo/closure-compile.plt/1/2/./
 raco setup:   unpacking scribble-style.css in
 /home/dyoo/.racket/planet/300/5.1.3/cache/dyoo/closure-compile.plt/1/2/./
 raco setup:   unpacking scribble.css in
 /home/dyoo/.racket/planet/300/5.1.3/cache/dyoo/closure-compile.plt/1/2/./
 raco setup: version: 5.1.3 [3m]
 raco setup: variants: 3m
 raco setup: main collects: /home/dyoo/local/racket-5.1.3/collects
 raco setup: collects paths:
 raco setup:   /home/dyoo/.racket/5.1.3/collects
 raco setup:   /home/dyoo/local/racket-5.1.3/collects
 raco setup: --- pre-installing collections ---
 raco setup: --- compiling collections ---
 raco setup: making: planet/dyoo/closure-compile.plt/1/2 (closure-compile)
 raco setup:  in planet/dyoo/closure-compile.plt/1/2
 raco setup: making: planet/dyoo/closure-compile.plt/1/2/planet-docs
 raco setup: making: planet/dyoo/closure-compile.plt/1/2/planet-docs/manual
 raco setup: --- updating info-domain tables ---
 raco setup: updating: /home/dyoo/.racket/planet/300/5.1.3/cache.rktd
 raco setup: --- creating launchers ---
 raco setup: --- building documentation ---
 raco setup: running: planet/dyoo/closure-compile.plt/1/2/manual.scrbl
 raco setup: rendering: planet/dyoo/closure-compile.plt/1/2/manual.scrbl
 raco setup: --- installing collections ---
 raco setup: --- post-installing collections ---
 - Rebuilding documentation index -
 raco setup: version: 5.1.3 [3m]
 raco setup: variants: 3m
 raco setup: main collects: /home/dyoo/local/racket-5.1.3/collects
 raco setup: collects paths:
 raco setup:   /home/dyoo/.racket/5.1.3/collects
 raco setup:   /home/dyoo/local/racket-5.1.3/collects
 raco setup: --- pre-installing collections ---
 raco setup: --- compiling collections ---
 raco setup: making: scribblings/main/user
 raco setup: --- updating info-domain tables ---
 raco setup: --- creating launchers ---
 

Re: [racket-dev] [racket-bug] all/11778: check syntax does not workwith path-up

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

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


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

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


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

THANK YOU ROBBY -- Matthias

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


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


[racket-dev] Scribble does not complain when @tech{term} is used but not defined

2011-08-17 Thread Jay McCarthy
Is there a subtle reason to not error? I've just seeded a file with a
lot of @tech{} uses and I was hoping to get a big list of errors as a
to-define list.

I looked at the code and found a commented-out error printing in the
HTML renderer. I think it would be great to re-enable it, perhaps with
a command line flag for the original objector?

What's the scoop?

Jay

-- 
Jay McCarthy j...@cs.byu.edu
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

The glory of God is Intelligence - DC 93
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] sporadic failure when building PLaneT docs

2011-08-17 Thread Danny Yoo
On Wednesday, August 17, 2011, Robby Findler ro...@eecs.northwestern.edu
wrote:
 Is this the released 5.1.3? (so it doesn't have the recent change I
 made to the planet module name resolver)?

Yes, I'm running on 5.1.3.
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] syntax property duplication

2011-08-17 Thread Sam Tobin-Hochstadt
The following idiom duplicates the syntax properties on `stx':

  (define-syntax (m stx) (datum-syntax #'here 'id stx stx))

This is a problem for me because I use syntax properties to indicate
polymorphic type instantiation.  If an expression that's actually a
macro using this idiom is instatiated, then Typed Racket tries to do
the type instantiation twice, resulting in an error.  See the below
program, which fails.

Should I expect that duplicate syntax properties are a natural result
of expansion, and find some way to handle them?  Or is there something
else that should happen?

#lang typed/racket
(: id : (All (A) (A - A)))
(define (id x) x)
(define-syntax (m stx) (datum-syntax #'here 'id stx stx))
(inst m Integer)

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


Re: [racket-dev] getting oops, internal error messages when updating PLaneT packages

2011-08-17 Thread Robby Findler
I think I found the bug. The problem I found was that, during the
creation of the rss feed (the rss feed shows the recently added
packages), the planet server was not being careful enough to guard
against bad xexprs in package info.rkt files.

Well, I didn't find any packages that would actually lead to that
specific error which is a bit mysterious, but the error at that spot
is consistent with you seeing the package actually be uploaded
successfully (and the logfile that I can see), and is the only place
where I see a call to that function (which is actually named
write-xml/content) with non-checked input.

So hopefully you won't see that error anymore. Thanks for the report.

Robby

On Mon, Aug 15, 2011 at 6:21 PM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 I think that this is the relevant part of the log, showing the error:

  Monday, August 15th, 2011 5:38:17pm:
   write-xml-content: received ()
  Monday, August 15th, 2011 6:02:19pm:
   write-xml-content: received ()

 I'm not seeing a stacktrace (probably because I have a bug in my
 logging). I don't see anything obviously wrong with the packages,
 either.

 I'll have to look into this more later on but at least for the moment,
 I think that things are in shape. Please let me know if you spot
 something wrong (as that would be a clue as to where that error is
 coming from!).

 Thanks,
 Robby

 On Mon, Aug 15, 2011 at 5:04 PM, Danny Yoo d...@cs.wpi.edu wrote:
 I'm updating a few of my PLaneT packages and trying to eliminate
 compile-time errors that have been bugging the heck out of me.  When I
 update the package, I'm seeing the following error message from
 PLaneT's web site:

 ---

 Oops! An internal error occured. The problem has been logged, but if
 you have any further information to report, please email
 pla...@racket-lang.org.

 ---

 I've updated both my version-case.plt and closure-compile.plt
 libraries today.  Is there any other debugging information I can
 provide?
 _
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev



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

Re: [racket-dev] Scribble does not complain when @tech{term} is used but not defined

2011-08-17 Thread Matthias Felleisen

I would prefer not to get an error so that I can compile modules independently. 


On Aug 17, 2011, at 5:58 PM, Jay McCarthy wrote:

 Is there a subtle reason to not error? I've just seeded a file with a
 lot of @tech{} uses and I was hoping to get a big list of errors as a
 to-define list.
 
 I looked at the code and found a commented-out error printing in the
 HTML renderer. I think it would be great to re-enable it, perhaps with
 a command line flag for the original objector?
 
 What's the scoop?
 
 Jay
 
 -- 
 Jay McCarthy j...@cs.byu.edu
 Assistant Professor / Brigham Young University
 http://faculty.cs.byu.edu/~jay
 
 The glory of God is Intelligence - DC 93
 _
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


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