Re: ocaml vs python/ruby/perl etc. was [SLUG] Why not C

2005-11-28 Thread Raphael Kraus
Ok, I know I shouldn't bite - but I just have to...

 Read the note on usage again.
 Here it is in terms geeks will grok:
 less is used for continuous quantities,
 fewer is used for discrete quantities
 
 less water, fewer drops.
 less population, fewer people.
 less traffic, fewer cars.

less water != fewer drops

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: ocaml vs python/ruby/perl etc. was [SLUG] Why not C

2005-11-26 Thread telford
On Fri, Nov 25, 2005 at 02:21:41PM +1000, QuantumG wrote:
 
 Dist thou not knoweth how thee shalt speak?!
 
 Prescriptive grammer is domain of the historically ignorant.
 
 Language changes, this is a good thing, deal with it.

Spelling is one of those new fangled fads that will
die out before much longer.

- Tel

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: ocaml vs python/ruby/perl etc. was [SLUG] Why not C

2005-11-24 Thread telford
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, Nov 24, 2005 at 11:11:42AM +1100, Robert Collins wrote:

 Well, the only bugs I've found to date that cannot be effectively tested
 for are concurrent operation bugs - threads and co-processes
 specifically.

None of which are detected by compilers, at least not the sort
of compilers we have available. There are code analysis tools that
can prove correct locking behaviour (e.g. prove your code is deadlock
free, prove resources are always locked, etc). I haven't seen one
available as open source.

- Tel

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)

iQIVAwUBQ4WjYMfOVl0KFTApAQKPiw/+IgMDnXb0JZoHersTZQmC4fPX8rMiIkf9
rU6oqPK64K6pdlK/z5m1YQa0Fx7OFMXFJgeSSu2wiK/st3L89KDAFs5eVCWpO2jz
NBW7nByd6Suh5+blrr9GZ8PKAvrYbWiKcVc8KzCrSXd7wyaUXT7spJeP244XCZ/9
eo6YRTF0LBrWm5SzSTTmfvHEHuSf3O7LcUjZKzLinBLpFSEa4qkttiU4Qyq5eTtj
bdDG1/xbWMEBfD8sYUiH8b+GYk9fYtr4aRLLgusH4C6PCscvZy21xnHyit9XpXbb
MpZfX4dQFgaZtjg/H2kXh9qEs2P4J8pamG6DQxHJNfthcXBniQ7cL8z8DOo8h/4T
c6JfQRNQDbAOLtRlzofojhrJYE7FEyOWIwdK/r18Mb0GuuAu8pY1fsAF0kgfuMZN
CAaOE0r51krFppPQBbcapM4k3WXfyjfghgdtos2OpX/3v0v83O59dF62+Czyybh5
X05CizYsSH3x0DfXbfVIK2Y7BFSgLTI6BQeXAlTnirGhmhL1+j2Yj6Xl6pwQQCIV
0ZaoPiy443R28KpzKUG9gn8qZCAmP8ZoueyHbCUjfq4tc8sPa5tWhDYXC4OEDukn
s0TsYSznkHpL3WYr6hHFo0ewkk2kpVVM2+JecIDedY01XF+NBzCgwDPEbHyDh4Ji
WNmKO8M9mcg=
=r2JJ
-END PGP SIGNATURE-
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: ocaml vs python/ruby/perl etc. was [SLUG] Why not C

2005-11-24 Thread telford
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, Nov 23, 2005 at 10:42:54PM +1100, Del wrote:
 
 Less is a measure of quality not quantity.

If I have less money than you do, the quality of my money
is still exactly the same as yours.

  So by saying there are
 less bugs what you are implying is that there are the same number
 of bugs, but the bugs are smaller.

That would be lesser bugs.

  What you probably want to say is
 fewer bugs.

This implies that the functional behaviour of a computer program
can be measured in countable, integer units -- an implication
that I for one would hesitate to make. There is a fundamental
problem with the colloquial usage of the word bugs because
insects are countable and and computer misbehavior is not.

