Re: [racket-dev] read-line performance problem
Racket can do this somewhat faster, but I suggest any effort be focused on improvements that are also relevant to substantial programs, and not on trying to compete on Perl one-liners and poor benchmarks. Details follow... Trying this 'benchmark' on a 700MB log file (just Linux "dmesg" output, duplicated many times), I saw somewhat comparable numbers with Racket 5.x as those on Stackoverflow. (This was on Linux on an old 2GHz laptop, no swap space, and the kernel had cached the 700MB in RAM buffer, so it was just Racket pegging a CPU core at 100%.) Using a "regexp-match" was significantly faster than "read-bytes-line", but I'm sure still slower than the other languages mentioned. The process size stayed at 40MB total (shared libraries and everything). It looked like there were near-constant quick GC cycles. GC tuning might help? This would be a more useful benchmark if it required actually doing something plausible with the allocations, rather than immediately throwing them away and doing no actual processing. I suspect Racket would perform relatively better on something closer to a real-world task. Were I writing high-performance I/O code, I might use "read-bytes-avail!", to try to reduce allocations. Of course, sys-admins would not be doing this for quick scripting Perl-like tasks. (Were we to max out what we can do with GC tuning and optimizations, we could always try making a minilanguage for this traditional Perl-like task, which optimized away some allocations, such as by allocating only text that we use.) Matching Perl I/O performance would be nice, but I'm not disappointed if nobody does. Perl was originally developed for pretty much this exact task (i.e., going through a line-oriented text-ish data file, applying a regexp to each line) and to be fast even on a 16MHz 4MB Sun 3/50 of over 20 years ago. Also, I think we discussed this a while ago (perhaps when making the few-liner examples for the new Web site), but I think that nobody will win over any Perl programmers by trying to get their language to do 20-year-old Perl one-liners. This program is a handful of characters in Perl, and telling people that they could be typing "lambda" and parentheses and such instead, and wouldn't that be so much better, makes one look like a crazy person. Focus on things that are *not* Perl one-liners, but are substantial programs -- especially ones that benefit from syntactic extension, functional-ish programming, and maintainability -- since that's where Racket becomes a smart tool of smart people, and where Perl becomes a burden of crazy people. With that in mind, from a PR perspective, if a Perl-type person asks you, "What does this Perl one-liner look like in Racket?", the preferred responses are: (1) "That task looks like what Perl is good at"; (2) do as politicians do, and answer the question that you wish you had been asked; (3) pretend to speak only Swahili and to not understand the question. Sam Tobin-Hochstadt wrote at 11/02/2011 07:14 PM: On StackOverflow [1], someone reported that Racket's I/O performance on large files was substantially worse than other languages for a simple task. I haven't yet tried it on a similarly large volume of data, but I did see a performance difference relative to Chicken for large but not huge files, and Ryan seems to have gotten similar results. [1] http://stackoverflow.com/questions/7946745/i-o-performance-in-mzscheme -- http://www.neilvandyke.org/ _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Release Announcement for v5.2, second call
On 11/02/2011 03:31 PM, Eli Barzilay wrote: Just now, Sam Tobin-Hochstadt wrote: On Wed, Nov 2, 2011 at 5:24 PM, Eli Barzilay wrote: * The `plot' collection has been reimplemented in Racket. It now offers PDF output, log axes, histograms, and more. Some code that uses `plot' will still work, and some will need light porting. The `plot/compat' module offers expedient backward compatibility. "offers full backward compatibility". Defer to Neil: IIUC, it's not "full". That's correct. I didn't emulate `plot/extend'. (Not that it's a big deal.) Also, "expedient" is like "convenient" or "practical", but connotes suboptimality at best and immorality at worst. It's exactly the right word. Neil T _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] read-line performance problem
On StackOverflow [1], someone reported that Racket's I/O performance on large files was substantially worse than other languages for a simple task. I haven't yet tried it on a similarly large volume of data, but I did see a performance difference relative to Chicken for large but not huge files, and Ryan seems to have gotten similar results. [1] http://stackoverflow.com/questions/7946745/i-o-performance-in-mzscheme -- sam th sa...@ccs.neu.edu _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Release Announcement for v5.2
On Wed, Nov 2, 2011 at 10:50 AM, Eli Barzilay wrote: >> > * DrRacket comes with an experimental, on-line check syntax >> > function. By default, it is turned off. To turn it on, right >> > click on the red circle in the buttom right corner of the >> > DrRacket window. Warning: turning this on makes DrRacket less >> > stable. >> >> This belongs in the major items category -- it's certainly more >> significant than the changes to Typed Racket, for example. > > It's there intentionally -- so I'll leave it for Robby's decision. > It is a significant feature, but also disabled by default for now. So I think near the top of the list or not in the list at all are appropriate places for it. Robby _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Release Announcement for v5.2, second call
A few minutes ago, Sam Tobin-Hochstadt wrote: > On Wed, Nov 2, 2011 at 5:31 PM, Eli Barzilay wrote: > > > >> > - Typed Racket now supports defining function with optional > >> > arguments using the same syntax as Racket. > >> > >> > * Fixed several GUI problems, including problems on Ubuntu > >> > 11.10 (GTK+ 3) and 64-bit Mac OS X. > >> > >> This should go right after 'raco link'. > > > > Any reason? (I've put it near the end since it's not really > > something that has new functionality like the others in the `raco > > link' neighborhood.) > > Just because it's a significant bug fix -- without it, we look > pretty bad, and we should alert our users that it's fixed. OK, but the information is still there -- and I prefer coherent text. Anyone cares to second either side? -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life! _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Release Announcement for v5.2, second call
On Wed, Nov 2, 2011 at 5:31 PM, Eli Barzilay wrote: > >> > - Typed Racket now supports defining function with optional >> > arguments using the same syntax as Racket. >> >> > * Fixed several GUI problems, including problems on Ubuntu 11.10 >> > (GTK+ 3) and 64-bit Mac OS X. >> >> This should go right after 'raco link'. > > Any reason? (I've put it near the end since it's not really something > that has new functionality like the others in the `raco link' > neighborhood.) Just because it's a significant bug fix -- without it, we look pretty bad, and we should alert our users that it's fixed. -- sam th sa...@ccs.neu.edu _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Release Announcement for v5.2, second call
Just now, Sam Tobin-Hochstadt wrote: > On Wed, Nov 2, 2011 at 5:24 PM, Eli Barzilay wrote: > > > * The `plot' collection has been reimplemented in Racket. It now > > offers PDF output, log axes, histograms, and more. Some code that > > uses `plot' will still work, and some will need light porting. > > The `plot/compat' module offers expedient backward compatibility. > > "offers full backward compatibility". Defer to Neil: IIUC, it's not "full". > > - Typed Racket now supports defining function with optional > > arguments using the same syntax as Racket. > > > * Fixed several GUI problems, including problems on Ubuntu 11.10 > > (GTK+ 3) and 64-bit Mac OS X. > > This should go right after 'raco link'. Any reason? (I've put it near the end since it's not really something that has new functionality like the others in the `raco link' neighborhood.) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life! _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Release Announcement for v5.2, second call
On Wed, Nov 2, 2011 at 5:24 PM, Eli Barzilay wrote: > * The `plot' collection has been reimplemented in Racket. It now > offers PDF output, log axes, histograms, and more. Some code that > uses `plot' will still work, and some will need light porting. > The `plot/compat' module offers expedient backward compatibility. "offers full backward compatibility". > - Function definitions with optional arguments now work. This line should be deleted, it's replaced by the one below. > - Typed Racket now supports defining function with optional > arguments using the same syntax as Racket. > * Fixed several GUI problems, including problems on Ubuntu 11.10 > (GTK+ 3) and 64-bit Mac OS X. This should go right after 'raco link'. -- sam th sa...@ccs.neu.edu _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] Release Announcement for v5.2, second call
All edits are in this version. -- Release highlights: * The new `db' library offers a high-level, functional interface to popular relational database systems, including PostgreSQL, MySQL, and SQLite, as well as other systems via ODBC. * A new XREPL collection provides convenient commands for a plain racket REPL. It is particularly convenient for people who prefer console-based work and alternative editors. See also the new chapter on command-line tools and other editors at the end of the Racket Guide. * The `plot' collection has been reimplemented in Racket. It now offers PDF output, log axes, histograms, and more. Some code that uses `plot' will still work, and some will need light porting. The `plot/compat' module offers expedient backward compatibility. * DrRacket uses more conventional key bindings: `C-t' creates a new tab, `C-w' closes the current one, and `C-r' runs the definitions. On Mac OS X, the Command key is used. See "Defining Custom Shortcuts" in the DrRacket manual for an example that uses the old key bindings. * The new `raco link' command registers a directory as a collection, which allows the collection directory to reside outside the "collects" tree and without changing the PLTCOLLECTS environment variable. * Support for `begin-for-syntax' has been generalized; modules may now define and export both value bindings and syntax bindings (macros) at phase 1 and higher. * Typed Racket: - Typed Racket provides static performance debugging support to show which code gets optimized and point out code that does not. Use the "Performance Report" button in DrRacket. - More intuitive types in printouts in the REPL and in error messages. Use `:query-result-type' to explore types, or `:print-type' for a full printout. - Function definitions with optional arguments now work. - Typed Racket now supports defining function with optional arguments using the same syntax as Racket. * Redex now supports specifying (and testing and automatically typesetting) judgment forms including type systems and SOS-style operational semantics. * Fixed several GUI problems, including problems on Ubuntu 11.10 (GTK+ 3) and 64-bit Mac OS X. * Internal-definition expansion has changed to use `let*' semantics for sequences that contain no back references. This change removes a performance penalty for using internal definitions instead of `let' in common cases, and it only changes the meaning of programs that capture continuations in internal definitions. Internal definitions are now considered preferable in style to `let'. Additional items: * DrRacket comes with an experimental, on-line check syntax function. By default, it is turned off. To turn it on, right click on the red circle in the buttom right corner of the DrRacket window. Warning: turning this on makes DrRacket less stable. * The `racket/gui' library (and Slideshow) provides more support for multiple-screen displays. * DrRacket remembers whether an opened file used LF or CRLF line endings, and will continue using the same. When creating a new file, a preference determines how it is saved. * `net/url' can now follow HTTP redirections. * The LNCS and JFP class files are no longer distributed with Racket. Instead, they are downloaded on demand. * The Algol language implementation is now available as a plain language using `#lang algol60'. * The Racket-to-C compiler (as accessed via `raco ctool' or `mzc') has been removed; Racket's JIT has long provided better performance, and the FFI provides better access to C libraries. * Contracts can be applied to exports with the new `contract-out' form within `provide', instead of a separate `provide/contract' form. (The new `contract-out' form is implemented as a new kind of "provide pre-transformer".) * The `date*' structure type is an extension of `date' with `nanosecond' and `time-zone-name' fields. * New looping constructs: `for/sum' and `for/product'. * Direct calls to keyword-accepting functions are now optimized to eliminate the overhead of keywords. In addition, the compiler detects and logs warnings for keyword-argument mismatches. * The libfit interface is available from `plot/deprecated/fit', and will be removed in the near future. * The Unix installer has been re-done, and it is now more robust. * The built-in reader and printer support for Honu is removed. (This functionality is re-implemented in Racket.) -- -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life! _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Release Announcement for v5.2
On Wed, Nov 2, 2011 at 11:06 AM, Eli Barzilay wrote: > * A new XREPL collection provides convenient commands for uses of > plain racket. Is that supposed to be "commands for users"? -- James GPG Key: 1024D/61326D40 2003-09-02 James McCoy _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Release Announcement for v5.2
On 11/02/2011 09:06 AM, Eli Barzilay wrote: The release announcement sketch is finally ready, apologies for the delay. It should be close to being a final version, and I'll probably proceed with the release tonight -- so if there are any issues with it, please reply soon. -- Racket version 5.2 is now available from http://racket-lang.org/ Release highlights: ... * The `plot' collection has been completely re-implemented in Racket, and offers more functionality. Some old code that uses `plot' will continue working, and some will need to use the `plot/compat' library. Can we go with this? * The `plot' collection has been reimplemented in Racket. It now offers PDF output, log axes, histograms, and more. Some code that uses `plot' will still work, and some will need light porting. The `plot/compat' module offers expedient backward compatibility. This names some of the new features, mentions porting, and frowns slightly upon using `plot/compat'. :) Neil T _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Release Announcement for v5.2
At Wed, 2 Nov 2011 11:50:25 -0400, Eli Barzilay wrote: > 20 minutes ago, Sam Tobin-Hochstadt wrote: > > > * Fixed several GUI problems. > > > > This should explicitly mention Ubuntu 11.10/GTK3, and go ahead of > > most of the others. > > I'll leave this for Matthew to decide. (There were a bunch of such > things.) * Fixed several GUI problems, including problems on Ubuntu 11.10 (GTK+ 3) and 64-bit Mac OS X. _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Release Announcement for v5.2
20 minutes ago, Sam Tobin-Hochstadt wrote: > On Wed, Nov 2, 2011 at 11:06 AM, Eli Barzilay wrote: > > > * The new db library offers a high-level, functional interface to > > popular relational database systems, including PostgreSQL, MySQL, > > and SQLite, as well as other systems via ODBC. > > I think this should go first, ahead of XREPL. Swapped. > > * Fixed several GUI problems. > > This should explicitly mention Ubuntu 11.10/GTK3, and go ahead of > most of the others. I'll leave this for Matthew to decide. (There were a bunch of such things.) > > * DrRacket comes with an experimental, on-line check syntax > > function. By default, it is turned off. To turn it on, right > > click on the red circle in the buttom right corner of the > > DrRacket window. Warning: turning this on makes DrRacket less > > stable. > > This belongs in the major items category -- it's certainly more > significant than the changes to Typed Racket, for example. It's there intentionally -- so I'll leave it for Robby's decision. > > * The Algol language implementation is now available as other > > languages, use `#lang algol60' for Algol code. > > The "as" here is confusing. I'll take an edit. > > * The `typed-scheme' collection was renamed to `typed-racket'. > > This doesn't even belong in the release notes -- it has no > user-visible impact. Gone. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life! _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Release Announcement for v5.2
At Wed, 2 Nov 2011 11:21:24 -0400, Sam Tobin-Hochstadt wrote: > > * DrRacket comes with an experimental, on-line check syntax > > function. By default, it is turned off. To turn it on, right > > click on the red circle in the buttom right corner of the DrRacket > > window. Warning: turning this on makes DrRacket less stable. > > This belongs in the major items category -- it's certainly more > significant than the changes to Typed Racket, for example. +1 Near the top even. It's one of the most useful new features! Vincent _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Release Announcement for v5.2
On Nov 2, 2011, at 11:21 AM, Sam Tobin-Hochstadt wrote: > On Wed, Nov 2, 2011 at 11:06 AM, Eli Barzilay wrote: > >> * The new db library offers a high-level, functional interface to >> popular relational database systems, including PostgreSQL, MySQL, >> and SQLite, as well as other systems via ODBC. > > I think this should go first, ahead of XREPL. ++1++ > >> * Typed Racket: >> - Typed Racket provides static performance debugging support to >>show which code gets optimized and point out code that does not. >>Use the "Performance Report" button. > > add "in DrRacket" at the end here. > >> - Function definitions with optional arguments now work. > > Replace with "Typed Racket now supports defining function with > optional arguments using the same syntax as Racket". > >> * Fixed several GUI problems. > > This should explicitly mention Ubuntu 11.10/GTK3, and go ahead of most > of the others. > >> * DrRacket comes with an experimental, on-line check syntax >> function. By default, it is turned off. To turn it on, right >> click on the red circle in the buttom right corner of the DrRacket >> window. Warning: turning this on makes DrRacket less stable. > > This belongs in the major items category -- it's certainly more > significant than the changes to Typed Racket, for example. > >> * The Algol language implementation is now available as other >> languages, use `#lang algol60' for Algol code. > > The "as" here is confusing. > >> * The `typed-scheme' collection was renamed to `typed-racket'. > > This doesn't even belong in the release notes -- it has no user-visible > impact. > -- > sam th > sa...@ccs.neu.edu > > _ > 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] Release Announcement for v5.2
On Wed, Nov 2, 2011 at 11:06 AM, Eli Barzilay wrote: > * The new db library offers a high-level, functional interface to > popular relational database systems, including PostgreSQL, MySQL, > and SQLite, as well as other systems via ODBC. I think this should go first, ahead of XREPL. > * Typed Racket: > - Typed Racket provides static performance debugging support to > show which code gets optimized and point out code that does not. > Use the "Performance Report" button. add "in DrRacket" at the end here. > - Function definitions with optional arguments now work. Replace with "Typed Racket now supports defining function with optional arguments using the same syntax as Racket". > * Fixed several GUI problems. This should explicitly mention Ubuntu 11.10/GTK3, and go ahead of most of the others. > * DrRacket comes with an experimental, on-line check syntax > function. By default, it is turned off. To turn it on, right > click on the red circle in the buttom right corner of the DrRacket > window. Warning: turning this on makes DrRacket less stable. This belongs in the major items category -- it's certainly more significant than the changes to Typed Racket, for example. > * The Algol language implementation is now available as other > languages, use `#lang algol60' for Algol code. The "as" here is confusing. > * The `typed-scheme' collection was renamed to `typed-racket'. This doesn't even belong in the release notes -- it has no user-visible impact. -- sam th sa...@ccs.neu.edu _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] Release Announcement for v5.2
The release announcement sketch is finally ready, apologies for the delay. It should be close to being a final version, and I'll probably proceed with the release tonight -- so if there are any issues with it, please reply soon. -- Racket version 5.2 is now available from http://racket-lang.org/ Release highlights: * A new XREPL collection provides convenient commands for uses of plain racket. It is particularly convenient for people who prefer console-based work and alternative editors. See also the new chapter on command-line tools and other editors at the end of the Racket Guide. * The new db library offers a high-level, functional interface to popular relational database systems, including PostgreSQL, MySQL, and SQLite, as well as other systems via ODBC. * The `plot' collection has been completely re-implemented in Racket, and offers more functionality. Some old code that uses `plot' will continue working, and some will need to use the `plot/compat' library. * DrRacket uses more conventional key bindings: `C-t' creates a new tab, `C-w' closes the current one, and `C-r' runs the definitions. On Mac OS X, the Command key is used. See "Defining Custom Shortcuts" in the DrRacket manual for an example that uses the old key bindings. * The new `raco link' command registers a directory as a collection, which allows the collection directory to reside outside the "collects" tree and without changing the PLTCOLLECTS environment variable. * Support for `begin-for-syntax' has been generalized; modules may now define and export both value bindings and syntax bindings (macros) at phase 1 and higher. * Typed Racket: - Typed Racket provides static performance debugging support to show which code gets optimized and point out code that does not. Use the "Performance Report" button. - More intuitive types in printouts in the REPL and in error messages. Use `:query-result-type' to explore types, or `:print-type' for a full printout. - Function definitions with optional arguments now work. * Redex now supports specifying (and testing and automatically typesetting) judgment forms including type systems and SOS-style operational semantics. * Fixed several GUI problems. * Internal-definition expansion has changed to use `let*' semantics for sequences that contain no back references. This change removes a performance penalty for using internal definitions instead of `let' in common cases, and it only changes the meaning of programs that capture continuations in internal definitions. Internal definitions are now considered preferable in style to `let'. Additional items: * DrRacket comes with an experimental, on-line check syntax function. By default, it is turned off. To turn it on, right click on the red circle in the buttom right corner of the DrRacket window. Warning: turning this on makes DrRacket less stable. * The `racket/gui' library (and Slideshow) provides more support for multiple-screen displays. * DrRacket remembers whether an opened file used LF or CRLF line endings, and will continue using the same. When creating a new file, a preference determines how it is saved. * `net/url' can now follow HTTP redirections. * The LNCS and JFP class files are no longer distributed with Racket. Instead, they are downloaded on demand. * The Algol language implementation is now available as other languages, use `#lang algol60' for Algol code. * The Racket-to-C compiler (as accessed via `raco ctool' or `mzc') has been removed; Racket's JIT has long provided better performance, and the FFI provides better access to C libraries. * Contracts can be applied to exports with the new `contract-out' form within `provide', instead of a separate `provide/contract' form. (The new `contract-out' form is implemented as a new kind of "provide pre-transformer".) * The `date*' structure type is an extension of `date' with `nanosecond' and `time-zone-name' fields. * New looping constructs: `for/sum' and `for/product'. * Direct calls to keyword-accepting functions are now optimized to eliminate the overhead of keywords. In addition, the compiler detects and logs warnings for keyword-argument mismatches. * The `typed-scheme' collection was renamed to `typed-racket'. * The libfit interface is available from `plot/deprecated/fit', and will be removed in the near future. * The Unix installer has been re-done, and it is now more robust. * The built-in reader and printer support for Honu is removed. (This functionality is re-implemented Racket.) Feedback Welcome, -- -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life! _ For l