Kate Bush and Haskell: Difference between pages

(Difference between pages)
Content deleted Content added
 
More complex examples: coherence with previous section
 
Line 1:
[[Image:Haskell Logo.jpg|frame|Haskell logo]]
'''Kate Bush''' (born Catherine Bush on [[July 30]], [[1958]] in [[Bexleyheath]], [[Kent]], [[England]]) is a British [[singer]] and songwriter who has acquired a large number of extremely devoted fans since her debut in [[1978]] with the surprise hit "Wuthering Heights," which was number 1 in the British music charts for 4 weeks.
 
'''Haskell''' is a standardized [[purely functional|pure]] [[functional_programming|functional]] [[programming language]] with [[non-strict programming language|non-strict semantics]]. Named after the logician [[Haskell Curry]], it was created by a committee formed in [[1987]] for the express purpose of defining such a language. The direct predecessor of Haskell was [[Miranda programming language|Miranda]] from [[1985]].
==Biography==
The latest semi-official language standard is '''Haskell 98''', intended to specify a minimal, portable version of the language for teaching and as a base for future extensions.
[[image:Kate Bush The Dreaming Cover.jpg|225px|thumb|right|<small>With a kiss<br />I'd pass the key<br />And feel your tongue<br />Teasing and receiving<br />''"Houdini"'' from [[The Dreaming (album)|The Dreaming]]</small>]]
The language continues to evolve rapidly, with [[Hugs]] and [[Glasgow Haskell Compiler|GHC]] (see below) representing the current [[de facto#De facto standards|''de facto'' standard]].
 
Characterizing syntax features in Haskell include [[pattern matching]], [[currying]], [[list comprehension]]s, [[guard (computing)|guard]]s, and definable [[operator (programming)|operator]]s. The language also supports [[recursion|recursive]] functions and [[algebraic data type]]s, as well as [[lazy evaluation]]. Unique concepts include [[Monads_in_functional_programming|monad]]s, and [[type class]]es.
[[David Gilmour]] of [[Pink Floyd]] was largely responsible for bringing her to prominence, funding her first demo sessions and attracting the interest of the Floyd's record company, [[EMI]]. They have since worked together on occasional projects and in concert.
The combination of such features can make [[function (programming)|functions]] which would be difficult to write in a procedural programming language almost trivial to implement in Haskell.
 
The language is, as of [[as of 2002|2002]], the [[Lazy_evaluation|lazy]] [[functional programming language|functional language]] on which the most research is being performed. Several variants have been developed: parallelizable versions from [[Massachusetts Institute of Technology|MIT]] and [[Glasgow University|Glasgow]], both called Parallel Haskell; more parallel and distributed versions called Distributed Haskell (formerly Goffin) and [[Eden_programming_language|Eden]]; a [[speculative execution|speculatively evaluating]] version called Eager Haskell and several [[object orientation|object oriented]] versions: Haskell++, [[O'Haskell]] and [[Mondrian programming language|Mondrian]].
While her range of styles does not appeal to everyone, Bush is nevertheless widely respected by many musicians, and has been noted as an influence and inspiration by artists as diverse as [[Jewel_(singer)|Jewel]], [[Tori Amos]], [[Björk]], [[Paula Cole]], [[Sinead O'Connor]], [[Pat Benatar]], [[Happy Rhodes]], [[The Utah Saints]], and others. The [[trip hop]] artist [[Tricky]] has stated her work has been a significant influence on him and that she should be treasured more than [[the Beatles]]. Though many outside of Europe remain unfamiliar with her work and its profound intensity, others in her profession are also unreluctant to declare her works as those of great genius. Even the iconoclastic punk rocker John Lydon ([[Johnny Rotten]] of the [[Sex Pistols]]) has declared her work to be "fucking brilliant" and has labelled her "a true original".
 
Although Haskell has a comparatively small user community, its strengths have been well applied to a few projects. [[Autrijus Tang]]'s [[Pugs]] is an implementation for the forthcoming Perl 6 language with an interpreter and compilers that proved useful already after just a few months of its writing. [[DARCS]] is a revision control system, with several innovative features.
Even in her earliest works where the piano was a primary instrument, she weaved together many diverse influences, melding classical music, rock, and a wide range of ethnic and folk sources, to produce a uniquely impressive amalgalm, and this has continued throughout her career. More than one reviewer has used the term ''surreal'' to describe much of her music, for many of the songs have a melodramatic emotional and musical surrealism that defies easy categorization. It has been observed that even the more joyous of the pieces is often tinged with traces of melancholy, and even the most sorrowful have elements of a unique vitality struggling against all that would oppress it. The unapologetic use of her voice as an instrument to convey a broad range of emotional intensity and subtlety is one thing that characterizes nearly all that she does.
 
There is also a Haskell-like language that offers a new method of support for [[GUI]] development called [[Clean programming language|Concurrent Clean]]. Its biggest deviation from Haskell is in the use of [[uniqueness type]]s for input as opposed to [[Monads in functional programming|monads]].
Kate Bush has tackled sensitive and taboo subjects long before it has become fashionable to do so. ''Moving'' discusses female orgasm; ''Kashka From Baghdad'' is a brilliant song about a happy gay couple oblivious to the world's prejudice around them. Her originality transcends time and space.
 
== Examples ==
She has worked with [[Peter Gabriel]] on two of his albums, most notably on the hits "Games Without Frontiers" and ''Don't Give Up'', (the latter a duet); and his appearance on her 1979 television special. Their duet of [[Roy Harper]]'s ''Another Day'' was discussed for release as a single, but this never came to pass. Harper is another frequent collaborator, appearing on her song ''Breathing'' and her on his albums ''HQ'' and ''Once'' (both also featuring Gilmour).
 
=== Anatomy of a Haskell function ===
She has appeared in duets with [[Midge Ure]], [[Big Country]] and others on their albums. A wide diversity of respected artists have worked with her on some of her more recent albums ranging from the rock guitarist [[Jeff Beck]], the classical guitarist [[John Williams_(guitarist)|John Williams]], the folk artists The [[Trio Bulgarka]], and [[Prince (artist)|Prince]].
 
The [[Hello world program|"Hello World"]] of functional languages is the [[factorial]] function. Expressed as pure Haskell:
She has stated that she is at work on a new album, with the title of one track "How to be Invisible" having been discussed on at least one of her fan sites. She was reportedly recording tracks as recently as November 2003 at [[Abbey Road Studios]], but as of summer 2004 no release date for a new album has been announced, more than a decade after her last recordings were released.
 
fac :: Integer -> Integer
The only gripe fans and critics have ever had about her has been her refusal since the end of the [[1970s]] to tour.
fac 0 = 1
fac n | n>0 = n * fac (n-1)
 
This describes the factorial as a recursive function, with a single terminating base case. It is similar to the descriptions of factorials found in mathematics textbooks. Much of Haskell code is similar to mathematics in facility and syntax.
----
 
The first line of the factorial function shown is optional, and describes the ''types'' of this function. It can be read as ''the function fac'' (fac) ''has type'' (::) ''from integer to integer'' (Integer -> Integer). That is, it takes an integer as an argument, and returns another integer.
"Kate Bush" is also a character in [[Victory Gundam]], one of the five (of the six) original members of the Shrike Team who were named in homage to famous [[20th century]] female singers.
 
The second line relies on [[pattern matching]], an important part of Haskell programming. Note that parameters of a function are not in parentheses but separated by spaces. When the function's argument is 0 (zero) it will return the integer 1 (one). For all other cases the third line is tried. This is the [[recursion]], and executes the function again until the base case is reached. A [[guard (computing)|guard]] protects the third line from negative arguments that would run down unterminated.
==Discography==
 
The "Prelude" is a number of small functions analogous to C's standard library. Using the Prelude and writing in the "point free" (insert classic Haskell joke here) style of unspecified arguments, it becomes:
===Studio albums===
#[[The Kick Inside]] ([[1978 in music|1978]])
#[[Lionheart]] ([[1978 in music|1978]])
#[[Never For Ever]] ([[1980 in music|1980]])
#[[The Dreaming (album)|The Dreaming]] ([[1982 in music|1982]])
#[[Hounds of Love]] ([[1985 in music|1985]])
#[[The Sensual World]] ([[1989 in music|1989]])
#[[The Red Shoes (Album)|The Red Shoes]] ([[1993 in music|1993]])
===Compilations===
#[[The Whole Story]] ([[1986 in music|1986]]) (includes a new rendition of "Wuthering Heights")
#[[This Woman's Work]] Vol.s I & II ([[1990 in music|1990]])
#[[This Woman's Work (boxed set)|This Woman's Work 1978-1990]] ([[1998 in music|1998]]) (A boxed set of albums including two discs of rare [[b-side]]s)
 
fac = product . enumFromTo 1
===Live albums===
#[[Kate Bush: Live at the Hammersmith Odeon|Live at the Hammersmith Odeon]] ([[1989 in music|1989]])
 
The above is close to mathematical definitions such as ''f = g <small>o</small> h'' (see [[function composition]]), and indeed, it's ''not'' an assignment of a value to a variable.
==External links==
{{wikiquote}}
* [http://homepage.eircom.net/~twoms/katenews.htm Kate Bush News]
* [http://gaffa.org/intro/toc.html Gaffaweb - extensive fan site]
* [http://home.att.net/~james51453/ "Cathy" Online version of the book by Kate's brother, John Carder Bush]
* [http://www.dongrays.com/kate-bush/mp3/ Kate Bush in MP3 - early studio demos by Kate Bush, plus other rare recordings.]
 
=== More complex examples ===
[[Category:1958 births|Bush, Kate]] [[Category:Record producers|Bush, Kate]]
[[Category:Female singers|Bush, Kate]] [[Category:Kate Bush albums]]
 
A simple [[RPN]] calculator:
[[de:Kate Bush]]
 
[[ja:&#12465;&#12452;&#12488;&#12539;&#12502;&#12483;&#12471;&#12517;]]
calc = foldl f [] . words
[[nl:Kate Bush]]
where
f (x:y:zs) "+" = y+x:zs
f (x:y:zs) "-" = y-x:zs
f (x:y:zs) "*" = y*x:zs
f (x:y:zs) "/" = y/x:zs
f xs y = (read y :: Float):xs
 
A function which returns a stream of the [[Fibonacci numbers]] in linear time:
 
fibs = 0 : 1 : (zipWith (+) fibs (tail fibs))
 
The same function, presented with GHC's [[parallel list comprehension]] syntax:
 
fibs = 0 : 1 : [ a+b | a <- fibs | b <- tail fibs ]
 
The earlier factorial function, this time using a sequence of functions:
 
fac n = (foldl (.) id [\x -> x*k | k <- [1..n]]) 1
 
A remarkably concise function that returns the list of [[Hamming number]]s in order:
 
hamming = 1 : map (*2) hamming # map (*3) hamming # map (*5) hamming
where xxs@(x:xs) # yys@(y:ys)
| x==y = x : xs#ys
| x<y = x : xs#yys
| x>y = y : xxs#ys
 
== Implementations ==
The following all comply fully, or very nearly, with the Haskell 98 standard, and are distributed under [[open source]] licences. There are currently no commercial Haskell implementations.
* '''''[[Hugs]]''''' ([http://www.haskell.org/hugs/]) is a [[bytecode]] interpreter. It offers fast compilation of programs and reasonable execution speed. It also comes with a simple graphics library. Hugs is good for people learning the basics of Haskell, but is by no means a "toy" implementation. It is the most portable and lightweight of the Haskell implementations.
* '''''[[Glasgow Haskell Compiler|Glasgow Haskell Compiler]]''''' ([http://www.haskell.org/ghc/]). The Glasgow Haskell Compiler compiles to native code on a number of different architectures, and can also compile to C. GHC is probably the most popular Haskell compiler, and there are quite a few useful libraries (e.g. bindings to [[OpenGL]]) that will only work with GHC.
* '''''nhc98''''' ([http://www.cs.york.ac.uk/fp/nhc98/]) is another bytecode compiler, but the bytecode runs significantly faster than with Hugs. Nhc98 focuses on minimising memory usage, and is a particularly good choice for older, slower machines.
* '''''Jhc''''' ([http://repetae.net/john/computer/jhc/]) a haskell compiler emphasising speed and efficiency of generated programs as well as exploration of new program transformations.
* '''''Gofer''''' An educational version of Haskell, Gofer was developed by Mark Jones. It was supplanted by HUGS.
* '''''HBC''''' ([http://www.cs.chalmers.se/~augustss/hbc/hbc.html]) is another native-code Haskell compiler. It hasn't been actively developed for some time, but is still usable.
*'''''Helium''''' ([http://www.cs.uu.nl/helium/]) is a newer dialect of Haskell. The focus is on making it easy to learn. It currently lacks typeclasses, making it incompatible with many Haskell programs.
 
== Extensions ==
*[[O'Haskell]] is an extension of Haskell adding [[object-oriented programming|object-orientation]] and [[concurrent programming]] support.
 
== External links ==
* [http://www.haskell.org The Haskell Home Page]
* [http://www.haskell.org/hawiki/ The Haskell Wiki]
* [http://www.haskell.org/tutorial/ A Gentle Introduction to Haskell 98] ([http://www.haskell.org/tutorial/haskell-98-tutorial.pdf pdf] format)
* [http://haskell.org/papers/NSWC/jfp.ps Haskell vs. Ada vs. C++ vs. Awk vs. ... An Experiment in Software Prototyping Productivity]
* [http://www.willamette.edu/~fruehr/haskell/evolution.html The Evolution of a Haskell Programmer] - a slightly humorous overview of different programming styles available in Haskell
* [http://haskell.readscheme.org An Online Bibliography of Haskell Research]
* [http://www.haskell.org/humor/press.html Haskell Humor]
* [http://www.research.microsoft.com/~simonpj/papers/haskell-retrospective Wearing the hair shirt: a retrospective on Haskell]. Simon Peyton Jones, invited talk at POPL 2003.
 
{{Major programming languages small}}
 
[[Category:Haskell dialects|*]]
[[Category:Programming languages]]
[[Category:Functional languages]]
[[Category:Declarative programming languages]]
 
[[cs:Haskell]]
[[de:Haskell (Programmiersprache)]]
[[es:Haskell]]
[[eo:Haskell]]
[[fr:Haskell]]
[[it:Haskell]]
[[nl:Haskell]]
[[ja:Haskell]]
[[pl:Haskell]]
[[pt:Haskell (linguagem de programação)]]
[[ru:Haskell]]
[[sk:Haskell (programovací jazyk)]]
[[sv:Haskell]]
[[zh:Haskell]]