Re: [Haskell-cafe] Apparently, Erlang does not have a static type system, since with hot code loading, this is intrinsically difficult.

2010-04-03 Thread Jason Dusek
2010/04/03 Casey Hawthorne : > Apparently, Erlang does not have a static type system, since with hot > code loading, this is intrinsically difficult. It is doubtless hard to statically check a program that is not statically available :) > If Haskell allows hot code loading, would this throw a

[Haskell-cafe] Re: A function that makes list of Bool lists from list of Int lists

2010-04-03 Thread Ertugrul Soeylemez
"Edward Z. Yang" wrote: > Excerpts from Maur Toter's message of Sat Apr 03 09:54:26 -0400 2010: > > I am new with Haskell so I think this will be a pretty dumb > > question. I would like to make a function that makes this: > > > > listbool :: [[Int]] -> [[Bool]] > > > > in this way: > > listbool

Re: [Haskell-cafe] Apparently, Erlang does not have a static type system, since with hot code loading, this is intrinsically difficult.

2010-04-03 Thread aditya siram
Check out Hint [1]. [1] http://hackage.haskell.org/package/hint On 4/3/10, Casey Hawthorne wrote: > Apparently, Erlang does not have a static type system, since with hot > code loading, this is intrinsically difficult. > > "Erlang Programming", Francesco Cesarini & Simon Thompson, June 2009, >

Re: [Haskell-cafe] Time for a San Francisco Hackathon?

2010-04-03 Thread Jason Dusek
2010/04/03 Mark Lentczner : > In particular, I think it would be cool to offer a Haskell > "teach-in". I think that'd be a cool event, yeah. > Something like a half day, perhaps at one of the hacker > locations... By "hacker locations", I gather you mean Noisebridge or Hacker Dojo? If Nois

[Haskell-cafe] Apparently, Erlang does not have a static type system, since with hot code loading, this is intrinsically difficult.

2010-04-03 Thread Casey Hawthorne
Apparently, Erlang does not have a static type system, since with hot code loading, this is intrinsically difficult. "Erlang Programming", Francesco Cesarini & Simon Thompson, June 2009, O'Reilly, page 31. If Haskell allows hot code loading, would this throw a wrench into the static type system?

Re: [Haskell-cafe] Hackage and popular packages: 2010 Q1 report

2010-04-03 Thread Christopher Done
Nice report! > Downloads in March 2010: 145,752 (new monthly record) G Zurihac! Bring on SanFranHac! Nice to see wxHaskell rising up. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: True Random Numbers

2010-04-03 Thread Alex Rozenshteyn
Looking over the random-fu package, I think it might have what I'm looking for (and a lot that I'm not). On Sat, Apr 3, 2010 at 6:27 PM, Gökhan San wrote: > Alex Rozenshteyn writes: > > > The Rand monad you linked seems to be a step in the right direction > > for what I want, but it uses getStd

Re: [Haskell-cafe] Time for a San Francisco Hackathon?

