Re: [Haskell-cafe] who's in charge?

2010-10-29 Thread Gregory Crosswhite
Also, this is a complete aside but what the heck. :-) Has anyone else been driven crazy by the way that Java code and libraries are documented? It seems like whenever I try to figure out how to use a piece of Java code, the functionality is spread out over a huge collection of classes and

Re: [Haskell-cafe] who's in charge?

2010-10-29 Thread Ivan Lazar Miljenovic
On 29 October 2010 17:33, Gregory Crosswhite gcr...@phys.washington.edu wrote: Also, this is a complete aside but what the heck.  :-) Has anyone else been driven crazy by the way that Java code and libraries are documented?  It seems like whenever I try to figure out how to use a piece of

Re: [Haskell-cafe] libffi mystery

2010-10-29 Thread Conor McBride
Hi Thanks for the help! I've made some progress, but I'm not there yet. On 28 Oct 2010, at 20:08, Ketil Malde wrote: Sittampalam, Ganesh ganesh.sittampa...@credit-suisse.com writes: Have you tried passing -optl-static to ghc (which causes -static to be passed to ld)? This was new to me.

[Haskell-cafe] Haskellers.com idea: strike forces

2010-10-29 Thread Michael Snoyman
Hey all, In the recent discussion about the status of email support in Haskell, the idea of strike forces to tackle these big problems came up. I think one dilemma people face when trying to coordinate such a venture is the logistics: where to organize, how to advertise it, where to have

Re: [Haskell-cafe] Haskellers.com idea: strike forces

2010-10-29 Thread Ivan Lazar Miljenovic
On 29 October 2010 19:06, Michael Snoyman mich...@snoyman.com wrote: Hey all, In the recent discussion about the status of email support in Haskell, the idea of strike forces to tackle these big problems came up. I think one dilemma people face when trying to coordinate such a venture is the

Re: [Haskell-cafe] who's in charge?

2010-10-29 Thread Claus Reinke
2) If there is a problem, here's what you could do about it, in descending order of attractiveness: y) specify the requirements (a sample application of what needs to be supported would be a start) z) review the existing options wrt to those requirements (which ones are you aware about,

Re: [Haskell-cafe] who's in charge?

2010-10-29 Thread Günther Schmidt
Hi aditya, thanks for the tip. No, I must admit a deal breaker it is not, giving all the advantages of haskell on the one hand I think I'd be able to life with something half baked. Günther Am 29.10.10 06:53, schrieb aditya siram: I understand your frustration at not having free tested

Re: [Haskell-cafe] Haskellers.com idea: strike forces

2010-10-29 Thread Michael Snoyman
On Fri, Oct 29, 2010 at 10:14 AM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On 29 October 2010 19:06, Michael Snoyman mich...@snoyman.com wrote: [..] I _really_ like this idea.  With this nebulous proposal of yours, is there any way of maybe integrating the various services

Re: [Haskell-cafe] libffi mystery

2010-10-29 Thread Ketil Malde
Conor McBride co...@strictlypositive.org writes: ...seemed like a good plan. I got lots of scary warnings like (.text+0x51d8): warning: Using 'setprotoent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking I guess the message

Re: [Haskell-cafe] Haskellers.com idea: strike forces

2010-10-29 Thread Ivan Lazar Miljenovic
On 29 October 2010 20:19, Michael Snoyman mich...@snoyman.com wrote: Mental note: must remember to use word nebulous more often, I like it. As do I ;-) Anyway, integration with existing services would be very good, but I doubt it will be possible. I don't think there's a way to automatically

Re: [Haskell-cafe] Haskellers.com idea: strike forces

2010-10-29 Thread Michael Snoyman
On Fri, Oct 29, 2010 at 11:30 AM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On 29 October 2010 20:19, Michael Snoyman mich...@snoyman.com wrote: Anyway, integration with existing services would be very good, but I doubt it will be possible. I don't think there's a way to

[Haskell-cafe] type class design

2010-10-29 Thread Uwe Schmidt
Dear Haskellers, I've a question about type class design. When developing the set of functions for a class, there are often two or more functions, let's say f and g, where the semantics of g can be expressed by f. When writing down the code, there are two choices for g. First g is included in

Re: [Haskell-cafe] who's in charge?

