Re: [racket-dev] mzscheme executable broken when using --enable-shared
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Matthew, On 04/18/11 04:00, Imran Rafique wrote: Ah, that would explain it (Marijn is packaging racket for gentoo, as part of the gentoo-lisp group). Binaries are stripped by default pre-installation by the emerge packager. Imran is correct. On 18 April 2011 00:39, Matthew Flatt mfl...@cs.utah.edu wrote: Was `strip' or a similar tool run on the `mzscheme' executable? Except for `racket', `gracket', and executables created as shell scripts, Racket executables are generated by cloning `starter' and appending extra data to the end of the executable file. Simply appending data to the end of the file is a hack; it doesn't create a well-formed ELF binary. Using `strip' or similar tools on the broken binary tends to just throw away the data, which would lead to an error like the one you reported. I've pushed changes that add to `starter' in a proper ELF section. Even if you didn't run `strip', having a valid ELF binary may fix the problem you're seeing. I tried to test your changes, but ran into an (unrelated I think) compile failure: x86_64-pc-linux-gnu-gcc -I./.. -I./../include - -I/usr/lib64/libffi-3.0.10rc8/include -DMZ_DONT_USE_JIT - -DMZ_USES_SHARED_LIB -c ./module.c -fPIC -DPIC -o .libs/module.o /var/tmp/portage/dev-scheme/racket-999/work/racket-999/src/lt/libtool - --mode=compile --tag=CC x86_64-pc-linux-gnu-gcc -I./.. -I./../include -I/usr/lib64/libffi-3.0.10rc8/include -DMZ_DONT_USE_JIT - -DMZ_USES_SHARED_LIB -c ./mzrt.c -o mzrt.lo ./module.c: In function 'do_module_execute': ./module.c:5278: error: 'scheme_module_code_cache' undeclared (first use in this function) ./module.c:5278: error: (Each undeclared identifier is reported only once ./module.c:5278: error: for each function it appears in.) make[6]: *** [module.lo] Error 1 Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2r8i0ACgkQp/VmCx0OL2w6pwCgyPsC25mIOgur+YpA/nMpLPPX QIYAn3LHhcfdf6Xdv29z7qVDefv8SPVf =dsGD -END PGP SIGNATURE- _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] exact nonnegative integers as sequences?
FWIW, I don't like that any of these 'in-*' thigns are optional. I was recently reading over a script that was used to build web pages from the output of testing runs for my compilers class and there were several nested for loops without in-* thingies and it was painfully difficult for me to reconstruct what the contracts of the functions were because of that. (These loops were iterating over the output of some other, long-lost script that generated the output and I was writing an adapter from the new, cleaned up scripts to this one.) So I'd be happier if you asked to get rid of all of any possibility to avoid writing 'in-*'. Even very short names, eg using the natural number unicode character would be better than using nothing. Robby On Mon, Apr 18, 2011 at 8:25 AM, Matthew Flatt mfl...@cs.utah.edu wrote: I often write (for ([i (in-range N)]) ...) In cases where the loop overhead is not significant (i.e., I don't care whether the compiler can tell that I'm iterating through integers), it would be nice to write just (for ([i N]) ...) which would require that integers are treated as sequences. Would anyone object to making an exact, nonnegative integer `N' a sequence equivalent to `(in-range N)'? _ 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] exact nonnegative integers as sequences?
On Mon, Apr 18, 2011 at 9:25 AM, Matthew Flatt mfl...@cs.utah.edu wrote: I often write (for ([i (in-range N)]) ...) In cases where the loop overhead is not significant (i.e., I don't care whether the compiler can tell that I'm iterating through integers), Or in cases where you're using Typed Racket, and the compiler can tell exactly what you're doing. :) it would be nice to write just (for ([i N]) ...) which would require that integers are treated as sequences. Would anyone object to making an exact, nonnegative integer `N' a sequence equivalent to `(in-range N)'? I am very strongly in favor of this. -- sam th sa...@ccs.neu.edu _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] exact nonnegative integers as sequences?
I have written (for ([i N]) ..) many times only to remember that it's in-range. On Apr 18, 2011, at 9:25 AM, Matthew Flatt wrote: I often write (for ([i (in-range N)]) ...) In cases where the loop overhead is not significant (i.e., I don't care whether the compiler can tell that I'm iterating through integers), it would be nice to write just (for ([i N]) ...) which would require that integers are treated as sequences. Would anyone object to making an exact, nonnegative integer `N' a sequence equivalent to `(in-range N)'? _ 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] exact nonnegative integers as sequences?
On Mon, Apr 18, 2011 at 9:58 AM, Robby Findler ro...@eecs.northwestern.edu wrote: I also don't buy Sam's implicit argument for my example. If I had tried to port this to code to typed racket to just read off the types, I would have spent far longer as debugging via TR's error messages is going to be less productive than debugging via tracing the flow of values in the program. While I support this change for basically the reasons Matthew and Matthias point to, I wasn't trying to claim that TR makes this easier to follow, just that TR removes the performance penalty Matthew mentioned. -- sam th sa...@ccs.neu.edu _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] DrRacket crash
Hello, the attached program, invoked with (fa 2000 -2) in DrRacket, both in 5.1 and in 5.1.0.5, on windows XP, causes DrRacket to crash (after 20 minutes, on my machine). This appears to be repeatable on my machine. I tested with No debugging or profiling, don't Preserve stacktrace, and with limit memory set to 1 GB, and unlimited. The crash happens during the third or fourth invocation of the test procedure, the output of the displayln in this procedure is written partially when the crash happens. Hope this helps. Cheers P. prova.rkt Description: Binary data _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] DrRacket crash
The limits in the DrRacket executable are not the same as the limits that you might expect from just looking at the amount of memory you have on that machine and, judging from a quick look at the program, it seems to be using a lot of memory. So, I'd suggest you either lower the memory limit or watch the drracket process via some OS-level memory monitoring tool (under windows 7 there is something called resource monitor that would work; not sure about XP) to see if you are indeed running out of memory. Robby On Mon, Apr 18, 2011 at 9:36 AM, Pierpaolo Bernardi olopie...@gmail.com wrote: Hello, the attached program, invoked with (fa 2000 -2) in DrRacket, both in 5.1 and in 5.1.0.5, on windows XP, causes DrRacket to crash (after 20 minutes, on my machine). This appears to be repeatable on my machine. I tested with No debugging or profiling, don't Preserve stacktrace, and with limit memory set to 1 GB, and unlimited. The crash happens during the third or fourth invocation of the test procedure, the output of the displayln in this procedure is written partially when the crash happens. Hope this helps. Cheers P. _ 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] exact nonnegative integers as sequences?
9 minutes ago, Matthew Flatt wrote: Thanks for the clarifications, and I now agree that it's not about genericity. I think it's about scripts to programs, though. In a script, not having to type `(in-range )' or `(in-list )' feels worthwhile. You make a good point that those scriptish shortcuts can make understanding the code a little harder, and using `in-range' or `in-list' can good for long-term maintenance. Still, I think it's better to allow the shortcuts. Is there any difference between this and other generic operations (which could also benefit from types being more explicit and more checked)? [Not intended as a flame -- I'm curious to see if there's something makes some generics be worse than others.] -- ((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] exact nonnegative integers as sequences?
Three minutes ago, Robby Findler wrote: On Mon, Apr 18, 2011 at 9:59 AM, Eli Barzilay e...@barzilay.org wrote: 9 minutes ago, Matthew Flatt wrote: Thanks for the clarifications, and I now agree that it's not about genericity. I think it's about scripts to programs, though. In a script, not having to type `(in-range )' or `(in-list )' feels worthwhile. You make a good point that those scriptish shortcuts can make understanding the code a little harder, and using `in-range' or `in-list' can good for long-term maintenance. Still, I think it's better to allow the shortcuts. Is there any difference between this and other generic operations (which could also benefit from types being more explicit and more checked)? [Not intended as a flame -- I'm curious to see if there's something makes some generics be worse than others.] As you probably guessed, I think that this is more of a coherent-language-design issue, but I bet someone could conduct some kind of a survey type thing to figure out what leads to more bugs or what programmers find confusing or something along those lines (ie, you decide on some concrete measure for worse and then conduct a study to try to answer that question). :) My own use of the for loops is usually without using the generic dispatch thing, similar to regexp functions. I get the feeling that you'd similarly want those to throw errors on strings and require an explicit `regexp' if you really want to use a string -- but there the reason is clearer: you have (regexp-match foo bar) and it's easy to mix the two -- so to avoid relying on my memory, I'd just use (regexp-match foo #rxbar) and let racket barf at me when I need to change the order. (And even TR won't save me there.) -- ((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] exact nonnegative integers as sequences?
At Mon, 18 Apr 2011 11:04:18 -0400, Eli Barzilay wrote: An hour and a half ago, Matthew Flatt wrote: I often write (for ([i (in-range N)]) ...) In cases where the loop overhead is not significant (i.e., I don't care whether the compiler can tell that I'm iterating through integers), it would be nice to write just What's the overhead? The same as using `(in-range N)' as a value: an indirection on the `(curry = N)' test, `add1' increment, and identity conversion from the loop index to the loop value. #lang racket (define N 100) (define N-range (in-range N)) (time (for/fold ([v 0]) ([i (in-range N)]) i)) ; cpu time: 4 real time: 3 gc time: 0 (time (for/fold ([v 0]) ([i N-range]) i)) ; cpu time: 103 real time: 103 gc time: 0 You have to be doing very little work in the loop body for the 100-nanosecond-per-iteration overhead to matter, though. _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] exact nonnegative integers as sequences?
FWIW, it would make sense to me if TR's regexp-match function accepted only regexps in the first argument (ditto for Racket and then Scracket could take strings (which of course are hashes mapping integers to chars)). Robby On Mon, Apr 18, 2011 at 10:09 AM, Eli Barzilay e...@barzilay.org wrote: Three minutes ago, Robby Findler wrote: On Mon, Apr 18, 2011 at 9:59 AM, Eli Barzilay e...@barzilay.org wrote: 9 minutes ago, Matthew Flatt wrote: Thanks for the clarifications, and I now agree that it's not about genericity. I think it's about scripts to programs, though. In a script, not having to type `(in-range )' or `(in-list )' feels worthwhile. You make a good point that those scriptish shortcuts can make understanding the code a little harder, and using `in-range' or `in-list' can good for long-term maintenance. Still, I think it's better to allow the shortcuts. Is there any difference between this and other generic operations (which could also benefit from types being more explicit and more checked)? [Not intended as a flame -- I'm curious to see if there's something makes some generics be worse than others.] As you probably guessed, I think that this is more of a coherent-language-design issue, but I bet someone could conduct some kind of a survey type thing to figure out what leads to more bugs or what programmers find confusing or something along those lines (ie, you decide on some concrete measure for worse and then conduct a study to try to answer that question). :) My own use of the for loops is usually without using the generic dispatch thing, similar to regexp functions. I get the feeling that you'd similarly want those to throw errors on strings and require an explicit `regexp' if you really want to use a string -- but there the reason is clearer: you have (regexp-match foo bar) and it's easy to mix the two -- so to avoid relying on my memory, I'd just use (regexp-match foo #rxbar) and let racket barf at me when I need to change the order. (And even TR won't save me there.) -- ((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] exact nonnegative integers as sequences?
Two minutes ago, Robby Findler wrote: FWIW, it would make sense to me if TR's regexp-match function accepted only regexps in the first argument (ditto for Racket and then Scracket could take strings (which of course are hashes mapping integers to chars)). I think that Sam's usual policy for that is to make things as close to Racket as possible. (And I think that it's a good policy in general.) As for Scratchit (obviously the right spelling), it does sound like a good idea, but the nice thing about the untyped - TR route is that you get to keep your code, whereas a Scratchit thing would be useless if you can't use the libraries. -- ((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] exact nonnegative integers as sequences?
On Mon, Apr 18, 2011 at 10:18 AM, Eli Barzilay e...@barzilay.org wrote: Two minutes ago, Robby Findler wrote: FWIW, it would make sense to me if TR's regexp-match function accepted only regexps in the first argument (ditto for Racket and then Scracket could take strings (which of course are hashes mapping integers to chars)). I think that Sam's usual policy for that is to make things as close to Racket as possible. (And I think that it's a good policy in general.) I know. As for Scratchit (obviously the right spelling), it does sound like a good idea, but the nice thing about the untyped - TR route is that you get to keep your code, whereas a Scratchit thing would be useless if you can't use the libraries. Yes, that would be in the plan. _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] DrRacket crash
On Mon, Apr 18, 2011 at 16:49, Pierpaolo Bernardi olopie...@gmail.com wrote: And there's plenty of free ram when it happens. To be more precise, I ran the test once more: the machine has 2 GB of RAM, DrRacket at the moment of the crash uses about 900 MB, and there are more than 300 MB of physical RAM free. The crash happened after writing (semplice in the interaction window, that is, in the displayln at the end of procedure test during the third invocation of said procedure. _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] exact nonnegative integers as sequences?
Which also raises an idea: now that TR is getting going, maybe we should have another step on this scripts-to-programs slope that is _lower_ than Racket. A language where we really only have one single datatype and everything just works on it, hashes being the obvious one (altho we probably should not _call_ them hashes; we should call them the scracket value or something). Guillaume's been doing all his programming lately with just such an infrastructure, and can't sing its praises enough. The associative table really is a powerful abstraction for lightweight programming, especially when combined with overloading of the form Matthew initially suggested. Shriram _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] [plt] Push #22468: master branch updated
30 minutes ago, ro...@racket-lang.org wrote: 100b4d3 Robby Findler ro...@racket-lang.org 2011-04-18 10:31 : | make the close icon clicky thingy not grab the focus | closes PR 10380 : M collects/mrlib/close-icon.rkt |2 +- So how about including both of these? -- ((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] exact nonnegative integers as sequences?
50 minutes ago, Robby Findler wrote: On Mon, Apr 18, 2011 at 10:18 AM, Eli Barzilay e...@barzilay.org wrote: As for Scratchit (obviously the right spelling), it does sound like a good idea, but the nice thing about the untyped - TR route is that you get to keep your code, whereas a Scratchit thing would be useless if you can't use the libraries. Yes, that would be in the plan. How would you do that? -- ((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] [plt] Push #22468: master branch updated
About a minute ago, Eli Barzilay wrote: 30 minutes ago, ro...@racket-lang.org wrote: 100b4d3 Robby Findler ro...@racket-lang.org 2011-04-18 10:31 : | make the close icon clicky thingy not grab the focus | closes PR 10380 : M collects/mrlib/close-icon.rkt |2 +- So how about including both of these? (Apologies for the unintentionally wide reply.) -- ((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] exact nonnegative integers as sequences?
I dunno. Do some search again-ing? On Mon, Apr 18, 2011 at 11:06 AM, Eli Barzilay e...@barzilay.org wrote: 50 minutes ago, Robby Findler wrote: On Mon, Apr 18, 2011 at 10:18 AM, Eli Barzilay e...@barzilay.org wrote: As for Scratchit (obviously the right spelling), it does sound like a good idea, but the nice thing about the untyped - TR route is that you get to keep your code, whereas a Scratchit thing would be useless if you can't use the libraries. Yes, that would be in the plan. How would you do that? -- ((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] exact nonnegative integers as sequences?
1. Racket should obviously use S-expressions as the one-and-only data structure. That's where we come from, and we're different that way. 2. I played with the idea of gluing code like that together some 10 years ago. The idea was to glue together units (no modules yet) where on one side you use lists to represent records and on the other you use generic structs. With the proper unit signature, you can actually do this -- as long as the unit adheres to the struct-like discipline. With types it might be possible to introduce this discipline on an 'assisted' basis. Say you have a unit that you want to structurize. You would change representations and the test suite plus the exceptions of the structure would guide you to the places where you mix representations. A Spidey-style type analysis could make this look better and perhaps better by default. _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] DrRacket crash
I dont have any insight into the crashing, but fwiw, I ran your program on two machines and both completed. The first machine has windows7 and 12gb ram and the second is xp and has 2gb (and pretty much took all day to complete). I ran both times with unlimited memory in drracket. Here is the output from the windows7 machine: Welcome to DrRacket, version 5.1.0.5 [3m]. Language: racket. (fa 2000 -2) (esatta 0 -1.2616954770445667e+017 377.6509536743 #f) (esatta 1 -1.2616954770445667e+017 380.4076484985 #f) (semplice -1.2616954770445358e+017 1.373000144958496 2.4475002535742013e-014) (posneg -1.261695476976997e+017 1.759904632568 5.355472951228884e-011) (posneg ordinata -1.2616954770445666e+017 359.230190735 1.2681348464115033e-016) (ricorsiva -1.2616954770445667e+017 4.718999862670898 0.0) (ricorsiva ordinata -1.2616954770445664e+017 360.3747247925 2.5362696928230065e-016) somma heap inizio separazione somma heap fine separazione somma un heap inizio somma somma un heap inizio somma (heap -1.2616954770445666e+017 3496.894534058 1.2681348464115033e-016) Here is the output from windows xp machine: Welcome to DrRacket, version 5.1.0.6 [3m]. Language: racket [custom]. (fa 2000 -2) (esatta 0 -319065950439559.1 1700.64132425 #f) (esatta 1 -319065950439559.1 1590.703686646 #f) (semplice -3.1906595043948e+014 2.82868664551 2.479894827103737e-013) (posneg -319065950439150.4 3.5470001697540283 1.2810831097360537e-012) (posneg ordinata -319065950439559.1 1515.60867575 0.0) (ricorsiva -319065950439559.06 10.655999898910522 1.958842675437391e-016) (ricorsiva ordinata -319065950439559.1 1524.0 0.0) somma heap inizio separazione somma heap fine separazione somma un heap inizio somma somma un heap inizio somma (heap -319065950439559.1 13219.68066757 0.0) On Mon, Apr 18, 2011 at 10:36 AM, Pierpaolo Bernardi olopie...@gmail.com wrote: Hello, the attached program, invoked with (fa 2000 -2) in DrRacket, both in 5.1 and in 5.1.0.5, on windows XP, causes DrRacket to crash (after 20 minutes, on my machine). This appears to be repeatable on my machine. I tested with No debugging or profiling, don't Preserve stacktrace, and with limit memory set to 1 GB, and unlimited. The crash happens during the third or fourth invocation of the test procedure, the output of the displayln in this procedure is written partially when the crash happens. Hope this helps. Cheers P. _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev