Talk:Haskell/Archive 1

message: 1What's meant by an "eager" variation?  I worked with functional languages for some amount of time and never heard the term. --Robert Merkel
:I'm pretty sure it means "without lazy evaluation". --Anon.
::That's right. --The Anome
::: Basic Lambda Calculus theory... Just read some. Eager means you are always reducing the rightmost redex. The other "simple" option (more complex options are what Explicit Substitution Calculi studies) is to always reduce the leftmost redex. This second option is guaranteed to always reduce to a Normal Form if it exists (the eager doesnt guarantee this). Lazy is a refinement of the second option where you store pointers to redexes that eventually get copied around. -- Anon  —Preceding unsigned comment added by 189.11.192.130 (talk) 20:55, 14 November 2007 (UTC)
thread_title:  Eager evaluation 

message: :"Haskell is, as of 2002, the functional language on which the most research is being performed."
Do you have a reference for this statement? --Taw
:"It is one of the more popular functional languages"
Likewise for this unreferenced claim. —The preceding unsigned comment was added by 17.221.40.150 (talk) 00:08, 13 April 2007 (UTC)
replies: text:  A survey of recent literature shows that Haskell syntax is widely used in functional programming research, but it is doubtful that there exists a reference that actually justifies that it is 'most used'.  —Preceding unsigned comment added by 130.126.108.208 (talk) 20:59, 30 October 2007 (UTC)
replies: text:  Um... That "Nobody uses Haskell" is a blatant lie. DiscipleRaynes (talk) 06:03, 28 January 2009 (UTC)
thread_title:  Boasting 

message: Why the deletion of the 'extensions' section on Hugs98 for .NET?  I can't immediately see why it'd be problematic.  (And there no rationale provided.) --Alai 19:36, 19 Jan 2005 (UTC)
thread_title:  .NET information deletion 

message: Can someone knowledgeable about Haskell please add some commentary to the "More Complex Examples" section, similar to what is there for the "Examples" section? The syntax is a bit abstruse for those not already familiar with the Haskell language. Kwertii 18:46, 20 February 2006 (UTC)
replies: text: I suppose the point is that those who are intrigued by the examples can turn to the language definition and tutorials for syntax and pure functional programming in general. I don't think we can teach all in this article, but we could try to add notes on what's the point in each example and links for more info elsewhere in Wikipedia. The parallel list comprehension link will help something, algebraic data type has something on lists although they should have an article of their own, corecursion isn't very helpful for the moment. --TuukkaH 20:05, 20 February 2006 (UTC)
thread_title:  Explanations of the examples 

message: This really needs to be clarified:
:Haskell has many advanced features not found in other programming languages; these features can and have been criticized for making the language more complex and difficult to understand.
As it stands suggests that the problem is that Haskell has differences from other languages and that the critic simply wants to suppress diversity.  This would not be rational criticsm, because it suggests that the ideal is that only one unique language exist.  The problem may have been misphrased to avoid the real criticsm, or it may have been included without there being any real merit behind it. --ToobMug 01:37, 24 April 2006 (UTC)
replies: text: I think the key modifier is "advanced" (monads, anyone?). I agree that the formulation needs to be made more precise. Fredrik Johansson 06:33, 24 April 2006 (UTC)
thread_title:  Unclear criticism 