2010-10-29 Thread Ben Millwood
On Fri, Oct 29, 2010 at 5:06 AM, Steve Severance st...@medwizard.net wrote: whenever I here any open source community (yeah...everyone not just haskell) tell beginners to contribute a package I always scratch my head with a little bit of wonder. Would you really want a package that someone

Re: [Haskell-cafe] type class design

2010-10-29 Thread Tillmann Rendel
Hi, Uwe Schmidt wrote: In the standard Haskell classes we can find both cases, even within a single class. Eq with (==) as f and (/=) as g belongs to the 1. case Note that the case of (==) and (/=) is slightly different, because not only can (/=) be defined in terms (==), but also the other

Re: [Haskell-cafe] type class design

2010-10-29 Thread Ivan Lazar Miljenovic
On 29 October 2010 23:28, Uwe Schmidt u...@fh-wedel.de wrote: Dear Haskellers, I've a question about type class design. When developing the set of functions for a class, there are often two or more functions, let's say f and g, where the semantics of g can be expressed by f. When writing

[Haskell-cafe] Decoupling type classes (e.g. Applicative)?

2010-10-29 Thread Dominique Devriese
Hi all, I have a problem with the design of the Applicative type class, and I'm interested to know people's opinion about this. Currently, the Functor and Applicative type class are defined like this: class Functor f where fmap:: (a - b) - f a - f b class Functor f =

Re: [Haskell-cafe] Red links in the new haskell theme

2010-10-29 Thread Victor Oliveira
Thank's. I didn't see the menu style on top of the page. It helps a lot. I think it's just a matter of getting used with the new colors... []s Victor On Oct 28, 2010, at 11:51 PM, Antoine Latter wrote: On Thu, Oct 28, 2010 at 2:42 PM, Andrew Coppin andrewcop...@btinternet.com wrote: On

[Haskell-cafe] State nested structures

2010-10-29 Thread Dupont Corentin
Hello the list, I have another silly question. In my software I have a very common pattern: --in file A.hs module A where data A = A {b :: B, i :: Int} type SA x = State A x -- many functions with SA x --in file B.hs data B = B {r :: Int} type SB x = State B x -- many functions with SB x

Re: [Haskell-cafe] Decoupling type classes (e.g. Applicative)?

2010-10-29 Thread Ozgur Akgun
On 29 October 2010 14:35, Dominique Devriese dominique.devri...@cs.kuleuven.be wrote: I have a problem with the design of the Applicative type class Sorry for going a bit off-topic, but every-time I see someone complaining about such things, I remember this proposal:

Re: [Haskell-cafe] State nested structures

2010-10-29 Thread Christopher Done
2010/10/29 Dupont Corentin corentin.dup...@gmail.com: Of course in module A I'm calling some functions of module B. I'd like to know if it's possible, in a function of type SA, to call a function of type SB, without actually executing the State SB. I just wanna tell him Hey look, you can

Re: [Haskell-cafe] Re: Current thinking on CompositionAsDot issue in haskell prime?

2010-10-29 Thread Daniel Peebles
Speaking of MagicHash, is it really necessary to take an operator with potential like (#) just to keep primitive symbols separate from the rest? At least from my 2010 Haskell learner perspective, it seems odd to create a whole language extension/lexical change just for that purpose. On Thu, Oct

[Haskell-cafe] Re: Decoupling type classes (e.g. Applicative)?

2010-10-29 Thread DavidA
I've been thinking about the following type class design principles: * Only include two functions in the same design class if both can be implemented in terms of each other. * Only introduce a dependency from type class A to type class B if all functions in type class B can be

Re: [Haskell-cafe] State nested structures

2010-10-29 Thread Stephen Tetley
2010/10/29 Dupont Corentin corentin.dup...@gmail.com: Also, I can't manage to write the more generic function SB x -  SA x. Horribly enough this one seems to work... mapOnBofA :: SB a - SA a mapOnBofA mf = get = \st@(A {b=temp}) - let (ans,temp2) = runState mf temp

Re: [Haskell-cafe] type class design

2010-10-29 Thread Ben Millwood
On Fri, Oct 29, 2010 at 1:33 PM, Tillmann Rendel ren...@informatik.uni-marburg.de wrote: Note that the case of (==) and (/=) is slightly different, because not only can (/=) be defined in terms (==), but also the other way around. The default definitions of (==) and (/=) are mutually

[Haskell-cafe] Re: State nested structures

2010-10-29 Thread steffen
Horribly enough this one seems to work... mapOnBofA :: SB a - SA a mapOnBofA mf = get = \st@(A {b=temp}) -                let (ans,temp2) = runState mf temp                in put (st { b=temp2}) return ans There is nothing horrible about that. You just run a new isolated computation in

Re: [Haskell-cafe] Re: Decoupling type classes (e.g. Applicative)?

2010-10-29 Thread Sönke Hahn
I have been thinking for a while that it might be worth defining a Prelude2, which corrects the known problems with the Prelude. Over time, people could migrate to using Prelude2. It would probably take years to be widely adopted, but at least there would be light at the end of the tunnel.

Re: [Haskell-cafe] Re: State nested structures

2010-10-29 Thread Dupont Corentin
Thank you for your responses. I will look at monad transformers. I already use them I think because actually I use something like StateT Game IO a. You mean I have to implement my own instance? Oh, can you call me Corentin? This is my name ;) Cheers, Corentin On Fri, Oct 29, 2010 at 6:19 PM,

[Haskell-cafe] Re: State nested structures

2010-10-29 Thread steffen
Nothing hinders you writing: StateT Game (StateT A IO) or GameT mt = ErrorT Err (StateT Game (mt IO)) with mt being another Monad-Transformer Monad-Transformers can be quite tricky. The point is you don't have to create new Monad instances. On 29 Okt., 18:46, Dupont Corentin

Re: [Haskell-cafe] who's in charge?

2010-10-29 Thread C. McCann
On Fri, Oct 29, 2010 at 8:31 AM, Ben Millwood hask...@benmachine.co.uk wrote: Besides, I'd think that often what Haskell developers lack is time more than skill - there are plenty of tasks that could be done without advanced knowledge of deep abstractions, if only someone could put aside a few

Re: [Haskell-cafe] Edit Hackage

2010-10-29 Thread C. McCann
On Thu, Oct 28, 2010 at 9:13 PM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: IIUC, [one of] the prime motivating factor[s] behind both reddit and StackOverflow is the accumulation of karma, which leads to people posting just to try and accumulate karma even if they don't know what

Re: [Haskell-cafe] fundata1 -- Karmic Social Capital Benchmark and Shootout

2010-10-29 Thread Daryoush Mehrtash
In the lessons you say: Haskell proved too slow with String Map, so we ended up interning strings and working with an IntMap and a dictionary to disintern back to strings as a last step. Daniel Fisher was instrumental in bringing Haskell up to speed with OCaml and then beating it. Don

Re: [Haskell-cafe] [ANNAUNCE] ghcjs-0.1.0 Haskell to Javascript compiler

2010-10-29 Thread Aaron Gray
On 27 October 2010 13:30, Martijn Schrage mart...@oblomov.com wrote: On 21-10-10 01:01, Victor Nazarov wrote: This example creates a text field that turns red if it contains any non-digit characters. It is on-line at http://tryout.oblomov.com/ghcjs/ghcjs.html (Note: I only tested it on

Re: [Haskell-cafe] fundata1 -- Karmic Social Capital Benchmark and Shootout

2010-10-29 Thread Don Stewart
dmehrtash: In the lessons you say: Haskell proved too slow with String Map, so we ended up interning strings and working with an IntMap and a dictionary to disintern back to strings as a last step. Daniel Fisher was instrumental in bringing Haskell up to speed with

Re: [Haskell-cafe] type class design

2010-10-29 Thread David Menendez
On Fri, Oct 29, 2010 at 8:33 AM, Tillmann Rendel ren...@informatik.uni-marburg.de wrote: Hi, Uwe Schmidt wrote: In the standard Haskell classes we can find both cases, even within a single class. Eq with (==) as f and (/=) as g belongs to the 1. case Note that the case of (==) and (/=)

[Haskell-cafe] Re: State nested structures

2010-10-29 Thread steffen
you can find a nice introduction on using monad transformers by developing an interpreter at [1] and a little more detailed one at [2] [1]http://www.grabmueller.de/martin/www/pub/Transformers.pdf [2]http://www.haskell.org/all_about_monads/html/ On 29 Okt., 18:46, Dupont Corentin

Re: [Haskell-cafe] Edit Hackage