- Tel


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)

iQIVAwUBQ4Wp+cfOVl0KFTApAQJndhAAjpOoqxLFQyyKGSvmPaFuMLuLSd/da/Vh
kMwojeryA+ZltaEmX3I4l4TeLZ4uZu3U/cbqkTpDL+/Jy3nkox/7pr5miSzhaVst
T4Q52oyKl2b1C6cxpNPAEON6ejrOdA5UoHkVYlu4y4YOwR5M28H0Afq2HIXTUo7l
uV4LwGlMJ6VM6VKfydypOxOd0yJX1ByFqYtE7bIREoFOAWVQRa4wpraWJQBPnITn
2lUUrmYAqEhGiEJ0j/kXMIJ4zJoyg5ZKMLUAjg/bihB5a74sSVMPCjs+7WV/luht
FNAI/wAZdpVIlFw7jEzsYqeoItKejZedlgkAR6pUmWmYLn17zV7WCZgGeFHspWru
TuHz4tBsCWSZwc6CNAXVnOehxF6mu+pyHtKvPsmlfAoInK2HhqJP7bMeZ8s2UCaE
g6s/wnuFpQ5M4GDatvxiMNy85Xtp9ICI0Sg2lhG0xbP8dOuuVofONRz/f5Db6XSk
EILD/dyi1SgKntRvl/Yx+CSKEHfeSgBCQtGws/AXbBh6oMy9KIJ2BdTckxcMeP8u
InonJRGbOJJVaFZeoH3NBa/jHwOwbbAOtDewBv9pRa1KDcJDC4o+TiNQ/Kk9vLTd
T/xxLiZU5QQWjLAj/0lxbCzu8s9VOdpH+dcTo0Y0HMAUpuPYaOVDZe79o1PcXjfc
cuKI10pomXM=
=zBiz
-END PGP SIGNATURE-
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: ocaml vs python/ruby/perl etc. was [SLUG] Why not C

2005-11-24 Thread James Gray
On Wednesday 23 November 2005 22:42, Del wrote:
 Steve Lindsay wrote:
  Python works for me because:
 
  a) i (and others) write less code because the language is very
  expressive. therefore less bugs

 Gra.  Grammar fascist attack coming up:

 Less is a measure of quality not quantity.  So by saying there are
 less bugs what you are implying is that there are the same number
 of bugs, but the bugs are smaller.  What you probably want to say is
 fewer bugs.

int main(){
if ( bugs.original()  bugs.new() ){
cout  We don't have as many bugs - yay for us!  endl;
else
cout  Either things are worse or no better - woe is us  endl;
}

return 0;
}

Hmmm, less bugs or fewer bugs is still shorter.  I'm with Palmer, let's go 
grow some corn.

James
-- 
Accept people for what they are -- completely unacceptable.
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: ocaml vs python/ruby/perl etc. was [SLUG] Why not C

2005-11-24 Thread James Purser
 Steve Lindsay wrote:
  Python works for me because:
 
  a) i (and others) write less code because the language is very
  expressive. therefore less bugs

 Gra.  Grammar fascist attack coming up:

 Less is a measure of quality not quantity.  So by saying there are
 less bugs what you are implying is that there are the same number
 of bugs, but the bugs are smaller.  What you probably want to say is
 fewer bugs.

Just to prove I can be as anal as others, Less is an indicator of quantity
as defined by the Oxford Dictionary:
http://www.askoxford.com/concise_oed/less?view=uk as in I have less
apples than you.

-- 
James Purser
Producer/Presenter - Linux Australia Update
http://k-sit.com - My Blog
http://la-pod.k-sit.com - Linux Australia Update Podcast, Blog and Forums
Skype: purserj1977

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: ocaml vs python/ruby/perl etc. was [SLUG] Why not C

2005-11-24 Thread Peter Miller
On Fri, 2005-11-25 at 12:48 +1100, James Purser wrote:
 http://www.askoxford.com/concise_oed/less?view=uk

