PDA

View Full Version : Haskell



danbaron
17-02-2011, 08:05
I'm downloading Haskell. It must really be something, because the download is 74.09 MB.

If I am correct, Haskell is a compiler, programs are compiled into standalone ".exe" files.

------------------------------------------------------

I know a tiny bit about Haskell.

For instance, I think if you say,

x = 2,

then, you cannot later say,

x = 3.

That by itself seems like a "show stopper", doesn't it?!

------------------------------------------------------

Also, Haskell is referred to as being a "lazy" language.

I think if you say,

y = sqrt(7),

it won't evaluate the value of y, until it is forced to.

Now, if you say,

z = y^0.346,

it still won't evaluate either y or z, because, it is too "lazy".

I think that only if you send a value to output, will it do the necessary evaluations required, to get that output. Maybe even then, it will wait until it is forced to write the output, like for instance, when the program terminates. Or, maybe if it notices that you had a heart attack and died during the program's execution, it will never do the calculations, I'm not sure how smart it is.

------------------------------------------------------

"Learn You a Haskell for Great Good!"

http://learnyouahaskell.com/chapters

:p

kryton9
17-02-2011, 10:29
Dan, I wish I could keep the languages clearer in my head... it all turns into a haze when I look at so many, but I can't resist.

I found this timeline today and was surprised by how old Lisp was, actually a lot of languages were a lot older than I remember.

http://en.wikipedia.org/wiki/Timeline_of_programming_languages

One of the game engine designer gurus had a presentation that said Haskell would be the best language to develop games in more than c++.

https://docs.google.com/viewer?url=http://www.st.cs.uni-saarland.de/edu/seminare/2005/advanced-fp/docs/sweeny.pdf

This is one of my favorite lines from the slides:
Factoid: C# exposes more than 10 integer-like data types, non of which are those defined by (Pythagoras, 500BC).

danbaron
18-02-2011, 07:22
The name, "Haskell", comes from Haskell Curry.

http://en.wikipedia.org/wiki/Haskell_Curry

Forth was invented by Chuck Moore. He is still alive. His life seems to be filled with, "excitement". I guess it comes from his personality.

http://www.colorforth.com/

I've looked a little at Forth, and it seems to me that Factor was patterned after it. My guess is that if not Forth, then no Factor.

I looked at Sweeney's presentation. I guess he is saying that for games in which the order of events is unpredictable, it is less natural to use imperative languages than functional languages. Also, hardware is permitting processes to occur concurrently instead of consecutively. I guess that concurrency is perfect for simulation type games. And, functional languages are natural for concurrency, because, in functional languages, the order of execution does not matter. (But, I am observing the world of game programming, from the outside, so, my interpretations are not, "golden". Maybe, "leaden".)

:mad::p
Dan

kryton9
18-02-2011, 09:11
Wow that S40 chip sure sounds interesting on his site!
I hope they bring it to market somehow.