Re: [Haskell-cafe] What happens if you get hit by a bus?

2011-12-16 Thread Brian Hurt
I think the truck-factor implications of the programming language as dwarfed by the implications of everything else in the project. Any project of any significant size is going to have a huge amount of project-specific information tucked up inside the programmers head. It doesn't matter if there

Re: [Haskell-cafe] What happens if you get hit by a bus?

2011-12-16 Thread Brian Hurt
On Fri, Dec 16, 2011 at 3:51 PM, Andrew Coppin andrewcop...@btinternet.comwrote: On 16/12/2011 07:05 PM, Bardur Arantsson wrote: Michael Litchard wrote: [--snip--] If getting hit by a bus is a significant factor in the overall outcome of the project then I think those are pretty good

[Haskell-cafe] Stupid question, re: overloaded type classes

2009-01-18 Thread Brian Hurt
So, I'm working with this simplistic S-expression library of my own design (yes, I know, reinventing the wheel). Basically, I have the type: data Sexp = List of [ Sexp ] | Atom of String with the associated parsers and printers which really aren't relevent to the question

Re: [Haskell-cafe] Stupid question, re: overloaded type classes

2009-01-18 Thread Brian Hurt
On Sun, 18 Jan 2009, Ryan Ingram wrote: 2) A third choice is to do what Show does, which is kind of a hack but solves this specific problem: Thanks. I like this solution much better than the two I proposed. Brian ___ Haskell-Cafe mailing list

[Haskell-cafe] Stupid question #852: Strict monad

2009-01-01 Thread Brian Hurt
First off, let me apologize for this ongoing series of stupid newbie questions. Haskell just recently went from that theoretically interesting language I really need to learn some day to a language I actually kinda understand and can write real code in (thanks to Real World Haskell). Of

Re: [Haskell-cafe] Type classes vr.s functions

2008-12-24 Thread Brian Hurt
On Tue, 23 Dec 2008, wren ng thornton wrote: In particular, imagine that you have two different and valid ways to convert the same type into Foo; which do you choose? With the continuation/combinator/argument approach this is a non-issue since you can just pass in the one you need. With

[Haskell-cafe] Stupid question #374: why is MaybeT not in the standard library?

2008-12-22 Thread Brian Hurt
I wrote my own implementation of MaybeT (which was a usefull exercise), but a quick google showed: http://www.haskell.org/haskellwiki/New_monads/MaybeT But I'm wondering why it's not in the standard library. The standards committee just hasn't gotten around to it yet? Or was there some

[Haskell-cafe] Type classes vr.s functions

2008-12-20 Thread Brian Hurt
So, style question for people, if I can. I have a certain problem- basically, I have a bunch of functions which need a special function, of type a - Foo say. And a bunch of other functions which can define that function on some type of interest, and then what to call the first batch of

Re: [Haskell-cafe] Haskell as a religion

2008-12-20 Thread Brian Hurt
(Sorry for the late reply) On Tue, 16 Dec 2008, Andrew Coppin wrote: Don Stewart wrote: I think of Haskell more as a revolutionary movement LOL! Longest revolution EVER, eh? I mean, how long ago was its dogma first codified? ;-) Remember: the eternal union of soviet socialist states

[Haskell-cafe] Please tell me this function exists

2008-12-17 Thread Brian Hurt
I know it's not hard to write, but still: concat :: String - [String] - String concat _ [] = concat _ [x] = x concat sep x:xs = x ++ sep ++ (concat sep xs) I've got to be stupid and missing it in the standard libraries. Please tell me where. Thanks. Brian

Re: [Haskell-cafe] Please tell me this function exists

2008-12-17 Thread Brian Hurt
On Wed, 17 Dec 2008, Max Rabkin wrote: Hoogle is your friend: Searching for String - [String] - String Data.List intercalate :: [a] - [[a]] - [a] base intercalate xs xss is equivalent to (concat (intersperse xs xss)). It inserts the... Thanks. Brian

Re: [Haskell-cafe] Line noise

2008-09-22 Thread Brian Hurt
On Sun, 21 Sep 2008, wren ng thornton wrote: Even with functionalists ---of the OCaml and SML ilk--- this use of spaces can be confusing if noone explains that function application binds tighter than all operators. Bwuh? Ocaml programmers certainly know that application binds tighter

[Haskell-cafe] the trivial monad- thoughts and a question

2008-01-12 Thread Brian Hurt
So, I've been playing around with what I call the trivial monad: module TrivialMonad where data TrivialMonad a = M a recover :: TrivialMonad a - a recover (M x) = x instance Monad TrivialMonad where (M x) = f = f x (M x) f = f return x = M x fail s =

