Re: [Haskell-cafe] New in haskell for old-timers?

2012-03-31 Thread Paul R
John 0.8.1 is almost due to be put out, it will be the first to be 100% John haskell 2010 (and haskell 98) compliant and has a lot of other neat John features over 0.8.0. That's great ! I can't wait to put it into my toolbox. Haskell compilers are all pieces of art, bringing beauty to our daily

Re: [Haskell-cafe] New in haskell for old-timers?

2012-03-30 Thread Brandon Allbery
On Fri, Mar 30, 2012 at 10:33, Mats Rauhala mats.rauh...@gmail.com wrote: I didn't realize asking how long it's been for him, but he mentioned about new fronts in optimizing compilers and specifically mentioned a compiler that could compile to legible C. I've been following Haskell only for a

Re: [Haskell-cafe] New in haskell for old-timers?

2012-03-30 Thread Mats Rauhala
On 11:57 Fri 30 Mar , Brandon Allbery wrote: The legible C thing is probably jhc ( http://repetae.net/computer/jhc/ ). It's GHC's *illegible* registerized C that is being phased out; the slightly-more-legible ANSI C mode used for porting is staying, though. Oh wow, I thought jhc was

Re: [Haskell-cafe] New in haskell for old-timers?

2012-03-30 Thread Jason Dagit
On Fri, Mar 30, 2012 at 1:05 PM, Mats Rauhala mats.rauh...@gmail.com wrote: On 11:57 Fri 30 Mar     , Brandon Allbery wrote: The legible C thing is probably jhc ( http://repetae.net/computer/jhc/ ).  It's GHC's *illegible* registerized C that is being phased out; the slightly-more-legible

Re: [Haskell-cafe] New in haskell for old-timers?

2012-03-30 Thread Henk-Jan van Tuyl
On Fri, 30 Mar 2012 22:45:40 +0200, Jason Dagit dag...@gmail.com wrote: Anyway, back to the original topic, some of the big items that I would mention to your friend include: * cabal/cabal-dev * hackage (and some of the better known libraries, Data.Vector/Data.Text/Data.ByteString) * Type

Re: [Haskell-cafe] New in haskell for old-timers?

2012-03-30 Thread John Meacham
On Fri, Mar 30, 2012 at 1:05 PM, Mats Rauhala mats.rauh...@gmail.com wrote: Oh wow, I thought jhc was discontinued, but just checked the repositories and mailing lists and it's alive and well. No idea where I got the idea that it was discontinued. Going a little bit on tangent here, but if I

Re: [Haskell-cafe] New to Haskell - List Comprehension Question

2009-10-07 Thread Ross Mellgren
I don't think a list comprehension is the easiest way to do it, how about upperCase :: String - String upperCase [] = [] upperCase (x:xs) = toUpper x : map toLower xs -Ross On Oct 7, 2009, at 4:48 PM, Steven1990 wrote: Hi, I'm currently learning Haskell, and I've been trying to work out a

Re: [Haskell-cafe] New to Haskell - List Comprehension Question

2009-10-07 Thread Gregory Crosswhite
Hint: Move the boundary case outside the comprehension, and then use the comprehension to handle the normal case. Also, FYI, a comprehension feeds each value of the list xs into x, and then evaluates the expression to the left of the pipe with that single value of x. Cheers, Greg On

Re: [Haskell-cafe] New to Haskell - List Comprehension Question

2009-10-07 Thread minh thu
2009/10/7 Steven1990 stevenyoung1...@msn.com: Hi, I'm currently learning Haskell, and I've been trying to work out a function for the following problem for a couple of days now. I want to use a list comprehension method to change the first letter of a string to upper case, and the rest of

Re: [Haskell-cafe] New to Haskell - List Comprehension Question

2009-10-07 Thread michael rice
not...@gmail.com Subject: Re: [Haskell-cafe] New to Haskell - List Comprehension Question To: Steven1990 stevenyoung1...@msn.com Cc: haskell-cafe@haskell.org Date: Wednesday, October 7, 2009, 5:20 PM 2009/10/7 Steven1990 stevenyoung1...@msn.com: Hi, I'm currently learning Haskell, and I've been trying

Re: [Haskell-cafe] New to Haskell

2007-12-19 Thread John Meacham
On Tue, Dec 18, 2007 at 01:58:00PM +0300, Miguel Mitrofanov wrote: I just want the sistem to be able to print one of these expressions ! Its this too much to ask ? Yes, 'cause it means you want to embed almost all source code into the compiled program. So ? So, I don't know any

Re: [Haskell-cafe] New to Haskell

2007-12-19 Thread Jake McArthur
On Dec 19, 2007, at 6:25 PM, John Meacham wrote: On Tue, Dec 18, 2007 at 01:58:00PM +0300, Miguel Mitrofanov wrote: I just want the sistem to be able to print one of these expressions ! Its this too much to ask ? Yes, 'cause it means you want to embed almost all source code into the

Re: [Haskell-cafe] New to Haskell

2007-12-19 Thread Luke Palmer
On Dec 20, 2007 1:23 AM, Jake McArthur [EMAIL PROTECTED] wrote: On Dec 19, 2007, at 6:25 PM, John Meacham wrote: On Tue, Dec 18, 2007 at 01:58:00PM +0300, Miguel Mitrofanov wrote: I just want the sistem to be able to print one of these expressions ! Its this too much to ask ? Yes,

Re: [Haskell-cafe] New to Haskell

2007-12-19 Thread Alex Queiroz
Hallo, On Dec 19, 2007 9:25 PM, John Meacham [EMAIL PROTECTED] wrote: Actually, it is a pretty fundamental feature of the lisp-derived languages that they can self modify their own source, and hence keep their own source representation all the way through runtime. This is not actually

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Luke Palmer
On Dec 18, 2007 7:31 AM, Cristian Baboi [EMAIL PROTECTED] wrote: Here is some strange example: module Hugs where aa::Int aa=7 cc:: (Int-Int)-(Int-Int-Int)-Int-(Int-Int) cc a op b = \x- case x of { _ | x==aa - x+1 ; _- a x `op` b } f::Int-Int f(1)=1 f(2)=2 f(_)=3 g::Int-Int

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Miguel Mitrofanov
What I should have been told about upfront: - the syntax for an expression - the syntax for a block Don't see your point. - the adhoc syntax rules (how to distinguish among a tuple and a pharanthesized expression and how to find the start and end of a block for example ) Oh, that's

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Ketil Malde
Cristian Baboi [EMAIL PROTECTED] writes: Here is some strange example: module Hugs where aa::Int aa=7 Small note, it's common to use spaces around the :: and = I've never really noticed before. cc :: (Int-Int) - (Int-Int-Int) - Int - (Int-Int) cc a op b = \x- case x of { _ | x==aa -

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Cristian Baboi
On Tue, 18 Dec 2007 10:29:43 +0200, Miguel Mitrofanov [EMAIL PROTECTED] wrote: What I should have been told about upfront: - the syntax for an expression - the syntax for a block Don't see your point. The point is the syntax is introduced as transformation of layout form to non layout

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Benja Fallenstein
Hi Cristian, On Dec 18, 2007 10:53 AM, Cristian Baboi [EMAIL PROTECTED] wrote: - the lambda expressions can be written (input) but cannot be printed (output) Yes, since two different lambda expressions can denote the same function. I just want the sistem to be able to print one of these

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Jules Bean
Cristian Baboi wrote: On Tue, 18 Dec 2007 10:29:43 +0200, Miguel Mitrofanov [EMAIL PROTECTED] wrote: What I should have been told about upfront: - the syntax for an expression - the syntax for a block Don't see your point. The point is the syntax is introduced as transformation of layout

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Miguel Mitrofanov
- the syntax for an expression - the syntax for a block Don't see your point. The point is the syntax is introduced as transformation of layout form to non layout form. As a user, I just want to be able to spot the basic components of a source file without thinking about

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Cristian Baboi
On Tue, 18 Dec 2007 12:25:18 +0200, Miguel Mitrofanov [EMAIL PROTECTED] wrote: - the syntax for an expression - the syntax for a block Don't see your point. The point is the syntax is introduced as transformation of layout form to non layout form. As a user, I just want to be able to

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Cristian Baboi
Thank you very much! On Tue, 18 Dec 2007 12:17:54 +0200, Jules Bean [EMAIL PROTECTED] wrote: Cristian Baboi wrote: On Tue, 18 Dec 2007 10:29:43 +0200, Miguel Mitrofanov [EMAIL PROTECTED] wrote: - what guarantees are made by the LANGUAGE that an IO action (such as do putStrLn Hello

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Miguel Mitrofanov
As a user, I just want to be able to spot the basic components of a source file without thinking about transformation rules. Well, most users are. Are what ? Sorry if I've confused you. English isn't my native language. Are able, of course. Have you asked them all ? If you're

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Jules Bean
Cristian Baboi wrote: What guarantees that by running the main, the string Hello world will be printed exactly twice ? The semantics of IO, and the guarantees of the runtime. IO specifies that () means compose two actions to make a larger action which does the first actions, then the

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Peter Lund
On Tue, 2007-12-18 at 12:53 +0200, Cristian Baboi wrote: The semantics of IO, and the guarantees of the runtime. IO specifies that () means compose two actions to make a larger action which does the first actions, then the second action. [do {a; a;} is notation for a a] The RTS

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Spencer Janssen
On Tuesday 18 December 2007 01:31:59 Cristian Baboi wrote: A few days ago, for various reasons, I've started to look at Haskell. At first I was quite impressed, after reading some FAQ, and some tutorials. Evrything was nice and easy ... until I've started writing some code on my own. What I

Re: [Haskell-cafe] New to Haskell: The End

2007-12-18 Thread Reinier Lamers
Cristian Baboi wrote: Haskell strengts as I see them: - it is lazy with class - it is strongly typed - it has automatic memory management - it has a standard library - it has a compiler - it is available on several platforms - it has a community - it is free Is there anything you would like to

Re: [Haskell-cafe] New to Haskell: The End

2007-12-18 Thread Alex Sandro Queiroz e Silva
Hallo, Cristian Baboi escreveu: From your list, I agree to add some pattern matching abilities to mine, but that it all. Keep using Haskell and resend your list in six months. -alex ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] New to Haskell: The End

2007-12-18 Thread Jules Bean
Cristian Baboi wrote: Haskell strengts as I see them: - it is lazy with class - it is strongly typed - it has automatic memory management - it has a standard library - it has a compiler - it is available on several platforms - it has a community - it is free Is there anything you would like to

Re: [Haskell-cafe] New to Haskell: The End

2007-12-18 Thread Cristian Baboi
On Tue, 18 Dec 2007 15:33:55 +0200, Reinier Lamers [EMAIL PROTECTED] wrote: Cristian Baboi wrote: Haskell strengts as I see them: - it is lazy with class - it is strongly typed - it has automatic memory management - it has a standard library - it has a compiler - it is available on several

Re: [Haskell-cafe] New to Haskell: The End

2007-12-18 Thread Henning Thielemann
On Tue, 18 Dec 2007, Cristian Baboi wrote: Haskell strengts as I see them: - it is lazy with class - it is strongly typed - it has automatic memory management - it has a standard library - it has a compiler - it is available on several platforms - it has a community - it is free Is

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Henning Thielemann
On Tue, 18 Dec 2007, Benja Fallenstein wrote: Hi Cristian, On Dec 18, 2007 10:53 AM, Cristian Baboi [EMAIL PROTECTED] wrote: - the lambda expressions can be written (input) but cannot be printed (output) Yes, since two different lambda expressions can denote the same function. I

Re: [Haskell-cafe] New to Haskell: The End

2007-12-18 Thread jerzy . karczmarczuk
Concerning the subject: The End of WHAT? Cristian Baboi writes: Reinier Lamers wrote: Cristian Baboi wrote: Haskell strengts as I see them: ... - it has a compiler ... Is there anything you would like to add ? Higher-order functions, purity, pattern-matching, no-nonsense syntax,

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Benja Fallenstein
Hi Henning, On Dec 18, 2007 3:53 PM, Henning Thielemann [EMAIL PROTECTED] wrote: Since this was discussed already here, I summed it up in: http://www.haskell.org/haskellwiki/Show_instance_for_functions I find the discussion under theoretical answer unsatisfying. The property that a Show

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Benja Fallenstein
On Dec 18, 2007 4:50 PM, Benja Fallenstein [EMAIL PROTECTED] wrote: Further, even with extensionality, we can (with compiler support) in principle have Show instances other than enumerating the graph. Now that I said it, I'm starting to doubt we even need compiler support beyond what we have

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Henning Thielemann
On Tue, 18 Dec 2007, Benja Fallenstein wrote: Hi Henning, On Dec 18, 2007 3:53 PM, Henning Thielemann [EMAIL PROTECTED] wrote: Since this was discussed already here, I summed it up in: http://www.haskell.org/haskellwiki/Show_instance_for_functions I find the discussion under

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Paul Hudak
If the semantics of a language says that a function f is equivalent to a function g, but there is a function h such that h(f) is not equivalent to h(g), then h cannot be a function. Therefore that language cannot be a (purely) functional language. That is the pure and simple reason why

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Benja Fallenstein
Hi Henning, On Dec 18, 2007 5:17 PM, Henning Thielemann [EMAIL PROTECTED] wrote: The mathematical definition of function I know of, says that functions are special relations, and relations are sets of pairs. Their is nothing about intension. That's the standard definition in set theory, but

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Benja Fallenstein
Hi Paul, On Dec 18, 2007 5:18 PM, Paul Hudak [EMAIL PROTECTED] wrote: If the semantics of a language says that a function f is equivalent to a function g, but there is a function h such that h(f) is not equivalent to h(g), then h cannot be a function. Sure. Therefore that language cannot

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Paul Hudak
Benja Fallenstein wrote: Not so fast :-) Caveat one, there may be useful ways to for functions to implement Show that don't conflict with extensionality (i.e., the property that two functions are equal if they yield the same results for all inputs). Sure, and I suppose one way to do this

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Benja Fallenstein
On Dec 18, 2007 6:01 PM, Paul Hudak [EMAIL PROTECTED] wrote: Well, my caveat was that the Haskell designers wanted it this way. So you are essentially rejecting my caveat, rather than creating a new one. :-) I mean, I reject the answer They wanted it this way because I think the answer should

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Henning Thielemann
On Tue, 18 Dec 2007, Benja Fallenstein wrote: Hi Henning, On Dec 18, 2007 5:17 PM, Henning Thielemann [EMAIL PROTECTED] wrote: The mathematical definition of function I know of, says that functions are special relations, and relations are sets of pairs. Their is nothing about

Re: [Haskell-cafe] New to Haskell: The End

2007-12-18 Thread Jonathan Cast
On 18 Dec 2007, at 7:28 AM, [EMAIL PROTECTED] wrote: Concerning the subject: The End of WHAT? Cristian Baboi writes: Reinier Lamers wrote: Cristian Baboi wrote: Haskell strengts as I see them: ... - it has a compiler ... Is there anything you would like to add ? Higher-order functions,

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Paul Hudak
Benja Fallenstein wrote: I mean, I reject the answer "They wanted it this way" because I think the answer should be, "They wanted it this way because They looked at substituting equals under a lambda, and They saw it was good" ;-) Your version of the answer is in fact correct, but is

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Benja Fallenstein
Hi Paul, On Dec 19, 2007 6:54 AM, Paul Hudak [EMAIL PROTECTED] wrote: Your version of the answer is in fact correct, but is just an elaboration of the original one. So, I don't see what your point is... Ok, sorry, I'll try again... I'm trying to say that in my opinion, it's important to

Re: [Haskell-cafe] New to Haskell - Question about hugsIORun from old Prelude

2006-12-12 Thread Henning Thielemann
On Mon, 11 Dec 2006, Rahul Naik wrote: Hello, I am trying to rewrite some older (2001) haskell : myReadFile :: String - String myReadFile f = case hugsIORun (readFile f) of Right s - s Left _ - Can someone provide me with a up to date version of the above

Re: [Haskell-cafe] New to Haskell, suggestions on code

2005-06-28 Thread Glynn Clements
Flavio Botelho wrote: At many places i have put a Char type instead of an abstract one because some funcations were not working properly before and i wanted to be able to output things and so be able to see what was the problem. (Haskell doesnt seem a 'magic' function to output arbitrary