Re: [racket-dev] REPL crash
At Tue, 30 Nov 2010 23:51:57 +0100, Dmitry Chestnykh wrote: Seg fault (internal error) at 0x4 Bus error Mac OS X 10.6.5, same result on Racket 5.0.2 and 6c25210a6bb8 from git. Fixed in the git repo. Thanks for the report! Matthew _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] Refactoring in-vector and friends
Hi all, I spent (far too much) time this morning refactoring the definition of in-vector to expose the building blocks to compose these macro/functions. After refactoring the code for defining in-vector is: (define-:vector-like-gen :vector-gen unsafe-vector-ref) (define-in-vector-like in-vector vector vector? vector-length :vector-gen) (define-sequence-syntax *in-vector (lambda () #'in-vector) (make-in-vector-like #'vector? #'unsafe-vector-length #'in-vector #'unsafe-vector-ref)) This could obviously be made smaller but it sufficient to enable reuse for in-flvector (my goal), in-f64vector etc. In doing so I split for.rkt into three (I couldn't handle refactoring the 1000+ lines of for.rkt; I needed something smaller to understand it all). Since this is a moderately large change I'm looking for comments/objections before committing. If you have objections please let me know -- if I don't hear any I'll commit tomorrow. Diff is attached. N. vector.diff Description: Binary data _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] code base metrics
And because I already started it, here is the entire collects tree (370k file) http://www.cs.utah.edu/~rafkind/tmp/racket-definitions.txt On 11/29/2010 03:34 PM, Matthias Felleisen wrote: That makes sense. For now, I am fine with this very first-order approximation. Thanks On Nov 29, 2010, at 5:32 PM, Jon Rafkind wrote: There is one thing defined at phase 0, module-begin. The module exports a bunch of stuff (provide (rename-out [module-begin #%module-begin]) (except-out (all-from-out scheme/base) #%module-begin) (all-from-out scheme/unit) (all-from-out scheme/contract) (for-syntax (all-from-out scheme/base))) I realize you probably wanted something like 'only count exports of things defined in the module' but thats a little harder to compute, which is why the metric is a first approximation. On 11/29/2010 03:29 PM, Matthias Felleisen wrote: Thanks, that's great. But what does this mean: collects/racket/signature/lang.rkt defined 1 exported 2747 -- Matthias On Nov 29, 2010, at 4:24 PM, Jon Rafkind wrote: On 11/29/2010 12:20 PM, Jon Rafkind wrote: I hacked my old tool to get a first approximation and ran it on all the files of the collects/racket tree. I can run it on the entire collects tree if you want, but its sort of slow so it will take a while. I couldn't expand all the files because local requires failed, I'll try to fix that. Here is a better list collects/racket/file.rkt defined 29 exported 18 collects/racket/include.rkt defined 5 exported 4 collects/racket/set.rkt defined 32 exported 26 collects/racket/gui/info.rkt defined 3 exported 2 collects/racket/gui/init.rkt defined 0 exported 3354 collects/racket/gui/base.rkt defined 4 exported 209 collects/racket/gui/lang/reader.rkt defined 6 exported 3 collects/racket/gui/dynamic.rkt defined 5 exported 2 collects/racket/gui/installer.rkt defined 1 exported 1 collects/racket/match/define-forms.rkt defined 1 exported 1 collects/racket/match/compiler.rkt defined 13 exported 1 collects/racket/match/struct.rkt defined 1 exported 1 collects/racket/match/runtime.rkt defined 11 exported 6 collects/racket/match/gen-match.rkt defined 3 exported 2 collects/racket/match/patterns.rkt defined 194 exported 163 collects/racket/match/reorder.rkt defined 11 exported 1 collects/racket/match/parse-legacy.rkt defined 1 exported 1 collects/racket/match/parse.rkt defined 2 exported 1 collects/racket/match/parse-helper.rkt defined 15 exported 11 collects/racket/match/parse-quasi.rkt defined 3 exported 1 collects/racket/match/legacy-match.rkt defined 11 exported 15 collects/racket/match/match-expander.rkt defined 1 exported 1 collects/racket/match/match.rkt defined 11 exported 16 collects/racket/match/split-rows.rkt defined 2 exported 1 collects/racket/system.rkt defined 0 exported 8 collects/racket/control.rkt defined 0 exported 24 collects/racket/package.rkt defined 10 exported 11 collects/racket/runtime-path.rkt defined 2 exported 7 collects/racket/tcp.rkt defined 1 exported 12 collects/racket/runtime-config.rkt defined 1 exported 1 collects/racket/init.rkt defined 0 exported 3206 collects/racket/serialize.rkt defined 5 exported 12 collects/racket/surrogate.rkt defined 1 exported 1 collects/racket/cmdline.rkt defined 5 exported 2 collects/racket/splicing.rkt defined 15 exported 11 collects/racket/provide-syntax.rkt defined 1 exported 1 collects/racket/require-transform.rkt defined 30 exported 22 collects/racket/load/lang/reader.rkt defined 6 exported 3 collects/racket/stream.rkt defined 19 exported 17 collects/racket/contract/regions.rkt defined 5 exported 3 collects/racket/contract/private/object.rkt defined 15 exported 6 collects/racket/contract/private/arrow.rkt defined 104 exported 17 collects/racket/contract/private/ds.rkt defined 45 exported 9 collects/racket/contract/private/guts.rkt defined 95 exported 69 collects/racket/contract/private/misc.rkt defined 121 exported 28 collects/racket/contract/private/provide.rkt defined 4 exported 2 collects/racket/contract/private/base.rkt defined 5 exported 3 collects/racket/contract/private/hash.rkt defined 22 exported 1 collects/racket/contract/private/vector.rkt defined 52 exported 4 collects/racket/contract/private/helpers.rkt defined 12 exported 9 collects/racket/contract/private/basic-opters.rkt defined 0 exported 0 collects/racket/contract/private/arr-i.rkt defined 26 exported 1 collects/racket/contract/private/opt-guts.rkt defined 40 exported 31 collects/racket/contract/private/legacy.rkt defined 22 exported 18 collects/racket/contract/private/arr-util.rkt defined 2 exported 2 collects/racket/contract/private/box.rkt defined 26 exported 2 collects/racket/contract/private/prop.rkt defined 72 exported 19 collects/racket/contract/private/opt.rkt defined 20 exported 6 collects/racket/contract/private/arr-i-old.rkt defined 22 exported 1 collects/racket/contract/private/arr-i-parse.rkt defined 45
Re: [racket-dev] [racket] Exploratory programming?
1. I've been meaning for a long time to mention some things like this. Another example is modulus (modulo and remainder work). It'd be nice to have a list of suggestions returned whenever certain words were typed or whenever no results are returned. 2. Search Manuals breaks the browser's Back button. Here's a simple example. a. Open http://docs.racket-lang.org/ b. Type modulus in the search manuals box and hit Enter c. No matches found, so change the highlighted text to modulo d. Click on one of the results e. Click the browser's back button f. I'm not back at the list of results I have been very impressed with the level of documentation, but I (and my students) have often found frustration in searching. Constructively, Paul Btw, I know of no easy search in other languages (Java) other than Google. -Original Message- From: users-boun...@racket-lang.org [mailto:users-boun...@racket-lang.org] On Behalf Of Justin Zamora Sent: Tuesday, November 30, 2010 3:02 PM To: lukejor...@gmail.com Cc: us...@racket-lang.org Subject: Re: [racket] Exploratory programming? On Tue, Nov 30, 2010 at 12:25 PM, Luke Jordan luke.jor...@gmail.com wrote: Yes, using DrRacket it's really really easy to interface with help, explore libraries, etc., at least as far as I have found for my humble needs. It uses racket/doc/search/search-context.html. The main problem with searching is that the indexing is not very good. For example, this query returns no matches: http://docs.racket-lang.org/search/index.html?q=sine This is especially frustrating for students who know what kind of function they want but don't know its name. Justin _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] [racket] Exploratory programming?
On Dec 1, 2010, at 2:51 PM, engin...@alum.mit.edu wrote: 1. I've been meaning for a long time to mention some things like this. Another example is modulus (modulo and remainder work). It'd be nice to have a list of suggestions returned whenever certain words were typed or whenever no results are returned. 2. Search Manuals breaks the browser's Back button. Here's a simple example. a. Open http://docs.racket-lang.org/ b. Type modulus in the search manuals box and hit Enter c. No matches found, so change the highlighted text to modulo d. Click on one of the results e. Click the browser's back button f. I'm not back at the list of results I have been very impressed with the level of documentation, but I (and my students) have often found frustration in searching. This might be another good chance to mention work that a student of mine has done on a tool, ErrRecorder, that collects error messages automatically and allows users to suggest solutions for particular error messages. http://li21-127.members.linode.com:8021/errrecorder The new piece here is that it now does some clustering of error messages based on levenshtein distances, so that errors can be grouped by frequency in some sensible way. For the problem you mention, I see that you really want to split up that big first category that holds all of the undefined identifier messages generated in teaching languages. This tool has been installed on local machines for about eight weeks, now, and has collected about 3900 errors. It's not yet ready for download, but I'd be interested in hearing whether something like this could be useful for you. John Clements smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] [racket] Exploratory programming?
Four hours ago, engin...@alum.mit.edu wrote: 2. Search Manuals breaks the browser's Back button. Here's a simple example. a. Open http://docs.racket-lang.org/ b. Type modulus in the search manuals box and hit Enter c. No matches found, so change the highlighted text to modulo d. Click on one of the results e. Click the browser's back button f. I'm not back at the list of results I have been very impressed with the level of documentation, but I (and my students) have often found frustration in searching. That's an issue with URLs and with how your browser decides to implement history navigation. When you're done with (b), you get to the search page with the query in the url ...?q=modulus. You now change the string and follow a link, then go back -- to the same url with the original query. At this point, Chrome reinitializes the page in a way that makes modulus re-appear in the input field, while FireFox preserves the state as you left it and will not do that. I know how to make FF behave like Chrome, but that involves re-initializing the page, which means that using the back button will be much more painful. -- ((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] [racket] Exploratory programming?
In Safari this error doesn't show up. On Dec 1, 2010, at 9:52 PM, Eli Barzilay wrote: Four hours ago, engin...@alum.mit.edu wrote: 2. Search Manuals breaks the browser's Back button. Here's a simple example. a. Open http://docs.racket-lang.org/ b. Type modulus in the search manuals box and hit Enter c. No matches found, so change the highlighted text to modulo d. Click on one of the results e. Click the browser's back button f. I'm not back at the list of results I have been very impressed with the level of documentation, but I (and my students) have often found frustration in searching. That's an issue with URLs and with how your browser decides to implement history navigation. When you're done with (b), you get to the search page with the query in the url ...?q=modulus. You now change the string and follow a link, then go back -- to the same url with the original query. At this point, Chrome reinitializes the page in a way that makes modulus re-appear in the input field, while FireFox preserves the state as you left it and will not do that. I know how to make FF behave like Chrome, but that involves re-initializing the page, which means that using the back button will be much more painful. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life! _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] [racket] Exploratory programming?
My FF and IE behave as does Chrome. I've heavily configure my FF and may have messed it up, but my IE is quite vanilla. -Paul -Original Message- From: Eli Barzilay [mailto:e...@barzilay.org] Sent: Wednesday, December 01, 2010 9:52 PM To: engin...@alum.mit.edu Cc: 'dev'; lukejor...@gmail.com Subject: Re: [racket-dev] [racket] Exploratory programming? Four hours ago, engin...@alum.mit.edu wrote: 2. Search Manuals breaks the browser's Back button. Here's a simple example. a. Open http://docs.racket-lang.org/ b. Type modulus in the search manuals box and hit Enter c. No matches found, so change the highlighted text to modulo d. Click on one of the results e. Click the browser's back button f. I'm not back at the list of results I have been very impressed with the level of documentation, but I (and my students) have often found frustration in searching. That's an issue with URLs and with how your browser decides to implement history navigation. When you're done with (b), you get to the search page with the query in the url ...?q=modulus. You now change the string and follow a link, then go back -- to the same url with the original query. At this point, Chrome reinitializes the page in a way that makes modulus re-appear in the input field, while FireFox preserves the state as you left it and will not do that. I know how to make FF behave like Chrome, but that involves re-initializing the page, which means that using the back button will be much more painful. -- ((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] code base metrics
Thanks. When I re-run my 'averaging' I get around 34% exports. BTW, your script is broken. Look for view: name On Dec 1, 2010, at 4:36 PM, Jon Rafkind wrote: And because I already started it, here is the entire collects tree (370k file) http://www.cs.utah.edu/~rafkind/tmp/racket-definitions.txt On 11/29/2010 03:34 PM, Matthias Felleisen wrote: That makes sense. For now, I am fine with this very first-order approximation. Thanks On Nov 29, 2010, at 5:32 PM, Jon Rafkind wrote: There is one thing defined at phase 0, module-begin. The module exports a bunch of stuff (provide (rename-out [module-begin #%module-begin]) (except-out (all-from-out scheme/base) #%module-begin) (all-from-out scheme/unit) (all-from-out scheme/contract) (for-syntax (all-from-out scheme/base))) I realize you probably wanted something like 'only count exports of things defined in the module' but thats a little harder to compute, which is why the metric is a first approximation. On 11/29/2010 03:29 PM, Matthias Felleisen wrote: Thanks, that's great. But what does this mean: collects/racket/signature/lang.rkt defined 1 exported 2747 -- Matthias On Nov 29, 2010, at 4:24 PM, Jon Rafkind wrote: On 11/29/2010 12:20 PM, Jon Rafkind wrote: I hacked my old tool to get a first approximation and ran it on all the files of the collects/racket tree. I can run it on the entire collects tree if you want, but its sort of slow so it will take a while. I couldn't expand all the files because local requires failed, I'll try to fix that. Here is a better list collects/racket/file.rkt defined 29 exported 18 collects/racket/include.rkt defined 5 exported 4 collects/racket/set.rkt defined 32 exported 26 collects/racket/gui/info.rkt defined 3 exported 2 collects/racket/gui/init.rkt defined 0 exported 3354 collects/racket/gui/base.rkt defined 4 exported 209 collects/racket/gui/lang/reader.rkt defined 6 exported 3 collects/racket/gui/dynamic.rkt defined 5 exported 2 collects/racket/gui/installer.rkt defined 1 exported 1 collects/racket/match/define-forms.rkt defined 1 exported 1 collects/racket/match/compiler.rkt defined 13 exported 1 collects/racket/match/struct.rkt defined 1 exported 1 collects/racket/match/runtime.rkt defined 11 exported 6 collects/racket/match/gen-match.rkt defined 3 exported 2 collects/racket/match/patterns.rkt defined 194 exported 163 collects/racket/match/reorder.rkt defined 11 exported 1 collects/racket/match/parse-legacy.rkt defined 1 exported 1 collects/racket/match/parse.rkt defined 2 exported 1 collects/racket/match/parse-helper.rkt defined 15 exported 11 collects/racket/match/parse-quasi.rkt defined 3 exported 1 collects/racket/match/legacy-match.rkt defined 11 exported 15 collects/racket/match/match-expander.rkt defined 1 exported 1 collects/racket/match/match.rkt defined 11 exported 16 collects/racket/match/split-rows.rkt defined 2 exported 1 collects/racket/system.rkt defined 0 exported 8 collects/racket/control.rkt defined 0 exported 24 collects/racket/package.rkt defined 10 exported 11 collects/racket/runtime-path.rkt defined 2 exported 7 collects/racket/tcp.rkt defined 1 exported 12 collects/racket/runtime-config.rkt defined 1 exported 1 collects/racket/init.rkt defined 0 exported 3206 collects/racket/serialize.rkt defined 5 exported 12 collects/racket/surrogate.rkt defined 1 exported 1 collects/racket/cmdline.rkt defined 5 exported 2 collects/racket/splicing.rkt defined 15 exported 11 collects/racket/provide-syntax.rkt defined 1 exported 1 collects/racket/require-transform.rkt defined 30 exported 22 collects/racket/load/lang/reader.rkt defined 6 exported 3 collects/racket/stream.rkt defined 19 exported 17 collects/racket/contract/regions.rkt defined 5 exported 3 collects/racket/contract/private/object.rkt defined 15 exported 6 collects/racket/contract/private/arrow.rkt defined 104 exported 17 collects/racket/contract/private/ds.rkt defined 45 exported 9 collects/racket/contract/private/guts.rkt defined 95 exported 69 collects/racket/contract/private/misc.rkt defined 121 exported 28 collects/racket/contract/private/provide.rkt defined 4 exported 2 collects/racket/contract/private/base.rkt defined 5 exported 3 collects/racket/contract/private/hash.rkt defined 22 exported 1 collects/racket/contract/private/vector.rkt defined 52 exported 4 collects/racket/contract/private/helpers.rkt defined 12 exported 9 collects/racket/contract/private/basic-opters.rkt defined 0 exported 0 collects/racket/contract/private/arr-i.rkt defined 26 exported 1 collects/racket/contract/private/opt-guts.rkt defined 40 exported 31 collects/racket/contract/private/legacy.rkt defined 22 exported 18 collects/racket/contract/private/arr-util.rkt defined 2 exported 2 collects/racket/contract/private/box.rkt defined 26 exported 2 collects/racket/contract/private/prop.rkt defined 72 exported 19
Re: [racket-dev] code base metrics
Oh, there were some errors while running the script so to clean it up I just did 'grep defined out' :p /home/kazzmir/svn/plt/racket/collects/htdp/tests/guess-gui.rkt:10:3: view: name is not defined, not a parameter, and not a primitive name in: view On 12/01/2010 08:40 PM, Matthias Felleisen wrote: Thanks. When I re-run my 'averaging' I get around 34% exports. BTW, your script is broken. Look for view: name _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev