Thread: [q-lang-users] sum not working (x86_64 / linux)
Brought to you by:
agraef
From: Ethan G. <ee...@fa...> - 2009-04-16 02:21:46
|
Hiyos. I just installed Q today, submitting a Source Mage GNU/Linux 'spell' for it, so that's one more distro that carries Q. At least one function, sum, is not working. The manual gives the following example: ==> sum [1..123456] 7620753696 I entered something similar with different results: ==> sum [1..100] sum [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100] simpler uses of sum do not work either: ==> sum 1 2 sum 1 2 The splash text may be of interest: 0 ethan@vardo q-pure (0) $ q def: error loading module Warning: 141 unresolved external symbols ____ / __ \ Q interpreter version 7.11 (x86_64-pc-linux-gnu) / /_/ / Copyright (c) 1991-2008 by Albert Graef \___\_\ http://q-lang.sourceforge.net This software is distributed under the terms of the GNU General Public License version 2 or later; type `copying' for details. ! File def, line 77: Value mismatch in definition ==> What is this module "def"? There is no such file either in the source tree or installed. I assume a syntax error leading to a bad import statement, but how can a nonexistant file have line numbers? Testing the install did not produce anything useful: 0 ethan@vardo q-7.11 (0) $ q test.q Segmentation fault -- wow.. wondering how to make it more general and less hard-coded is making my head hurt. that's a good sign that it's my code |
From: Ethan G. <ee...@fa...> - 2009-04-16 03:21:34
|
On Thu, 16 Apr 2009 03:21 +0100, "Ethan Grammatikidis" <ee...@fa...> wrote: > Hiyos. I just installed Q today, submitting a Source Mage GNU/Linux > 'spell' for it, so that's one more distro that carries Q. > > At least one function, sum, is not working. The manual gives the > following example: > ==> sum [1..123456] > 7620753696 > > I entered something similar with different results: > ==> sum [1..100] > sum > [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100] > > simpler uses of sum do not work either: > ==> sum 1 2 > sum 1 2 > > The splash text may be of interest: > 0 ethan@vardo q-pure (0) $ q > def: error loading module > Warning: 141 unresolved external symbols > ____ > / __ \ Q interpreter version 7.11 (x86_64-pc-linux-gnu) > / /_/ / Copyright (c) 1991-2008 by Albert Graef > \___\_\ http://q-lang.sourceforge.net > > This software is distributed under the terms of the GNU General Public > License version 2 or later; type `copying' for details. > ! File def, line 77: Value mismatch in definition > > ==> > > What is this module "def"? There is no such file either in the source > tree or installed. I assume a syntax error leading to a bad import > statement, but how can a nonexistant file have line numbers? > > Testing the install did not produce anything useful: > 0 ethan@vardo q-7.11 (0) $ q test.q > Segmentation fault > A little extra info: As far as I can tell, anything defined in stdlib.q is unavailable. Line 77 is the definition of curry: public curry F; curry F X Y = F (X,Y); The code immediately before surprises me: public cst X; cst X _ = X; Whyfore the underscore? -- wow.. wondering how to make it more general and less hard-coded is making my head hurt. that's a good sign that it's my code |
From: Albert G. <Dr....@t-...> - 2009-04-21 10:06:15
|
Ethan Grammatikidis wrote: > The splash text may be of interest: > 0 ethan@vardo q-pure (0) $ q > def: error loading module > Warning: 141 unresolved external symbols Hi Ethan, Unfortunately, Q doesn't work on 64 bit systems, it was never ported to those. You might wish to take a look at Q's successor Pure, which is fully 64 bit compatible, has some important new features and runs programs much faster (it also needs LLVM at build time, though): http://pure-lang.googlecode.com/ In case you're interested, Pure has its own mailing list at: http://groups.google.com/group/pure-lang 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: Ethan G. <ee...@fa...> - 2009-05-16 00:59:53
|
On Tue, 21 Apr 2009 12:05:34 +0200 Albert Graef <Dr....@t-...> wrote: > Ethan Grammatikidis wrote: > > The splash text may be of interest: > > 0 ethan@vardo q-pure (0) $ q > > def: error loading module > > Warning: 141 unresolved external symbols > > Hi Ethan, > > Unfortunately, Q doesn't work on 64 bit systems, it was never ported to > those. You might wish to take a look at Q's successor Pure, which is > fully 64 bit compatible, has some important new features and runs > programs much faster (it also needs LLVM at build time, though): > > http://pure-lang.googlecode.com/ > > In case you're interested, Pure has its own mailing list at: > > http://groups.google.com/group/pure-lang > > Cheers, > Albert Cheers. I sort-of subconciously avoided Pure because LLVM requires C++, but I guess it would be more appropriate for my 64-bit box. Q starts and runs nicely on my PDA, a Sharp Zaurus running Angstrom Linux which has issues compiling and sometimes running C++ apps. You'd think 64MB would be as adequate for a little bit of light coding as it was 7 or 8 years ago, but at least for C++ it's aparently not. -- Ethan Grammatikidis The lyf so short, the craft so long to lerne. -- Chaucer |
From: Albert G. <Dr....@t-...> - 2009-05-16 21:49:39
|
Ethan Grammatikidis wrote: > Cheers. I sort-of subconciously avoided Pure because LLVM requires C++, but I guess it would be more appropriate for my 64-bit box. Q starts and runs nicely on my PDA, a Sharp Zaurus running Angstrom Linux which has issues compiling and sometimes running C++ apps. You'd think 64MB would be as adequate for a little bit of light coding as it was 7 or 8 years ago, but at least for C++ it's aparently not. Well, I guess you're right. Compiling C stuff on the Z works all right, but for getting any substantial piece of C++ software going, you'll need a cross compiler. Alas, my Z doesn't get much use anymore, the screen is too small for my eyes. I do run Pure on my eeepc, though, it works great there. 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 |