POV-Ray : Newsgroups : povray.off-topic : Why is Haskell interesting? Server Time
4 Sep 2024 19:21:49 EDT (-0400)
  Why is Haskell interesting? (Message 41 to 50 of 87)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Warp
Subject: Re: Why is Haskell interesting?
Date: 28 Feb 2010 08:40:29
Message: <4b8a724d@news.povray.org>
Neeum Zawan <m.n### [at] ieeeorg> wrote:
>         Now you know how lots of people feel when they have to learn UNIX
> (command line). At some point, you just tell them, "Hey, that's the way
> it is. Weird, obscure, but works, and doesn't really get in your way
> once you know it".

  The difference is that unix is 43 years old and there were no established
conventions back then.

  If you develop a new programming language today, there should be a good
reason why you go against general conventions. Making it different just for
the sake of being different is not smart.

-- 
                                                          - Warp


Post a reply to this message

From: Orchid XP v8
Subject: Re: Why is Haskell interesting?
Date: 28 Feb 2010 11:46:29
Message: <4b8a9de5$1@news.povray.org>
Warp wrote:
> Neeum Zawan <m.n### [at] ieeeorg> wrote:
>>         Now you know how lots of people feel when they have to learn UNIX
>> (command line). At some point, you just tell them, "Hey, that's the way
>> it is. Weird, obscure, but works, and doesn't really get in your way
>> once you know it".
> 
>   The difference is that unix is 43 years old and there were no established
> conventions back then.
> 
>   If you develop a new programming language today, there should be a good
> reason why you go against general conventions. Making it different just for
> the sake of being different is not smart.

Perhaps you're forgetting that Haskell is also 20 years old?

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Warp
Subject: Re: Why is Haskell interesting?
Date: 28 Feb 2010 11:57:19
Message: <4b8aa06e@news.povray.org>
Orchid XP v8 <voi### [at] devnull> wrote:
> Perhaps you're forgetting that Haskell is also 20 years old?

  Hence a complete newcomer as programming languages are concerned.

-- 
                                                          - Warp


Post a reply to this message

From: Orchid XP v8
Subject: Re: Why is Haskell interesting?
Date: 28 Feb 2010 12:10:04
Message: <4b8aa36c$1@news.povray.org>
>> Perhaps you're forgetting that Haskell is also 20 years old?
> 
>   Hence a complete newcomer as programming languages are concerned.

Not nearly as new as the likes of Java, Python, Ruby, etc. But sure, not 
as ancient as Lisp or C...

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Warp
Subject: Re: Why is Haskell interesting?
Date: 28 Feb 2010 12:21:53
Message: <4b8aa630@news.povray.org>
Orchid XP v8 <voi### [at] devnull> wrote:
> Not nearly as new as the likes of Java

  Well if you consider 5 years older as "not *nearly* as new"... :P

> Python

  Or 1 year older in this case...

> Ruby

  Ruby is 5 years newer as well.

-- 
                                                          - Warp


Post a reply to this message

From: Darren New
Subject: Re: Why is Haskell interesting?
Date: 28 Feb 2010 14:54:25
Message: <4b8ac9f1$1@news.povray.org>
Orchid XP v8 wrote:
> Heh. If you mean "why isn't it some random symbol?" then the answer is 
> "you can only use symbols for *binary* functions, not *unary* functions 
> such as NOT".

It could be worse. It could be APL, where functions are in greek.

-- 
Darren New, San Diego CA, USA (PST)
   The question in today's corporate environment is not
   so much "what color is your parachute?" as it is
   "what color is your nose?"


Post a reply to this message

From: Warp
Subject: Re: Why is Haskell interesting?
Date: 28 Feb 2010 16:15:11
Message: <4b8adcdf@news.povray.org>
Orchid XP v8 <voi### [at] devnull> wrote:
> Heh. If you mean "why isn't it some random symbol?" then the answer is 
> "you can only use symbols for *binary* functions, not *unary* functions 
> such as NOT".

  How do you negate an integral or floating point value, then?