message: Simon Peyton Jones, Paul Hudak, John Hughes, and Philip Wadler are currently working on a paper describing the history of Haskell. This paper is currently in draft state, but will be submitted to the History of Programming Languages conference (HOPL'07) once it is finished. The draft is publically available and already is a very valuable source of information. — Tobias Bergemann 09:55, 4 August 2006 (UTC)
thread_title:  "A History of Haskell" paper 

message: I recently started an article for wxHaskell, one of the many bindings for WxWidgets. It has been nominated for deletion as it "Does not assert notability". Please have a look at it and improve it if possible, especially if you are a fan of wxHaskell. Aaron McDaid (talk - contribs)  13:33, 11 September 2006 (UTC)
thread_title:  delete [[wxHaskell]]? 

message: "This sentence does not make much sense: he Glasgow Haskell Compiler compiles to native code on a number of different architectures—as well as to ANSI C—using C-- as an intermediate language." --using c-- ?? 128.12.108.147 13:12, 4 March 2007 (UTC)
replies: text: This is an old question but I figured I'd jump on it.  This is a fairly standard approach to handle compilation.  Write a generic: Language X -> C translator and then use a platform specific C compiler handle C -> platform specific instruction code. See P-code machine for a more broad based discussion jbolden1517Talk 18:58, 31 March 2009 (UTC)
thread_title:  confusing sentence 

message: What's the status of Concurrent Haskell? I've found this reference:
PEYTON JONES, S., GORDON, A., AND FINNE, S. Concurrent
Haskell. In 23rd ACM Symposium on Principles of Programming
Languages (POPL’96), pp. 295–308.
and it's also recently described in Composable Memory Transaction, 2006.
Bartosz 01:55, 7 March 2007 (UTC)
replies: text: This isn't the right place for programming advice, so email for follow up.  What it sounds like you want is .  jbolden1517Talk 13:19, 29 March 2007 (UTC)
thread_title:  Concurrent Haskell 

message: Say in haskell I wanted to implement the types Z/mZ i.e. "integers mod m" for all integeres m>1. Naturally I'd want to implement the arithmetic operator / for these types. Context: In 1992-3 I faced this prob while writing haskell code for smith reduction for all integral domains where it makes sense. (Which in turn was part of a homological-algebra package).
The best I could do was to define a single type Zmod, and replace the binary operator \a \b a/b by a ternary function \a \b \m "a/b mod m" . Which meant that even for the integer type, I had to replace (/) by that ternary function and pass it a dummy argument that it ignored. 
Was I missing something then? Is there in newer haskell versions a way to define type schemas? (ie nonconstant type-valued functions of at least one argument). [I suppose not - is Type yet a Type in Haskell?] Or at least to do the stuff mentioned in the above paragraph in a less kludgy way?
I guess not - types are untermenschen in haskell, subject to compulsory type checks which had better be "finite" - "infinite" type checking being "inefficient" - so e.g. you cannot write the  fixedpoint operator named after Haskell Curry in the language named after Haskell Curry. (nor can you write the noniterative nonrecursive factorial program that works by passing a function as an argument to itself, 'cause that function would have "infinite" type. —The preceding unsigned comment was added by 59.93.195.26 (talk) 03:51, 29 March 2007 (UTC)
replies: text: This isn't the right place for programming advice, so email for follow up.  What it sounds like you want is .  jbolden1517Talk 13:19, 29 March 2007 (UTC)
thread_title: = is non-kludgy way to implement the type schema Z/mZ (m integer >1) 

message: Perhaps a pronounciation ought to be given? I suspect it's probably pronounced as the last name of "Beaver" Cleaver's buddy Eddie, but in my head it always sounds closer to Pascal (programming language). --Belg4mit 18:37, 7 April 2007 (UTC)
replies: text: I don't know. I'd also be interested in seeing an IPA-pronunciation. Wikitionary or Dictionary.com don't give pronunciation on this entry either. I'd hereby like to invite a knowledgable fellow wikipedian to help. --Netizen (talk) 08:04, 24 June 2009 (UTC)
thread_title:  Pronunciation 

message: Heh, whatever. These code examples are all taken from some sort of freshman Haskell course and are nothing like  Haskell code looks like out there in the wild. I note my attempt to add such an example and clean up the current mess has been summarily reverted. —The preceding unsigned comment was added by 193.77.153.149 (talk) 11:43, 11 May 2007 (UTC)
replies: text: I thought your example was a good one.  I said as much.  I think it would be useful for wikibooks.  But it involved several complex ideas and it was highly monadic.  Moreover you deleted other examples.  jbolden1517Talk 11:47, 11 May 2007 (UTC)
replies: text:  Ooooo Monads, those are so scary, don't you think so? I thought about mentioning uns*fePe**orm*O, but thankfully I regained my senses and removed it. God forbid we show Haskell is good for anything but producing Fibonacci numbers, a computing concept so important it obviously has to be demonstrated in several slightly different but equivalent ways. Similarly we should keep the verbose idiocy about how to get the examples running in Hugs and ghci because obviously various people come here and we should really aim for the lowest common denominator persons. —The preceding unsigned comment was added by 193.77.153.149 (talk) 12:41, 11 May 2007 (UTC)

text: Who made you king of Wikipedia that you may make demands in such a manner? —The preceding unsigned comment was added by 193.77.153.149 (talk) 17:27, 11 May 2007 (UTC)
replies: text: I'm not sure if he's actually the King of Wikipedia, but his demands (at least the last two) reflect established Wikipedia policies. See WP:TALK, and for both points, and specifically WP:CIVIL for #3. As for the first demand, it's a bit easier for you to carry on discussion if you have an account, but you're certainly welcome to remain anonymous. Staecker 17:43, 11 May 2007 (UTC)
thread_title:  Code examples 

message: I don't really see what aspects of Python are owed in particular to Haskell. Perhaps lazy streams, but is there any evidence that it did so directly? Jogloran 13:14, 13 May 2007 (UTC)
replies: text: From the Python page: Python 2.0 borrowed a major feature from the functional programming language Haskell: list comprehensions. 90.4.118.238 05:44, 24 May 2007 (UTC)
thread_title:  'Influenced: Python' 

message: Would you folks say that Haskell supports multiple dispatch? If so, could you update that article? I'm not too sure. It was this section of that article that piqued my curiousity:
: (from multiple dispatch) "In languages with multiple dispatch, all the arguments are treated symmetrically in the selection of which method to call. Matching recognizes first, second, third, etc. position within the call syntax, but no one argument "owns" the function/method carried out in a particular call."
One of the things I like about Haskell is that it supports (something like) the above. In Haskell, the first argument isn't special, and typeclasses can be used on any argument:
:meth :: (A a, B b) => x -> a -> b
Aaron McDaid (talk - contribs)  17:20, 16 December 2007 (UTC)
thread_title:  Multiple dispatch? 

message: I'm not sure that Java generics rise to the level of an influence from Haskell. True, there is the Philip Wadler connection, but IMHO Java's generics are just a form of parametric polymorphism (which pre-dates Haskell, e.g., in ML and Miranda) with the syntactic flavor of C++ templates. Clconway (talk) 23:22, 4 January 2008 (UTC)
thread_title:  Influence on Java 

message: I downloaded GHCi from haskell.org, tried the examples on the Wikipedia page, and found most of them didn't work.  This is hugely confusing.  One of the examples with "let" that's recommended for Hugs worked for me, which is also confusing since I'm not running Hugs, and the page says GHCi doesn't have that restriction.
I see from the comments above that this problem has come up before.  I respectfully suggest that the examples should work with the standard Haskell system. Billgordon1099 (talk) 05:46, 7 June 2008 (UTC)
replies: text: It can be very confusing for a beginner. When defining a function an GHCi, one must write, for example, "let foo x = x * x", all in one line. You could then use "foo" wherever you like. For testing, I recommend writing all functions in a file, loading that file with GHCi using ":l file.hs", then testing the functions from there. --Kinghajj (talk) 15:06, 15 September 2008 (UTC)
thread_title:  Working examples, please

message: The latest addition to the article suggests that mapReduce could be simplified from 1) to 2)
1) mr takes a list, applies a function to it and then reduces the elements based on a criterion
 mr criteria operator list = reduce criteria (map operator list)