Read the note on usage again.
Here it is in terms geeks will grok:
less is used for continuous quantities,
fewer is used for discrete quantities

less water, fewer drops.
less population, fewer people.
less traffic, fewer cars.

Express lane: 8 items or FEWER

mumble/

-- 
Regards
Peter Miller [EMAIL PROTECTED]
/\/\*http://www.canb.auug.org.au/~millerp/

PGP public key ID: 1024D/D0EDB64D
fingerprint = AD0A C5DF C426 4F03 5D53  2BDB 18D8 A4E2 D0ED B64D
See http://www.keyserver.net or any PGP keyserver for public key.


signature.asc
Description: This is a digitally signed message part
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Re: ocaml vs python/ruby/perl etc. was [SLUG] Why not C

2005-11-24 Thread QuantumG

Peter Miller wrote:


On Fri, 2005-11-25 at 12:48 +1100, James Purser wrote:
 


http://www.askoxford.com/concise_oed/less?view=uk
   



Read the note on usage again.

 



Dist thou not knoweth how thee shalt speak?!

Prescriptive grammer is domain of the historically ignorant.

Language changes, this is a good thing, deal with it.

Trent

--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


ocaml vs python/ruby/perl etc. was [SLUG] Why not C

2005-11-23 Thread Steve Lindsay
On 11/23/05, Erik de Castro Lopo [EMAIL PROTECTED] wrote:

 While I agree wholeheartedly that tests are necessay, I'm curious
 why you are advocating writing Python tests to find bugs at run time
 that say an Ocaml compiler will find for free at compile time.


While I would agree that catching any bugs asap is a good thing, I
find that typos and the like are not the problems that are causing me
most grief (crappy logic, crappy requirements, not enough time, other
developers writing crappy code, etc are more likely to cause me
problems).


Python works for me because:

a) i (and others) write less code because the language is very
expressive. therefore less bugs
b) i (and others) write less code because there are heaps of modules
out there to do many of the things I need to do (and so many of them
come as part of the standard library). therefore less bugs
c) i write code and it tends to work first or second go (which says
way more about python than it does about my coding ability). I don't
have to fight the language, and don't often think why did they do it
that way?
d) the code tends to be easy to read (both my code and the code in
standard modules etc.)
e) i don't have to look up the documentation each time I try something
slightly new (I can keep a large chunk of the language in my head or I
can work it out by playing around in the interpreter for a few
minutes)
f) actually I'll mention the interpreter again, it seems such a simple
thing but the number of times I've not known how to use a module but
worked it out in the interpreter using a combination of dir, help
and __doc__ in a short period of time makes it worth mentioning as a
point on it's own


Erik, I've never used ocaml (and know very little about it). Would you
be able to evaluate it against some of the points I've raised above,
particularly in comparison to python (I'm assuming you've used python
based on your criticism)?


(I'm not suggesting my criteria are the only ones that matter,
different experience, different projects, different environments etc
might make other things more or less important, they are criteria that
are relevant to me however)


Cheers.Steve
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: ocaml vs python/ruby/perl etc. was [SLUG] Why not C

2005-11-23 Thread Erik de Castro Lopo
Steve Lindsay wrote:

 While I would agree that catching any bugs asap is a good thing, I
 find that typos and the like are not the problems that are causing me
 most grief (crappy logic, crappy requirements, not enough time, other
 developers writing crappy code, etc are more likely to cause me
 problems).

I recently worked on a quite large piece of Python code which I 
inherited without any tests. The only way to test it was to run it
which took 10-15 minutes.

While I was working on this I was constantly finding that little
bugs that an Ocaml/Haskell/Ada/Pascal etc compiler would have found
were killing me at run time. It was a royal PITA.

rearranged your post slightly

 Erik, I've never used ocaml (and know very little about it).

I spoke at SLUG about it. Slides here:

http://www.mega-nerd.com/tmp/firstimp-ocaml.pdf

