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 encapsulat
I'd like to announe the New York Functional Programmers Meetup, which is
Wednesday, June 27th, 7PM, at the offices of Jane Street Capital.
The NYFP meetup is for people using or interested in strongly typed functional
languages, such as Haskell, Ocaml, SML, etc.
Meeting details are here:
ht
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
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 implement
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 thi
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 "
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
so
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
Th
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 list
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 (E
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 [
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
than
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
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
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 functio
(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 last
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
di
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 type
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
cou
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 at
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
Ha
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
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, s
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 = und
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
ther
On Fri, Dec 16, 2011 at 3:51 PM, Andrew Coppin
wrote:
> 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 odds, aren't they?
26 matches
Mail list logo