-- 
                                                          - Warp


Post a reply to this message

From: Orchid XP v8
Subject: Re: Why is Haskell interesting?
Date: 28 Feb 2010 16:49:27
Message: <4b8ae4e7$1@news.povray.org>
>> Heh. If you mean "why isn't it some random symbol?" then the answer is 
>> "you can only use symbols for *binary* functions, not *unary* functions 
>> such as NOT".
> 
>   How do you negate an integral or floating point value, then?

Haskell possesses exactly *one* unary operator: unary minus. (Because, 
let's face it, not having this would just be annoying.) This is 
hard-wired into the language spec, however. You cannot define new unary 
operators.

The existence of the unary minus operator causes the following glitch:

   (5+) is a function.
   (5-) is a function.
   (5*) is a function.
   (5/) is a function.
   (+5) is a function.
   (-5) is a number.
   (*5) is a function.
   (/5) is a function.

Spot the odd one out. (There's a library function named "subtract" so 
that you can write "subtract 5" instead of "(-5)" to get a function.)

And it *is* unary minus, not part of the numeric literal syntax; for 
example "-x" works just as well as "-5" does.

(Saying "-x" is equivilent to saying "negate x". In particular, since 
unary minus is a syntax quirk, you can't define it directly. You define 
"negate" directly, and the compiler does the rest. Also, just for 
giggles, the default implementation of binary minus is "x - y = x + 
(negate y)"...)

So there - aren't you sorry you asked?

You may also have noticed that "sin -5" doesn't work. That's because 
it's interpretted as *binary* minus, i.e. "sin - 5", which obviously 
doesn't type-check. And *that* is why you have to say "sin (-5)". 
Annoying, isn't it?

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: nemesis
Subject: Re: Why is Haskell interesting?
Date: 28 Feb 2010 17:15:01
Message: <web.4b8aea70b2efd740fa5d1ec00@news.povray.org>
Orchid XP v8 <voi### [at] devnull> wrote:
> Neeum Zawan wrote:
>
> >  Now you know how lots of people feel when they have to learn UNIX
>
> ls, cp, mv, rn and friends. Becuase, let's face it, adding two octets to
> cp to make copy would be a crime...

there were no visual text editors back then.  You entered chars and there was a
lag before they were printed.  The less chars, the less the chance of errors.
Kinda like the choice of bits too.


Post a reply to this message

From: Orchid XP v8
Subject: Re: Why is Haskell interesting?
Date: 28 Feb 2010 17:30:35
Message: <4b8aee8b$1@news.povray.org>
>> ls, cp, mv, rn and friends. Becuase, let's face it, adding two octets to
>> cp to make copy would be a crime...
> 
> there were no visual text editors back then.  You entered chars and there was a
> lag before they were printed.  The less chars, the less the chance of errors.
> Kinda like the choice of bits too.

When I was briefly in the local council offices, I went into their 
central computer room.

Now, this was 1997 or so, but I am not kidding, EVERYTHING WAS BROWN! Do 
you have any idea how long ago they stopped making computers in brown 
and cream?!?

They had a machine with a big green screen - you know, the kind where 
you can actually *see* the scanlines, and text takes a split second or 
two to actually fade off the screen. (And you can see what the most 
common message is, because it's permanently burned into the phosphor.)

Anyway, when you type on the clunky keyboard, there's a sort of 2-second 
delay, and then the character appears on the screen. Apparently the 
mainframe you're operating is actually 60 miles down the road, connected 
over some kind of telephone link. And the terminal is a *real* dumb 
terminal. o_O

I have no idea what kind of system it runs - it wasn't Unix, or at least 
didn't appear to be. But if you type in something like "lx 37f7h.b" or 
similar, the huge line printer next to it suddenly goes crazy and starts 
printing people's benefits cheques.

It wouldn't surprise me if that's how the council's computer systems 
*still* work...

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.