which can be expressed point-free as 2)
 mr = (. map) . (.) . reduce
--Ancheta Wis (talk) 18:15, 31 March 2009 (UTC)
replies: text: That was me.  Was that a point of interest or did you have a question/comment/concern or...?  jbolden1517Talk 18:53, 31 March 2009 (UTC)
replies: text: Not a concern, rather a talking point for the inherent efficiency of higher order functions to show how it is more expressive than our current popular programming languages. Perhaps such an example could be a poster child for the language. --Ancheta Wis (talk) 22:21, 31 March 2009 (UTC)

text: I neglected to say: Well Done, JBolden! Thank you for your contribution to the encyclopedia. --Ancheta Wis (talk)
Well thank you!  Nice to hear you like.  Yeah I got a kick out of that one when I worked it out the first time.  The one that made a convert out of me was the Eight queens puzzle solutions:
 
 queens :: Int -> Int
 queens n = map reverse $ queens' n
    where queens' 0       = 
          queens' k       = [q:qs | qs <- queens' (k-1), q <- [1..n], isSafe q qs]
          isSafe   try qs = not (try `elem` qs || sameDiag try qs)
          sameDiag try qs = any (\(colDist,q) -> abs (try - q) == colDist) $ zip [1..] qs
I saw that solution and it got me to learn Haskell.  Look at those C#/Java/Python solutions comparatively, talk about a mound of boilerplate.   Wikipedia has haskell/FP versions all over the place, I personally think this trend is likely to start selling people on FP, at least I hope  jbolden1517Talk 02:28, 1 April 2009 (UTC)
thread_title: [[Point-free programming]] application

