are <Propon...@gmx.net> writes: > On Sep 19, 6:52 pm, Raffael Cavallaro <raffaelcavallaro@pas-d'espam- > s'il-vous-plait-mac.com> wrote: > > On 2007-09-19 19:18:24 -0400, are <Propon...@gmx.net> said:
> > > Wanting something > > > that's fast and high-level, I've zeroed in on Lisp and OCaml. > > > Superficially, these two seem very different from one another, yet > > > I've noticed that there a some who post to both of these groups. > > > Would anyone who knows both languages well (let's not start a flame > > > war, please!) care to comment on the similarities and differences > > > between them?
> > Wanting something that's fast and high-level, > > I've zeroed in on Lisp and Scheme. > > Superficially, these two seem very different > > from one another, yet I've noticed > > that there are some who post to both of these groups. > > Would anyone who knows both languages well (let's not start a > > flame war, please!) care to comment on the similarities > > and differences between them? ;^)
> > ------------------------------------------
> > Anyone else here on c.l.l think that 'are' should choose > > OCaml, decamp to c.l.functional, and take frog-boy with him?
> Yeah, well, I admit it was optimistic of me to hope that a flame war > might be avoided regardless of how genuine my interest in the question > posed was.
Although Raffael's tone may have been a bit flippant, I do think that if you peel past the personal-sounding bits, there's a serious suggestion hiding in there that's worth looking at.
Sometimes when faced with a decision like this, the flamewar you anticipate is caused not by someone failing to taking someone seriously, but by taking them seriously.
The problem is that we are still recovering in this group from an extensive discussion of this very issue, and all you have to do is peel back a couple of months to see it. It was long and painful, and the ratio of signal to noise was not nearly as high as many would like, but it's all archived for your convenience.
We don't necessarily have to relive it. It wasn't pleasant and it sapped energy from more pleasant discussions we'd like to be having.
Moreover, people often think it's a diss to say "go elsewhere" but not every language is for every person, and it's quite common for people to be properly placed in a language other than Lisp. We are not threatened by people going elsewhere, and you ought not take that as a negative. Languages serve user communities and those user communities each have biases. (See my http://www.nhplace.com/kent/PS/Lambda.html for an elaboration of this theme.) There are two reasons to shop for a language: (a) because you need a specific feature [in which case you know what that feature is in advance and should just ask] or (b) because you want something that just lets you write stuff the way you want to say it. In the latter case, I think you want to look at some programs and decide what feels good.
Feature set comparisons are easily divisive, depending on how they are worded, and it's easy to see how you might think someone trying to keep you from having an open discussion about comparative feature sets might be trying to do you an injustice, but it can be just the opposite.
Pick one or both languages and just write some code. It's good to know a lot of languages anyway. So don't make people choose for you--if you have it narrowed to two, just learn both. Then see where you get.
And preferrably, don't assume the programs will have the same shape. Try to avoid questions that ask about what the "word for x" is in the other language, as if the only difference between languages was what word you use to say the exact identical thing. Languages vary in subtle and important ways that change the way you write programs in them even to accomplish a task. Focus on accomplishing a goal, not on syntax. If you're at the point of wanting pedantically a particular syntax, you should just ask which language has it and when they raise their hand, you should dive for it because now you're back in category (a) of my choices above.
Questions on this forum (and probably on any other, too) are better treated when they're asked by someone who genuinely seems to want to worry about just getting something done in the language, rather than just having us justify the fact that we happen to prefer this language to others. (Adding cross-posting is a devastatingly bad thing to do in this regard. See the URL at top of this post for a detailed explanation, and why the fact that "union" does not equal "intersection" matters.) Forums have titles in order to attract people who like to talk about those things. The preference for Lisp by people who post here is not, a priori, a rejection of other options. But when we want to talk about those languages, we go to their forums mostly. It's just been a sore spot that for the particular language you mention, a major proponent of that language has overrun us with comparisons whether we wanted it or not. So that brings me back to my original point, and I'll stop there.
George Neuner wrote: > On Wed, 19 Sep 2007 23:14:05 -0400, Ken Tilton > <kennytil...@optonline.net> wrote:
>>Griff wrote:
>>>Is it better to learn F# directly through F# literature or through >>>OCaml?
>>Through a hole in your head, and the higher the caliber the bigger the >>hole and the shorter the learning curve. Hollow-point bullets really >>grease the skids.
> Hollow points just frag against the skull ... unless they're filled > with nitroglycerin. Best to use metal jacketed.
On Thu, 20 Sep 2007 08:10:39 -0700, are <Propon...@gmx.net> wrote: >I have looked at Scheme and really liked it. I wish I had been >introduced to programming via Scheme. But for my purposes, I find >there are two major drawbacks:
> 1. The formally defined language lacks some things I'd really like >to have, ...
Don't be put off by the small size of the standard - almost no Scheme implements only the standard functionality. Extensions to the standard are called "SRFIs" and Scheme has a long list of them (see http://srfi.schemers.org/). Some require native support (e.g., to support arrays of unboxed values), but most are portable. The set of SRFIs considered by the community to be very important are implemented by most Schemes and the heavyweight Schemes (Chez, PLT, etc.) implement a large number of useful ones.
[Anyone can submit an SRFI and some are, admittedly, frivolous. SRFIs with strong community support tend to quickly find their way into implementations.]
> ... like OO. Of course you can roll your own, but that's not >where I want to be spending my time. Or you can use a proprietary >extension, like that in MzScheme, but I don't want to be locked into a >single supplier.
Scheme has a portable CLOS implementation called TinyCLOS. It's lacking a few of the advanced features of CL CLOS, but it suffices for most OO programming. TinyCLOS has a MOP though not all implementations support it.
PLT Scheme (mzScheme) has Swindle, which, in addition to a version of CLOS, provides many other features of CL in Scheme. I don't know how portable Swindle itself is, but you could check with the author, Eli Barzilay.
I understand your not wanting to be locked into a single implementation, but you should understand that many of the things which are not portable among Scheme implementations are the same things that not portable among CL implementations: networking, FFI, compiler optimizations, proprietary extensions, etc.
> 2. From what I've seen Scheme is too slow, even if I'm not worried >about factors of two in execution time.
Stalin produces very fast executables that are comparable to optimized CL. Even John Harrop was/is impressed by it. The main complaint against Stalin is that the compiler itself is quite slow ... users tend to do initial development with another implementation and then switch to Stalin once the code base becomes stable.
Dylan also produces fast executables. Although Dylan is technically a variant of Scheme, it uses a conventional syntax rather than sexprs and programming in it "feels" quite un-lispy. That said, some people love it.
On Sep 20, 10:58 am, are <Propon...@gmx.net> wrote: [...]
> Yeah, well, I admit it was optimistic of me to hope that a flame war > might be avoided regardless of how genuine my interest in the question > posed was.
Asking proponents of Language X about why Language X is better than Language Y is a wonderfully reliable way to start a flamewar. Indeed, it's so efficient it will work nine times out of ten even if your intent is not to start a flamewar. In any event, even if it weren't inherently flamebaity, it's still unlikely to generate much useful information.
People who hang around in a Common Lisp newsgroup do so because they have some sort of investment in Common Lisp. They may love it, they may hate it but have to deal with it, or they may just be trying to learn it, but one way or another, they're united by their involvement with Common Lisp.
They aren't really likely to have any sort of investment or extensive experience with OCaml. You're better off asking about it here than in a forum devoted to contract bridge or something, but that's not saying much.
If you describe your problem domain and your tastes a little better, you'll probably get some good information about whether Common Lisp is right for you. You can ask the analogous question in the OCaml group and probably get useful information from them. Then you'll have to make the final decision which language is best for your purposes---but then, you were going to have to do that anyway.
>> - For the red dots (which show results on 32-bit architecture), Lisp >> and OCaml are very close.
> OCaml is 4% faster in the fastest case.
>> Only for 64 bit SBCL was slower.
> OCaml is 55% faster in the fastest case.
> That does not disagree with "Lisp is typically 1-2x slower than OCaml".
>> It would be a good idea to split the graphs;
> Yes. I'd like to write a JavaScript front end that lets you display only the > results you're interested in. The static GIF was fine when there were fewer > entrants...
+--------------- | I have looked at Scheme and really liked it. I wish I had been | introduced to programming via Scheme. But for my purposes, I find | there are two major drawbacks: | | 1. The formally defined language lacks some things I'd really like | to have, like OO. Of course you can roll your own, but that's not | where I want to be spending my time. +---------------
Ditto, which is one of the reasons I switched from Scheme to CL.
+--------------- | Or you can use a proprietary extension, like that in MzScheme, | but I don't want to be locked into a single supplier. +---------------
After trying several other flavors, I *had* actually "settled on" using MzScheme, mainly for it's performance [compared to the other Scheme's I'd tried] and its clean FFI [MzScheme calls external C code with a Tcl-like/shell-like "int argc, Scheme_Object **argv" calling sequence] and support for runtime DSO lining. I had no particular concerns myself about being "locked" to a "supplier", since the code is in C and builds from scratch fairly easily. I used MzScheme quite happily for a number of years. [But...]
+--------------- | 2. From what I've seen Scheme is too slow, even if I'm not | worried about factors of two in execution time. +---------------
MzScheme now comes with a compiler to C, "mzc", that speeds things up somewhat. But the speed of compiled CL is certainly one of the reasons I eventually "turned to the dark side" and embraced CL.
That, and getting tired of reinventing stuff all the time.
[And having a major app that I'd written in MzScheme v.50 break horribly by a major change in internals that occurred circa MzScheme v.103...]
Even with CL, you will probably find yourself "settling into" a specific implementation of CL for most of your work. [I use and like CMUCL. YMMV.] Don't worry about it. The good news is that if you *do* have to change implementations later, that rather large portion of your code which was written to conform to the ANSI Standard (a.k.a. CLHS) will probably "just work"; only the implementation-specific extension bits will have to change. [And you kept those factored aside anyway... DIDN'T YOU?!? ;-} ]
-Rob
----- Rob Warnock <r...@rpw3.org> 627 26th Avenue <URL:http://rpw3.org/> San Mateo, CA 94403 (650)572-2607
> Yes. I'd like to write a JavaScript front end that lets you display only the > results you're interested in. The static GIF was fine when there were fewer > entrants...
> That's really what I'd like to do -- learn both languages well and > make a decision. But that's going to take a long time. While I have > learned some Lisp and have enjoyed doing so, I fear that it's going to > be a long time before I really "get it," before I can break out of the > non-Lisp thought patterns that I've acquired from using Algol-like > languages and truly access Lisp's power.
Don't worry about that, learning from a good lispbook will make you think lispway, I'm coming from basic/pascal/c/c++/c# heritage but found that s-expressions are my natural way of thinking.
Cesar Rabak wrote: > Jon Harrop escreveu: >> Yes. I'd like to write a JavaScript front end that lets you display only >> the results you're interested in. The static GIF was fine when there were >> fewer entrants...
> Why "JavaScript" and not OCaml?
JavaScript is more widely supported by browsers and is still on my TODO list of languages to learn.
On 2007-09-20, Jon Harrop <j...@ffconsultancy.com> wrote:
Jon Harrop <j...@ffconsultancy.com> wrote: > OCaml is 55% faster in the fastest case.
One thing I didn't find in the benchmark description -- did you run a precompiled SBCL in both cases? Compiled from source? Just wondering if you didn't end up running a version of SBCL fo 32 bit on the 64 bit architecture.
are wrote: > Yeah, well, I admit it was optimistic of me to hope that a flame war > might be avoided regardless of how genuine my interest in the question > posed was.
I know. Not long ago, I posted a genuine question to an Israeli and a Palestinian newsgroup asking for an honest comparison of Judaism and Islam, because I genuinely wanted to know which was the better religion, and you would've thought that I just walked into an airport with explosives strapped to my chest. I mean, really. How was I supposed to know that this was a touchy subject?
Jeronimo Pellegrini wrote: > On 2007-09-20, Jon Harrop <j...@ffconsultancy.com> wrote: > Jon Harrop <j...@ffconsultancy.com> wrote: >> OCaml is 55% faster in the fastest case.
> One thing I didn't find in the benchmark description -- did you run a > precompiled SBCL in both cases? Compiled from source? > Just wondering if you didn't end up running a version of SBCL fo 32 bit > on the 64 bit architecture.
Damien Kick wrote: > are wrote: >> Yeah, well, I admit it was optimistic of me to hope that a flame war >> might be avoided regardless of how genuine my interest in the question >> posed was.
> I know. Not long ago, I posted a genuine question to an Israeli and a > Palestinian newsgroup asking for an honest comparison of Judaism and > Islam, because I genuinely wanted to know which was the better religion, > and you would've thought that I just walked into an airport with > explosives strapped to my chest. I mean, really. How was I supposed to > know that this was a touchy subject?
I'm surprised to see anyone making a mountain out of this mole hill. In the big picture, OCaml and Lisp are both functional languages and most people can learn a lot by comparing and contrasting them, which is all the OP was asking us to do.
Perhaps a lesson that we can all take away from this is that community friendliness can be very important when learning a language and this is unquestionably the weakest point of Lisp. If anyone still has faith in Lisp it might be worthwhile trying to write honest and impartial responses to other people's questions here in future.
>Not long ago, I posted a genuine question to an Israeli and a >Palestinian newsgroup asking for an honest comparison of Judaism and >Islam, because I genuinely wanted to know which was the better religion, >and you would've thought that I just walked into an airport with >explosives strapped to my chest. I mean, really. How was I supposed to >know that this was a touchy subject?
More proof that you're stupid.
All religions are equally bad. God[*] didn't create any religion, they were all created by humans attempting to control the behavior of other humans. There is no "right" or "wrong" belief ... what you believe is just as valid as what anyone else believes.
[*] The term "God", as it is used here, is not intended to refer to the preferred deity of any particular religion, but refers to the collective belief in a knowledge and/or power greater than human.
> Damien Kick wrote: >> are wrote: >>> Yeah, well, I admit it was optimistic of me to hope that a flame war >>> might be avoided regardless of how genuine my interest in the question >>> posed was. >> I know. Not long ago, I posted a genuine question to an Israeli and a >> Palestinian newsgroup asking for an honest comparison of Judaism and >> Islam, because I genuinely wanted to know which was the better religion, >> and you would've thought that I just walked into an airport with >> explosives strapped to my chest. I mean, really. How was I supposed to >> know that this was a touchy subject?
> I'm surprised to see anyone making a mountain out of this mole hill. In the > big picture, OCaml and Lisp are both functional languages and most people > can learn a lot by comparing and contrasting them, which is all the OP was > asking us to do.
Er... no. Lisp is a multi paradigm language, which allows you to use functional programming.
> Perhaps a lesson that we can all take away from this is that community > friendliness can be very important when learning a language and this is > unquestionably the weakest point of Lisp. If anyone still has faith in Lisp > it might be worthwhile trying to write honest and impartial responses to > other people's questions here in future.
There is no lesson to take from nothing. Lest about friendliness or lack of.
If you have faith in the language you promote you could start being honest in the postings of yours in this NG.
George Neuner wrote: > On Wed, 26 Sep 2007 14:43:23 -0500, Damien Kick <dk...@earthlink.net> > wrote:
>> How was I supposed to >> know that this was a touchy subject?
> More proof that you're stupid.
> All religions are equally bad. [...]
Man, even the Discommodiously Defenestrated Toad, later in this thread, could tell that I was being sarcastic.
DDT escreveu:
> I'm surprised to see anyone making a mountain out of this mole hill. In the > big picture, OCaml and Lisp are both functional languages and most people > can learn a lot by comparing and contrasting them, which is all the OP was > asking us to do.
He still doesn't understand netiquette [1], but at least he didn't start lecturing us on theology.
[1] Actually, I'm sure he understands it. He's just free to ignore it and he does.
>>>Yeah, well, I admit it was optimistic of me to hope that a flame war >>>might be avoided regardless of how genuine my interest in the question >>>posed was.
>>I know. Not long ago, I posted a genuine question to an Israeli and a >>Palestinian newsgroup asking for an honest comparison of Judaism and >>Islam, because I genuinely wanted to know which was the better religion, >>and you would've thought that I just walked into an airport with >>explosives strapped to my chest. I mean, really. How was I supposed to >>know that this was a touchy subject?
Reminds me of my speech on the positive side of the KKK to the Million Man March down in DC a few years back. Talk about intolerance!
> Perhaps a lesson that we can all take away from this is that community > friendliness can be very important when learning a language and this is > unquestionably the weakest point of Lisp. If anyone still has faith in Lisp > it might be worthwhile trying to write honest and impartial responses to > other people's questions here in future.
Then can I kill them?
kenny
ps. Being lectured by Dr. Jon "Sorry for the sewage I am dumping in your NG but my Web site needs hits" Harrop on social skills is easily the high point of my day. k
On 2007-09-26, Jon Harrop <j...@ffconsultancy.com> wrote:
> Jeronimo Pellegrini wrote: >> On 2007-09-20, Jon Harrop <j...@ffconsultancy.com> wrote: >> Jon Harrop <j...@ffconsultancy.com> wrote: >>> OCaml is 55% faster in the fastest case.
>> One thing I didn't find in the benchmark description -- did you >> run a precompiled SBCL in both cases? Compiled from source? >> Just wondering if you didn't end up running a version of SBCL fo 32 >> bit on the 64 bit architecture.
> Debian binary packages in both cases.
In this case -- Unless you installed Debian for AMD64, you were running a 32-bit binary.
I would either repeat the experiment with the binary from sbcl.org (the current version is 1.0.9) or in a Debian/AMD64 installation. If you decide to run the binary from sbcl.org, you still need a Linux kernel running in 64-bit mode (an ordinary i386 installation will not do); you may need to reinstall Linux.
Jeronimo Pellegrini wrote: > Unless you installed Debian for AMD64, you were running a 32-bit binary.
> I would either repeat the experiment with the binary from sbcl.org (the > current version is 1.0.9) or in a Debian/AMD64 installation. If you > decide to run the binary from sbcl.org, you still need a Linux kernel > running in 64-bit mode (an ordinary i386 installation will not do); > you may need to reinstall Linux.
Yes, this is an x86_64 Debian install. All of the 64-bit results are from compilers generating 64-bit code in this 64-bit OS.
Cesar Rabak wrote: > Jon Harrop escreveu: >> Damien Kick wrote: >>> are wrote: >>>> Yeah, well, I admit it was optimistic of me to hope that a flame war >>>> might be avoided regardless of how genuine my interest in the question >>>> posed was. >>> I know. Not long ago, I posted a genuine question to an Israeli and a >>> Palestinian newsgroup asking for an honest comparison of Judaism and >>> Islam, because I genuinely wanted to know which was the better religion, >>> and you would've thought that I just walked into an airport with >>> explosives strapped to my chest. I mean, really. How was I supposed to >>> know that this was a touchy subject?
>> I'm surprised to see anyone making a mountain out of this mole hill. In >> the big picture, OCaml and Lisp are both functional languages and most >> people can learn a lot by comparing and contrasting them, which is all >> the OP was asking us to do.
> Er... no. Lisp is a multi paradigm language, which allows you to use > functional programming.
On Sep 20, 4:10 pm, are <Propon...@gmx.net> wrote:
> > You may also like to look at Scheme.
> I have looked at Scheme and really liked it. I wish I had been > introduced to programming via Scheme. But for my purposes, I find > there are two major drawbacks:
> 1. The formally defined language lacks some things I'd really like > to have, like OO. Of course you can roll your own, but that's not > where I want to be spending my time. Or you can use a proprietary > extension, like that in MzScheme, but I don't want to be locked into a > single supplier.
> 2. From what I've seen Scheme is too slow, even if I'm not worried > about factors of two in execution time.
Hello: Give Bigloo a try!
Bigloo gives you a very fast compiled language and has lost of add on stuff. Okay, you must stick to Bigloo then cos Bigloo goes far beyond any minimal Scheme standard. Bigloo has native object oriented programming facilities. But I must confess that though never done any elaborate Common Lisp programming myself, Common Lisp object oriented programming gives you surely more power than Bigloo ist one.
Maybe yoy are happy with Python? Python has lots of libraries to put you aside with Matlab or IDL so to speak.
But best: play around and decide for yourself which suits you best! A computer programming language is often no substitute for creativity. I wished it were.