2010-04-03 Thread Mark Lentczner
On Feb 11, 2010, at 10:00 PM, Bryan O'Sullivan wrote: > I'm thinking it might be a good idea to organise a Haskell Hackathon for > people in (and who'd like to visit) the Bay Area. I'm still up for this - are others? > The tentative date I have in mind is the first weekend in May (conveniently

Re: [Haskell-cafe] Re: True Random Numbers

2010-04-03 Thread Gökhan San
Alex Rozenshteyn writes: > The Rand monad you linked seems to be a step in the right direction > for what I want, but it uses getStdGen, which appears to end up using > cpu time to seed the generator. There's the random-stream package but looks like it's subject to code rot. Its RandomGen instan

[Haskell-cafe] Hackage and popular packages: 2010 Q1 report

2010-04-03 Thread Don Stewart
Hackage 2010 Q1 report http://donsbot.wordpress.com/2010/04/03/the-haskell-platform-q1-2010-report/ After the big move of Hackage from monk to the new abbot server, here's the first report on which packages are popular, and how Hackage is doing in general. -- Don

[Haskell-cafe] Re: replicateM over vectors

2010-04-03 Thread Chad Scherrer
Roman Leshchinskiy cse.unsw.edu.au> writes: > Ah. I missed that. Then your best bet is probably > > replicate n action = munstream v $ Fusion.Stream.Monadic.generateM n (const action) > $ new n > > It's uglier that it should be but vector simply doesn't define t

Re: [Haskell-cafe] The 8 Most Important GSoC Projects

2010-04-03 Thread Daniel Fischer
Am Samstag 03 April 2010 20:45:47 schrieb Don Stewart: > schlepptop: > > Don Stewart schrieb: > >> While at ZuriHac, a few of us GSoC mentors got together to discuss > >> what we think the most important student projects for the summer > >> should be. > >> > >> Here's the list: > >> > >> > >> h

Re: [Haskell-cafe] A function that makes list of Bool lists from list of Int lists

2010-04-03 Thread Daniel Fischer
Am Samstag 03 April 2010 19:44:51 schrieb Alexandru Scvortov: > Look at it from the inside, out. > > What does const do? > > Const is a function that takes two parameters and always returns the > first one. For instance, const True x is True, for all x. > > What's \x -> map (const x) then? (or map

Re: [Haskell-cafe] Re: True Random Numbers

2010-04-03 Thread Alex Rozenshteyn
The Rand monad you linked seems to be a step in the right direction for what I want, but it uses getStdGen, which appears to end up using cpu time to seed the generator. On Sat, Apr 3, 2010 at 9:21 AM, Ertugrul Soeylemez wrote: > Matthew Hayden wrote: > > > What's wrong with the System.Random.S

Re: [Haskell-cafe] The 8 Most Important GSoC Projects

2010-04-03 Thread Antoine Latter
On Sat, Apr 3, 2010 at 12:45 PM, Don Stewart wrote: > schlepptop: >> Don Stewart schrieb: >>> While at ZuriHac, a few of us GSoC mentors got together to discuss what >>> we think the most important student projects for the summer should be. >>> >>> Here's the list: >>> >>>     >>> http://donsbot.

Re: [Haskell-cafe] The 8 Most Important GSoC Projects

2010-04-03 Thread Don Stewart
schlepptop: > Don Stewart schrieb: >> While at ZuriHac, a few of us GSoC mentors got together to discuss what >> we think the most important student projects for the summer should be. >> >> Here's the list: >> >> >> http://donsbot.wordpress.com/2010/04/01/the-8-most-important-haskell-org-gsoc-

Re: [Haskell-cafe] The 8 Most Important GSoC Projects

2010-04-03 Thread Henning Thielemann
Don Stewart schrieb: While at ZuriHac, a few of us GSoC mentors got together to discuss what we think the most important student projects for the summer should be. Here's the list: http://donsbot.wordpress.com/2010/04/01/the-8-most-important-haskell-org-gsoc-projects/ Please consider appl

Re: [Haskell-cafe] The 8 Most Important GSoC Projects

2010-04-03 Thread Henning Thielemann
Ivan Lazar Miljenovic schrieb: Don Stewart writes: Portability? You already have GHC on the machine, right? You don't necessarily need the GHC API to get something prototyped quickly. I meant in the sense of writing this as a tool, which will also work if the user prefers JHC, YHC, et

Re: [Haskell-cafe] Profiling

2010-04-03 Thread Jason Dagit
On Sun, Feb 21, 2010 at 9:11 AM, Thomas DuBuisson < thomas.dubuis...@gmail.com> wrote: > > How do I tell Cabal to install the necessary code? > > set: > "library-profiling: True" > > in your ~/.cabal/config file and never deal with this again (for any > new packages you install). use --reinstall

Re: [Haskell-cafe] A function that makes list of Bool lists from list of Int lists

2010-04-03 Thread Jason Dagit
On Sat, Apr 3, 2010 at 7:29 AM, Maur Toter wrote: > Hey, > > thanks for the help! > > Yes it is part of a homework that I can't find out (I am fine with other > parts). > This is not the homework itself, just the part of it and I needed help with > it, thanks for that! > I would like to understan

Re: [Haskell-cafe] A function that makes list of Bool lists from list of Int lists

2010-04-03 Thread Alexandru Scvortov
Look at it from the inside, out. What does const do? Const is a function that takes two parameters and always returns the first one. For instance, const True x is True, for all x. What's \x -> map (const x) then? (or map.const in my case) It's a function that takes something and maps all the

Re: [Haskell-cafe] A function that makes list of Bool lists from list of Int lists

2010-04-03 Thread Maur Toter
Thanks again! The last part I cant understand: So I give it for example zipWith ($) (map (\x -> map (const x)) (cycle [True, False])) [[1,2],[3]] Okay, because of ($) it takes the first element of the last part which is [1,2] and apply the function on it But how makes this: map (\x -> map (const

Re: [Haskell-cafe] Integers v ints

2010-04-03 Thread Lennart Augustsson
The cost factor of Integer vs Int is far, far smaller than the factor between computable reals vs Double. On Thu, Apr 1, 2010 at 6:33 PM, Jens Blanck wrote: > Yes, the cost for computable reals will be an order of magnitude or possibly > two for well-behaved computations. For not well-behaved pro

Re: [Haskell-cafe] A function that makes list of Bool lists from list of Int lists

2010-04-03 Thread Edward Z. Yang
Excerpts from Maur Toter's message of Sat Apr 03 10:29:34 -0400 2010: > What does the ($) at zipWith? ($) is function application Prelude> :t ($) ($) :: (a -> b) -> a -> b Cheers, Edward ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www

Re: [Haskell-cafe] A function that makes list of Bool lists from list of Int lists

2010-04-03 Thread Maur Toter
Hey, thanks for the help! Yes it is part of a homework that I can't find out (I am fine with other parts). This is not the homework itself, just the part of it and I needed help with it, thanks for that! I would like to understand the solution and not only have it so I would like to ask you: What

Re: [Haskell-cafe] A function that makes list of Bool lists from list of Int lists

2010-04-03 Thread Alexandru Scvortov
Too many points. listbool :: [[a]] -> [[Bool]] listbool = zipWith ($) (map (map . const) (cycle [True, False])) Cheers, Alex On Saturday 03 April 2010 15:13:48 Edward Z. Yang wrote: > Excerpts from Maur Toter's message of Sat Apr 03 09:54:26 -0400 2010: > > I am new with Haskell so I think this

Re: [Haskell-cafe] A function that makes list of Bool lists from list of Int lists

2010-04-03 Thread Edward Z. Yang
Excerpts from Maur Toter's message of Sat Apr 03 09:54:26 -0400 2010: > I am new with Haskell so I think this will be a pretty dumb question. > I would like to make a function that makes this: > > listbool :: [[Int]] -> [[Bool]] > > in this way: > listbool [[1,2],[3,4]] == [[True, True],[False, F

Re: [Haskell-cafe] A function that makes list of Bool lists from list of Int lists

2010-04-03 Thread Daniel Fischer
Am Samstag 03 April 2010 15:54:26 schrieb Maur Toter: > Hey, > > I am new with Haskell so I think this will be a pretty dumb question. > I would like to make a function that makes this: > > listbool :: [[Int]] -> [[Bool]] > > in this way: > listbool [[1,2],[3,4]] == [[True, True],[False, False]] >

Re: [Haskell-cafe] Different behavior of GHC 6.10.1 and Hugs (Sep 2006)

2010-04-03 Thread Daniel Fischer
Am Samstag 03 April 2010 15:40:03 schrieb Vladimir Reshetnikov: > Hi list, > > GHC 6.10.1: > > Prelude> :t let f x y = return x == return y in f > let f x y = return x == return y in f :: (Eq (m a), Monad m) => a -> a > -> Bool > > Hugs (Sep 2006): > > Hugs> :t let f x y = return x == return y in f

[Haskell-cafe] A function that makes list of Bool lists from list of Int lists

2010-04-03 Thread Maur Toter
Hey, I am new with Haskell so I think this will be a pretty dumb question. I would like to make a function that makes this: listbool :: [[Int]] -> [[Bool]] in this way: listbool [[1,2],[3,4]] == [[True, True],[False, False]] listbool [[1],[5,5],[5,4],[2]] == [[True],[False, False],[True, True],

[Haskell-cafe] Different behavior of GHC 6.10.1 and Hugs (Sep 2006)

2010-04-03 Thread Vladimir Reshetnikov
Hi list, GHC 6.10.1: Prelude> :t let f x y = return x == return y in f let f x y = return x == return y in f :: (Eq (m a), Monad m) => a -> a -> Bool Hugs (Sep 2006): Hugs> :t let f x y = return x == return y in f ERROR - Ambiguous type signature in inferred type *** ambiguous type : (Eq (a b),

[Haskell-cafe] Re: True Random Numbers

2010-04-03 Thread Ertugrul Soeylemez
Matthew Hayden wrote: > What's wrong with the System.Random.StdGen implementation of > RandomGen?[1] (I'm not sure if it's cryptographically safe) It's a poor PRNG. And no, it's not anywhere near suitable for cryptographic applications. > Someone (Cale IIRC) has already implemented a Rand mon

[Haskell-cafe] Re: True Random Numbers

2010-04-03 Thread Ertugrul Soeylemez
Hello Christopher, unfortunately this is not a "better StdGen", because it still uses the poor PRNG algorithm of StdGen. You can get better statistic properties by using a package like mwc-random or mersenne-random. However, if you want (an approximation of) truely random numbers, you need to re

Re: [Haskell-cafe] Haskellers hate GUIs!!

2010-04-03 Thread Joachim Breitner
Hi Jürgen, Am Freitag, den 02.04.2010, 14:31 +0200 schrieb Jürgen Nicklisch-Franken: > I cite from a mail from a potential user/contributor for my GUI app. > What shall I say, how should he install gtk2hs? Is their a way to get a > stable version from a changing darcs repo? Is he trying to use o

[Haskell-cafe] wxHaskell ease of installation?

2010-04-03 Thread Eric Kow
Hi Anthony, On Fri, Apr 02, 2010 at 12:59:48 +, Anthony Cowley wrote: > I have a GUI app that I deploy on Mac and Linux that uses OpenGL and > wxHaskell. It has been a pretty good experience, but getting wx set up > on every development machine is hairier than cabal install. Is it still hairy

[Haskell-cafe] Re: Haskellers hate GUIs!!

2010-04-03 Thread Peter Hercek
On 04/02/2010 10:15 PM, Dominic Espinosa wrote: On Fri, Apr 02, 2010 at 06:11:52PM +0100, Stephen Tetley wrote: On 2 April 2010 17:53, Dominic Espinosa wrote: I ended up rewriting it in another language (due to time pressure) and I'm a little wary of attempting to use Haskell again for develo

Re: [Haskell-cafe] True Random Numbers

2010-04-03 Thread Christopher Done
I've used this one before: betterStdGen :: IO StdGen betterStdGen = alloca $ \p -> do h <- openBinaryFile "/dev/random" ReadMode hGetBuf h p $ sizeOf (undefined :: Int) hClose h mkStdGen <$> peek p ___ Haskell-Cafe mailing list Haskell-Cafe@h

Re: [Haskell-cafe] True Random Numbers

2010-04-03 Thread Matthew Hayden
What's wrong with the System.Random.StdGen implementation of RandomGen?[1] (I'm not sure if it's cryptographically safe) Someone (Cale IIRC) has already implemented a Rand monad[2] which is like a state monad but it keeps a RandomGen instead. As an aside, there is no such Arrow or ArrowTransormer

[Haskell-cafe] True Random Numbers

2010-04-03 Thread Alex Rozenshteyn
Does haskell have a way of using /dev/random to generate random *things*? Currently I'm just reading the data into a byte string, converting it into bits, and keeping track of it in the state monad. -- Alex R ___ Haskell-Cafe mailing list Haske

[Haskell-cafe] Re: Haskellers hate GUIs!!

2010-04-03 Thread Heinrich Apfelmus
Rafael Cunha de Almeida wrote: > When using haskell, can't you just make a static binary on MacOS and Windows, > though? Why wouldn't that work? On MacOS, you would have to relocate the shared gtk2hs libraries and bundle them with the application. It's actually easiest to exorcise the paths from t

[Haskell-cafe] Re: Haskellers hate GUIs!!

2010-04-03 Thread Heinrich Apfelmus
Thomas Schilling wrote: > Haskeller's certainly aren't GUI-haters! It's just difficult in > general to write cross-platform GUIs. The goal *is* to put gtk2hs > into the platform, but in order to do that, it needs to be buildable > using Cabal. The limiting factor is time, not motivation. Well,

[Haskell-cafe] Re: Haskellers hate GUIs!!

2010-04-03 Thread Heinrich Apfelmus
Brandon S. Allbery KF8NH wrote: > David Leimbach wrote: >> Having said that, are there any plans to make it really easy to get >> gtk2hs working on Mac OS X? > > > It's in MacPorts. Which doesn't necessarily make it easier. Took me 2 full days to install gtk and it's still crashing a lot more th

[Haskell-cafe] Re: libraries [was GUI haters]

2010-04-03 Thread Heinrich Apfelmus
Michael Vanier wrote: > aditya siram wrote: >> Yes Haskell is not strong on the GUI end of things but have you >> considered turning your desktop app into a web app? I've done this >> for a few things and really enjoyed the process. Haskell's STM is >> what makes this so nice. > > This is a great i