[Haskell-cafe] Re: Cabal and linking with static libs (.a files)

2006-06-12 Thread Ketil Malde
Simon Marlow [EMAIL PROTECTED] writes: What you actually want to do, I suspect, is to include verbatim copies of the .a dependencies in your (binary) Cabal package, to make it self-contained. Exactly. But it's quite easy: just copy the .a files from /usr/lib (or wherever) and put them in

RE: [Haskell-cafe] newbie type signature question

2006-06-12 Thread Simon Peyton-Jones
you need at least one constructor if you say 'where'. S | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brock | Peabody | Sent: 09 June 2006 20:34 | To: haskell-cafe@haskell.org | Subject: RE: [Haskell-cafe] newbie type signature question | |

[Haskell-cafe] HCAR

2006-06-12 Thread Imam Tashdid ul Alam
does anyone know what happened to HCAR? or HWN? __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] HCAR

2006-06-12 Thread Stefan Holdermans
Tashdid, does anyone know what happened to HCAR? or HWN? I guess the May ;) 2006 edition of HCAR will appear soon. I'm not sure about what happened to HWN the last couple of weeks, though, but I think that Donald is just quite busy these days. Regards, Stefan

Re: [Haskell-cafe] Re: Cabal and linking with static libs (.a files)

2006-06-12 Thread Ketil Malde
Ketil Malde [EMAIL PROTECTED] writes: But it's quite easy: just copy the .a files from /usr/lib (or wherever) and put them in the same place as your libHSpackage.a. I managed to get it to work by following that advice, and also renaming foo.a to libfoo.a, and linking with -lfoo. Now you see

Re: [Haskell-cafe] HCAR

2006-06-12 Thread Donald Bruce Stewart
stefan: Tashdid, does anyone know what happened to HCAR? or HWN? I guess the May ;) 2006 edition of HCAR will appear soon. I'm not sure about what happened to HWN the last couple of weeks, though, but I think that Donald is just quite busy these days. Yep, that's the case. Expect an

[Haskell-cafe] Newbie: safe program termination in Windows

2006-06-12 Thread Alberto G. Corona
Hi, I have a program that handle cached data. I donĀ“t find the way to store the data when the program is killed by other program. There is nothing similar to signal in the Windows implementation and no exception appears to trigger when the program is killed by a service handler or by the Task

[Haskell-cafe] Learning C after Haskell

2006-06-12 Thread Chad Scherrer
Ok, so I'm doing things somewhat backward. I've been using Haskell for a while now, whenever I get a chance to. But in order to become more involved in high-performance computing projects at my work, I need to learn C. I've heard a lot of people say that experience in Haskell can improve one's

Re: [Haskell-cafe] Learning C after Haskell

2006-06-12 Thread Greg Buchholz
Chad Scherrer wrote: My question is, as I learn C, are there any particular Haskell concepts I should keep in the back of my mind, or is it better to approach C from scratch? One thing from Haskell I'd try keep in mind is to minimize side effects and keep the scope of side effects as

Re: [Haskell-cafe] Learning C after Haskell

2006-06-12 Thread Jason Dagit
On 6/12/06, Chad Scherrer [EMAIL PROTECTED] wrote: Ok, so I'm doing things somewhat backward. I've been using Haskell for a while now, whenever I get a chance to. But in order to become more involved in high-performance computing projects at my work, I need to learn C. [snip] My question is,

[Haskell-cafe] Separate a string into a list of strings

2006-06-12 Thread Sara Kenedy
Hi all, I want to write a function to separate a string into a list of strings separated by commas. Example: separate :: String - [String] separate Haskell, Haskell, and Haskell = [Haskell, Haskell, and Haskell] If anyone has some ideas, please share with me. Thanks. S.

Re: Re[2]: [Haskell-cafe] newbie type signature question

2006-06-12 Thread Brian Hulley
Bulat Ziganshin wrote: Hello Brian, Saturday, June 10, 2006, 3:05:25 AM, you wrote: It is possible that this feature was added to the language for the benefit of people who prefer not to use explicit type signatures but afaiu this goes against best practice where everything should always have