2010-10-29 Thread Ivan Lazar Miljenovic
On 30 October 2010 05:51, C. McCann c...@uptoisomorphism.net wrote: Speaking of not wanting more places to keep track of, that's precisely why I rarely bother with blog comments and would find discussions on reddit preferable: it's a single place to go, and keeps things more unified and

Re: [Haskell-cafe] Bug in HTTP (bad internal error handling)

2010-10-29 Thread Ganesh Sittampalam
On Fri, 22 Oct 2010, Sigbjorn Finne wrote: On Fri, Oct 22, 2010 at 9:35 AM, Sittampalam, Ganesh ganesh.sittampa...@credit-suisse.com wrote: libraries@, what's the right way to proceed? Can I make a Debian-style non-maintainer upload with minimal changes to fix urgent issues like these?

Re: [Haskell-cafe] Edit Hackage

2010-10-29 Thread Don Stewart
ivan.miljenovic: Neither the Haskell reddit nor Stack Overflow are linked to from haskell.org and there is nothing to indicate that they are official. Also, wasn't it Don that started (and is mainly responsible) for linking to Haskell articles on reddit? They're linked from the front page.

Re: [Haskell-cafe] Edit Hackage

2010-10-29 Thread Ivan Lazar Miljenovic
On 30 October 2010 09:51, Don Stewart d...@galois.com wrote: ivan.miljenovic: Neither the Haskell reddit nor Stack Overflow are linked to from haskell.org and there is nothing to indicate that they are official.  Also, wasn't it Don that started (and is mainly responsible) for linking to

Re: [Haskell-cafe] Edit Hackage

2010-10-29 Thread Don Stewart
ivan.miljenovic: On 30 October 2010 09:51, Don Stewart d...@galois.com wrote: ivan.miljenovic: Neither the Haskell reddit nor Stack Overflow are linked to from haskell.org and there is nothing to indicate that they are official.  Also, wasn't it Don that started (and is mainly

Re: [Haskell-cafe] who's in charge?

2010-10-29 Thread wren ng thornton
On 10/29/10 2:33 AM, Gregory Crosswhite wrote: Also, this is a complete aside but what the heck. :-) Has anyone else been driven crazy by the way that Java code and libraries are documented? It seems like whenever I try to figure out how to use a piece of Java code, the functionality is spread

Re: [Haskell-cafe] Edit Hackage

2010-10-29 Thread C. McCann
On Fri, Oct 29, 2010 at 6:13 PM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: So you'd prefer to have the discussion about a blog post be made distinct from the blog post itself?  Why not keep them together, also so that people finding the blog post from someplace other than reddit

Re: [Haskell-cafe] Re: Current thinking on CompositionAsDot issue in haskell prime?

