Thread: [pure-lang-users] pure won't complile anymore
Status: Beta
Brought to you by:
agraef
From: Eddie R. <er...@bm...> - 2008-09-02 12:54:12
|
$ make install g++ -shared -o libpure-0.6.so expr.o interpreter.o matcher.o printer.o runtime.o symtable.o util.o lexer.o parser.o `llvm-config --ldflags --libs core jit native` -lreadline -lgmp /usr/bin/ld: runtime.o: relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC runtime.o: could not read symbols: Bad value collect2: ld returned 1 exit status make: *** [libpure-0.6.so] Error 1 g++ -shared -o libpure-0.6.so expr.o interpreter.o matcher.o printer.o runtime.o symtable.o util.o lexer.o parser.o `llvm-config --ldflags --libs core jit native` -lreadline -lgmp /usr/bin/ld: runtime.o: relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC runtime.o: could not read symbols: Bad value collect2: ld returned 1 exit status make: *** [libpure-0.6.so] Error 1 e.r. |
From: Albert G. <Dr....@t-...> - 2008-09-03 14:29:32
|
Eddie Rucker wrote: > g++ -shared -o libpure-0.6.so expr.o interpreter.o matcher.o printer.o > runtime.o symtable.o util.o lexer.o parser.o `llvm-config --ldflags > --libs core jit native` -lreadline -lgmp > /usr/bin/ld: runtime.o: relocation R_X86_64_32S against `a local symbol' > can not be used when making a shared object; recompile with -fPIC Oops, sorry. This should be fixed now (r689). You'll have to do a ./configure && make clean && make. 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-09-03 14:49:11
|
OK. Compiles now. e.r. On Wed, 2008-09-03 at 16:31 +0200, Albert Graef wrote: > Eddie Rucker wrote: > > g++ -shared -o libpure-0.6.so expr.o interpreter.o matcher.o printer.o > > runtime.o symtable.o util.o lexer.o parser.o `llvm-config --ldflags > > --libs core jit native` -lreadline -lgmp > > /usr/bin/ld: runtime.o: relocation R_X86_64_32S against `a local symbol' > > can not be used when making a shared object; recompile with -fPIC > > Oops, sorry. This should be fixed now (r689). You'll have to do a > ./configure && make clean && make. > > Albert > |
From: Eddie R. <er...@bm...> - 2008-09-04 12:46:56
|
On Wed, 2008-09-03 at 21:49 +0200, Albert Graef wrote: > Unfortunately, sf.net has a scheduled downtime of svn write tonight (or > rather this morning, 04:00 UTC), i.e., svn reads will work, but I won't > be able to commit anything. I'll try to do the overhauled list > generators and update the manual before that, but any further bugfixes > will probably have to wait until that ordeal is over... They seem to be down quite a bit :( > In the meantime, here's some stuff from SICP you can play around with: > > > ones = 1:ones&; > > integers = 1 : zipwith (+) ones integers&; > > let ints = integers; > > ints; > 1:<<thunk 0xb5fe1588>> > > take 10 ints; > [1,2,3,4,5,6,7,8,9,10] > > ints; > 1:2:3:4:5:6:7:8:9:10:<<thunk 0xb5fe1b28>> Uhm. Mine don't do that. I'm using revision 698 that latest. > ones = 1 : ones&; > integers=1 : zipwith (+) ones integers&; > let ints = integers; > take 10 ints; 1:{{thunk 0x7fe5e17d0488}} > > structure, it's just a normal list with a thunked tail, which makes > things a bit easier (and leaves the curly braces for something else ;-). Sounds good to me! e.r. |
From: Eddie R. <er...@bm...> - 2008-09-04 20:12:36
|
On Thu, 2008-09-04 at 15:32 -0400, John Cowan wrote: > Albert Graef scripsit: > > > How about calling the interactive 'list' command 'lsd' (for "list > > definition") instead? In any case it should be short, memoizable and > > not likely to be used as a function name. Any better ideas? > > Strong associations with LSD-25 for me, and with pounds shillings and > pence for older Brits. How about "show"? LOL. Call it shrooms for mushrooms or dc for Divine Cactus (Peyote)! Just joking ;-) show sounds fine to me. Mabye rlist for "rule list." > Or how about using a signal character before all commands, and think > of it as part of the command? Lisp folks like to use comma, because it > never appears at the beginning of an expression. Maybe a '!' as an escape? I think the ',' as a first char might be interpreted as a tuple but I could be (probably) wrong. e.r. |
From: Eddie R. <er...@bm...> - 2008-09-04 23:31:28
|
On Fri, 2008-09-05 at 00:21 +0200, Albert Graef wrote: > ! is already being used for shell escapes, which is pretty much standard > for any kind of Unix program with a command line. For the occasional > shell command that's good enough. But I hate it if I have to prefix > basic stuff like 'cd' or 'ls' which are in my muscle memory. How about lr for list rules. e.r. |
From: Albert G. <Dr....@t-...> - 2008-09-04 23:51:00
|
Eddie Rucker wrote: > How about lr for list rules. It's not only rules that can be listed, but also variable and constant definitions, as well as assembler code and other information. In fact, with -s no rules will be listed at all. Anyway, John convinced me that this command is too important to fall victim to an acronym. And 'show' isn't bad at all, so I changed it to that now. That's already in svn. I think it would be a good idea to warn the programmer when he uses one of these special commands as an ordinary identifier in his programs, even though they're not really keywords of the language. That should make it easier for people who are not familiar with the interactive command language yet. Those warnings could be restricted to interactive mode, so that they wouldn't bother you with a program that's only run in batch mode. 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-09-03 19:47:37
|
Eddie Rucker wrote: > OK. Compiles now. Hi Eddie, just FYI: In the latest from svn I also rewrote the better part of prelude.pure to make the list operations handle infinite lists, but that's not quite finished yet (I still have to do the list generator functions, and there might still be some bugs in the new code even though it passes all tests), so please consider this "experimental" for now. (And of course your bug reports are appreciated.) Unfortunately, sf.net has a scheduled downtime of svn write tonight (or rather this morning, 04:00 UTC), i.e., svn reads will work, but I won't be able to commit anything. I'll try to do the overhauled list generators and update the manual before that, but any further bugfixes will probably have to wait until that ordeal is over... In the meantime, here's some stuff from SICP you can play around with: > ones = 1:ones&; > integers = 1 : zipwith (+) ones integers&; > let ints = integers; > ints; 1:<<thunk 0xb5fe1588>> > take 10 ints; [1,2,3,4,5,6,7,8,9,10] > ints; 1:2:3:4:5:6:7:8:9:10:<<thunk 0xb5fe1b28>> Note the new & operator (postfix, binds stronger than anything else but function application) which does all the magic. It defers the evaluation of its operand until that value is actually needed somewhere (in which case evaluation and memoization happens automagically, as you can see above). So in difference to Q, there's no separate stream data structure, it's just a normal list with a thunked tail, which makes things a bit easier (and leaves the curly braces for something else ;-). Happy streaming! 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-09-04 18:18:16
|
Eddie Rucker wrote: > They seem to be down quite a bit :( svn is back up, and I committed the latest changes (see ChangeLog). The manual also has a subsection with (hopefully) instructive stream examples now. (See the end of the EXAMPLES section.) > Uhm. Mine don't do that. I'm using revision 698 that latest. > > ones = 1 : ones&; > > integers=1 : zipwith (+) ones integers&; > > let ints = integers; > > take 10 ints; > 1:{{thunk 0x7fe5e17d0488}} Yes, the results you got are correct. I fixed up take/takewhile which were too eager. Use, e.g., list (take 10 ints) to force the stream, like in Q. (I also changed the <<external object>> notation, which could be mistaken as ordinary expression syntax, to those double curly braces which aren't -- and won't be -- legal Pure. If anyone has a better suggestion, or prefers it the way it was, I'd like to hear about it.) Talking about the dreaded 'list' at the beginning of a line ambiguity, I really think I have to do something about this, it bites me all the time, too. I don't have that problem with other commands, it's just that darn 'list' command, because the 'list' function gets used so frequently. How about calling the interactive 'list' command 'lsd' (for "list definition") instead? In any case it should be short, memoizable and not likely to be used as a function name. Any better ideas? 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-09-05 01:18:19
|
Albert Graef wrote: > (I also changed the <<external object>> notation, which could be > mistaken as ordinary expression syntax, to those double curly braces > which aren't -- and won't be -- legal Pure. If anyone has a better > suggestion, or prefers it the way it was, I'd like to hear about it.) Well, actually that turned out to be a bad idea as well, so I changed it to the #<...> syntax which should be familiar to Schemers. This won't parse as a Pure expression no matter in which context (although you might still fool the interpreter by declaring an '#<' operator, oh well). (Note that this is all about print syntax only, so it doesn't affect any programs except possibly the regression tests.) -- 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-09-04 19:32:28
|
Albert Graef scripsit: > How about calling the interactive 'list' command 'lsd' (for "list > definition") instead? In any case it should be short, memoizable and > not likely to be used as a function name. Any better ideas? Strong associations with LSD-25 for me, and with pounds shillings and pence for older Brits. How about "show"? Or how about using a signal character before all commands, and think of it as part of the command? Lisp folks like to use comma, because it never appears at the beginning of an expression. -- And through this revolting graveyard of the universe the muffled, maddening beating of drums, and thin, monotonous whine of blasphemous flutes from inconceivable, unlighted chambers beyond Time; the detestable pounding and piping whereunto dance slowly, awkwardly, and absurdly the gigantic tenebrous ultimate gods --the blind, voiceless, mindless gargoyles whose soul is Nyarlathotep. (Lovecraft) John Cowan co...@cc... |
From: Albert G. <Dr....@t-...> - 2008-09-04 21:54:57
|
John Cowan wrote: > Strong associations with LSD-25 for me, Ha, I thought that nobody would notice. ;-) > How about "show"? I actually thought about that, too. But then I remembered that I might want a 'show' function for some H(ask)ellish purpose. > Or how about using a signal character before all commands, and think > of it as part of the command? Yeah, we discussed that idea when Pure was just born (I think Libor originally brought that up), but I very strongly prefer unstropped commands (at least as much as others hate them ;-). Anyway, it's really only an issue with that one command, and that can be resolved by picking something that's less generic than 'list'. 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 L. <joh...@gm...> - 2008-09-04 21:23:48
|
On 4 Sep 2008, at 21:12, Eddie Rucker wrote: >> Or how about using a signal character before all commands, and think >> of it as part of the command? Lisp folks like to use comma, >> because it >> never appears at the beginning of an expression. > > Maybe a '!' as an escape? I think the ',' as a first char might be > interpreted as a tuple but I could be (probably) wrong. > > e.r. I REALLY think there should be some sort of character before these commands, such as list and friends. It's one of my few qualms about Pure! I think the ! could work, but I don't really mind. John |
From: Albert G. <Dr....@t-...> - 2008-09-05 00:00:41
|
John Lunney wrote: > I REALLY think there should be some sort of character before these > commands, such as list and friends. It's one of my few qualms about > Pure! John, I understand your pov, and we actually had a fairly heated debate over this issue when Libor brought it up. But I do value convenience more than safety here. Just think of it as if those commands were additional keywords. With the exception of the 'list' command (which I now renamed to 'show') those commands aren't really what you'd frequently want to use as a function or variable name. However, I admit that there should at least be a warning if you happen to do that, I'm working on that now. 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-09-04 22:19:34
|
Eddie Rucker wrote: > LOL. Call it shrooms for mushrooms or dc for Divine Cactus (Peyote)! I like the sound of that. :) It vaguely reminds me of the arcane command syntax of the monitor program on early SUN workstations. We didn't get to toggle in a boot loader program, but that was almost as good. ;-) > Maybe a '!' as an escape? ! is already being used for shell escapes, which is pretty much standard for any kind of Unix program with a command line. For the occasional shell command that's good enough. But I hate it if I have to prefix basic stuff like 'cd' or 'ls' which are in my muscle memory. Besides that, it's really cool if I run Pure in the Kate terminal pane and Kate properly synchronizes the interpreter with the directory of the current edit window. That only works because the interpreter knows how to handle a plain 'cd' command. It's a minor point, but actually Kate works pretty well as an edit+run environment for Pure, and its folding support rocks. 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 |