Re: [racket-dev] Proposal for a no-argument
On 07/01/2012 09:27 AM, Eli Barzilay wrote: There rare cases where it is useful to have a value that means that no argument was passed to a function. In many of these cases there is a plain value that is used as that mark, with the most idiomatic one being #f, but sometimes others are used. IMO, while such uses of #f are idiomatic, they're a hack where an argument's domain is extended only to mark no argument. I believe this is why CL lambda lists allow another variable name when specifying optional parameters. http://www.lispworks.com/documentation/HyperSpec/Body/03_dab.htm http://www.gigamonkeys.com/book/functions.html (defun f (optional (arg 'default-value arg-supplied?)) (if arg-supplied? 'real-value 'default-value)) Matlab's nargin and nargout are another interesting approach. http://www.mathworks.com/help/techdoc/ref/nargin.html http://www.mathworks.com/help/techdoc/ref/nargout.html A (supplied? arg) special form might also work. - Daniel _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] Racket 5.3 release branch doesn't build
I looked at this a little bit and it appears to be a bug in version/utils, specifically the version-integer function is not working correctly for the release version number. Robby On Wed, Jul 18, 2012 at 5:55 PM, Aleksej Saushev a...@inbox.ru wrote: Hello, Racket 5.3 release branch doesn't build on NetBSD 6.0_BETA2 i386: env CFLAGS=-O2 -pthread -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/freetype2 -Wall -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/freetype2 -I/usr/pkg/include -pthread LDFLAGS=-L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -pthread -pthread racket/racket3m -X /tmp/local-vcs/racket-rc/work/.destdir/usr/pkg/lib/racket/collects -N raco setup -l- setup--no-user raco setup: bootstrapping from source... : contract violation expected: real? given: #f argument position: 1st other arguments...: 0 context...: /tmp/local-vcs/racket-rc/work/.destdir/usr/pkg/lib/racket/collects/dynext/filename-version.rkt:14:4: loop /tmp/local-vcs/racket-rc/work/.destdir/usr/pkg/lib/racket/collects/dynext/filename-version.rkt: [running body] /tmp/local-vcs/racket-rc/work/.destdir/usr/pkg/lib/racket/collects/dynext/link-unit.rkt: [traversing imports] /tmp/local-vcs/racket-rc/work/.destdir/usr/pkg/lib/racket/collects/dynext/dynext-unit.rkt: [traversing imports] /tmp/local-vcs/racket-rc/work/.destdir/usr/pkg/lib/racket/collects/setup/setup-go.rkt: [traversing imports] /tmp/local-vcs/racket-rc/work/.destdir/usr/pkg/lib/racket/collects/setup/main.rkt: [running body] *** Error code 1 -- HE CE3OH... _ Racket Developers list: http://lists.racket-lang.org/dev _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] Racket 5.3 release branch doesn't build
Two hours ago, Robby Findler wrote: I looked at this a little bit and it appears to be a bug in version/utils, specifically the version-integer function is not working correctly for the release version number. Sorry, I forgot to push a version fix on the release branch -- done now. But note that there are some other issues with the release branch at the moment. As for `version-integer' it's working as it should -- returning #f on an invalid version instead of throwing an error. The problem is that the previous version on the release branch was broken: it was 5.2.900.0, and the version specs for X.Y.Z.W versions is W != 0. Maybe `version-integer' should have thrown an error instead, but it seems risky to change that behavior now. On the other hand, it seems reasonable to assume in code that (version-integer (version)) never returns #f, since the currently running racket is assumed to be fine. So I don't think that anything should be done (at least on the short term). There is a safety check though in the build script that verifies that the version is valid which should detect such problems early, but the release branch build failed for a different reason, and failed earlier than that check. (Just in case, I verified now that it would have killed the build with an error.) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life! _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] Racket 5.3 release branch doesn't build
Thanks, Eli. (I agree that version-integer's current behavior is the right one.) Robby On Thu, Jul 19, 2012 at 9:22 AM, Eli Barzilay e...@barzilay.org wrote: Two hours ago, Robby Findler wrote: I looked at this a little bit and it appears to be a bug in version/utils, specifically the version-integer function is not working correctly for the release version number. Sorry, I forgot to push a version fix on the release branch -- done now. But note that there are some other issues with the release branch at the moment. As for `version-integer' it's working as it should -- returning #f on an invalid version instead of throwing an error. The problem is that the previous version on the release branch was broken: it was 5.2.900.0, and the version specs for X.Y.Z.W versions is W != 0. Maybe `version-integer' should have thrown an error instead, but it seems risky to change that behavior now. On the other hand, it seems reasonable to assume in code that (version-integer (version)) never returns #f, since the currently running racket is assumed to be fine. So I don't think that anything should be done (at least on the short term). There is a safety check though in the build script that verifies that the version is valid which should detect such problems early, but the release branch build failed for a different reason, and failed earlier than that check. (Just in case, I verified now that it would have killed the build with an error.) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life! _ Racket Developers list: http://lists.racket-lang.org/dev
[racket-dev] racket/gui performance problem when using lots of items in table-panels
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I've been having some performance problems when using lots of items in table-panels[1]. Switching tabs when running the following example exhibits the problem. Can anything be done about it? Marijn #lang racket/gui ;(require (planet williams/table-panel:1:1/table-panel)) (require table-panel.rkt) ;;; The top-level frame (define frame (new frame% (label Table Panel Perf Test) (width 500) (height 500))) (define (current-root-tab) (vector-ref root-tab-vector (send root-tab-panel get-selection)) ) (define (delete-all-children area) (send area change-children (lambda (children) '())) ) (define (root-tab-callback tab-panel event) (send root-tab-panel change-children (lambda (children) (list (current-root-tab ) (define root-tab-panel (new tab-panel% (choices '()#;tab-names) (parent frame) (callback root-tab-callback))) (define nr-rows 30) (define nr-cols 20) (define on-show-refresh-panel% (class table-panel% (init-field refresher) (super-new) (define/override (on-superwindow-show shown?) (when shown? (displayln refreshing!) (refresher))) )) (define tab1 (new panel% (parent root-tab-panel))) (define (build-tab2) (delete-all-children tab2) (for* ((r nr-rows) (c nr-cols)) (new button% (parent tab2) (label (format ~a,~a r c)) (stretchable-width #t) (stretchable-height #t) (callback (lambda (button event) (printf ~a~n (send button get-label ) )) (define tab2 (new on-show-refresh-panel% (parent root-tab-panel) (style '(deleted)) (alignment '(center center)) (dimensions `(,nr-cols ,nr-rows)) (refresher build-tab2))) (define tabs `((,tab1 . Tab 1) (,tab2 . Tab 2))) (define tab-names (map cdr tabs)) (define root-tab-vector (list-vector (map car tabs))) (send root-tab-panel set tab-names) (send frame show #t) [1]:http://planet.racket-lang.org/display.ss?package=table-panel.pltowner=williams -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlAIIMoACgkQp/VmCx0OL2x3CgCbBhGkCCroHrEj1giTYA7KYhC4 3sgAoMLUC6S+zouYY4kXm4HFca85odPG =n8MG -END PGP SIGNATURE- _ Racket Developers list: http://lists.racket-lang.org/dev
[racket-dev] contract error message in 'system'
Someone ran across something like the below and shared it with me: (system x\0y) system: contract violation expected: (or/c (and/c string? (lambda (s) (not (memv #\nul (string-list s) (and/c bytes? (lambda (bs) (not (memv 0 (bytes-list bs)) given: x\uy I can read it and I know what it says. BUT, I think for a casual novice scripter who encounters this kind of message, it is difficult to scrutinize and understand, especially when an English phrase -- say a string or byte-string without nul character -- would have served just as well. Is it okay if I change this and push a fix in 'systems.rkt'? -- Matthias _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] racket/gui performance problem when using lots of items in table-panels
I think the problem is the time it takes to create 600 buttons in this case, not the time needed to switch between the tabs. I'm not sure why you are recreating them each refresh. Am I missing something? Doug On Thu, Jul 19, 2012 at 8:59 AM, Marijn hk...@gentoo.org wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I've been having some performance problems when using lots of items in table-panels[1]. Switching tabs when running the following example exhibits the problem. Can anything be done about it? Marijn #lang racket/gui ;(require (planet williams/table-panel:1:1/table-panel)) (require table-panel.rkt) ;;; The top-level frame (define frame (new frame% (label Table Panel Perf Test) (width 500) (height 500))) (define (current-root-tab) (vector-ref root-tab-vector (send root-tab-panel get-selection)) ) (define (delete-all-children area) (send area change-children (lambda (children) '())) ) (define (root-tab-callback tab-panel event) (send root-tab-panel change-children (lambda (children) (list (current-root-tab ) (define root-tab-panel (new tab-panel% (choices '()#;tab-names) (parent frame) (callback root-tab-callback))) (define nr-rows 30) (define nr-cols 20) (define on-show-refresh-panel% (class table-panel% (init-field refresher) (super-new) (define/override (on-superwindow-show shown?) (when shown? (displayln refreshing!) (refresher))) )) (define tab1 (new panel% (parent root-tab-panel))) (define (build-tab2) (delete-all-children tab2) (for* ((r nr-rows) (c nr-cols)) (new button% (parent tab2) (label (format ~a,~a r c)) (stretchable-width #t) (stretchable-height #t) (callback (lambda (button event) (printf ~a~n (send button get-label ) )) (define tab2 (new on-show-refresh-panel% (parent root-tab-panel) (style '(deleted)) (alignment '(center center)) (dimensions `(,nr-cols ,nr-rows)) (refresher build-tab2))) (define tabs `((,tab1 . Tab 1) (,tab2 . Tab 2))) (define tab-names (map cdr tabs)) (define root-tab-vector (list-vector (map car tabs))) (send root-tab-panel set tab-names) (send frame show #t) [1]:http://planet.racket-lang.org/display.ss?package=table-panel.pltowner=williams -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlAIIMoACgkQp/VmCx0OL2x3CgCbBhGkCCroHrEj1giTYA7KYhC4 3sgAoMLUC6S+zouYY4kXm4HFca85odPG =n8MG -END PGP SIGNATURE- _ Racket Developers list: http://lists.racket-lang.org/dev _ Racket Developers list: http://lists.racket-lang.org/dev
[racket-dev] props script
Does anyone know what this means from the props script? [robby@yanpu] ~/git/plt/collects/meta$ ./props Root: /Users/robby/git/plt/... .DS_Store: no responsible DrRacket.app: no responsible GRacket.app: no responsible PLT Games.app: no responsible Racket Documentation.app: no responsible Search Magic.app: no responsible Set Fonts.app: no responsible SirMail.app: no responsible Slideshow.app: no responsible Stopwatch.app: no responsible Webcam.app: no responsible collects/.DS_Store: no responsible collects/combinator-parser: no responsible collects/guibuilder: no responsible collects/srpersist: no responsible collects/tex2page: no responsible collects/waterworld: no responsible collects/tests/aligned-pasteboard: no responsible collects/tests/plot: no responsible collects/tests/typed-scheme: no responsible props: 20 path errors [robby@yanpu] ~/git/plt/collects/meta$ _ Racket Developers list: http://lists.racket-lang.org/dev
[racket-dev] Planning for RacketCon 2012
We're planning on holding the second version of RacketCon at Northeastern in Boston this fall. This will be a one-day event, featuring both short talks and tutorials. To choose a date that works for the most people, we need your feedback. Here: http://www.doodle.com/6fk3avrf2vypici5 is a quick poll on which dates (all Saturdays) you would be interested in attending RacketCon. Please vote soon so that we can make appropriate plans. ## The Agenda This year, RacketCon will feature 3 2-hour tutorial sessions, as well as a series of short talks about development in and of Racket over the last year. Potential tutorial sessions include: * Building a new domain-specific language using syntactic extension * Using contracts in application development * Adding types to an existing application with Typed Racket * Parallelizing Racket applications with futures and places Potential talks include: * submodules * WhaleSong * futures and visualization * distributed places * optimization coaching * Dracula and ACL2 * PLT Redex If you would be interested in giving a 10 minute talk at RacketCon on something you've built in or for Racket, or you have any other questions, please send email to racket...@racket-lang.org . Sam Tobin-Hochstadt _ Racket Developers list: http://lists.racket-lang.org/dev
[racket-dev] Official PLaneT account?
Hi all, I heard rumours that there was once an official PLT PLaneT account intended for packages maintained by the dev team. Does anyone know if it exists and how to go about getting access to it? I was thinking that it'd be more appropriate to put the 'parser-combinator' and 'tex2page' packages under such an account rather than under mine. Cheers, Asumu _ Racket Developers list: http://lists.racket-lang.org/dev