Re: [Haskell-cafe] Separate a string into a list of strings

2006-06-12 Thread J. Garrett Morris
Off the top of my head: separate :: String - [String] separate [] = [] separate s = case break (',' ==) s of (s,[]) - [s] (s,',':s') - s : separate s' _ - error how did we get here? There is at least one cunning rewriting with foldl, I think, but I think this version is clearer. /g

Re: [Haskell-cafe] Learning C after Haskell

2006-06-12 Thread Chad Scherrer
Thanks, Minh. So are things like recursion and memory sharing typically out the window? Also, I don't see how thinking about type classes will help, without the benefits of polymorphism. -Chad-- Forwarded message --From: minh thu [EMAIL PROTECTED]Date: Jun 12, 2006 12:23 PM

Re: [Haskell-cafe] Learning C after Haskell

2006-06-12 Thread Jared Updike
Thanks, Minh. So are things like recursion and memory sharing typically out the window? Recursion works in C, but every function call pushes stack, so recursive depth is limited by RAM (compare to tail call optimization in many functional programming languages where the stack frame is reused if

Re: [Haskell-cafe] Learning C after Haskell

2006-06-12 Thread Duncan Coutts
On Mon, 2006-06-12 at 14:48 -0700, Jared Updike wrote: Thanks, Minh. So are things like recursion and memory sharing typically out the window? Recursion works in C, but every function call pushes stack, so recursive depth is limited by RAM (compare to tail call optimization in many

Re: [Haskell-cafe] Separate a string into a list of strings

2006-06-12 Thread Neil Mitchell
Hi, I tend to use the module TextUtil (or Util.Text) from Yhc for these kind of string manipulations: http://www-users.cs.york.ac.uk/~malcolm/cgi-bin/darcsweb.cgi?r=yhc;a=headblob;f=/src/compiler98/Util/Text.hs separate = splitList , I am currently thinking about making this module into a

Re: [Haskell-cafe] Separate a string into a list of strings

2006-06-12 Thread Clifford Beshers
Sara Kenedy wrote: Hi all, I want to write a function to separate a string into a list of strings separated by commas. Example: separate :: String - [String] separate "Haskell, Haskell, and Haskell" = ["Haskell", "Haskell", "and Haskell"] If anyone has some ideas,

Re: [Haskell-cafe] Separate a string into a list of strings

2006-06-12 Thread Brandon Moore
Clifford Beshers wrote: Sara Kenedy wrote: Hi all, I want to write a function to separate a string into a list of strings separated by commas. Example: separate :: String - [String] separate Haskell, Haskell, and Haskell = [Haskell, Haskell, and Haskell] If anyone has some ideas, please

[Haskell-cafe] Everything but the lazyness - idea for force/delay lists

2006-06-12 Thread Brian Hulley
Hi - I've been thinking about how to get an extremely fast language with all the benefits of Haskell ie completely pure with no side effects, but with monads, higher order functions, type classes etc, but without the lazyness. I know this is controversial, but having started to write a

Re: [Haskell-cafe] Separate a string into a list of strings

2006-06-12 Thread Jared Updike
Funny. I have a module called Useful.hs with some of these same sorts of functions. (coming from Python where I used .split(',') and .replace('\r', '') and such a lot): -- module Useful where import List ( intersperse, tails ) import Numeric ( readHex ) hex2num :: (Num a) =

Re: [Haskell-cafe] Separate a string into a list of strings

2006-06-12 Thread Neil Mitchell
Hi beginsWith [] [] = True beginsWith _[] = True beginsWith [] _ = False beginsWith (a:aa) (b:bb) | a == b = aa `beginsWith` bb | otherwise= False I used to have this in my library then I discovered isPrefixOf :) (or flip

Re: [Haskell-cafe] Separate a string into a list of strings

2006-06-12 Thread Clifford Beshers
Brandon Moore wrote: Going by man grep, those [:foo:] classes are only special inside a character class, otherwise [:space:]* = [aceps:]*. Prelude Text.Regex splitRegex (mkRegex [[:space:]]*,[[:space:]]*) Haskell, Haskell, and Haskell [Haskell,Haskell,and Haskell] The smart money was