q-lang-users Mailing List for Q - Equational Programming Language (Page 4)
Brought to you by:
agraef
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(3) |
Feb
(27) |
Mar
|
Apr
(4) |
May
(11) |
Jun
(5) |
Jul
(5) |
Aug
(6) |
Sep
(15) |
Oct
(28) |
Nov
(8) |
Dec
|
2005 |
Jan
(9) |
Feb
(5) |
Mar
(10) |
Apr
(43) |
May
(8) |
Jun
(31) |
Jul
(45) |
Aug
(17) |
Sep
(8) |
Oct
(30) |
Nov
(2) |
Dec
(6) |
2006 |
Jan
(4) |
Feb
(20) |
Mar
(1) |
Apr
|
May
(92) |
Jun
(179) |
Jul
(26) |
Aug
(65) |
Sep
(36) |
Oct
(38) |
Nov
(44) |
Dec
(68) |
2007 |
Jan
(11) |
Feb
(25) |
Mar
(37) |
Apr
(7) |
May
(83) |
Jun
(77) |
Jul
(44) |
Aug
(4) |
Sep
(28) |
Oct
(53) |
Nov
(12) |
Dec
(21) |
2008 |
Jan
(66) |
Feb
(45) |
Mar
(30) |
Apr
(50) |
May
(9) |
Jun
(18) |
Jul
(11) |
Aug
(6) |
Sep
(4) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: Libor S. <li...@gm...> - 2008-04-28 13:43:58
|
Eddie, Sorry, I must be dyslexic too, I meant 8.04., 64bit. It took a dislike to my ATA disks, though previous Ubuntus were OK with them. However, I found some "magic incantation" boot options and it works now. You were lucky to get an easy ride, I think. I will look for the LLVM software sources, I like them for their automatic updates. Libor On Mon, 28 Apr 2008 14:14:04 +0100, Eddie Rucker <er...@bm...> wrote: > On Mon, 2008-04-28 at 11:45 +0100, Libor Spacek wrote: > >> I have installed Ubuntu 4.08, which was, unexpectedly, a pain in the neck. > > This is off topic but, why such an old version? I'm using 8.04 (I'm > dyslexic so I didn't catch that at first) and it was fairly painless to > install. You can get LLVM 2.3 through the Synaptic Package Manager by > adding more software sources but I don't know what they are. Sometimes I > prefer the manual install ;) I installed Ubuntu, then Ubuntu 64bit, then > back to Ubunto. Although not Linux, I think I liked FreeBSD of all the > OSs I've used and that is quite a list. |
From: Eddie R. <er...@bm...> - 2008-04-28 13:14:21
|
On Mon, 2008-04-28 at 11:45 +0100, Libor Spacek wrote: > I have installed Ubuntu 4.08, which was, unexpectedly, a pain in the neck. This is off topic but, why such an old version? I'm using 8.04 (I'm dyslexic so I didn't catch that at first) and it was fairly painless to install. You can get LLVM 2.3 through the Synaptic Package Manager by adding more software sources but I don't know what they are. Sometimes I prefer the manual install ;) I installed Ubuntu, then Ubuntu 64bit, then back to Ubunto. Although not Linux, I think I liked FreeBSD of all the OSs I've used and that is quite a list. > > Hi friends, > > BTW, the present version is some 30-40 times faster than Q on naive fib, > > IIRC. I was hoping for more, but it's already 7 times faster than Python > > 2.4 on the recursive benchmark from the shootout, and it certainly makes I wonder if Python 2.5 is faster than 2.4? MzScheme seemed to be faster than Python 2.5 on most of the bench marks on the shootout. Lua seems pretty fast too. The OCaml interpreter absolutely smokes. If I were aiming for speed, the OCaml interpreter is the one to chase. However, IIRC, BigIntegers are not built into OCaml and that and type information can have a major impact on speed. Eddie |
From: Libor S. <li...@gm...> - 2008-04-28 10:18:35
|
Albert, Looking at the LLVM website again, I note their latest SVN version (LLVM 2.3) features llvm-gcc 4.2 and significant code generator and optimiser improvements. Would it be worth shooting for this latest version, or is it likely to break Pure? Would you care to test it and see if it (a) works, (b) runs faster? Libor |
From: Libor S. <li...@gm...> - 2008-04-28 09:45:26
|
Albert, It is great to hear about your progress! I suspect the answer to beating even more languages lies in making your matcher as fast as possible, so that it can approach the speed of a fixed function call that most other languages use. You probably know a lot more about this but if I was implementing Pure I would start by converting all operators/functors/constructors to the same internal representation, such as *(X,Y) instead of X*Y and then have a very efficient indexing scheme (hashing?) for locating the LHS of the next equation to invoke. In this example, I know I only need to look for functor "*" with two arguments. I have installed Ubuntu 4.08, which was, unexpectedly, a pain in the neck. It comes with an old version of LLVM available and that installed easily. Next I will have a go at a manual installation of LLVM 2.2. Regards, Libor On Sun, 27 Apr 2008 04:22:22 +0100, Albert Graef <Dr....@t-...> wrote: > Hi friends, > > well, it was quite a bit more work than I expected, but it finally > works! :) And I already have the Pure->C interface, exceptions > (catch/throw) and a considerable part of the system module working > (basic I/O, printf/scanf, glob, regex). Nicely enough, I can write most > of the wrappers in Pure now. > > BTW, the present version is some 30-40 times faster than Q on naive fib, > IIRC. I was hoping for more, but it's already 7 times faster than Python > 2.4 on the recursive benchmark from the shootout, and it certainly makes > Hugs look very bad; MZ Scheme is still a bit faster, though. So I guess > it's fast enough -- and there's no doubt that the generated code can > still be improved. ;-) > > Still working on a few examples, too tired to do a prerelease tonight. > Maybe tomorrow. For the time being, get LLVM 2.2 up and running on your > machines, you'll need it. ;-) > > Cheers, > Albert |
From: Albert G. <Dr....@t-...> - 2008-04-27 03:08:55
|
Hi friends, well, it was quite a bit more work than I expected, but it finally works! :) And I already have the Pure->C interface, exceptions (catch/throw) and a considerable part of the system module working (basic I/O, printf/scanf, glob, regex). Nicely enough, I can write most of the wrappers in Pure now. BTW, the present version is some 30-40 times faster than Q on naive fib, IIRC. I was hoping for more, but it's already 7 times faster than Python 2.4 on the recursive benchmark from the shootout, and it certainly makes Hugs look very bad; MZ Scheme is still a bit faster, though. So I guess it's fast enough -- and there's no doubt that the generated code can still be improved. ;-) Still working on a few examples, too tired to do a prerelease tonight. Maybe tomorrow. For the time being, get LLVM 2.2 up and running on your machines, you'll need it. ;-) Cheers, Albert Eddie Rucker wrote: > Yea, how is everything Albert? > > I've got one more killer week and then I'm going to get to work on the > wrapping GSL. I'll be so glad to have some play time with Q. > > Eddie > > On Fri, 2008-04-25 at 21:45 +0100, Libor Spacek wrote: >> Albert, >> >> How are you getting on with LLVM and Pure? >> You went suddenly quiet about it but some of us are still here, >> looking forward to an early release of Pure. >> >> Libor -- 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-04-25 20:58:51
|
Yea, how is everything Albert? I've got one more killer week and then I'm going to get to work on the wrapping GSL. I'll be so glad to have some play time with Q. Eddie On Fri, 2008-04-25 at 21:45 +0100, Libor Spacek wrote: > Albert, > > How are you getting on with LLVM and Pure? > You went suddenly quiet about it but some of us are still here, > looking forward to an early release of Pure. > > Libor > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > q-lang-users mailing list > q-l...@li... > https://lists.sourceforge.net/lists/listinfo/q-lang-users |
From: Libor S. <li...@gm...> - 2008-04-25 19:45:35
|
Albert, How are you getting on with LLVM and Pure? You went suddenly quiet about it but some of us are still here, looking forward to an early release of Pure. Libor |
From: Don G. <dg...@cc...> - 2008-04-19 04:46:59
|
Ah, thanks. -- don On Apr 18, 2008, at 9:37 PM, Ryan Schmidt wrote: > The portindex only regenerates every 12 hours, so wait a little > longer. > > > On Apr 18, 2008, at 10:08 PM, Don Groves wrote: > >> I just did selfupdate on MacPorts and list still shows version 7.10. >> Anything else I need to do to get 7.11? >> >> >> On Apr 18, 2008, at 6:37 PM, Ryan Schmidt wrote: >> >>> On Mar 11, 2008, at 3:46 AM, Albert Graef wrote: >>>> Ryan Schmidt wrote: >>>>> Hello. Q 7.10 compiled just fine on Mac OS X 10.4.11 Intel, but >>>>> 7.11 >>>>> doesn't. Here's what it does: >>>> >>>> Hmm, any news on that? Didn't the patch I posted work for you? >>> >>> Sorry for the delay. The patch worked fine, Q 7.11 now compiles, and >>> I've updated the port in MacPorts. > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save > $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > q-lang-users mailing list > q-l...@li... > https://lists.sourceforge.net/lists/listinfo/q-lang-users > |
From: Ryan S. <rya...@us...> - 2008-04-19 04:37:33
|
The portindex only regenerates every 12 hours, so wait a little longer. On Apr 18, 2008, at 10:08 PM, Don Groves wrote: > I just did selfupdate on MacPorts and list still shows version 7.10. > Anything else I need to do to get 7.11? > > > On Apr 18, 2008, at 6:37 PM, Ryan Schmidt wrote: > >> On Mar 11, 2008, at 3:46 AM, Albert Graef wrote: >>> Ryan Schmidt wrote: >>>> Hello. Q 7.10 compiled just fine on Mac OS X 10.4.11 Intel, but >>>> 7.11 >>>> doesn't. Here's what it does: >>> >>> Hmm, any news on that? Didn't the patch I posted work for you? >> >> Sorry for the delay. The patch worked fine, Q 7.11 now compiles, and >> I've updated the port in MacPorts. |
From: Don G. <dg...@cc...> - 2008-04-19 03:08:24
|
I just did selfupdate on MacPorts and list still shows version 7.10. Anything else I need to do to get 7.11? -- don On Apr 18, 2008, at 6:37 PM, Ryan Schmidt wrote: > On Mar 11, 2008, at 3:46 AM, Albert Graef wrote: >> Ryan Schmidt wrote: >>> Hello. Q 7.10 compiled just fine on Mac OS X 10.4.11 Intel, but 7.11 >>> doesn't. Here's what it does: >> >> Hmm, any news on that? Didn't the patch I posted work for you? > > Sorry for the delay. The patch worked fine, Q 7.11 now compiles, and > I've updated the port in MacPorts. > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save > $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > q-lang-users mailing list > q-l...@li... > https://lists.sourceforge.net/lists/listinfo/q-lang-users > |
From: Ryan S. <rya...@us...> - 2008-04-19 01:37:41
|
On Mar 11, 2008, at 3:46 AM, Albert Graef wrote: > Ryan Schmidt wrote: >> Hello. Q 7.10 compiled just fine on Mac OS X 10.4.11 Intel, but 7.11 >> doesn't. Here's what it does: > > Hmm, any news on that? Didn't the patch I posted work for you? Sorry for the delay. The patch worked fine, Q 7.11 now compiles, and I've updated the port in MacPorts. |
From: Ryan S. <rya...@us...> - 2008-04-07 18:02:33
|
On Apr 7, 2008, at 05:21, Tim Haynes wrote: [q in macports] > Needs more variants adding for things like ODBC, I think... I'm happy to add variants to the port. I don't use q myself so I don't really know what's typical or desired. But if you will file enhancement requests in the issue tracker and assign (or Cc) them to me, ideally including a patch to the portfile to implement it, or at least mentioning which configure flag is necessary, I'll try to add it. http://guide.macports.org/#project |
From: Tim H. <q...@st...> - 2008-04-07 10:53:12
|
Don Groves <dg...@cc...> writes: > Hi, all -- > > I'm highly interested in Q and just tried to install the MacPorts > version with the following results: > > ---> Fetching pkgconfig > ... > ---> Activating zlib 1.2.3_1 > Error: Target org.macports.activate returned: Image error: /opt/local/ > include/zconf.h already exists and does not belong to a registered > port. Unable to activate port zlib. > Error: The following dependencies failed to build: curl zlib gmp > readline ncurses ncursesw > Error: Status 1 encountered during processing. > > Any help will be greatly appreciated. Where did you get your /opt/local/include/zconf.h from, if not ports? Either remove the offending files, run port clean zlib && port install zlib , or you can forcibly activate it with port -f activate zlib and resume, see what that does. I just grabbed and built the latest MacPorts (on a PPC box) over this past weekend and had no such problem. So finally... | zsh, pizza 11:08AM ~/ # port install q | ---> Fetching q | ---> Attempting to fetch q-7.10.tar.gz from | http://downloads.sourceforge.net/q-lang | ---> Verifying checksum(s) for q | ---> Extracting q | ---> Configuring q | ---> Building q with target all | ---> Staging q into destroot | ---> Installing q 7.10_0 | ---> Activating q 7.10_0 | ---> Cleaning q | zsh, pizza 11:16AM ~/ # It works! Needs more variants adding for things like ODBC, I think... ~Tim -- <http://spodzone.org.uk/> |
From: Don G. <dg...@cc...> - 2008-04-07 06:23:54
|
On Apr 6, 2008, at 19:18 , Ryan Schmidt wrote: > > On Apr 6, 2008, at 17:16, Ryan Schmidt wrote: > >> You can also force the activation of the zlib port. For each file >> it's trying to install which it finds to already exist, it will >> rename it, tell you about it, then install the file it was going to >> install. You can manually remove the renamed older files later. > > Sorry, I forgot to say how to do this. To force the activation if the > zlib port if you get that error message, you can: > > sudo port -f activate zlib Thanks, Ryan, this solved the problem for me. Now that I know a bit about MacPorts, I'll ask in the right venue next time. -- don |
From: Ryan S. <rya...@us...> - 2008-04-06 22:19:26
|
On Apr 6, 2008, at 17:16, Ryan Schmidt wrote: > You can also force the activation of the zlib port. For each file > it's trying to install which it finds to already exist, it will > rename it, tell you about it, then install the file it was going to > install. You can manually remove the renamed older files later. Sorry, I forgot to say how to do this. To force the activation if the zlib port if you get that error message, you can: sudo port -f activate zlib |
From: Ryan S. <rya...@us...> - 2008-04-06 22:17:11
|
On Apr 5, 2008, at 21:44, Don Groves wrote: > I'm highly interested in Q and just tried to install the MacPorts > version with the following results: > > ---> Fetching pkgconfig > ... > ---> Activating zlib 1.2.3_1 > Error: Target org.macports.activate returned: Image error: /opt/local/ > include/zconf.h already exists and does not belong to a registered > port. Unable to activate port zlib. > Error: The following dependencies failed to build: curl zlib gmp > readline ncurses ncursesw > Error: Status 1 encountered during processing. > > Any help will be greatly appreciated. This question really belongs on the macports-users mailing list, not the q-lang-users list, since your problem right now is with installing zlib, not q. The message means that the zlib port is trying to install the file / opt/local/include/zconf.h but this file already exists on your system. Why does it? It shouldn't, unless you had a previous installation of MacPorts, removed it incompletely, and then reinstalled it. If that's the case, you should remove MacPorts completely [1] and reinstall it and then everything should work. You can also force the activation of the zlib port. For each file it's trying to install which it finds to already exist, it will rename it, tell you about it, then install the file it was going to install. You can manually remove the renamed older files later. You should not generally need to go through all this, though. If you find this happening on many ports, something is amiss in your MacPorts installation, and the best idea is to remove and reinstall. [1] http://trac.macports.org/projects/macports/wiki/ FAQ#HowdoIremoveoruninstallMacPorts |
From: Don G. <dg...@cc...> - 2008-04-06 02:44:40
|
Hi, all -- I'm highly interested in Q and just tried to install the MacPorts version with the following results: ---> Fetching pkgconfig ... ---> Activating zlib 1.2.3_1 Error: Target org.macports.activate returned: Image error: /opt/local/ include/zconf.h already exists and does not belong to a registered port. Unable to activate port zlib. Error: The following dependencies failed to build: curl zlib gmp readline ncurses ncursesw Error: Status 1 encountered during processing. Any help will be greatly appreciated. -- Don Groves |
From: Libor S. <li...@gm...> - 2008-04-03 20:51:07
|
On Wed, 02 Apr 2008 13:21:43 +0100, Albert Graef <Dr....@t-...> wrote: > But the biggest difference between all those languages (including Lisp) > and Q/Pure is that the latter are based on general term rewriting rather > than the lambda calculus, which essentially boils down to the simple > feature that there is no distinction between "constructors" and "defined > functions". This is my take on this. Any comments? Functors (identifiers of defined functions), operators, and constructors are essentially one and the same thing. After all, we could define new operators by functions ever since Algol68 and there was equivalence between constructors and functors since Prolog .(A,B) = [A,B]. So I think you are doing the right and natural thing to acknowledge this and to incorporate it onto your language design by essentially removing those unnecessary distinctions from the matcher requirements as well. At least this is how I understand your main point. Now here is a new idea: At the moment, you write (in Q or Pure): square X = X*X; Suppose that we remove the requirement that any functor/operator/constructor be present on the L.H.S. as well? So now we can, whenever we want to, turn this into an anonymous function (lambda expression): X = X*X; by simply omitting the functor (and possibly using -> instead of =). Simply written as any other rule with the = sign, it would become a macro, in this case a dangerously recursive one. However, there is use for ordinary text replacement macros of similar forms. You could then also write this: var Square = (X = X*X); without the lambda and dot syntactical baggage. Square is now a function variable, which can be applied simply as: Square X I like this because it makes very clear and obvious the comparison between the constant function definition square and the variable function definition Square. Notice that they were both initialised with exactly the same expression/value/R.H.S., the only difference being that one is a constant and the other is a variable holding the same value. I know, most of this is just "reinventing" lambda calculus but, at the very least, I think my suggestion could lead to a neater syntax, getting rid of the pesky \ and . which had me puzzled when I first saw them. I had no idea what they were until I was told somewhere deep down the manual, that \ stands for lambda. Libor |
From: Libor S. <li...@gm...> - 2008-04-03 15:49:10
|
On Wed, 02 Apr 2008 13:21:43 +0100, Albert Graef <Dr....@t-...> wrote: > Btw, this might also be a nice read in this context: > http://www.lisperati.com/landoflisp/ Wonderful cartoon. I loved that "Hidley Milner Type Checker"! Holy awesomeness!!! :) |
From: Albert G. <Dr....@t-...> - 2008-04-03 03:06:38
|
Brian Beckman wrote: > Oh, I think I see even more clearly, now. The data constructors "Just" and > "Nothing" are not quite ordinary functions ... they're a special kind of > function that is permitted -- by special rules -- to participate in pattern > matching. But in TRs, any function is permitted in the pattern position > because there's just one kind of function. Right? Right, exactly. Constructors *only* get used in the patterns, and functions *only* get used in the head position in front of the patterns. That is what's called the constructor discipline. Of course, you *can* program like this with TRSes, too (I think that the term "constructor discipline" actually comes from TRS theory), but it's not required. TRSes are therefore conceptually much simpler. 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: Brian B. <bri...@co...> - 2008-04-03 01:21:02
|
Oh, I think I see even more clearly, now. The data constructors "Just" and "Nothing" are not quite ordinary functions ... they're a special kind of function that is permitted -- by special rules -- to participate in pattern matching. But in TRs, any function is permitted in the pattern position because there's just one kind of function. Right? It always seems right to me to reduce the number of special cases. -----Original Message----- From: q-l...@li... [mailto:q-l...@li...] On Behalf Of Brian Beckman Sent: Wednesday, April 02, 2008 5:45 PM To: 'Discuss the Q language.' Subject: Re: [q-lang-users] Speeding up Q I think I see :) At the risk of being tiresome, I think you're saying that in something like this in Haskell data Maybe a = Nothing | Just a we get a type constructor "Maybe" and a type variable "a" on the left-hand side, and a pair of data constructors, which are just ordinary functions (?!) -- on the right-hand side, and "a" gets punned from a type variable on LHS into an ordinary data-variable of type a on the RHS. At least, that's how I understand it (perhaps very poorly :) The TYPE constructor, "Maybe," is NOT available for Haskell's pattern matching, but the data constructors are, by design f :: Num a => Maybe a -> a f (Just x) = x f Nothing = 0 In Q, this distinction doesn't even arise, correct? And if not, is the reason that data constructors like "Maybe" don't exist? And, if so, isn't the reason simply that a "kinded" type system can't exist in Q or other TRS, and that type-checking must always be dynamic because and there's only one KIND of thing (a function) and patterns are perforce just over functions? Or am I way off? Apologies for being so far off the deep end :) -----Original Message----- From: q-l...@li... [mailto:q-l...@li...] On Behalf Of Albert Graef Sent: Wednesday, April 02, 2008 11:13 AM To: Discuss the Q language. Subject: Re: [q-lang-users] Speeding up Q Brian Beckman wrote: > Would you be so kind as to give a tiny example of a 'constructor' versus a > 'defined function' to clarify how they're different in the lambda calculus > but not so in TR? My memory of lambda is that it's just the following I should have worded that more carefully. Of course, pure lambda calculus doesn't have constructor symbols (they're emulated using lambdas), but Haskell, ML et al have them. I was actually talking about the constructor discipline in pattern-matching definitions in Haskell et al. In a sense these are just rewriting rules, but there are two different classes of symbols, the defined functions which occur as head symbols in the definitions, and the constructor symbols which occur in the argument patterns. Consequently, in Haskell, ML etc. there's just no way you can write a rule like foo (foo x) = x; expressing the idempotence of a "function" foo, or Bar (Bar x y) z = Bar x (Bar y z); for making a binary "constructor" Bar right-associative. But in TR, these kinds of rules are just normal business. In a sense, these are all just conveniences. After all, lambda calculus is as universal as term rewriting and they can easily emulate each other. But rewriting rules are just *so* much more convenient, otherwise why would there be pattern-matching in virtually every modern FPL (and there's even a Lisp dialect which has them)? TR languages go all they way there, by just abolishing the artificial segregation between functions and constructors. 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 ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ q-lang-users mailing list q-l...@li... https://lists.sourceforge.net/lists/listinfo/q-lang-users ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ q-lang-users mailing list q-l...@li... https://lists.sourceforge.net/lists/listinfo/q-lang-users |
From: Brian B. <bri...@co...> - 2008-04-03 00:45:38
|
I think I see :) At the risk of being tiresome, I think you're saying that in something like this in Haskell data Maybe a = Nothing | Just a we get a type constructor "Maybe" and a type variable "a" on the left-hand side, and a pair of data constructors, which are just ordinary functions (?!) -- on the right-hand side, and "a" gets punned from a type variable on LHS into an ordinary data-variable of type a on the RHS. At least, that's how I understand it (perhaps very poorly :) The TYPE constructor, "Maybe," is NOT available for Haskell's pattern matching, but the data constructors are, by design f :: Num a => Maybe a -> a f (Just x) = x f Nothing = 0 In Q, this distinction doesn't even arise, correct? And if not, is the reason that data constructors like "Maybe" don't exist? And, if so, isn't the reason simply that a "kinded" type system can't exist in Q or other TRS, and that type-checking must always be dynamic because and there's only one KIND of thing (a function) and patterns are perforce just over functions? Or am I way off? Apologies for being so far off the deep end :) -----Original Message----- From: q-l...@li... [mailto:q-l...@li...] On Behalf Of Albert Graef Sent: Wednesday, April 02, 2008 11:13 AM To: Discuss the Q language. Subject: Re: [q-lang-users] Speeding up Q Brian Beckman wrote: > Would you be so kind as to give a tiny example of a 'constructor' versus a > 'defined function' to clarify how they're different in the lambda calculus > but not so in TR? My memory of lambda is that it's just the following I should have worded that more carefully. Of course, pure lambda calculus doesn't have constructor symbols (they're emulated using lambdas), but Haskell, ML et al have them. I was actually talking about the constructor discipline in pattern-matching definitions in Haskell et al. In a sense these are just rewriting rules, but there are two different classes of symbols, the defined functions which occur as head symbols in the definitions, and the constructor symbols which occur in the argument patterns. Consequently, in Haskell, ML etc. there's just no way you can write a rule like foo (foo x) = x; expressing the idempotence of a "function" foo, or Bar (Bar x y) z = Bar x (Bar y z); for making a binary "constructor" Bar right-associative. But in TR, these kinds of rules are just normal business. In a sense, these are all just conveniences. After all, lambda calculus is as universal as term rewriting and they can easily emulate each other. But rewriting rules are just *so* much more convenient, otherwise why would there be pattern-matching in virtually every modern FPL (and there's even a Lisp dialect which has them)? TR languages go all they way there, by just abolishing the artificial segregation between functions and constructors. 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 ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ q-lang-users mailing list q-l...@li... https://lists.sourceforge.net/lists/listinfo/q-lang-users |
From: Libor S. <li...@gm...> - 2008-04-02 23:01:37
|
On Wed, 02 Apr 2008 13:21:43 +0100, Albert Graef <Dr....@t-...> wrote: > ..... Whether you > like that pretty much depends on which kind of programmer you are: do > you want a sharp knife, or are you worried about accidentally cutting > your feet off? ;-) > > Hope that this clarified the differences a bit. > > Cheers, > Albert Albert, Thank you for that clear answer! Now I am even more looking forward to trying out Pure. I was never one of those who believe that sharp knives should be banned. That kind of thinking leads to "Hello World!" program in "only" two pages of J... code ;-) It is often argued that safety is important. In my view, however, those who can program don't need it and those who cannot program only make more mistakes the longer the program is and should be doing something else anyway. Libor |
From: Albert G. <Dr....@t-...> - 2008-04-02 18:02:12
|
Brian Beckman wrote: > Would you be so kind as to give a tiny example of a 'constructor' versus a > 'defined function' to clarify how they're different in the lambda calculus > but not so in TR? My memory of lambda is that it's just the following I should have worded that more carefully. Of course, pure lambda calculus doesn't have constructor symbols (they're emulated using lambdas), but Haskell, ML et al have them. I was actually talking about the constructor discipline in pattern-matching definitions in Haskell et al. In a sense these are just rewriting rules, but there are two different classes of symbols, the defined functions which occur as head symbols in the definitions, and the constructor symbols which occur in the argument patterns. Consequently, in Haskell, ML etc. there's just no way you can write a rule like foo (foo x) = x; expressing the idempotence of a "function" foo, or Bar (Bar x y) z = Bar x (Bar y z); for making a binary "constructor" Bar right-associative. But in TR, these kinds of rules are just normal business. In a sense, these are all just conveniences. After all, lambda calculus is as universal as term rewriting and they can easily emulate each other. But rewriting rules are just *so* much more convenient, otherwise why would there be pattern-matching in virtually every modern FPL (and there's even a Lisp dialect which has them)? TR languages go all they way there, by just abolishing the artificial segregation between functions and constructors. 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: Philipp K. J. <ja...@ma...> - 2008-04-02 16:42:16
|
My apologies - the URL is: www.principal-value.com/my-book.php (3 'w' - instead of 4) Best, Ph. On 02/04/2008, Philipp K. Janert <ja...@ma...> wrote: > Finally: A book on Gnuplot! > > If you are interested in data analysis and visualization, > you might be interested in the upcoming book: > "Gnuplot in Action" > (to be published, Fall 2008, Manning Publications). > > You can pre-order it directly from the publisher: > www.manning.com/janert > > Gnuplot is probably the most popular open-source > program for plotting and visualization. The book > assumes no previous familiarity with Gnuplot. It > introduces the most basic concepts rapidly, and > then moves on to explain Gnuplot's advanced > concepts and power features in detail. > > If you want to learn more about the book and the > author, check out my book page at > wwww.principal-value.com/my-book.php > > If you have comments or suggestions for the book, > please let me know! > > Feel free to forward this information as appropriate. > > Best, > > Ph. > _______________________________________________ > Help-octave mailing list > Hel...@oc... > https://www.cae.wisc.edu/mailman/listinfo/help-octave ------------------------------------------------------- |