An Ocaml tutorial is here:

http://www.ocaml-tutorial.org/

 Would you
 be able to evaluate it against some of the points I've raised above,
 particularly in comparison to python (I'm assuming you've used python
 based on your criticism)?

 Python works for me because:
 
 a) i (and others) write less code because the language is very
 expressive. therefore less bugs

I would say that for pure code (ie not using the excellent Python
libraries) Ocaml will require slightly less LOC than Python.

 b) i (and others) write less code because there are heaps of modules

The Ocaml libraries are not as extensive, comprehensive or as well
documented as those of Python. There are however tasks where even 
the Python libraries won't help you.

 c) i write code and it tends to work first or second go (which says
 way more about python than it does about my coding ability). I don't
 have to fight the language, and don't often think why did they do it
 that way?

The thing I have found with Ocaml and many others say about Haskell
is that if it compiles its usually right.

 d) the code tends to be easy to read (both my code and the code in
 standard modules etc.)

Once you get around Ocaml's slight weird syntax this does apply.

 e) i don't have to look up the documentation each time I try something
 slightly new (I can keep a large chunk of the language in my head or I
 can work it out by playing around in the interpreter for a few
 minutes)

Ocaml also has a command line interpreter for experimentation. There
are also bytecode and native-code compilers.

 f) actually I'll mention the interpreter again, it seems such a simple
 thing but the number of times I've not known how to use a module but
 worked it out in the interpreter using a combination of dir, help
 and __doc__ in a short period of time makes it worth mentioning as a
 point on it's own

The Ocaml documentation is a little dry and not up the same standard as
Python.

However, there are some tasks for which Ocaml is a far better fit than 
Python. For me those would be computer algebra systems and compilers.

Erik
-- 
+---+
  Erik de Castro Lopo
+---+
Whenever the C++ language designers had two competing ideas as to
how they should solve some problem, they said, OK, we'll do them
both. So the language is too baroque for my taste. -- Donald E Knuth
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: ocaml vs python/ruby/perl etc. was [SLUG] Why not C

2005-11-23 Thread Steve Lindsay
On 11/23/05, Erik de Castro Lopo [EMAIL PROTECTED] wrote:

lots of interesting stuff

Cool, thanks Erik. Will check it out.

CheersSteve
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: ocaml vs python/ruby/perl etc. was [SLUG] Why not C

2005-11-23 Thread Del

Steve Lindsay wrote:

Python works for me because:

a) i (and others) write less code because the language is very
expressive. therefore less bugs


Gra.  Grammar fascist attack coming up:

Less is a measure of quality not quantity.  So by saying there are
less bugs what you are implying is that there are the same number
of bugs, but the bugs are smaller.  What you probably want to say is
fewer bugs.

This has been a community service announcement.

(Just because you write code doesn't mean you can't write English too).

--
Del
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: ocaml vs python/ruby/perl etc. was [SLUG] Why not C

2005-11-23 Thread Denis Crowdy
Should probably move this to [chat]...

On Wed, Nov 23, 2005 at 10:42:54PM +1100, Del wrote:
 Steve Lindsay wrote:
 Python works for me because:
 
 a) i (and others) write less code because the language is very
 expressive. therefore less bugs
 
 Gra.  Grammar fascist attack coming up:
 
 Less is a measure of quality not quantity.  So by saying there are
 less bugs what you are implying is that there are the same number of
 bugs, but the bugs are smaller.  What you probably want to say is
 fewer bugs.
Agreed but...  Here perhaps is where language differs from code.  If enough
people over a long enough period of time use less as a measure of
quantity (as in something measurable in discrete units), it will indeed
become a measure of such.  Dictionaries, and therefore definitions, are
constructed through analysis of usage.  That would throw a spanner in
the works for compiler writers wouldn't it?

Denis



-- 
Dr Denis Crowdy
Department of Contemporary Music Studies
Macquarie University
NSW 2109, Australia
+61 2 9850 6787; http://www.dcms.mq.edu.au
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: ocaml vs python/ruby/perl etc. was [SLUG] Why not C