message: I've removed the goal from the article because it's of little use to people who don't know Haskell (or to those that do) and it's POV too. What if I opened the article about Java and discovered (written with 'we' to show my point):
:Java is an advanced programming language and we've got an active community, lots of rich libraries, excellent integration with other languages and if you use Java, you'll experience rapid development and your software will be robust, concise and correct. Oh, and did we mention the joys of cutting-edge research for twenty years?
It may all be factually correct for Haskell and it should all be in the article but not by repeating the project's goals: after reading the article, the reader should be able to conclude whether this holds or not. Simeon (talk) 15:54, 5 April 2009 (UTC)
replies: text: Java actually has such a section Java (programming language)#Primary goals.  jbolden1517Talk 16:44, 5 April 2009 (UTC)
replies: text:  Ok, but in a philosophy section it's more acceptable than using it as main introduction in an article. I must say I didn't check the Java article, I also could have used language X as I just meant an arbitrary language. - Simeon (talk) 16:53, 5 April 2009 (UTC)
thread_title:  Removed goal 

message: I'm having a tough time seeing how the new for loop example teaches anything.  This looks like a slow complex implementation of map to me.  Does anyone disagree?  jbolden1517Talk 20:31, 26 April 2009 (UTC)
thread_title:  for loop 

message: The syntax highlighting in the code examples looks horrible. It's distracting, makes the examples hard to read, and draws too much attention to some irrelevant details. Furthermore, one-line examples without indentation look too much like short paragraphs of normal text. The general idea of having syntax highlighting might be ok, but the current implementation is so bad that I strongly suggest that we revert back to the version that uses simply "code"-blocks. — Miym (talk) 11:46, 26 June 2009 (UTC)
replies: text: Borders and gray background have now been reinstated, restoring much of the lost readability in my eyes. However, I myself would prefer not to use syntax highlighting at all for code examples in wikipedia articles as I find it distracting outside of a code editor. — Tobias Bergemann (talk) 08:58, 1 July 2009 (UTC)
thread_title:  Syntax highlighting 

message: It is not clear to me that this article has an overall structure or
theme. Here's a draft attempt to plan a rewrite of the Haskell article,
to give a comprehensive account of the language
http://haskell.org/haskellwiki/WikipediaArticleDesign Dons00 (talk) 23:05, 2 August 2009 (UTC)
replies: text: Moved this section to foot of the page. It is customary to keep talk in temporal order. --Ancheta Wis (talk) 23:13, 2 August 2009 (UTC)

text: I've made a start on this over at User:Simonmar/Haskell_(programming_language).  So far I've only added an overview section.  Hack away, and let's clean up this article. Simonmar (talk) 22:58, 2 December 2009 (UTC)
thread_title:  No clear structure