2010-10-29 Thread wren ng thornton
On 10/29/10 11:18 AM, Daniel Peebles wrote: Speaking of MagicHash, is it really necessary to take an operator with potential like (#) just to keep primitive symbols separate from the rest? At least from my 2010 Haskell learner perspective, it seems odd to create a whole language

Re: [Haskell-cafe] who's in charge?

2010-10-29 Thread Evan Laforge
Honestly, I think a big part of this isn't documentation practices so much as it is the expression problem. For a lot of the problems I tackle, the OO model is not appropriate for capturing program structure. Pairing this with Java's requirement of one class per file means that the actual

Re: [Haskell-cafe] Re: Current thinking on CompositionAsDot issue in haskell prime?

2010-10-29 Thread C. McCann
On Fri, Oct 29, 2010 at 7:54 PM, wren ng thornton w...@freegeek.org wrote: I'm sort of torn on this issue. On the one hand (#) has great potential as an operator, on the other hand I've found that having something like -XMagicHash (or TeX's \makeatletter and \makeatother) can be really helpful

Re: [Haskell-cafe] Re: Current thinking on CompositionAsDot issue in haskell prime?

2010-10-29 Thread Bas van Dijk
On Thu, Oct 28, 2010 at 4:42 PM, Ben Millwood hask...@benmachine.co.uk wrote: Personally I think function composition is what Haskell is all about and it is absolutely essential that the syntax for it be lightweight. If we think using . as qualification as well as composition is confusing, I'm

Re: [Haskell-cafe] Edit Hackage

2010-10-29 Thread Lauri Alanko
On Thu, Oct 28, 2010 at 01:55:12PM -0700, Don Stewart wrote: The number of subscribers to the Haskell Reddit, for example, is double the -cafe@, and there are comparable numbers of questions being asked on the Stack Overflow [haskell] tag, as here -- so anyone who only reads -cafe@ is already

Re: [Haskell-cafe] Edit Hackage

2010-10-29 Thread Ivan Lazar Miljenovic
On 30 October 2010 12:22, Lauri Alanko l...@iki.fi wrote: On Thu, Oct 28, 2010 at 01:55:12PM -0700, Don Stewart wrote: The number of subscribers to the Haskell Reddit, for example, is double the -cafe@, and there are comparable numbers of questions being asked on the Stack Overflow [haskell]

Re: [Haskell-cafe] Re: Current thinking on CompositionAsDot issue in haskell prime?

2010-10-29 Thread wren ng thornton
On 10/29/10 8:33 PM, C. McCann wrote: On Fri, Oct 29, 2010 at 7:54 PM, wren ng thorntonw...@freegeek.org wrote: I'm sort of torn on this issue. On the one hand (#) has great potential as an operator, on the other hand I've found that having something like -XMagicHash (or TeX's \makeatletter

Re: [Haskell-cafe] Re: Current thinking on CompositionAsDot issue in haskell prime?

2010-10-29 Thread C. McCann
On Fri, Oct 29, 2010 at 10:30 PM, wren ng thornton w...@freegeek.org wrote: I suggest U+2621. I'm not sure I'd've ever recognized a funny 'z' as caution sign... :) Well, I'm operating under the assumption that it's one of these: http://en.wikipedia.org/wiki/Bourbaki_dangerous_bend_symbol I

[Haskell-cafe] Monads and Functions sequence and sequence_

2010-10-29 Thread Mark Spezzano
Hi, Can somebody please explain exactly how the monad functions sequence and sequence_ are meant to work? I have almost every Haskell textbook, but there's surprisingly little information in them about the two functions. From what I can gather, sequence and sequence_ behave differently

[Haskell-cafe] Re: Monads and Functions sequence and sequence_

2010-10-29 Thread Bardur Arantsson
On 2010-10-30 07:07, Mark Spezzano wrote: Hi, Can somebody please explain exactly how the monad functions sequence and sequence_ are meant to work? I have almost every Haskell textbook, but there's surprisingly little information in them about the two functions. From what I can gather,

Re: [Haskell-cafe] Monads and Functions sequence and sequence_

2010-10-29 Thread Gregory Crosswhite
The expression sequence [a,b,c,...] is roughly equivalent to do r_a - a r_b - b r_c - c ... return [r_a,r_b,r_c,...] The expression sequence_ [a,b,c,...] is roughly equivalent to do a b c ...

Re: [Haskell-cafe] Re: Monads and Functions sequence and sequence_

2010-10-29 Thread Mark Spezzano
Not exactly. If you use the type with Maybe Int like so: sequence [Just 1, Nothing, Just 2] then the result is Nothing. Whereas sequence [Just 1, Just 2, Just 3] gives Just [1, 2, 3] Why? I assume there's special implementations of sequence and sequence_ depending on the type of monad used.

Re: [Haskell-cafe] Re: Monads and Functions sequence and sequence_

2010-10-29 Thread Ivan Lazar Miljenovic
On 30 October 2010 16:30, Mark Spezzano mark.spezz...@chariot.net.au wrote: Not exactly. If you use the type with Maybe Int like so: sequence [Just 1, Nothing, Just 2] then the result is Nothing. Whereas sequence [Just 1, Just 2, Just 3] gives Just [1, 2, 3] Why? I assume there's

Re: [Haskell-cafe] Re: Monads and Functions sequence and sequence_

2010-10-29 Thread Daniel Peebles
That is a result of the implementation of the specific Monad instance, and that does depend on the type, as you say (but it isn't determined for sequence(_) specifically). Nothing = f = Nothing Just x = f = f x is why a Nothing pollutes the sequenced lists of Maybes. If Maybe is a Monad

Re: [Haskell-cafe] Re: Monads and Functions sequence and sequence_

2010-10-29 Thread Sebastian Fischer
On Oct 30, 2010, at 2:30 PM, Mark Spezzano wrote: If you use the type with Maybe Int like so: sequence [Just 1, Nothing, Just 2] then the result is Nothing. Whereas sequence [Just 1, Just 2, Just 3] gives Just [1, 2, 3] Try do x - Just 1 y - Nothing z - Just 2