2005-11-23 Thread Jeff Waugh
quote who=Denis Crowdy

 Dictionaries, and therefore definitions, are constructed through analysis
 of usage.  That would throw a spanner in the works for compiler writers
 wouldn't it?

Good morning, Perl 6!

- Jeff

-- 
Ubuntu USA  Europe Tour: Oct-Nov 2005http://wiki.ubuntu.com/3BT
 
 Just because I sit in front of a terminal all day doesn't mean I
  couldn't hunt you down and righteously kick your ass to feed my
  newfound cannabalism. - Darwinian System Administration
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: ocaml vs python/ruby/perl etc. was [SLUG] Why not C

2005-11-23 Thread Matthew Palmer
On Wed, Nov 23, 2005 at 07:46:36PM +1100, Erik de Castro Lopo wrote:
 Steve Lindsay wrote:
 
  While I would agree that catching any bugs asap is a good thing, I
  find that typos and the like are not the problems that are causing me
  most grief (crappy logic, crappy requirements, not enough time, other
  developers writing crappy code, etc are more likely to cause me
  problems).
 
 I recently worked on a quite large piece of Python code which I 
 inherited without any tests. The only way to test it was to run it
 which took 10-15 minutes.

 While I was working on this I was constantly finding that little
 bugs that an Ocaml/Haskell/Ada/Pascal etc compiler would have found
 were killing me at run time. It was a royal PITA.

Any codebase without a comprehensive testsuite is going to be painful to
work on.  The bugs that a compiled language picks up just get replaced in
the royal PITA list by ones that the compiler doesn't pick up.  Lather,
rinse, repeat.

So, you add a testsuite, and then there's a whole new set of bugs that crop
up that can't be effectively tested for in the royal PITA list.  LRR.

Let's just give up this programming thing and go back to farming.

def CowTest(unittest.TestCase):
[...]

- Matt


signature.asc
Description: Digital signature
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Re: ocaml vs python/ruby/perl etc. was [SLUG] Why not C

2005-11-23 Thread Robert Collins
On Thu, 2005-11-24 at 11:01 +1100, Matthew Palmer wrote:

 So, you add a testsuite, and then there's a whole new set of bugs that crop
 up that can't be effectively tested for in the royal PITA list.  LRR.

Well, the only bugs I've found to date that cannot be effectively tested
for are concurrent operation bugs - threads and co-processes
specifically. State machine based pseduo concurrency however, gives
extremely easy reproduction of a bug, once you identify it ;).

What sorts of bugs are your PITA list ?

Rob
-- 
GPG key available at: http://www.robertcollins.net/keys.txt.


signature.asc
Description: This is a digitally signed message part
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Re: ocaml vs python/ruby/perl etc. was [SLUG] Why not C

2005-11-23 Thread Matthew Palmer
On Thu, Nov 24, 2005 at 11:11:42AM +1100, Robert Collins wrote:
 On Thu, 2005-11-24 at 11:01 +1100, Matthew Palmer wrote:
 
  So, you add a testsuite, and then there's a whole new set of bugs that crop
  up that can't be effectively tested for in the royal PITA list.  LRR.
 
 Well, the only bugs I've found to date that cannot be effectively tested
 for are concurrent operation bugs - threads and co-processes
 specifically. State machine based pseduo concurrency however, gives
 extremely easy reproduction of a bug, once you identify it ;).
 
 What sorts of bugs are your PITA list ?

GUIs, concurrency, and graceful handling of major system faults (like
database goes away in the middle of a transaction) are my three biggies. 
I avoid them by not doing GUIs or major concurrency unless I can avoid them,
and just crossing my fingers that I'll never get an inconvenient database
crash.  Luckily, I don't do work in environments where such things are
critical, otherwise I'd be very much unhappier.

- Matt


signature.asc
Description: Digital signature
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html