pure-lang-users Mailing List for Pure (Page 19)
Status: Beta
Brought to you by:
agraef
You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
(31) |
May
(422) |
Jun
(241) |
Jul
(268) |
Aug
(281) |
Sep
(109) |
Oct
(1) |
Nov
|
Dec
|
---|
From: Albert G. <Dr....@t-...> - 2008-07-12 00:48:32
|
Eddie Rucker wrote: > Well, now after restarting my system, pure runs That seems to indicate that your ld.so cache wasn't updated after all, and the reboot fixed that. Next time this happens please include the output of running ldconfig -v, that will make it easier to diagnose the problem. In any case this is supposed to work, and it works without a hitch on my SUSE systems. Also note that there's no reason that you need to run ldconfig after installing llvm; all those libraries are static anyway. Only after installing Pure you need to run ldconfig. > but from the examples sub-directory: > > $ export LD_LIBRARY_PATH=. > $ pure > ... > > using "lib:sort"; No error message here? > > using "lib:sort"; > <stdin>:1.0-15: sort: cannot open shared object file: No such file or > directory And then one here? Did you really run that command twice?? -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |
From: Jiri S. <jir...@bl...> - 2008-07-11 21:59:05
|
Eddie Rucker wrote: > Well, now after restarting my system, pure runs but from the examples > sub-directory: > > $ export LD_LIBRARY_PATH=. > $ pure > ... > > using "lib:sort"; > > > using "lib:sort"; > <stdin>:1.0-15: sort: cannot open shared object file: No such file or > directory > > Try 'using "lib:sort.so";', it works here for me. Jiri |
From: Libor S. <li...@gm...> - 2008-07-11 21:53:50
|
Hmmm, that is unlucky. I did much the same and it worked. The only differences being that I got the source tarball from the LLVM site, rather than the svn version, and I put in all those other recommended flags after the LLVM ./configure. And I configured pure with enable-release because I always hope that it will run faster but it did not really. L. On Fri, 11 Jul 2008 22:30:15 +0100, Eddie Rucker <er...@bm...> wrote: > Same old error. I uninstalled llvm and manually killed everything I > could find with llvm in my system. I went and got the svn version of > llvm-2.3, applied the patch and recompiled. Did the same with pure and > did the 'sudo /sbin/ldconfig' after install. No luck :-( > > e.r. > > On Fri, 2008-07-11 at 23:07 +0200, Jiri Spitz wrote: >> Eddie Rucker wrote: >> > I did the patch on llvm-2.3 before I configured llvm-2.3. >> > >> > I did a 'make uninstall', then 'make distclean', 'sudo /sbin/ldconfig', >> > './configure --enable-pic', 'make', 'sudo make install', 'pure', and >> > then I get >> > >> > $ pure >> > pure: error while loading shared libraries: libpure-0.5.so: cannot >> > open shared object file: No such file or directory >> > >> And 'sudo /sbin/ldconfig' after install? >> >> Jiri > > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > _______________________________________________ > pure-lang-users mailing list > pur...@li... > https://lists.sourceforge.net/lists/listinfo/pure-lang-users > |
From: Eddie R. <er...@bm...> - 2008-07-11 21:35:26
|
Well, now after restarting my system, pure runs but from the examples sub-directory: $ export LD_LIBRARY_PATH=. $ pure ... > using "lib:sort"; > using "lib:sort"; <stdin>:1.0-15: sort: cannot open shared object file: No such file or directory > :-( e.r. On Fri, 2008-07-11 at 22:16 +0100, Libor Spacek wrote: > sudo /sbin/ldconfig is definitely needed, despite its low prominence in the install instructions. > L. > > On Fri, 11 Jul 2008 22:07:51 +0100, Jiri Spitz <jir...@bl...> wrote: > > > Eddie Rucker wrote: > >> I did the patch on llvm-2.3 before I configured llvm-2.3. > >> > >> I did a 'make uninstall', then 'make distclean', 'sudo /sbin/ldconfig', > >> './configure --enable-pic', 'make', 'sudo make install', 'pure', and > >> then I get > >> > >> $ pure > >> pure: error while loading shared libraries: libpure-0.5.so: cannot > >> open shared object file: No such file or directory > >> > > And 'sudo /sbin/ldconfig' after install? > > > > Jiri > > > > ------------------------------------------------------------------------- > > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > > Studies have shown that voting for your favorite open source project, > > along with a healthy diet, reduces your potential for chronic lameness > > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > > _______________________________________________ > > pure-lang-users mailing list > > pur...@li... > > https://lists.sourceforge.net/lists/listinfo/pure-lang-users > > > > > > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > _______________________________________________ > pure-lang-users mailing list > pur...@li... > https://lists.sourceforge.net/lists/listinfo/pure-lang-users |
From: Eddie R. <er...@bm...> - 2008-07-11 21:30:13
|
Same old error. I uninstalled llvm and manually killed everything I could find with llvm in my system. I went and got the svn version of llvm-2.3, applied the patch and recompiled. Did the same with pure and did the 'sudo /sbin/ldconfig' after install. No luck :-( e.r. On Fri, 2008-07-11 at 23:07 +0200, Jiri Spitz wrote: > Eddie Rucker wrote: > > I did the patch on llvm-2.3 before I configured llvm-2.3. > > > > I did a 'make uninstall', then 'make distclean', 'sudo /sbin/ldconfig', > > './configure --enable-pic', 'make', 'sudo make install', 'pure', and > > then I get > > > > $ pure > > pure: error while loading shared libraries: libpure-0.5.so: cannot > > open shared object file: No such file or directory > > > And 'sudo /sbin/ldconfig' after install? > > Jiri |
From: Libor S. <li...@gm...> - 2008-07-11 21:16:34
|
sudo /sbin/ldconfig is definitely needed, despite its low prominence in the install instructions. L. On Fri, 11 Jul 2008 22:07:51 +0100, Jiri Spitz <jir...@bl...> wrote: > Eddie Rucker wrote: >> I did the patch on llvm-2.3 before I configured llvm-2.3. >> >> I did a 'make uninstall', then 'make distclean', 'sudo /sbin/ldconfig', >> './configure --enable-pic', 'make', 'sudo make install', 'pure', and >> then I get >> >> $ pure >> pure: error while loading shared libraries: libpure-0.5.so: cannot >> open shared object file: No such file or directory >> > And 'sudo /sbin/ldconfig' after install? > > Jiri > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > _______________________________________________ > pure-lang-users mailing list > pur...@li... > https://lists.sourceforge.net/lists/listinfo/pure-lang-users > |
From: Jiri S. <jir...@bl...> - 2008-07-11 21:07:54
|
Eddie Rucker wrote: > I did the patch on llvm-2.3 before I configured llvm-2.3. > > I did a 'make uninstall', then 'make distclean', 'sudo /sbin/ldconfig', > './configure --enable-pic', 'make', 'sudo make install', 'pure', and > then I get > > $ pure > pure: error while loading shared libraries: libpure-0.5.so: cannot > open shared object file: No such file or directory > And 'sudo /sbin/ldconfig' after install? Jiri |
From: Eddie R. <er...@bm...> - 2008-07-11 20:44:53
|
I did the patch on llvm-2.3 before I configured llvm-2.3. I did a 'make uninstall', then 'make distclean', 'sudo /sbin/ldconfig', './configure --enable-pic', 'make', 'sudo make install', 'pure', and then I get $ pure pure: error while loading shared libraries: libpure-0.5.so: cannot open shared object file: No such file or directory e.r. |
From: Libor S. <li...@gm...> - 2008-07-11 11:00:18
|
Pure 434 + LLVM 2.3 run happily here, thanks! L. |
From: Albert G. <Dr....@t-...> - 2008-07-11 10:39:46
|
Libor Spacek wrote: > That is a clever idea, thanks! It's just the standard way of emulating non-strict evaluation if your language only does eager evaluation. >> timex (\_ -> tailqueens 4); > Segmentation fault Yes I can reproduce that here, thanks for reporting. Will look into it. > I don't expect you to waste a lot of time on this but I would be grateful for any > hints as to what may be causing this? It's obviously a bug, either in the interpreter or the runtime, so needs to be fixed. Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |
From: John C. <co...@cc...> - 2008-07-11 04:40:03
|
Albert Graef scripsit: > Considering the metaphor, I'd say that the quote is from the > "Mathematics Written in Sand" paper, which is available as a PDF from > Kahan's website at http://www.cs.berkeley.edu/~wkahan/. It's been a > while since I read the paper, so I can't say for sure. But it's > recommended reading for everyone dabbling in numeric algorithms. That PDF is searchable, and it doesn't include the word "dirt". But I agree that the sentiment sounds like Kahan. -- John Cowan co...@cc... http://www.ccil.org/~cowan O beautiful for patriot's dream that sees beyond the years Thine alabaster cities gleam undimmed by human tears! America! America! God mend thine every flaw, Confirm thy soul in self-control, thy liberty in law! --one of the verses not usually taught in U.S. schools |
From: John C. <co...@cc...> - 2008-07-11 04:15:26
|
Albert Graef scripsit: > John Cowan wrote: > > If "round" is defined only as a macro, the implementation is out of > > compliance. > > In contrast to Cygwin, Mingw uses the native Windows libraries which at > best pay lip service to POSIX. Sorry, I lost track of the context and didn't realize we were talking MinGW here. There's certainly no reason to expect either SUS3 or C99 there! -- John Cowan co...@cc... http://ccil.org/~cowan The present impossibility of giving a scientific explanation is no proof that there is no scientific explanation. The unexplained is not to be identified with the unexplainable, and the strange and extraordinary nature of a fact is not a justification for attributing it to powers above nature. --The Catholic Encyclopedia, s.v. "telepathy" (1913) |
From: Albert G. <Dr....@t-...> - 2008-07-11 03:04:57
|
Rooslan S. Khayrov wrote: > Here is a patch (created by mostly mechanical substitution) to compile > Pure with LLVM trunk. I guess it should work with 2.3 as well. Ok, I committed this now, thanks a lot for the patch. This means that starting with r434 Pure really needs LLVM 2.3 now. The LLVM 2.3 version of Cyrille Berger's 64 bit -fPIC patch is available under the following URL: http://pure-lang.sf.net/X86JITInfo.cpp.pic.2.3.patch Cheers, Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |
From: Albert G. <Dr....@t-...> - 2008-07-11 02:37:14
|
Jiri Spitz wrote: >> And first of all - the test #15 runs 12 s instead of original 55 s (both >> under MinGW, of course). Yep, the 'let' statement at the beginning of your test module compiles in 7.6 secs now, versus 96.4 secs before. (That includes the startup time of the interpreter and loading of the prelude, which takes about half a second on my AMD32.) But it's still too slow. 7 secs to initialize a constant list of just 1000 elements? That's ridiculous, Q does that in a heartbeat. And almost all that time is still spent in the JIT. What is it doing there? So I'll still have to optimize for that case. Nevertheless, it does seem that the JIT has improved a lot, so requiring LLVM 2.3 seems sensible. Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |
From: Albert G. <Dr....@t-...> - 2008-07-11 01:41:06
|
John Cowan wrote: > "Doing floating-point arithmetic is like making sand castles: > every time you move one, you get a little less sand and a little > more dirt." -quoted by Knuth, but I forget who he attributes it to. Most likely the quote is from Prof. William Kahan, the father of IEEE 754, Turing Award winner and ACM fellow. That's the same guy who also designed the numeric algorithms powering the legendary HP 10C "Voyager" series of programmable RPN calculators, so he's very well-known to HP calculator fans like me. :) Considering the metaphor, I'd say that the quote is from the "Mathematics Written in Sand" paper, which is available as a PDF from Kahan's website at http://www.cs.berkeley.edu/~wkahan/. It's been a while since I read the paper, so I can't say for sure. But it's recommended reading for everyone dabbling in numeric algorithms. Cheers, Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |
From: Albert G. <Dr....@t-...> - 2008-07-11 00:41:26
|
John Cowan wrote: > If "round" is defined only as a macro, the implementation is out of > compliance. In contrast to Cygwin, Mingw uses the native Windows libraries which at best pay lip service to POSIX. Some functions aren't implemented at all, others need a '_' prefix etc. etc. Both Mingw and LLVM try to work around some of these quirks, but that doesn't guarantee that each and every POSIX function is dlsym'able under its POSIX name, even if some compatible replacement is available. I work around this by providing wrappers for stuff that appears to be missing on Windows in runtime.cc. That's what I'm going to do with those functions, too. Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |
From: Eddie R. <er...@bm...> - 2008-07-10 21:48:17
|
On Thu, 2008-07-10 at 17:34 -0400, John Cowan wrote: > Libor Spacek scripsit: > > Here is another "quirk", this time on Linux. > > So much for those wonderful fast doubles ;) > > > > > round 1.4999999999999999; > > 2.0 > > > round 1.499999999999999; > > 1.0 > > They aren't called quick and dirty for nothing, and the C library > is *not* guaranteed to preserve correctness when converting > doubles to strings or vice versa. You can bet your bippie it's a C thingy. #include <stdio.h> #include <math.h> int main(int argc, char **argv) { printf("%g\n", round(1.4999999999999999)); printf("%g\n", round(1.499999999999999)); return 0; } $ ./a.out 2 1 > "Doing floating-point arithmetic is like making sand castles: > every time you move one, you get a little less sand and a little > more dirt." -quoted by Knuth, but I forget who he attributes it to. LOL. Knuth is *the* man. e.r. |
From: John C. <co...@cc...> - 2008-07-10 21:34:32
|
Libor Spacek scripsit: > Here is another "quirk", this time on Linux. > So much for those wonderful fast doubles ;) > > > round 1.4999999999999999; > 2.0 > > round 1.499999999999999; > 1.0 They aren't called quick and dirty for nothing, and the C library is *not* guaranteed to preserve correctness when converting doubles to strings or vice versa. "Doing floating-point arithmetic is like making sand castles: every time you move one, you get a little less sand and a little more dirt." -quoted by Knuth, but I forget who he attributes it to. -- John Cowan http://ccil.org/~cowan co...@cc... SAXParserFactory [is] a hideous, evil monstrosity of a class that should be hung, shot, beheaded, drawn and quartered, burned at the stake, buried in unconsecrated ground, dug up, cremated, and the ashes tossed in the Tiber while the complete cast of Wicked sings "Ding dong, the witch is dead." --Elliotte Rusty Harold on xml-dev |
From: Libor S. <li...@gm...> - 2008-07-10 21:31:01
|
Here is another "quirk", this time on Linux. So much for those wonderful fast doubles ;) > round 1.4999999999999999; 2.0 > round 1.499999999999999; 1.0 L. On Thu, 10 Jul 2008 21:51:09 +0100, John Cowan <co...@cc...> wrote: > Albert Graef scripsit: >> Jiri Spitz wrote: >> > > using math; >> > math.pure:34.7-26: external symbol 'round' cannot be found >> >> Ok, then they are probably defined as macros and so we need a workaround >> in runtime.cc, I'll have a look at that asap. > > If "round" is defined only as a macro, the implementation is out of > compliance. However, "round" is only required by SUS3 and C99, > so older implementations may simply lack it. > > http://www.opengroup.org/onlinepubs/000095399/functions/round.html > > |
From: Libor S. <li...@gm...> - 2008-07-10 21:02:41
|
On Thu, 10 Jul 2008 00:20:49 +0100, Albert Graef <Dr....@t-...> wrote: > Note that this includes compilation times which isn't very useful if you > want to measure running times. Instead I'd suggest to work around this > until macros are implemented by just creating a closure taking a dummy > argument. > > > using system; > > timex f = (clock-t0)/CLOCKS_PER_SEC, res when t0 = clock; res = f () > end; > > foo n = if n<=0 then n else foo (n-1); // burn some cycles > > timex (\_->foo 100000); > 0.14,0 That is a clever idea, thanks! > Do you have a minimal test case showing the bug? I think there may be something wrong with my "tailqueens" because I cannot reproduce it in any other way. Very simple stand-alone "catch - throw" works. On the other hand, "tailqueens" segfault even with your version of timex: ~/pure/examples/libor$ pure -i -q queens.pure > using system; > timex f = (clock-t0)/CLOCKS_PER_SEC, res when t0 = clock; res = f () end; > timex (\_ -> queens 20); 4.72,[20,18,16,19,17,8,6,9,3,1,4,12,5,2,13,11,14,7,15,10] > timex (\_ -> tailqueens 4); Segmentation fault I don't expect you to waste a lot of time on this but I would be grateful for any hints as to what may be causing this? "tailqueens" always before worked happily alone, it is only these delayed evaluations that upset it. You can reproduce it on your machine by going to examples/libor and typing the above script. Cheers, Libor |
From: John C. <co...@cc...> - 2008-07-10 20:51:02
|
Albert Graef scripsit: > Jiri Spitz wrote: > > > using math; > > math.pure:34.7-26: external symbol 'round' cannot be found > > Ok, then they are probably defined as macros and so we need a workaround > in runtime.cc, I'll have a look at that asap. If "round" is defined only as a macro, the implementation is out of compliance. However, "round" is only required by SUS3 and C99, so older implementations may simply lack it. http://www.opengroup.org/onlinepubs/000095399/functions/round.html -- I marvel at the creature: so secret and John Cowan so sly as he is, to come sporting in the pool co...@cc... before our very window. Does he think that http://www.ccil.org/~cowan Men sleep without watch all night? |
From: Albert G. <Dr....@t-...> - 2008-07-10 20:21:53
|
Ryan Schmidt wrote: > MacPorts has llvm 2.2 right now. I could ask its maintainer to update > it to 2.3. That would be nice. > Will pure still work with llvm 2.2 or will llvm 2.3 be required now? I'd prefer the latter, because of all the quirks we see with the LLVM 2.2 JIT. But maybe you should first test with LLVM 2.3 on OSX after I committed the patches, before we decide on that. Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |
From: Eddie R. <er...@bm...> - 2008-07-10 20:14:39
|
On Thu, 2008-07-10 at 21:41 +0200, Albert Graef wrote: > > That's good news indeed. :) So I guess it's time to switch to LLVM 2.3 > now. I can commit the necessary changes tomorrow. Everybody ready to > take the plunge? NO, I'm never going to use 2.3!!! Just kidding ;=) I already have llvm 2.3 installed but I haven't gotten pure to compile yet. I need Jiri's changes. e.r. |
From: Albert G. <Dr....@t-...> - 2008-07-10 20:13:33
|
Libor Spacek wrote: > Excellent! I look forward to this, or even LLVM 2.4, becoming the default Pure setup. LLVM 2.3 *is* the current official release, so that's what I'm going to target to make things easier, especially for the package maintainers. But Roostan's patches are for LLVM trunk anyway, so you should be able to use that if you prefer. Note that for 64 bit we still need Cyrille Berger's patch (fortunately this has been updated for LLVM 2.3 already, but I don't think it's in LLVM svn yet). I'm going to commit the necessary changes tomorrow. Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |
From: Albert G. <Dr....@t-...> - 2008-07-10 19:58:20
|
Jiri Spitz wrote: > > using math; > math.pure:34.7-26: external symbol 'round' cannot be found Ok, then they are probably defined as macros and so we need a workaround in runtime.cc, I'll have a look at that asap. Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |