Re: [Haskell-cafe] Postdoctoral Fellowship in Functional Programming

2007-09-26 Thread Bryan Burgers
On 9/26/07, Graham Hutton [EMAIL PROTECTED] wrote: Salary will be within the range 25,134 - 32,796 pounds per year, depending on qualifications and experience. The post is available immediately, and will be offered on a fixed-term contract for 3 years. I don't mean to diminish the

Re: [Haskell-cafe] Basic question....

2007-08-17 Thread Bryan Burgers
On 8/17/07, rodrigo.bonifacio [EMAIL PROTECTED] wrote: Hi all. I want to create the following polymorphic type (EnvItem) that we can apply two functions (envKey and envValue). I tried the following: type Key = String data EnvItem a = EnvItem (Key, a) envKey :: EnvItem (Key, a) -

Re: [Haskell-cafe] Question about arrows

2007-08-04 Thread Bryan Burgers
On 8/3/07, Lewis-Sandy, Darrell [EMAIL PROTECTED] wrote: Is there a class property of the Control.Arrow class that represents the evaluatation of an arrow: eval :: (Arrow a)=a b c-b-c You could always use the ArrowEval class. Granted, it doesn't exist, so you'd have to write it, but it

Re: [Haskell-cafe] Maintaining the community

2007-07-18 Thread Bryan Burgers
On 7/18/07, Martin Coxall [EMAIL PROTECTED] wrote: On 7/18/07, Jon Harrop [EMAIL PROTECTED] wrote: On Tuesday 17 July 2007 23:26:08 Hugh Perkins wrote: Am I the only person who finds it interesting/worrying that there are few to no people in the group who are ex-C# programmers. I mean, you

Re: [Haskell-cafe] Help with IO and randomR

2007-07-16 Thread Bryan Burgers
On 7/16/07, Niko Korhonen [EMAIL PROTECTED] wrote: I'm writing some code to generate a dither (=noise) signal. I'm trying to generate an infinite series of noise with triangular distribution but my code hangs into an infinite loop. The problem is that I'm not very good with Haskell IO yet and I

Re: [Haskell-cafe] Messing around with types [newbie]

2007-06-21 Thread Bryan Burgers
also hope it is correct!) And I do not really know how to fix it, maybe somebody else can write about that. Bryan Burgers ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] To yi or not to yi, is this really the question? A plea for a cooperative, ubiquitous, distributed integrated development system.

2007-06-18 Thread Bryan Burgers
On 6/18/07, Pasqualino 'Titto' Assini [EMAIL PROTECTED] wrote: Having just presented a case for the possible rationality of the irrational decision of creating an Emacs-like IDE in Haskell, I wonder if we should not be even more irrational and contemplate the possibility of using Haskell to

Re: [Haskell-cafe] Re: [Haskell] Who pays for *.haskell.org machines?

2007-06-13 Thread Bryan Burgers
is its funding will be reliable? for example, if we don't get money from Google in 2008 year? in irc some time ago i brought up the topic of something like the freebsd or wikimedia foundations, but for haskell. if you can give me a secure and trustworthy method of payment, and as a bonus, a

Re: [Haskell-cafe] Mathematics in Haskell Re: Why the Prelude must die

2007-04-02 Thread Bryan Burgers
library for people to start patching? Bryan Burgers ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Unresolved overloading error

2007-03-31 Thread Bryan Burgers
On 3/31/07, Scott Brown [EMAIL PROTECTED] wrote: It's working now, thank you. I changed the definition to binom n j = div (fac n) ((fac j)*(fac (n - j))) bernoulli n p j = fromIntegral(binom n j)*(p ^ j) * ((1 - p)^(n - j)) As a matter of style suggestion, it might make 'binom' more clear

Re: [Haskell-cafe] newbie concatenating monad question

2007-03-24 Thread Bryan Burgers
My idea is to have a monad with a concatenating , so that I can: bulidStuff = do func1 func2 func3 func4 Leandro Penz I actually did this recently for a project I have been working on. First, an example: output label a@(I.Add a1 a2 a3) = do comment (show a) mov' label eax a1

Re: [Haskell-cafe] flip fix and iterate (was: Lazy IO and closing of file handles)

2007-03-19 Thread Bryan Burgers
On the topic of 'fix', is there any good tutorial for fix? I searched google, but mostly came up with pages including things like 'bug fix'. It's hard for me to get an intuition about it when 'fix' always stack overflows on me because I don't really know how to use it.

Re: [Haskell-cafe] Recursion

2007-03-06 Thread Bryan Burgers
On 3/6/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Does the following code increase the level of recursion once for each input line or is the recursive construct converted to an iteration? Thanks, Dave Feustel main :: IO () main = do line - getLine processIt line main processIt ::

[Haskell-cafe] Pulling a monad out of a functor

2007-03-05 Thread Bryan Burgers
Haskellers, Recently, I have come across a couple of situations in which I need to pull a monad out of a functor so to speak. The first time it was needed, I didn't think much of it, but the second time started me thinking whether there is already an existing construct for this. The type

Re: [Haskell-cafe] Pulling a monad out of a functor

2007-03-05 Thread Bryan Burgers
http://haskell.org/ghc/dist/current/docs/libraries/base/Data-Traversable.html pull is sequence, fmapM is mapM (also see the sequenceA, traverse functions for the more general case of applicative functors vs. monads) Stefan Ah yes, thank you! Saying It seems to me that if this were a class,

Re: [Haskell-cafe] Memoisation

2007-02-25 Thread Bryan Burgers
tips. -- Tony Morris You may be able to glean some ideas from a previous discussion at: http://comments.gmane.org/gmane.comp.lang.haskell.cafe/19623 Bryan Burgers ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

[Haskell-cafe] Summer of Code

2007-02-12 Thread Bryan Burgers
? If this is not the place to ask, where should I be asking? Bryan Burgers ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] It matters how Type Synonyms are defined?

2007-02-02 Thread Bryan Burgers
ScopeState Bool So, my new question is: Why does it matter how ScopeState is defined? Bryan Burgers ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Combine list of sorted lists

2006-12-29 Thread Bryan Burgers
I am not sure how to express f1 with map? how do I say (lambda (ls) (map (lambda (x) (list x)) ls)) in Haskell? map ([]) ? map (:[]), :[] takes a single element and puts it into a list. Some people refer to this as box Another way to express f1 with map is: f1 xs = map (\x -

Re: [Haskell-cafe] constant functions

2006-12-27 Thread Bryan Burgers
to be the same type as the first, so use 'b' instead of 'a'. always first = (\_ - first) -- replace 'second' with '_', because we don't need to bind anything to the second parameter. Does that makes sense? Bryan Burgers ___ Haskell-Cafe mailing list Haskell

Re: [Haskell-cafe] Haskell Side Effect

2006-12-20 Thread Bryan Burgers
On 12/20/06, Jason Dagit [EMAIL PROTECTED] wrote: Am I the only one that doesn't get it? Jason No, you are not the only one that doesn't get it. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] I'd like start with Haskell, but...

2006-12-16 Thread Bryan Burgers
with last summer. Haskell is good for a lot of things, and I'm sure somebody someday will show me that Haskell is even great for GUI/Database, but you should always use the right tool for the job, and for your job, I'd say C# is the right tool. Bryan Burgers

Re: [Haskell-cafe] Name that function =)

2006-12-12 Thread Bryan Burgers
pairs mapM_ (uncurry renameFile) pairs == mapM_ (\p - putDirs p) pairs mapM_ (\p - uncurry renameFile p) pairs == mapM_ (\p - putDirs p uncurry renameFile p) pairs Is that a reasonable solution? Bryan Burgers ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] smallest double eps

2006-09-30 Thread Bryan Burgers
Hang on, hang on, now I'm getting confused. First you asked for the smallest (positive) x such that 1+x /= x which is around x=4.5e15. 1 + 0 /= 0 0 is smaller than 4.5e15 So I don't understand this at all... But then 0 isn't positive. Why not? In any case every positive number

Re: [Haskell-cafe] Re: Numeric type classes

2006-09-12 Thread Bryan Burgers
this, it seems that having to keep track of all of this might get a bit unruly. Bryan Burgers ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: Re[2]: class [] proposal Re: [Haskell-cafe] One thought: Num to 0 as ? to list?

2006-08-22 Thread Bryan Burgers
Classes where Types go would just serve to muddle that understanding. Bryan Burgers ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] REALLY simple STRef examples

2006-07-21 Thread Bryan Burgers
advantage of partial application, so why did you define 'foreach' and then use it instead of using 'mapM_'? I am just curious, and have always been interested in reasons behind coding style. Bryan Burgers ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] do we have something like isDefined or isNull in Haskell?

2006-06-15 Thread Bryan Burgers
On 6/15/06, Vladimir Portnykh [EMAIL PROTECTED] wrote: Suppose there is a data definition in Haskell: data MyType = MyType { date :: Double, weight :: Double, height:: Double } deriving (Eq, Ord, Show) Is it possible to

Re: [Haskell-cafe] do we have something like isDefined or isNull in Haskell?

2006-06-15 Thread Bryan Burgers
Vladimir, I think you forgot to put Haskell-cafe as a recipient of this email, so first I'll repost what you wrote. On 6/15/06, Vladimir Portnykh [EMAIL PROTECTED] wrote: many thanks. i have the follwoing code: module MyType (DataContainer(..)) where import Maybe data DataContainer =

Re: [Haskell-cafe] elementsinlist

2006-06-13 Thread Bryan Burgers
On 6/13/06, Jenny678 [EMAIL PROTECTED] wrote: Hallo I search a code for elements_in_List([1,2],[1,2]). True elements_in_List([1,8],[1,2,3,4,8]). True elements_in_List([2,1],[1,2]). True elements_in_List([1,1],[1]). False I have a code elements_in_List :: Eq a = [a] - [a] - Bool

[Haskell-cafe] Library Repository?

2006-06-03 Thread Bryan Burgers
Recently, I have seen a few messages to Haskell Cafe (Like Marc Weber's Is there any url lib? and Ferenc Wagner's LDIF output library, as well as many replies like oh, you can find that library at this link...) that have prodded me to ask what I've been wondering for a long time. What are the