[Haskell-cafe] Newbie question: can laziness lead to space compression?

2007-12-29 Thread Brian Hurt
My apologies if this has been beat to death before, I'm still new to Haskell. But I was wondering if it is possible that lazy evaluation could lead to space compression, especially under heavily persistant usage patterns? Here's the argument I'm making. Say we have a tree-based Set with,

Re: [Haskell-cafe] On the verge of ... giving up!

2007-10-14 Thread Brian Hurt
On Sun, 14 Oct 2007, Andrew Coppin wrote: Vimal wrote: I like learning by comparison with other similar languages. This approach worked for me when I tried learning Python+Perl together. The nicer syntax and easier object-orientedness made me leave Perl behind and pursue Python. I also tried

Re: [Haskell-cafe] Elevator pitch for Haskell.

2007-09-10 Thread Brian Hurt
On Mon, 10 Sep 2007, Devin Mullins wrote: Brian Hurt wrote: Any links to these presentations? I'm interested. Videos: http://rubyhoedown2007.confreaks.com/session04.html Actually, this video has an interesting bit, relevent to this discussion. He doesn't phrase it as an elevator pitch

Re: [Haskell-cafe] Elevator pitch for Haskell.

2007-09-09 Thread Brian Hurt
On Sun, 9 Sep 2007, Devin Mullins wrote: As for the latter, the reason I hear most often is I want to be able to use the language at my job.* Yet, I have heard two presentations from people who studied the history of Smalltalk/Java/etc. and came to the (informal) conclusion that the very

Re: [Haskell-cafe] Dynamic thread management?

2007-08-11 Thread Brian Hurt
You guys might also want to take a look at the Cilk programming language, and how it managed threads. If you know C, learning Cilk is about 2 hours of work, as it's C with half a dozen extra keywords and a few new concepts. I'd love to see Cilk - C + Haskell as a programming language. The

Re: [Haskell-cafe] Dynamic thread management?

2007-08-11 Thread Brian Hurt
On Sat, 11 Aug 2007, Sebastian Sylvan wrote: How is this any better than using par in Haskell? Mainly how the threads are actually scheduled. Mind you, I'm an *incredible* Haskell newbie, so take all of my comments with a 5-pound salt block, but as I understand how the current

[Haskell-cafe] Do monads imply laziness?

2007-04-14 Thread Brian Hurt
This is probably an off-topic question, but I can't think of a better forum to ask it: does the existance of monads imply laziness in a language, at least at the monadic level? Consider the following: a purely functional, eagerly evaluated programming language, that uses monads to

[Haskell-cafe] Stupid newbie question

2007-01-05 Thread Brian Hurt
My apologies for wasting bandwidth on what I'm sure is a stupid newbie question. Given: -- Reimplementing the wheel here, I know data Option a = Some a | Empty deriving (Eq,Ord,Show,Read) nth 0 (x:xs) = Some x nth i (x:xs) = if i 0 then Empty else nth (i-1) xs nth i [] = Empty

Re: [Haskell-cafe] Stupid newbie question

2007-01-05 Thread Brian Hurt
On Fri, 5 Jan 2007, Jeremy Shaw wrote: Hi, In this case, the stack overflow you are seeing is due to laziness not tail recursion. Aha. I knew it was something stupid. Because you never demand the value of any element in the list, Haskell never bothers to calculate it. So you have a

Re: [Haskell-cafe] Stupid newbie question

2007-01-05 Thread Brian Hurt
On Fri, 5 Jan 2007, Jason Creighton wrote: On Fri, Jan 05, 2007 at 08:17:33PM -0500, Brian Hurt wrote: My apologies for wasting bandwidth on what I'm sure is a stupid newbie question. Given: -- Reimplementing the wheel here, I know data Option a = Some a | Empty deriving (Eq,Ord

Re: [Haskell-cafe] Stupid newbie question

2007-01-05 Thread Brian Hurt
On Fri, 5 Jan 2007, Jeremy Shaw wrote: The easiest solution is to make things a little more strict. For example, if you change: nth i (x:xs) = if i 0 then Empty else nth (i-1) xs Even better, if I define: nth 0 (x:_) = Just x nth i (_:xs) = if i 0 then Nothing else nth (i-1) xs nth i []

[Haskell-cafe] Good Haskell introduction for an Ocaml programmer?

2006-12-12 Thread Brian Hurt
Greetings, all. I'm an experienced Ocaml programmer, looking to broaden my horizons yet further and pick up Haskell, and I'm wondering if there's a good introduction to Haskell for me. I have Simon Thompson's Haskell: The Craft of Functional Programming, which isn't a bad book, but I'm