Re: [Haskell-cafe] Hackage accounts and real names
Out of curiosity: is there something wrong with my nickname migmit? I'm not gonna change it anyway. On 6 Apr 2010, at 09:52, Edward Z. Yang wrote: This is a pretty terrible reason, but I'm going to throw it out there: I like real names because they're much more aesthetically pleasing. In my younger days, I once decided, Hey, I should get a pseudonym and I picked something fairly ridiculous, just because everyone else was doing it. I would have appreciated someone to have conked me on the head earlier and said, No, that pseudonym is stupid and made me use something else. That said, I think I'd be perfectly happy with a policy that preferred real names, but was willing to take an (obvious) pseudonym if the author insisted. Cheers, Edward ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Hackage accounts and real names
Maybe users could choose between using a real name and being given a random one (like AnonymousN). This will (1) protect from data mining, (2) protect from government persecution and (3) keep the damned 1337 Haxxor names away from Hackage :) On 6 April 2010 08:02, Miguel Mitrofanov miguelim...@yandex.ru wrote: Out of curiosity: is there something wrong with my nickname migmit? I'm not gonna change it anyway. On 6 Apr 2010, at 09:52, Edward Z. Yang wrote: This is a pretty terrible reason, but I'm going to throw it out there: I like real names because they're much more aesthetically pleasing. In my younger days, I once decided, Hey, I should get a pseudonym and I picked something fairly ridiculous, just because everyone else was doing it. I would have appreciated someone to have conked me on the head earlier and said, No, that pseudonym is stupid and made me use something else. That said, I think I'd be perfectly happy with a policy that preferred real names, but was willing to take an (obvious) pseudonym if the author insisted. Cheers, Edward ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Hackage accounts and real names
On Tue, Apr 6, 2010 at 7:32 AM, Ivan Miljenovic ivan.miljeno...@gmail.com wrote: 5) No-one is convincing anyone else to their point of view, so we have a stale mate. Can you really legally distribute your software under an open source license if you don't use your real name? At least the Linux kernel has a policy these days that contributors pretty much have to reveal their real name to avoid legal issues. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Hackage accounts and real names
Ertugrul Soeylemez wrote: Human identity is much more than just a file descriptor or a map key, and people from academia often don't get this, because they don't have to fear using their real names. Particularly in economically illiberal countries being known as the author of a certain Haskell package can get you into trouble either at work or even with the government. It can also prevent you from getting a job. FWIW, I think this reason alone is enough justification to lift the restriction. Personally: after using a consistent pseudonym for years, I was eventually convinced[1] that real names are best when you're involved in contributing to online communities--- and I do mean *communities*, not mere interaction. But, while I feel it's probably in my best interest to have my community deeds associated with my real name, I'm under no delusions that it is in everyone's best interests that their deeds be so. I've never had to deal with illiberal governments. I have, however, worked with a number of excellent hackers who live with them. Also I don't believe there's anything sacrosanct about real names. Is the persona we have in the work place more real than the one we have with friends? To say nothing of the countless friends of mine who've legally changed their names for this or that reason. Our identity and the status accorded to us does not come from a name legally given at birth. It comes from the personae with which we participate in the world. [1] http://www.catb.org/~esr/faqs/hacker-howto.html#status -- Live well, ~wren ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Hackage accounts and real names
Pekka Enberg penb...@cs.helsinki.fi writes: Can you really legally distribute your software under an open source license if you don't use your real name? I think it would be hard to enforce any copyright license without revealing the connection between your pseudonym and real person, but I don't see any reason why a pseudonym should make it actually illegal to distribute your own work, open source or not. There seems to be some precedent: plenty of books, music (and even certain scientific works) have been written under pseudonym, without anybody suggesting these works not be covered by copyright, or that their distribution would be against the law. -k -- If I haven't seen further, it is by standing in the footprints of giants ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Hackage accounts and real names
Pekka == Pekka Enberg penb...@cs.helsinki.fi writes: Pekka On Tue, Apr 6, 2010 at 7:32 AM, Ivan Miljenovic Pekka ivan.miljeno...@gmail.com wrote: 5) No-one is convincing anyone else to their point of view, so we have a stale mate. Pekka Can you really legally distribute your software under an open Pekka source license if you don't use your real name? Well, yes, you can. The FSF has always suggested that you can assign the copyright of your GPL'ed software to them, in some circumstances. Note I'm very much pro the real-name policy in principle, but I don't see how it can be enforced. -- Colin Adams Preston Lancashire () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Re: Hackage accounts and real names
Ivan Miljenovic wrote: 5) No-one is convincing anyone else to their point of view, so we have a stale mate. Would allowing pseudonyms but requiring them to be explicitly marked as such be an acceptable compromise? Ganesh === Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html === ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Hackage accounts and real names
2010/4/6 Jonas Almström Duregård jonas.dureg...@gmail.com: Maybe users could choose between using a real name and being given a random one (like AnonymousN). This will (1) protect from data mining, (2) protect from government persecution and (3) keep the damned 1337 Haxxor names away from Hackage :) I think this is a bad idea as it ruins recognisability. How am I meant to know that anonymous1 on hackage is the same person as mrfoo on haskellwiki, for example? P.s. if (3) is your real reason for supporting this restriction, please rethink your perspective. You are supporting a policy that is hurting the community for mere aesthetic reasons. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Hackage accounts and real names
On 6 April 2010 05:01, Luke Palmer lrpal...@gmail.com wrote: When you say convincing, you are talking about yourself being convinced, right? So this paragraph means The arguments against my position haven't convinced me, but the arguments for my position have. Had I been told a convincing reason for the restriction, I would have changed my mind on the issue. This paragraph was pointing out that I hadn't. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Hackage accounts and real names
On 6 April 2010 05:32, Ivan Miljenovic ivan.miljeno...@gmail.com wrote: 5) No-one is convincing anyone else to their point of view, so we have a stale mate. Let me summarise the main arguments against the restriction: 1. It stops people from contributing to hackage. (It is immaterial that if you were in their position, you would have no problem with the restriction. Because of this policy, we have fewer libraries on hackage.) The reason this came up is because someone on IRC wrote a great implementation of which(1) as a Haskell library. I suggested they put it on hackage, and they told me they wouldn't because of this policy. The community loses out. 2. Inconsistency. If someone is known by their pseudonym on the mailing list, IRC, haskellwiki, blogs and so on, that is how I know them. How am I meant to find out their real name, in general? The rest of the internet works off pseudonyms and it is more convenient for everyone if hackage follows suit. 3. Privacy issues. Some people simply cannot reveal their real names. I've been over this thread and couldn't see anywhere where you'd made an attempt to refute these arguments, so I guess you take them as solid. On the other hand, every argument put forward by the pro-restriction group has been picked at and argued against by those against the restriction. That is not a stalemate. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskell.org re-design
On Tue, Apr 6, 2010 at 5:24 AM, Simon Michael si...@joyful.com wrote: On 4/2/10 5:28 AM, Thomas Schilling wrote: How about something more colourful? http://i.imgur.com/7jCPq.png I really like the simplicity of the Cassandra page: http://cassandra.apache.org/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Haskell+Cassandra was: RE: [Haskell-cafe] Re: Haskell.org re-design
Maybe a bit off-topic, but as Johan mentioned the Cassandra web site... Are there any Haskellers out there using Cassandra with Haskell? Thanks, Martin -Original Message- From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Johan Tibell Sent: Tuesday, April 06, 2010 11:36 AM To: Simon Michael Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] Re: Haskell.org re-design On Tue, Apr 6, 2010 at 5:24 AM, Simon Michael si...@joyful.com wrote: On 4/2/10 5:28 AM, Thomas Schilling wrote: How about something more colourful? http://i.imgur.com/7jCPq.png I really like the simplicity of the Cassandra page: http://cassandra.apache.org/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: Haskell+Cassandra was: RE: [Haskell-cafe] Re: Haskell.org re-design
On Tue, Apr 6, 2010 at 11:41 AM, Dr. Martin Grabmüller martin.grabmuel...@eleven.de wrote: Maybe a bit off-topic, but as Johan mentioned the Cassandra web site... Are there any Haskellers out there using Cassandra with Haskell? Not yet but I plan to write a binding for it if I ever get time. :) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: Haskell+Cassandra was: RE: [Haskell-cafe] Re: Haskell.org re-design
On Tue, Apr 6, 2010 at 11:47, Johan Tibell wrote: On Tue, Apr 6, 2010 at 11:41 AM, Dr. Martin Grabmüller martin.grabmuel...@eleven.de wrote: Maybe a bit off-topic, but as Johan mentioned the Cassandra web site... Are there any Haskellers out there using Cassandra with Haskell? Not yet but I plan to write a binding for it if I ever get time. :) Apparently, somebody used it long enough to write this: http://hackage.haskell.org/package/cassandra-thrift Sean ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Hackage accounts and real names
David House dmho...@gmail.com writes: 2. Inconsistency. If someone is known by their pseudonym on the mailing list, IRC, haskellwiki, blogs and so on, that is how I know them. How am I meant to find out their real name, in general? The rest of the internet works off pseudonyms and it is more convenient for everyone if hackage follows suit. And yet this is inconsistency remains regardless: people use different aliases on IRC to the mailing list to Hackage (though I think this is mainly because they have old IRC nicks they still use for internal consistency). I've been over this thread and couldn't see anywhere where you'd made an attempt to refute these arguments, so I guess you take them as solid. On the other hand, every argument put forward by the pro-restriction group has been picked at and argued against by those against the restriction. That is not a stalemate. A stalemate occurs when people disagree rather than one side having more compelling arguments. For example, I understand and respect your arguments; I just don't find them compelling enough (since I find it a pain trying to match up different nicks, etc.; though this is to do with the inconsistency you mention above). -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Hackage accounts and real names
Miguel Mitrofanov miguelim...@yandex.ru writes: Out of curiosity: is there something wrong with my nickname migmit? How it was derived is at least apparent, as opposed to nicknames that have nothing to do with people's real names. -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Hackage accounts and real names
On Tue, 06 Apr 2010 20:06:27 +1000, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: I've been over this thread and couldn't see anywhere where you'd made an attempt to refute these arguments, so I guess you take them as solid. On the other hand, every argument put forward by the pro-restriction group has been picked at and argued against by those against the restriction. That is not a stalemate. A stalemate occurs when people disagree rather than one side having more compelling arguments. For example, I understand and respect your arguments; I just don't find them compelling enough (since I find it a pain trying to match up different nicks, etc.; though this is to do with the inconsistency you mention above). So, what's next? Ban anyone hiding behind a nickname on the mailing list? On IRC? On wiki? This will bring you consistency. As a side effect, it will bring to the Haskell community the fame of being one of the most inadequate open source communities. Let's conduct a thought experiment: suppose hackage has just launched and its policy is yet to be decided. Do you find your own arguments compelling enough to accept the policy of Real Name Requirement? Taking into account that this policy is _inconsistent_ with other Haskell resources policy. -- Roman Cheplyaka, who has nothing to hide but hates silly enforcements ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Metaprogramming in Haskell vs. Ocaml
Hello aditya, Saturday, April 3, 2010, 6:56:23 AM, you wrote: Haskell. And I'm also wondering why metaprogramming is used much more in Ocaml than in Haskell. reasons are two-folded: haskell is more powerful language. in particular, there are lots of generic programming approaches besides TH. OTOH, TH is as powerful as any other syntax preprocessor, but not as easy to use. especially if you try to learn it by reading original papers i suggest you to postpone learning TH. it's not Haskell way :) -- Best regards, Bulatmailto:bulat.zigans...@gmail.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Hackage accounts and real names
David House dmho...@gmail.com writes: Let me summarise the main arguments against the restriction: 1. It stops people from contributing [..] 2. Inconsistency [..] 3. Privacy issues [..] 4. It inteferes with people's freedom - who has the right to dictate what name a person (or, for that matter, a group of people) should be known as? 5. It encourages dishonesty: if you want to contribute but not reveal your real name, you have the option to lie about it, and can be fairly confident your lie will never be called. +1 for allowing nicks. -k -- If I haven't seen further, it is by standing in the footprints of giants ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Hackage accounts and real names
2010/4/6 r...@ro-che.info: On Tue, 06 Apr 2010 20:06:27 +1000, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: I've been over this thread and couldn't see anywhere where you'd made an attempt to refute these arguments, so I guess you take them as solid. On the other hand, every argument put forward by the pro-restriction group has been picked at and argued against by those against the restriction. That is not a stalemate. A stalemate occurs when people disagree rather than one side having more compelling arguments. For example, I understand and respect your arguments; I just don't find them compelling enough (since I find it a pain trying to match up different nicks, etc.; though this is to do with the inconsistency you mention above). So, what's next? Ban anyone hiding behind a nickname on the mailing list? On IRC? On wiki? This will bring you consistency. As a side effect, it will bring to the Haskell community the fame of being one of the most inadequate open source communities. http://lambda-the-ultimate.org is one lovely community that has that restriction: http://lambda-the-ultimate.org/policies#Policies Actually, it's one of the best communities I know. I also think that many haskell-cafe readers agree on that. I also think that what is appropriate for mailing list is not appropriate for collective blog or site like hackage. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Hackage accounts and real names
Ketil Malde ke...@malde.org writes: 5. It encourages dishonesty: if you want to contribute but not reveal your real name, you have the option to lie about it, and can be fairly confident your lie will never be called. This to me sounds like a reason _for_ the policy (actually, a stricter variant) rather than against... -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Hackage accounts and real names
Let me summarise the main arguments against the restriction: 1. It stops people from contributing [..] 2. Inconsistency [..] 3. Privacy issues [..] 4. It inteferes with people's freedom - who has the right to dictate what name a person (or, for that matter, a group of people) should be known as? 5. It encourages dishonesty: if you want to contribute but not reveal your real name, you have the option to lie about it, and can be fairly confident your lie will never be called. +1 for allowing nicks. Another +1 from me. I must admit that I had never really thought about this restriction, but the arguments against the restriction clearly convince me. I have heard no valid arguments in favour of the restriction. I can see that there are advantages to requiring real names, but that only makes sense if it is enforced (and I certainly don't advocate that). The way it is now, where some people who just silently use pseudonyms get accounts, and others, who are not willing to lie, are rejected, is very bad. If people are really worried about trust, then a comment/reviewing system for Hackage is a better solution. Cheers, Andres -- Andres Loeh, Universiteit Utrecht mailto:and...@cs.uu.nl mailto:m...@andres-loeh.de http://www.andres-loeh.de ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Confusions about the Haskell Platform (for Mac)
1. Why can't the platform download site be hosted on www.haskell.org instead of hackage.haskell.org? I see that there's a redirect, but (imho) it would be ideal to have www.haskell.org/platform be the standard URL in my browser. It is easier to remember (for typing) and more obvious (for appearances). 2. What is the difference between Haskell and the Haskell Platform? I see one or the other in various places. To get from www.haskell.org to downloading the Mac software, I go through Download Haskell, Get the Haskell Platform Mac, and Download Haskell for Mac OS X (intel). 3. By looking at http://hackage.haskell.org/platform/mac.html , I have no idea what I'm going to get when I click the Download Haskell for Mac OS X (intel) link. It would be nice to know what I'm getting myself into before I commit to waiting for this 137.9 MB file. Thanks to the wonder of deep links, one can also not be expected to traverse the path that I did in #2. Similarly, if I come to this link directly, I have no easy way of navigating to try to figure out what Haskell or GHC is. 4. The current link for the Mac image points to http://hackage.haskell.org/platform/2010.1.0.0/haskell-platform-2010.1.0.1-i386.dmg. Note the inconsistency between the version in the directory and file names. 5. The directions on http://hackage.haskell.org/platform/mac.html say: After downloading: * Open the .dmg file * Follow the install instructions I see no install instructions in the .dmg file. I only see the following files: * GHC-6.12.1-i386.pkg * Haskell Platform 2010.1.0.1.pkg * Uninstall GHC 6. Since there are no install instructions, I am not sure which .pkg to install first. Of course, fix #3 and you hopefully fix this one. 7. Why can't I have a single .pkg file? Why do I have an Uninstall GHC and not an Uninstall Haskell Platform? -- I don't expect all of the above to necessarily have a direct solution. They are just my observations to share. Some of them are from the point of view of a newcomer, and some are from a perfectionist. Regards, Sean ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Hackage accounts and real names
And another +1 from me too. Keeping the policy will only achieve that people who want to stay anonymous will stay away from hackage, and that's not something (IMHO) we should want. David. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Confusions about the Haskell Platform (for Mac)
On Tue, Apr 6, 2010 at 13:47, Sean Leather wrote: 1. [...] 7. 8. The binaries do not work on Leopard (10.5.8). $ /usr/local/bin/cabal dyld: unknown required load command 0x8022 Trace/BPT trap This was previously reported at http://thread.gmane.org/gmane.comp.lang.haskell.cafe/71747/focus=71944 and Gregory Collins is apparently working on a fix. I'm happy to test a new version, but it would be nice to have an uninstaller (that cleans up the symlinks in /usr/local/bin too). Regards, Sean ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] FRP, arrows and loops
On Fri, 2010-04-02 at 14:51 -0400, Christopher Lane Hinson wrote: On Fri, 2 Apr 2010, Maciej Piechotka wrote: 1. How to interpret ArrowLoop? I have two possible implementations: type RunSF a = a Dynamic () data SF a b c = SF (a (Dynamic, b, RunSF, Set Unique) (c, Set Unique, SF a b c)) (...) instance ArrowLoop (SF a) where loop (SF f) = loop' f undefined where loop' g d = proc (dyn, b, r, s) - do ((c, d'), s, g') - g - (dyn, (b, d), r, s) returnA - (c, s, loop' g' d') instance ArrowLoop a = ArrowLoop (SF a) where loop (SF f) = SF $! proc (d, b, r, s) - do rec ((c, d), s, f') - f - (d, (b, d), r, s) returnA - (c, s, loop f') Neither of these compile through my eyeball, What I meant was: instance ArrowLoop a = ArrowLoop (SF a) where loop (SF f) = SF $! proc (dyn, b, r, s) - do rec ((c, d), s, f') - f - (dyn, (b, d), r, s) returnA - (c, s, loop f') 2. Why there is no ArrowIO in arrows? I.e. class Arrow a = ArrowIO a where liftAIO :: Kleisli IO b c - a b c (possibly class Arrow a = ArrowST a where liftAST :: Kleisli ST b c - a b c ) It would only be a convenience typeclass, and in that case why not just have a generic ArrowKleisli with: (i - m o) - a i o Hmm. I guess to avoid (some) problems: class (Monad m, Arrow a) = ArrowKleisli m a where liftMonad ∷ (b - m c) - a c liftMonad = liftKleisli . Kleisli liftKleisli ∷ Kleisli m b c - a b c liftKleisli = liftMonad . runKleisli Given: instance ArrowKleisli CHP (Kleisli CHP) instance ArrowKleisli IO (Kleisli CHP) And: someFunc = liftIO . print :: (Show b, MonadIO m) = b - m () Which liftIO is run in: liftMonad someFunc :: Kleisli CHP String () ghci :t liftMonad (someFunc) :: Kleisli CHP String () interactive:1:0: No instance for (ArrowKleisli m (Kleisli CHP)) arising from a use of `liftMonad' at interactive:1:0-19 Possible fix: add an instance declaration for (ArrowKleisli m (Kleisli CHP)) In the expression: liftMonad (someFunc) :: Kleisli CHP String () As IO is popular it is particularly likely to run into this problem. Adding: class Arrow a ⇒ ArrowIO a where liftAIO ∷ (b → IO c) → a b c instance ArrowKleisli IO a ⇒ ArrowIO a where liftAIO = liftMonad Solves problem: ghci :t liftAIO someFunc :: Kleisli CHP String () liftAIO someFunc :: Kleisli CHP String () :: Kleisli CHP String () Regards signature.asc Description: This is a digitally signed message part ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Hackage accounts and real names
On Tue, Apr 06, 2010 at 10:10:09AM +0100, David House wrote: 3. Privacy issues. Some people simply cannot reveal their real names. I've already said I was prepared to make exceptions in such cases, but perhaps you missed that. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Hackage accounts and real names
I note that in some jurisdictions there is no such thing as a real name. You can change your name for legal purposes (on official documentation and so forth) simply by asserting that this is the name you prefer to be known by. Your legal name doesn't have to be the same as your everyday name (mine isn't). What matters is continuity of identity and the ability to link your identities across the places you participate. Tony. -- f.anthony.n.finch d...@dotat.at http://dotat.at/ GERMAN BIGHT HUMBER: SOUTHWEST 5 TO 7. MODERATE OR ROUGH. SQUALLY SHOWERS. MODERATE OR GOOD. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Hackage accounts and real names
Edward Z. Yang wrote: This is a pretty terrible reason, but I'm going to throw it out there: I like real names because they're much more aesthetically pleasing. I agree, and this is why I phased out apfelmus in favor of the pseudonym Heinrich Apfelmus. So, a more accurate policy would be to accept not only real names, but also names that look like they're real, i.e. aesthetically pleasing noms de plumes. Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Hackage accounts and real names
On Tue, Apr 6, 2010 at 1:08 PM, Serguey Zefirov sergu...@gmail.com wrote: http://lambda-the-ultimate.org is one lovely community that has that restriction: http://lambda-the-ultimate.org/policies#Policies LtU has no restriction on user names. From LtU's policy: Anonymity and the use of pseudonyms is discouraged. I'm against *requiring* the use of a real name for hackage accounts. I have no problems with encouraging the use of given/everyday names. Regards, Roel ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Hackage accounts and real names
On Tue, Apr 6, 2010 at 6:08 AM, Serguey Zefirov sergu...@gmail.com wrote: http://lambda-the-ultimate.org is one lovely community that has that restriction: http://lambda-the-ultimate.org/policies#Policies I quote the policy in full here: Many of us here post with our real, full names. Anonymity and the use of pseudonyms is discouraged. We recognize that there can be legitimate reasons for wishing to post under a pseudonym. If you do not register using your real name, then if possible, please include identifying information in your user profile, such as your real name or a link to a personal home page or blog. Using a pseudonym by which you are known elsewhere can also help. This is a request, not a restriction. - Jake ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Hackage accounts and real names
On Tue, 06 Apr 2010 14:57:30 +0200, you wrote: I agree, and this is why I phased out apfelmus in favor of the pseudonym Heinrich Apfelmus. You mean your name isn't really Applesauce? Steve Schafer ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Confusions about the Haskell Platform (for Mac)
leather: 1. Why can't the platform download site be hosted on www.haskell.org instead of hackage.haskell.org? I see that there's a redirect, but (imho) it would be ideal to have www.haskell.org/platform be the standard URL in my browser. It is easier to remember (for typing) and more obvious (for appearances). It's a different server that we have better physical access to (i.e. I can check the logs). 2. What is the difference between Haskell and the Haskell Platform? I see one or the other in various places. To get from www.haskell.org to downloading the Mac software, I go through Download Haskell, Get the Haskell Platform Mac, and Download Haskell for Mac OS X (intel). 3. By looking at http://hackage.haskell.org/platform/mac.html , I have no idea what I'm going to get when I click the Download Haskell for Mac OS X (intel) link. It would be nice to know what I'm getting myself into before I commit to waiting for this 137.9 MB file. Thanks to the wonder of deep links, one can also not be expected to traverse the path that I did in #2. Similarly, if I come to this link directly, I have no easy way of navigating to try to figure out what Haskell or GHC is. 4. The current link for the Mac image points to http://hackage.haskell.org/ platform/2010.1.0.0/haskell-platform-2010.1.0.1-i386.dmg . Note the inconsistency between the version in the directory and file names. 5. The directions on http://hackage.haskell.org/platform/mac.html say: After downloading: * Open the .dmg file * Follow the install instructions I see no install instructions in the .dmg file. I only see the following files: * GHC-6.12.1-i386.pkg * Haskell Platform 2010.1.0.1.pkg * Uninstall GHC 6. Since there are no install instructions, I am not sure which .pkg to install first. Of course, fix #3 and you hopefully fix this one. 7. Why can't I have a single .pkg file? Why do I have an Uninstall GHC and not an Uninstall Haskell Platform? -- I don't expect all of the above to necessarily have a direct solution. They are just my observations to share. Some of them are from the point of view of a newcomer, and some are from a perfectionist. Thanks! I'm about to hop on a plane, but here's the darcs repo for the download website, if you want to address some of the issues -- e.g. return navigation links. http://code.haskell.org/haskell-platform I'd love patches and improvements to address the concerns above. -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Metaprogramming in Haskell vs. Ocaml
Jacques Carette wrote: Jason Dagit wrote: Are you implying that template haskell is not typed? Indeed. [...] Compare with metaocaml where if you can compile you meta-program (i.e. code generator), then you are guaranteed that it can only ever produce valid, well-typed code. Not so with TH, where you can easily generate junk -- which GHC will promptly figure out and give you an error. I'm curious, can metaocaml create new data type definitions, value declarations or type class instances? I usually use TH to get rid of boilerplate that I cannot get rid off in Haskell itself, for instance for creating functional lenses for record types data Foo = Foo { bar_ :: Int, ...} $(DeriveLenses Foo) -- bar :: Lens Foo Int It seems to me that metaocaml is more used as user annotated partial evaluation? Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] How do I use ByteString?
Hi Don Stewart wrote: gue.schmidt: Hi all, I've never found an easy way to deal with ByteStrings. I'm using the RSA library and it en- and decodes Data.ByteString.Lazy.ByteString. I initially start with Strings, ie. [Char], but there is no function to convert the 2 back and forth. There is however a function which takes [Word8] to BytesString and back. It all wouldn't be so confusing if there weren't several versions of ByteString in several modules to choose from. And a number of libraries requiring different types of ByteString. I am sure the designers of the bytestring package had good reason for this design, is there also a webpage which explains which one to use and under what circumstances? I really would like such a webpage, because I am also confused about when to use what type of strings. As a general rule you should never convert between String and bytestring. You can read bytestrings from files, or write literals using pack or the -XOverloadedStrings extension Except that different libraries require different kind of strings. Some use strict bytestring, some use lazy bytestring, some use [Char], some use lazy Data.Text, ... So you really need to convert between different representations. It may seem unfair that I put byte-strings and char-strings in the same bucket, but libraries do use byte-strings to contain characters. For example, Parsec has a [Char] and a bytestring interface. Strings are the glue that binds many libraries together, and the many different types of strings complicate this glue. It is therefore much more complicated to compose different libraries than it was when most libraries used [Char]. It really would make Haskell programming easier if we could settle on one char-string type (and one type for byte-strings). Converting between lazy and strict bytestrings is a representation change, and changes complexity - so be aware of what you're doing. You can do this via fromChunks or concat . toChunks. Reading the introduction to lazy bytestring here http://hackage.haskell.org/packages/archive/bytestring/0.9.1.5/doc/html/Data-ByteString-Lazy.html it seems that lazy bytestring always has at least as good complexity as strict bytestrings. Lazy Data.Text strings also has at least as good complexity as strict Data.Text strings. So, for public library interfaces it would be great if could settle for some lazy string type like Data.Text. Preferably a string type that could be efficiently converted to lazy bytestrings for libraries that deal with bytes and not characters. This however, requires that the community can settle for one char-string type and a good beginning could be a description of how string handling is supposed to happen in Haskell (I am thinking about a webpage like Günther writes about). /Mads -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe signature.asc Description: This is a digitally signed message part ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: libraries [was GUI haters]
aditya siram wrote: Cocoa is probably the best GUI toolkit (open-source or otherwise) that I've seen. However it ties your app to the Mac (and the iPhone). And I don't believe there is a mature Haskell bridge. There is hoc http://code.google.com/p/hoc/ but it's not on hackage and seems a bit dormant. And Javascript [1] is really not _that_ bad! But it's not Haskell. :'( Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Hackage accounts and real names
Am Dienstag 06 April 2010 14:57:30 schrieb Heinrich Apfelmus: Edward Z. Yang wrote: This is a pretty terrible reason, but I'm going to throw it out there: I like real names because they're much more aesthetically pleasing. I agree, and this is why I phased out apfelmus in favor of the pseudonym Heinrich Apfelmus. If it's a pseudonym, you should've chosen Marcus Apfelmus - or did you never read Asterix? So, a more accurate policy would be to accept not only real names, but also names that look like they're real, i.e. aesthetically pleasing noms de plumes. I support that, with exceptions for sufficiently well known nicks (Gour spoke out; before you changed it, apfelmus fell into that category, a few others come to mind, but not many). Regards, Heinrich Apfelmus ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Metaprogramming in Haskell vs. Ocaml
On Tue, 06 Apr 2010 15:08:45 +0200, Heinrich Apfelmus apfel...@quantentunnel.de wrote: Jacques Carette wrote: Jason Dagit wrote: Are you implying that template haskell is not typed? Indeed. [...] Compare with metaocaml where if you can compile you meta-program (i.e. code generator), then you are guaranteed that it can only ever produce valid, well-typed code. Not so with TH, where you can easily generate junk -- which GHC will promptly figure out and give you an error. I'm curious, can metaocaml create new data type definitions, value declarations or type class instances? I usually use TH to get rid of boilerplate that I cannot get rid off in Haskell itself, for instance for creating functional lenses for record types data Foo = Foo { bar_ :: Int, ...} $(DeriveLenses Foo) -- bar :: Lens Foo Int No metaocaml cannot do this. It is restricted to the expression level, and not the declaration level. Moreover you cannot pattern match over the generated code. It seems to me that metaocaml is more used as user annotated partial evaluation? That is a way to look at it. -- Nicolas Pouillard http://nicolaspouillard.fr ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: libraries [was GUI haters]
Jean-Denis Koeck wrote: Question to the Mac users on the list: do you find that Qt applications feel native enough on your platform ? If not, any tips ? Well, that depends on your definition of enough. :) The most important thing is probably that cross platform applications always look buggy, so if you can make sure that everything runs smoothly and there are no drawing bugs or thelike, that's a big plus. Qt applications will always look odd, the relative spacing is all off. But using the appropriate system fonts adds a lot to consistency. Avoid colored buttons and text. Another key feature of native for me is that the menu bar is at the top of the screen. Hence, all windows share the same menu. Furthermore, the context menu should not list commands that are not available in the top menu. Not as important, but still unique to native Mac applications is that accept a lot of drag drop. For instance, to insert a picture into a document, you can just drag drop it from the Finder program; no need to intricate open file dialogs. If you have a list of items that can be rearranged, do so by means of drag drop instead of strange Up and Down buttons. There's probably more, but that's what I can think of right now off the top of my hat. :) Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] How do I use ByteString?
Mads Lindstrøm mads_lindstr...@yahoo.dk writes: It may seem unfair that I put byte-strings and char-strings in the same bucket, but libraries do use byte-strings to contain characters. For example, Parsec has a [Char] and a bytestring interface. It bears noting that Data.ByteString and Data.ByteString.Char8 are just different interfaces to the same data type (same goes for the .Lazy versions). Once upon a time I forked bytestring to use a phantom type tag to separate different encodings (including many other 8-bit encodings than the Char8 one), but although I still think this is a good idea, the code is long dead and gone now. -k -- If I haven't seen further, it is by standing in the footprints of giants ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Seeking advice about monadic traversal functions
Darryn Reid wrote: Martijn van Steenbergen wrote: A small remark: I prefer using applicative notation for this: go Next (Single x t1) = Single x $ rewrite f t1 go Next (Fork t1 t2 ) = Fork $ rewrite f t1 * rewrite f t2 Thanks for your comment and advice. Could you explain a little further your thinking? Specifically, what advantage do you find in the applicative notation, and when would you advise using it and when would you advise not using it? The applicative notation is more general since it also applies to applicative functors http://www.cs.nott.ac.uk/~ctm/IdiomLite.pdf It's main advantage over the liftM family is that it can be used with any number of arguments liftM f m = f $ m liftM2 f m n = f $ m * n liftM3 f m n o = f $ m * n * o etc. and that's why I prefer it as well. It's very similar to function application, too, just think of * as a replacement for the empty space that separates function arguments. The only drawback is probably that you have to import Control.Applicative In fact, it doesn't actually work for monads, I think you have to wrap it in a newtype. :D The same effect can be achieved with `ap` , though: liftM3 f m n p = return f `ap` m `ap` n `ap` o Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Metaprogramming in Haskell vs. Ocaml
One thing I should have mentionned - TH and camlp4 are really equivalents. And camlp4 is as-typed-as TH (or not, depending on your point of view). I am co-author of a camlp4 extension, and I must admit that coding in camlp4 was not enjoyable, while coding in metaocaml (eventually) is. [I see that Nicolas Pouillard just answered the question about new type definitions, etc, as I was typing this answer] Heinrich Apfelmus wrote: It seems to me that metaocaml is more used as user annotated partial evaluation? I see most of my uses of metaocaml as code generation (building 'up' code from pieces by making explicit design choices) rather than classical partial evaluation (specializing code). Others would argue that these two activities are really the same thing -- and I would not really disagree! It's just that in my cases the 'specialization' is not driven by the partial evaluator at all, it is fully driven by the user [through explicit decisions of which modules/functors to use]. This requires a very different code organization, which is why I make the difference between the two approaches. The Haskell analogy: I write tons and tons of typeclass-level 'code', including typeclasses for type constructors (and type constructor transformers and ...) but then I ensure that whenever these are used, it can be statically determined exactly which instance should be used, and 100% of the dispatch overhead is eliminated AND I get full control over which methods get inlined in the final code. It is that 'full control' aspect which gets you reliable efficiency from highly abstract code. Jacques ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Metaprogramming in Haskell vs. Ocaml
On Tue, 06 Apr 2010 09:37:59 -0400, Jacques Carette care...@mcmaster.ca wrote: One thing I should have mentionned - TH and camlp4 are really equivalents. And camlp4 is as-typed-as TH (or not, depending on your point of view). I am co-author of a camlp4 extension, and I must admit that coding in camlp4 was not enjoyable, while coding in metaocaml (eventually) is. This is not exactly the same, TH is a bit more typed than camlp4 here is two examples: {-# LANGUAGE TemplateHaskell #-} module Thtest1 (test) where test = [d| f :: Int f = True |] {-# LANGUAGE TemplateHaskell #-} module Thtest2 (test) where test = [e| 1 + x |] These two files are rejected at compile time before being spliced in. So there is a limited scope checking, and type checking (limited because manually using the AST constructors allow to workaround the typechecker). Second point, the Q monad allows to generate names in a rather safe way compared to camlp4. Third reification can be done on declarations done in other files. So that we can easily inspect the types and definitions of previous things, which a rather hard (near to impossible) in camlp4. Best regards, -- Nicolas Pouillard http://nicolaspouillard.fr ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskell.org re-design
Well, they make the wannabe-designer mistake of using justified text in HTML, even worse, for columns just 3 words wide. The overall layout, is pretty nice though. It's essentially the standard Web 2.0 layout (compare http://basecamphq.com/, http://www.blinksale.com/, http://www.analysis-one.com/, etc.). The key design elements are (IMO): - Put the important stuff at the top and separate it visually from the other stuff. The important things are: (1) the quick summary of Haskell, (2) the Get Haskell button, (3) link to Learn Haskell / Try Haskell - We may have a second row/column of secondary important stuff, like community, project hosting, more implementations, the top learning materials, etc. links to Haskell users - News, Events, etc. can go further down I'm not particularly attached to any particulars of my suggested design. I just thought I'll try to encourage to move away much further from the current wiki-like and somewhat dull design. On 6 April 2010 10:36, Johan Tibell johan.tib...@gmail.com wrote: On Tue, Apr 6, 2010 at 5:24 AM, Simon Michael si...@joyful.com wrote: On 4/2/10 5:28 AM, Thomas Schilling wrote: How about something more colourful? http://i.imgur.com/7jCPq.png I really like the simplicity of the Cassandra page: http://cassandra.apache.org/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Push the envelope. Watch it bend. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] [OT?] Haskell-inspired functions for BASH
Patrick LeBoutillier wrote: ... Basically I'm looking for a bit of feedback/info: - Does anyone know if there are already similar projets out there? You've already got some references, you can also look at http://hackage.haskell.org/package/scc which includes a shell language. - Does anyone find this interesting? I do. - Any other comment/suggestion/feedback It would be interesting to compare the speed of your Bash functions with the h4sh executables written in Haskell. Your solution has the source platform independence on its side, of course. A question of my own: is there any written design (an academic paper would be perfect) of a functional shell language? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: HXT Namespaces and XPath
Hi Mads, In HXT, namespace prefixes bound by an XML document are valid in the context of an XPath. How do avoid that? An example program will clarify: simpleXml :: String simpleXml = soap:Body xmlns:soap=\http://www.w3.org/2003/05/soap-envelope\/ nsEnv :: [(String, String)] nsEnv = [ (s, http://www.w3.org/2003/05/soap-envelope;) ] evalXPath :: String - String - [XmlTree] evalXPath xpath xml = runLA ( xread propagateNamespaces getXPathTreesWithNsEnv nsEnv xpath ) xml Here: evalXPath //s:Body simpleXml == evalXPath //soap:Body simpleXml Even though I only mentions the prefix s (and not soap) in the function nsEnv. When working with namespaces in XML, the prefixes are not longer significant. After namespace propagation every name in the XML document is identified by a qualified name. This is a pair consisting of the namespace URI and the local part. The prefixes become irrelevant. A namespace aware XPath expression needs a namespace environment, as given in the example, to construct these qualified names for the names in the XPath expression. So the results of both evalXPath calls in your example must be the same. I do not want the XPath to see prefixes declared in the xml-document, as it means that two semantically similar XML documents can get different results when applied to the same XPath. If you intend, that the prefixes are significant, then you should not work with namespace propagation. If namespaces are not propagated, all names occurring in the document are taken as they are. That means s:Body is different from soap:Body. For solving your tasks there could be 2 ways: 1. don't use namespaces, no propagateNamespaces, no getXPathTreesWithNsEnv, use the prefixes instead. Disadvantage: the prefixes become significant. If prefixes change, the semantics changes. 2. Use propagateNamespaces and getXPathTreesWithNsEnv, but select all nodes via the namespace URIs, not via the prefixes. If you want to output the manipulated XML parts and use standard prefixes for the namespaces, then use the namespace manipulation functions in http://hackage.haskell.org/packages/archive/hxt/latest/doc/html/Text-XML-HXT-Arrow-Namespace.html Cheers, Uwe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] [OT?] Haskell-inspired functions for BASH
A question of my own: is there any written design (an academic paper would be perfect) of a functional shell language? A few: http://www.citeulike.org/user/spl/tag/shell More resources: http://www.cse.unsw.edu.au/~pls/thesis-topics/functionalshell.html Regards, Sean ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] [OT?] Haskell-inspired functions for BASH
On 6 April 2010 15:09, Mario Blažević mblaze...@stilo.com wrote: A question of my own: is there any written design (an academic paper would be perfect) of a functional shell language? Olin Shivers has written a detailed paper on Scsh. ftp://www-swiss.ai.mit.edu/pub/su/scsh/scsh-paper.ps The link might be down permanently (it is for me at the moment), maybe the paper is on Citeseer or similar. There is also the Scsh manual. Best wishes Stephen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskell.org re-design
I'm definitely not a design/color person, but has anyone considered using kuler.adobe.com as a source of nice color schemes, since we seem to have an issue coming up with attractive combinations? On Tue, Apr 6, 2010 at 9:58 AM, Thomas Schilling nomin...@googlemail.comwrote: Well, they make the wannabe-designer mistake of using justified text in HTML, even worse, for columns just 3 words wide. The overall layout, is pretty nice though. It's essentially the standard Web 2.0 layout (compare http://basecamphq.com/, http://www.blinksale.com/, http://www.analysis-one.com/, etc.). The key design elements are (IMO): - Put the important stuff at the top and separate it visually from the other stuff. The important things are: (1) the quick summary of Haskell, (2) the Get Haskell button, (3) link to Learn Haskell / Try Haskell - We may have a second row/column of secondary important stuff, like community, project hosting, more implementations, the top learning materials, etc. links to Haskell users - News, Events, etc. can go further down I'm not particularly attached to any particulars of my suggested design. I just thought I'll try to encourage to move away much further from the current wiki-like and somewhat dull design. On 6 April 2010 10:36, Johan Tibell johan.tib...@gmail.com wrote: On Tue, Apr 6, 2010 at 5:24 AM, Simon Michael si...@joyful.com wrote: On 4/2/10 5:28 AM, Thomas Schilling wrote: How about something more colourful? http://i.imgur.com/7jCPq.png I really like the simplicity of the Cassandra page: http://cassandra.apache.org/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Push the envelope. Watch it bend. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: HXT error handling
Hi Mads, I am trying to use HXT to evaluate XPath expressions. The XPath expressions are not specified by myself, but by users of my program. However, the idea behind HXT's error handling confuses me. Maybe somebody can enlighten me. This program fragment: evalXPath :: String - String - [XmlTree] evalXPath xpath xml = runLA ( xread propagateNamespaces getXPathTrees xpath ) xml seems to work fine, except when it comes to error handling. If the xml-string is malformed, the error is simply ignored and the evalXPath-function just returns an empty list. I can understand what happens. 'getXPathTrees xpath' tries to match the xpath to a XmlTree which represents a parse error, and it therefore never matches anything. When calling evalXPath, there are 2 error situations. Both can be handled in the same form. 1. xread is called with a string, that does not match XML contents. This results in a single element list containing an error message. Test: runLA xread ??? The following arrows, propagateNamespaces ..., don't accept error messages, so they fail and the result of the whole arrow ist the empty list. So the result of xread must be checked before further processed. 2. getXPathTrees xpath can fail with a syntax error in xpath. This again results in a single element list with an error message. The error message can be catched in the same way as before. Your example can be rewritten in the following way: -- module NameSpace where import Text.XML.HXT.Arrow import Text.XML.HXT.XPath simpleXml :: String simpleXml = soap:Body xmlns:soap=\http://www.w3.org/2003/05/soap-envelope\/ wrongXml :: String wrongXml = ??? nsEnv :: [(String, String)] nsEnv = [ (s, http://www.w3.org/2003/05/soap-envelope;) ] evalXPath :: String - String - [XmlTree] evalXPath xpath xml = runLA ( xread ( ( propagateNamespaces getXPathTreesWithNsEnv nsEnv xpath ) `whenNot` isError ) ) xml t1 = evalXPath //s:BodysimpleXml t2 = evalXPath //soap:Body simpleXml t3 = evalXPath ??? simpleXml t4 = evalXPath //soap:Body wrongXml t5 = runLA xread wrongXml -- What I really would like was functions like: parseStr :: (Monad m) = String - m XmlTrees parseStr xml = case Parsec.xread xml of (x:xs) - if (Dom.isError x) then fail Could not parse tree else return (x:xs) [] - fail No XML tree resultet from parsing XML You already do have this. Not in a monadic version but as arrow. See above example. And a similar function for the XPath. This could also speed up my program, as I would not parse the same XPath again and again. A This is a right point. Here the current XPath calling interface is too simple. A separation into XPath parsing and evaluation would be more flexible. The parsing (and error handling of XPath syntax errors) could be done once. I will extend the interface to support this. Thanks for your comments and hints, Uwe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Hackage accounts and real names
I think this is a bad idea as it ruins recognisability. How am I meant to know that anonymous1 on hackage is the same person as mrfoo on haskellwiki, for example? I should not have to point out how unreliable this method of identifying individuals is... I suppose there is no way of preventing mrfoo from adding his nick to the Maintainer or Author fields anyway. For those who claim that there are no advantages of real name policy's, consider Facebook. Arguably the astonishing success of Facebook is utterly based on a real names policy... 2010/4/6 David House dmho...@gmail.com: 2010/4/6 Jonas Almström Duregård jonas.dureg...@gmail.com: Maybe users could choose between using a real name and being given a random one (like AnonymousN). This will (1) protect from data mining, (2) protect from government persecution and (3) keep the damned 1337 Haxxor names away from Hackage :) I think this is a bad idea as it ruins recognisability. How am I meant to know that anonymous1 on hackage is the same person as mrfoo on haskellwiki, for example? P.s. if (3) is your real reason for supporting this restriction, please rethink your perspective. You are supporting a policy that is hurting the community for mere aesthetic reasons. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Confusions about the Haskell Platform (for Mac)
Sean Leather leat...@cs.uu.nl writes: 4. The current link for the Mac image points to http://hackage.haskell.org/platform/2010.1.0.0/haskell-platform-2010.1.0.1-i386.dmg . Note the inconsistency between the version in the directory and file names. You can think of that one as the second edition of the 2010.1 beta version. Agree that the directories should match. Too bad the installer still doesn't work -- I'm working on it everyone, but the Mac installer system is incredibly crufty and broken, and Snow Leopard broke a lot of stuff for me. 5. The directions on http://hackage.haskell.org/platform/mac.html say: After downloading: * Open the .dmg file * Follow the install instructions I see no install instructions in the .dmg file. I only see the following files: * GHC-6.12.1-i386.pkg * Haskell Platform 2010.1.0.1.pkg * Uninstall GHC When you mount the .dmg file a Finder window should pop up with the install instructions in a background image. Let me guess: this isn't working in Leopard? I should put a readme in there. 7. Why can't I have a single .pkg file? Short answer: I can't figure out how, and not for lack of trying, either. What I do is take the binary installer that the GHC guys build as a starting point. Despite many hours of reverse-engineering I cannot for the life of me figure out how to extract the GHC installer package from the binary metapackage. My experience has been that if you unxar the metapackage and try to copy the included package file into a new metapackage, the mac installer tools barf. Long-term, I'm planning on just building GHC from source so I can package a one-click installer, but I don't have infinite time for this project and doing psychic battle with the evil warlocks who cooked up the Mac installer is a challenge. If anyone has expertise in this area and a willingness to help, please contact me off-list. Why do I have an Uninstall GHC and not an Uninstall Haskell Platform? The platform installer is supposed to erase previous platform editions before it installs itself. G. -- Gregory Collins g...@gregorycollins.net ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] [OT?] Haskell-inspired functions for BASH
On Tue, Apr 6, 2010 at 11:17 AM, Stephen Tetley stephen.tet...@gmail.com wrote: On 6 April 2010 15:09, Mario Blažević mblaze...@stilo.com wrote: A question of my own: is there any written design (an academic paper would be perfect) of a functional shell language? Olin Shivers has written a detailed paper on Scsh. ftp://www-swiss.ai.mit.edu/pub/su/scsh/scsh-paper.ps The link might be down permanently (it is for me at the moment), maybe the paper is on Citeseer or similar. There is also the Scsh manual. Best wishes Stephen The Scsh manual is worth reading just for the introductory material. Part of the problem is that both Clean and Scheme have relatively easy and powerful 'eval' ability. (Esther exploits the interesting feature of Clean that lets you serialize functions to disk.) Haskell doesn't, so much. The GHC API isn't too great to work with here; it's hard enough to evaluate straight Haskell fragments, and to serve as a shell, you really need new syntax; for example, you want literals for program names. (Who would use a shell which forces you to write 'run ghci [foo.lhs]', instead of 'ghci foo.lhs'?) But many filenames break in Haskell; 'ssh-agent', 'g++-4.4', 'bf_tar', etc. -- gwern ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Confusions about the Haskell Platform (for Mac)
Hi Gregory, Thanks for the reply. Gregory Collins wrote: Sean Leather writes: 4. The current link for the Mac image points to http://hackage.haskell.org/platform/2010.1.0.0/haskell-platform-2010.1.0.1-i386.dmg . Note the inconsistency between the version in the directory and file names. You can think of that one as the second edition of the 2010.1 beta version. Agree that the directories should match. This is, of course, relatively minor. One alternative is to change the directory name to exclude the lowest version(s), e.g 2010.1/haskell-platform-2010.1.0.1-i386.dmg, so that when new intermediate versions are uploaded, the directory name still makes sense and doesn't need to change. Too bad the installer still doesn't work -- I'm working on it everyone, but the Mac installer system is incredibly crufty and broken, and Snow Leopard broke a lot of stuff for me. Is it possible to build the installer on a Leopard system/virtual machine such that it will install on a Snow Leopard system? 5. The directions on http://hackage.haskell.org/platform/mac.html say: After downloading: * Open the .dmg file * Follow the install instructions I see no install instructions in the .dmg file. I only see the following files: * GHC-6.12.1-i386.pkg * Haskell Platform 2010.1.0.1.pkg * Uninstall GHC When you mount the .dmg file a Finder window should pop up with the install instructions in a background image. Let me guess: this isn't working in Leopard? I should put a readme in there. Yes, I'm using Leopard. A README file should do the trick. 7. Why can't I have a single .pkg file? Short answer: I can't figure out how, and not for lack of trying, either. What I do is take the binary installer that the GHC guys build as a starting point. Despite many hours of reverse-engineering I cannot for the life of me figure out how to extract the GHC installer package from the binary metapackage. I'm completely ignorant of how the installer packages work, but is it possible to have one package refer to another? Thus, one installer could initiate another. Then, at least there is only one click needed for the whole thing. My experience has been that if you unxar the metapackage and try to copy the included package file into a new metapackage, the mac installer tools barf. Long-term, I'm planning on just building GHC from source so I can package a one-click installer, but I don't have infinite time for this project and doing psychic battle with the evil warlocks who cooked up the Mac installer is a challenge. I see you have the source at http://github.com/gregorycollins/haskell-platform-osx-installer . I can try to look at it at some point. If anyone has expertise in this area and a willingness to help, please contact me off-list. Why do I have an Uninstall GHC and not an Uninstall Haskell Platform? The platform installer is supposed to erase previous platform editions before it installs itself. That's good. Is it possible to include an uninstaller as well? Regards, Sean ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Confusions about the Haskell Platform (for Mac)
Sean Leather leat...@cs.uu.nl writes: Too bad the installer still doesn't work -- I'm working on it everyone, but the Mac installer system is incredibly crufty and broken, and Snow Leopard broke a lot of stuff for me. Is it possible to build the installer on a Leopard system/virtual machine such that it will install on a Snow Leopard system? I think that's the approach I'm going to have to take. I still have my Leopard DVD sitting around, I'll try building the thing in a VirtualBox or maybe even doing a separate Leopard edition of the platform installer. 7. Why can't I have a single .pkg file? Short answer: I can't figure out how, and not for lack of trying, either. What I do is take the binary installer that the GHC guys build as a starting point. Despite many hours of reverse-engineering I cannot for the life of me figure out how to extract the GHC installer package from the binary metapackage. I'm completely ignorant of how the installer packages work, but is it possible to have one package refer to another? Thus, one installer could initiate another. Then, at least there is only one click needed for the whole thing. I don't have a good working solution for this, so the situation will have to remain status quo (i.e. clicking two installers) for now. The platform installer is supposed to erase previous platform editions before it installs itself. That's good. Is it possible to include an uninstaller as well? It would be pretty easy to bundle a shell script. G -- Gregory Collins g...@gregorycollins.net ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskell.org re-design
Well, I used http://www.colorschemedesigner.com/ On 6 April 2010 16:20, Daniel Peebles pumpkin...@gmail.com wrote: I'm definitely not a design/color person, but has anyone considered using kuler.adobe.com as a source of nice color schemes, since we seem to have an issue coming up with attractive combinations? On Tue, Apr 6, 2010 at 9:58 AM, Thomas Schilling nomin...@googlemail.com wrote: Well, they make the wannabe-designer mistake of using justified text in HTML, even worse, for columns just 3 words wide. The overall layout, is pretty nice though. It's essentially the standard Web 2.0 layout (compare http://basecamphq.com/, http://www.blinksale.com/, http://www.analysis-one.com/, etc.). The key design elements are (IMO): - Put the important stuff at the top and separate it visually from the other stuff. The important things are: (1) the quick summary of Haskell, (2) the Get Haskell button, (3) link to Learn Haskell / Try Haskell - We may have a second row/column of secondary important stuff, like community, project hosting, more implementations, the top learning materials, etc. links to Haskell users - News, Events, etc. can go further down I'm not particularly attached to any particulars of my suggested design. I just thought I'll try to encourage to move away much further from the current wiki-like and somewhat dull design. On 6 April 2010 10:36, Johan Tibell johan.tib...@gmail.com wrote: On Tue, Apr 6, 2010 at 5:24 AM, Simon Michael si...@joyful.com wrote: On 4/2/10 5:28 AM, Thomas Schilling wrote: How about something more colourful? http://i.imgur.com/7jCPq.png I really like the simplicity of the Cassandra page: http://cassandra.apache.org/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Push the envelope. Watch it bend. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Push the envelope. Watch it bend. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskell.org re-design
There's colourlovers.com as well On Apr 6, 2010, at 12:41 PM, Thomas Schilling nomin...@googlemail.com wrote: Well, I used http://www.colorschemedesigner.com/ On 6 April 2010 16:20, Daniel Peebles pumpkin...@gmail.com wrote: I'm definitely not a design/color person, but has anyone considered using kuler.adobe.com as a source of nice color schemes, since we seem to have an issue coming up with attractive combinations? On Tue, Apr 6, 2010 at 9:58 AM, Thomas Schilling nomin...@googlemail.com wrote: Well, they make the wannabe-designer mistake of using justified text in HTML, even worse, for columns just 3 words wide. The overall layout, is pretty nice though. It's essentially the standard Web 2.0 layout (compare http://basecamphq.com/, http://www.blinksale.com/, http://www.analysis-one.com/, etc.). The key design elements are (IMO): - Put the important stuff at the top and separate it visually from the other stuff. The important things are: (1) the quick summary of Haskell, (2) the Get Haskell button, (3) link to Learn Haskell / Try Haskell - We may have a second row/column of secondary important stuff, like community, project hosting, more implementations, the top learning materials, etc. links to Haskell users - News, Events, etc. can go further down I'm not particularly attached to any particulars of my suggested design. I just thought I'll try to encourage to move away much further from the current wiki-like and somewhat dull design. On 6 April 2010 10:36, Johan Tibell johan.tib...@gmail.com wrote: On Tue, Apr 6, 2010 at 5:24 AM, Simon Michael si...@joyful.com wrote: On 4/2/10 5:28 AM, Thomas Schilling wrote: How about something more colourful? http://i.imgur.com/7jCPq.png I really like the simplicity of the Cassandra page: http://cassandra.apache.org/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Push the envelope. Watch it bend. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Push the envelope. Watch it bend. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] hsql repository
Hello I've looked at hsql-* packages at hackage and found that they have progressed to 1.8.1. However, as always there is no hsql-oracle on hackage. It was usually found in the repository. But I can't find where the repository is. Places, like code.haskell.org and htoolkit.sourceforge.net seem to have the older 1.7 version. Can somebody point me to the repository? Is there any chance that hsql-oracle compiles with new hsql? Thanks Daniil Elovkov ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] [OT?] Haskell-inspired functions for BASH
On 6 April 2010 16:56, Gwern Branwen gwe...@gmail.com wrote: The Scsh manual is worth reading just for the introductory material. Hi Gwern The Scsh manual is worth reading for the Acknowledgements section - which is somewhat famous. Looking over them both it seems most of the material in the paper is covered in the manual. Esther is shipped as a project with Clean2.2 although I think it only works on Windows - the last time I looked at the code I got the impression that it had diverged a bit from the the Famke / Esther papers. Best wishes Stephen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: HXT error handling
Hi Uwe This is a right point. Here the current XPath calling interface is too simple. A separation into XPath parsing and evaluation would be more flexible. The parsing (and error handling of XPath syntax errors) could be done once. I will extend the interface to support this. That would be great. Thank you. Thanks for your comments and hints, Uwe /Mads signature.asc Description: This is a digitally signed message part ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: HXT Namespaces and XPath
Hi Uwe I read your reply multiple times, but I am still confused. I think either I misunderstand you or I did not explain myself properly in the first mail. Hi Mads, In HXT, namespace prefixes bound by an XML document are valid in the context of an XPath. How do avoid that? An example program will clarify: simpleXml :: String simpleXml = soap:Body xmlns:soap=\http://www.w3.org/2003/05/soap-envelope\/ nsEnv :: [(String, String)] nsEnv = [ (s, http://www.w3.org/2003/05/soap-envelope;) ] evalXPath :: String - String - [XmlTree] evalXPath xpath xml = runLA ( xread propagateNamespaces getXPathTreesWithNsEnv nsEnv xpath ) xml Here: evalXPath //s:Body simpleXml == evalXPath //soap:Body simpleXml Even though I only mentions the prefix s (and not soap) in the function nsEnv. When working with namespaces in XML, the prefixes are not longer significant. After namespace propagation every name in the XML document is identified by a qualified name. This is a pair consisting of the namespace URI and the local part. The prefixes become irrelevant. This is my point. Prefixes are relevant in the current implementation of HXT. A namespace aware XPath expression needs a namespace environment, as given in the example, to construct these qualified names for the names in the XPath expression. So the results of both evalXPath calls in your example must be the same. Yes, but in the namespace environment I give to getXPathTreesWithNsEnv I only mention the prefix s, yet I am still able to evaluate the xpath //soap:Body. Furthermore //s:body and //soap:Body gives the same results. Why? I think another example will clarify my point. The code: simpleXmlOne, simpleXmlTwo :: String simpleXmlOne = a:Foo xmlns:a=\http://foo.org\/ simpleXmlTwo = b:Foo xmlns:b=\http://foo.org\/ nsEnv :: [(String, String)] nsEnv = [ (notFoo, http://notfoo.org;) ] evalXPath :: String - [XmlTree] evalXPath xml = runLA ( xread propagateNamespaces getXPathTreesWithNsEnv nsEnv //a:Foo ) xml Now notice that simpleXmlOne and simpleXmlTwo are equivalent. Yes, they have a different prefix for http://foo.org;, but the documents means the same. And as you write yourself, ... the prefix is no longer releavant ... Yet: evalXPath simpleXmlOne /= evalXPath simpleXmlTwo Hope that clarifies things. Regards, Mads signature.asc Description: This is a digitally signed message part ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: HXT error handling
Hi Mads, This is a right point. Here the current XPath calling interface is too simple. A separation into XPath parsing and evaluation would be more flexible. The parsing (and error handling of XPath syntax errors) could be done once. I will extend the interface to support this. That would be great. Thank you. just uploaded hxt-xpath-8.5.3 to hackage. But haddock doc is not yet available on hackage. Cheers, Uwe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: HXT Namespaces and XPath
Hi Replying to myself: I think another example will clarify my point. The code: simpleXmlOne, simpleXmlTwo :: String simpleXmlOne = a:Foo xmlns:a=\http://foo.org\/ simpleXmlTwo = b:Foo xmlns:b=\http://foo.org\/ nsEnv :: [(String, String)] nsEnv = [ (notFoo, http://notfoo.org;) ] evalXPath :: String - [XmlTree] evalXPath xml = runLA ( xread propagateNamespaces getXPathTreesWithNsEnv nsEnv //a:Foo ) xml Now notice that simpleXmlOne and simpleXmlTwo are equivalent. Yes, they have a different prefix for http://foo.org;, but the documents means the same. And as you write yourself, ... the prefix is no longer releavant ... Yet: evalXPath simpleXmlOne /= evalXPath simpleXmlTwo Just to clarify things. The point I am making is that: getXPathTreesWithNsEnv nsEnv //a:Foo do not only see the prefixes in 'nsEnv', but also the prefixes in the XML it is applied to. I think that the getXPathTreesWithNsEnv function should only see the prefixes mentioned in its first parameter. Regards, Mads signature.asc Description: This is a digitally signed message part ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: GSOC Haskell Project
Hello again Following a feedback (courtesy of lispy) of my proposal on #haskell, I come to complete it with some bits here and there. First, a short analysis on the impact that this tool will have on the community. I now that right now there are plenty of clever tricks for debugging your code, even if it involves FFI calls or Monad Transformers Stacks but no one trick is a silver bullet. As far as I know, there is no trick which works the same way both for FFI or Arrows. However, having a backtrace will really help in any domain, from DSLs to FRP and Category Theory constructs. It will help also the beginner average Joe starting to program in Haskell and the senior PhD doctor Bob from the University. The later will be helped by seeing what part of his code is responsible for an unexpected failure while the former will recognize the stack traces he saw in gdb and other imperative programming languages. The second completion that I want to do is to give some more details on the timeline. Between May 26 and first of June I will contact Simon Peyton Joynes and his coautors to see how I will integrate will their code base, what are their policies to integrating patches, what repository they use, etc. This is to ensure continual integration, such that every day there will be a version of the tool which can be built on any machine and used for debugging your own code. Moreover, I will talk to them during this timeframe to convince myself whether the idea of a HPC-like rewrite is good or I should stick with the existing one. If later, this would be all that I'll be doing during this period, otherwise, I'll try to refactor the existing rewrite to the HPC-like one during this timeframe and during one more week after that (that is, until 6th of June). Last but not least, this timeframe must be used to prove several proof of concept snapshots of the debugger, in both variants for public feedback and further guidance Between 1st and 14th of June I will integrate higher-order functions and typeclasses into the debugger. If choosing to do a HPC-like rewrite only the higher order functions would be integrated until 14th of June. However, until 1st of July I will have both higher-order functions and typeclasses inserted into the debugger, the period between 14th and 30th being a buffered period for cases where I'll get stuck and fall behind the timeline. In July, the first week will be dedicated to integrating CAFs while the second one will be for cross module debugging providing options to debug only certain modules while ignoring others (assuming that they are correct). A new buffering period will be between 14th of July and 1st of August, a period which will be used to ensure that all parts will be integrated well and will work in a non-buggy way. The month of August is dedicated to community suggested improvements. Through a series of stress tests or simple tests this debugger will show its strength and its bugs. The former will be praised while the later will be solved during this timeframe and after the GSoC period. Next, some details about my haskell development skills. If the code snippets found in my blog[1] are not so relevant, maybe a link to the latest project developed in Haskell will help[2]. The project was supposed to be a rewrite of Berkley's esspresso program allowing both for logic expression minimization and for automatic drawing of gates. Lately, we stopped working on it because we couldn't find a good working example of it's utility. To add more to my level of Haskell knowledge, I may say that I am teaching programming paradigms at my university as a teaching assistant (students are allowed to do so if they have a very solid knowledge of the subject and a very good extra-curricular open-source/contest activity) and one quarter of the course is held in Haskell (though this year will be the first when we will teach Monads to the students, starting from one of my ideas). Lastly, I've read books on Haskell and right now I am trying to grasp Category Theory by reading Awodey's book. Moreover, I have the full journal of functional programming articles downloaded on my laptop. As for the community integration, I am one of the most active ROSEdu members here, taking part in almost any activity that we develop. I am project manager for one Tech Talks activity and I intend to give a talk on side effects during the next month. More info can be found by reading my homepage[3]. Thanks for the patience for reading another long email. Please, do give some feedback to help me create a better application. Not really useful PS: I am thinking to chose a graduation license software project on Haskell though I haven't yet selected a theme and a domain. [1]: http://pgraycode.wordpress.com [2]: http://dev.rosedu.org/xpresso/browser/trunk -- Mihai Maruseac On Mon, Apr 5, 2010 at 8:26 PM, Mihai Maruseac mihai.marus...@gmail.com wrote: Hello haskellers (men and women)! I had an idea about a graphical
Re: [Haskell-cafe] Re: Haskell.org re-design
Another attempt: http://i.imgur.com/ENvl7.png On 6 April 2010 10:36, Johan Tibell johan.tib...@gmail.com wrote: On Tue, Apr 6, 2010 at 5:24 AM, Simon Michael si...@joyful.com wrote: On 4/2/10 5:28 AM, Thomas Schilling wrote: How about something more colourful? http://i.imgur.com/7jCPq.png I really like the simplicity of the Cassandra page: http://cassandra.apache.org/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Push the envelope. Watch it bend. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: GSOC Haskell Project
Oops, forgot to add the third link: my homepage is at http://people.rosedu.org/people/mihai_maruseac On Tue, Apr 6, 2010 at 10:11 PM, Mihai Maruseac mihai.marus...@gmail.com wrote: Hello again Following a feedback (courtesy of lispy) of my proposal on #haskell, I come to complete it with some bits here and there. First, a short analysis on the impact that this tool will have on the community. I now that right now there are plenty of clever tricks for debugging your code, even if it involves FFI calls or Monad Transformers Stacks but no one trick is a silver bullet. As far as I know, there is no trick which works the same way both for FFI or Arrows. However, having a backtrace will really help in any domain, from DSLs to FRP and Category Theory constructs. It will help also the beginner average Joe starting to program in Haskell and the senior PhD doctor Bob from the University. The later will be helped by seeing what part of his code is responsible for an unexpected failure while the former will recognize the stack traces he saw in gdb and other imperative programming languages. The second completion that I want to do is to give some more details on the timeline. Between May 26 and first of June I will contact Simon Peyton Joynes and his coautors to see how I will integrate will their code base, what are their policies to integrating patches, what repository they use, etc. This is to ensure continual integration, such that every day there will be a version of the tool which can be built on any machine and used for debugging your own code. Moreover, I will talk to them during this timeframe to convince myself whether the idea of a HPC-like rewrite is good or I should stick with the existing one. If later, this would be all that I'll be doing during this period, otherwise, I'll try to refactor the existing rewrite to the HPC-like one during this timeframe and during one more week after that (that is, until 6th of June). Last but not least, this timeframe must be used to prove several proof of concept snapshots of the debugger, in both variants for public feedback and further guidance Between 1st and 14th of June I will integrate higher-order functions and typeclasses into the debugger. If choosing to do a HPC-like rewrite only the higher order functions would be integrated until 14th of June. However, until 1st of July I will have both higher-order functions and typeclasses inserted into the debugger, the period between 14th and 30th being a buffered period for cases where I'll get stuck and fall behind the timeline. In July, the first week will be dedicated to integrating CAFs while the second one will be for cross module debugging providing options to debug only certain modules while ignoring others (assuming that they are correct). A new buffering period will be between 14th of July and 1st of August, a period which will be used to ensure that all parts will be integrated well and will work in a non-buggy way. The month of August is dedicated to community suggested improvements. Through a series of stress tests or simple tests this debugger will show its strength and its bugs. The former will be praised while the later will be solved during this timeframe and after the GSoC period. Next, some details about my haskell development skills. If the code snippets found in my blog[1] are not so relevant, maybe a link to the latest project developed in Haskell will help[2]. The project was supposed to be a rewrite of Berkley's esspresso program allowing both for logic expression minimization and for automatic drawing of gates. Lately, we stopped working on it because we couldn't find a good working example of it's utility. To add more to my level of Haskell knowledge, I may say that I am teaching programming paradigms at my university as a teaching assistant (students are allowed to do so if they have a very solid knowledge of the subject and a very good extra-curricular open-source/contest activity) and one quarter of the course is held in Haskell (though this year will be the first when we will teach Monads to the students, starting from one of my ideas). Lastly, I've read books on Haskell and right now I am trying to grasp Category Theory by reading Awodey's book. Moreover, I have the full journal of functional programming articles downloaded on my laptop. As for the community integration, I am one of the most active ROSEdu members here, taking part in almost any activity that we develop. I am project manager for one Tech Talks activity and I intend to give a talk on side effects during the next month. More info can be found by reading my homepage[3]. Thanks for the patience for reading another long email. Please, do give some feedback to help me create a better application. Not really useful PS: I am thinking to chose a graduation license software project on Haskell though I haven't yet selected a theme and a domain. [1]:
Re: [Haskell-cafe] Re: Haskell.org re-design
This is a very nice design. However shouldn't other pages e.g. the wiki template be redesigning to match as well? If this is not going to happen, then I would almost prefer sticking to the current design for consistency's sake. On 6 April 2010 20:11, Thomas Schilling nomin...@googlemail.com wrote: Another attempt: http://i.imgur.com/ENvl7.png On 6 April 2010 10:36, Johan Tibell johan.tib...@gmail.com wrote: On Tue, Apr 6, 2010 at 5:24 AM, Simon Michael si...@joyful.com wrote: On 4/2/10 5:28 AM, Thomas Schilling wrote: How about something more colourful? http://i.imgur.com/7jCPq.png I really like the simplicity of the Cassandra page: http://cassandra.apache.org/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Push the envelope. Watch it bend. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Why does Haskell not infer most general type?
Is haskell supposed to always infer the most general type (barring extensions)? I found a simple case where this is not true: f _ = undefined where _ = y :: Int - Int y x = undefined where _ = f x Haskell infers the types of 'y' and 'f' as: f :: Int - a y :: Int - Int This confused me at first, but after thinking about it a while it seemed to make sense. But then my friend John pointed out that you can add type sigs for 'f' and 'y': f :: a - b y :: a - b and have it still typecheck! This thoroughly confused me. Why does haskell not infer the most general type for these functions? Is it a limitation of the algorithm? a limitation of the recursive let binding? Any insight would be appreciated :) - Job ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskell.org re-design
Here's a matching Wiki style: http://i.imgur.com/XkuzH.png On 6 April 2010 20:35, Max Bolingbroke batterseapo...@hotmail.com wrote: This is a very nice design. However shouldn't other pages e.g. the wiki template be redesigning to match as well? If this is not going to happen, then I would almost prefer sticking to the current design for consistency's sake. On 6 April 2010 20:11, Thomas Schilling nomin...@googlemail.com wrote: Another attempt: http://i.imgur.com/ENvl7.png On 6 April 2010 10:36, Johan Tibell johan.tib...@gmail.com wrote: On Tue, Apr 6, 2010 at 5:24 AM, Simon Michael si...@joyful.com wrote: On 4/2/10 5:28 AM, Thomas Schilling wrote: How about something more colourful? http://i.imgur.com/7jCPq.png I really like the simplicity of the Cassandra page: http://cassandra.apache.org/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Push the envelope. Watch it bend. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Push the envelope. Watch it bend. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why does Haskell not infer most general type?
On Apr 6, 2010, at 15:56 , Job Vranish wrote: Is haskell supposed to always infer the most general type (barring extensions)? Look up the monomorphism restriction. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu electrical and computer engineering, carnegie mellon universityKF8NH PGP.sig Description: This is a digitally signed message part ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why does Haskell not infer most general type?
I don't believe that the monomorphism restriction has anything to do with this. Removing it does not generalize the type. On Tue, Apr 6, 2010 at 4:46 PM, Brandon S. Allbery KF8NH allb...@ece.cmu.edu wrote: On Apr 6, 2010, at 15:56 , Job Vranish wrote: Is haskell supposed to always infer the most general type (barring extensions)? Look up the monomorphism restriction. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu electrical and computer engineering, carnegie mellon universityKF8NH ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why does Haskell not infer most general type?
Excerpts from Brandon S. Allbery KF8NH's message of Tue Apr 06 16:46:28 -0400 2010: On Apr 6, 2010, at 15:56 , Job Vranish wrote: Is haskell supposed to always infer the most general type (barring extensions)? Look up the monomorphism restriction. Hey Brandon, I tested the code with -XNoMonomorphismRestriction and it still inferred the specific type, so perhaps this is either a GHC bug or something different? wnoise also points out that both functions take arguments, so the monomorphism restriction doesn't apply. See: http://www.reddit.com/r/haskell/comments/bn9to/type_checker_trivia_what_are_the_types_of_f_and_y/ Cheers, Edward ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Established names for a couple of list functionals?
Hello all Having traversals with special behaviour for the first or last element is useful for my current work: -- first element special -- anacrusisMap :: (a - b) - (a - b) - [a] - [b] anacrusisMap _ _ [] = [] anacrusisMap f g (a:as) = f a : map g as -- last element special -- cabooseMap :: (a - b) - (a - b) - [a] - [b] cabooseMap _ _ [] = [] cabooseMap f g (a:as) = step a as where step x [] = [g x] step x (y:ys) = f x : step y ys *Overlay1 anacrusisMap (+1) id [1..10] [2,2,3,4,5,6,7,8,9,10] *Overlay1 cabooseMap id (+1) [1..10] [1,2,3,4,5,6,7,8,9,11] My question (trivial, but still...) - is there any prior art naming these functions? For the record, my name derivation is: + anacrusis - musical term, the pickup notes before the first bar in a score. + caboose - there was discussion on Haskell-Cafe a couple of months ago about a list data type with a distinguished terminal type. Caboose is the name I remember. Thanks Stephen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Announce: hothasktags
On Thursday 1. April 2010 22.46.47 Luke Palmer wrote: I'd like to draw attention to a little script I wrote. I tend to use qualified imports and short names like new and filter. This makes hasktags pretty much useless, since it basically just guesses which one to go to. hothasktags is a reimplementation of hasktags that uses haskell-src-exts to analyze the import structure to generate (scoped) tags pointing to the right definition. I'm pretty addicted to it, since it provides the only functionality I miss from visual studio Thanks for this. Seems to be working very nicely. :-) -- Erlend Hamberg “Everything will be ok in the end. If its not ok, its not the end.” GPG/PGP: 0xAD3BCF19 45C3 E2E7 86CA ADB7 8DAD 51E7 3A1A F085 AD3B CF19 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why does Haskell not infer most general type?
On Tue, Apr 06, 2010 at 03:56:32PM -0400, Job Vranish wrote: f _ = undefined where _ = y :: Int - Int y x = undefined where _ = f x Because f and y are mutually recursive, their types are inferred together, so y gets the type Int - Int (as given), which forces f :: Int - a. If you add the type signature f :: a - b, you break the cycle: that type is used in inferring the type of y (namely a - b), which is then used in checking the typeof f. Ditto if you add y :: a - b instead. (This is not Haskell 98, but the implementations have done this for years, and it will be in Haskell 2010.) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why does Haskell not infer most general type?
So in Haskell 98, would the added constraints result in a type error? - Job On Tue, Apr 6, 2010 at 5:12 PM, Ross Paterson r...@soi.city.ac.uk wrote: On Tue, Apr 06, 2010 at 03:56:32PM -0400, Job Vranish wrote: f _ = undefined where _ = y :: Int - Int y x = undefined where _ = f x Because f and y are mutually recursive, their types are inferred together, so y gets the type Int - Int (as given), which forces f :: Int - a. If you add the type signature f :: a - b, you break the cycle: that type is used in inferring the type of y (namely a - b), which is then used in checking the typeof f. Ditto if you add y :: a - b instead. (This is not Haskell 98, but the implementations have done this for years, and it will be in Haskell 2010.) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why does Haskell not infer most general type?
Yes, it has to do with mutually recursive bindings. If you add a type signature, you break the mutual recursion. Mutually recursive functions are type-checked together and then generalised. Similarly, polymorphic recursion cannot be inferred either, but is possible by adding a type signature. HTH On 6 April 2010 20:56, Job Vranish job.vran...@gmail.com wrote: Is haskell supposed to always infer the most general type (barring extensions)? I found a simple case where this is not true: f _ = undefined where _ = y :: Int - Int y x = undefined where _ = f x Haskell infers the types of 'y' and 'f' as: f :: Int - a y :: Int - Int This confused me at first, but after thinking about it a while it seemed to make sense. But then my friend John pointed out that you can add type sigs for 'f' and 'y': f :: a - b y :: a - b and have it still typecheck! This thoroughly confused me. Why does haskell not infer the most general type for these functions? Is it a limitation of the algorithm? a limitation of the recursive let binding? Any insight would be appreciated :) - Job ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Push the envelope. Watch it bend. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why does Haskell not infer most general type?
On Tue, Apr 06, 2010 at 03:56:32PM -0400, Job Vranish wrote: Why does haskell not infer the most general type for these functions? Is it a limitation of the algorithm? a limitation of the recursive let binding? Any insight would be appreciated :) This is due to when Haskell does generalizing, first, the definitions are broken up into strongly connected components based on their dependencies. Then, in dependency order, the components are type checked then generalized and the result is added to the environment and made available to further typechecking. Notably the types are set in stone at this point and should be the most general they can be. So what is going on here is that your two function f and y depend on each other so are part of the same binding group and hence typecheckd together. this causes y's unknown type to be unified with its use in f, giving it the more specific Int - Int type, even though it could be assigned a more general one. This is what should happen according to the haskell standard, however, it was pointed out in the typing haskell in haskell paper that this is more strict than neccessary, we can furuther split up the binding group based on 'type dependency' as in, if g and h call each other and g has an explicit signature, then h need not be considered to depend on it as the explicit type for g can just be added to the envirornment. When determining binding groups, we can ignore dependencies through explicit types effecitively. This was proposed as an extension to haskell 98 in the THIH paper, and is generally considederd a good idea. What you have here is a more pathological variation on that, while y doesn't have an explicit signature, it is used with an explicit one in f, hence one could theoretically subdivide the binding group, typing f alone, getting its most general type, then typing y, then going back and verifying y's use in f is valid. It is ceratinly possible to come up with a specification for an extended type inference algorithm such as this, but whether it is worth it is another matter. John -- John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] what are the safety conditions for unsafeIOToST
I haven't been able to find it via Google or Haddock. An old message suggests is was just a matter of exceptions? I only want to use the IO for generating Data.Uniques to pair with STRefs in order to make a map of them. I'm guessing this would be a safe use since it's exception free (... right?). Thanks! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Established names for a couple of list functionals?
Stephen Tetley stephen.tet...@gmail.com writes: -- first element special -- anacrusisMap :: (a - b) - (a - b) - [a] - [b] anacrusisMap _ _ [] = [] anacrusisMap f g (a:as) = f a : map g as I've done something like this, and gave it the extremely imaginative name of firstOthers. But it was an internal non-exported function. -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Simple binary-protocol through network test
Hello, I'm trying to use the packages Network and Control.Monad.BinaryProtocol together, with a very simple program in which a client sends an operation to the server, which computes the result and sends it back. But the server holds when trying to receive (Server.hs, line 22), whereas the client has actually sent the data (Client.hs, line 17). The server stops to hold only when the client is killed with a Ctrl-C. This should be rather simple, and I can't get to know why it doesn't work. The files are here: http://old.nabble.com/file/p28157883/Client.hs Client.hs http://old.nabble.com/file/p28157883/Server.hs Server.hs http://old.nabble.com/file/p28157883/SharedData.hs SharedData.hs - Yves Parès Live long and prosper -- View this message in context: http://old.nabble.com/Simple-binary-protocol-through-network-test-tp28157883p28157883.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskell.org re-design
Thomas Schilling nomin...@googlemail.com writes: Another attempt: http://i.imgur.com/ENvl7.png I like the layout, but hate the colour scheme. -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Simple binary-protocol through network test
Yay, I'm glad to see someone else using my package. :-) Hmm, your program seems to work for me. I compiled and ran the Server (with ghc --make), then compiled and ran the Client, and then typed Operation 1.0 Mult 2.0 into the Client process, and the result it got was 2.0 with the output Just 2.0 on the Server. I got the same results running this on Mac OSX and (Gentoo) Linux, with GHC 10.4. What platform/GHC version are you running it on? Cheers, Greg On Apr 6, 2010, at 2:38 PM, Yves Parès wrote: Hello, I'm trying to use the packages Network and Control.Monad.BinaryProtocol together, with a very simple program in which a client sends an operation to the server, which computes the result and sends it back. But the server holds when trying to receive (Server.hs, line 22), whereas the client has actually sent the data (Client.hs, line 17). The server stops to hold only when the client is killed with a Ctrl-C. This should be rather simple, and I can't get to know why it doesn't work. The files are here: http://old.nabble.com/file/p28157883/Client.hs Client.hs http://old.nabble.com/file/p28157883/Server.hs Server.hs http://old.nabble.com/file/p28157883/SharedData.hs SharedData.hs - Yves Parès Live long and prosper -- View this message in context: http://old.nabble.com/Simple-binary-protocol-through-network-test-tp28157883p28157883.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskell.org re-design
On 6 April 2010 22:39, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: Thomas Schilling nomin...@googlemail.com writes: Another attempt: http://i.imgur.com/ENvl7.png I like the layout, but hate the colour scheme. Wow, hate is a very strong word. In any case, though, I'm pretty sure it'll be impossible to please everyone. FWIW, I used this: http://www.colourlovers.com/palette/694737/Thought_Provoking If we can agree on the general layout, though, I can create some colour scheme variants. I know this stuff is very subjective, but I would appreciate constructive feedback. / Thomas -- Push the envelope. Watch it bend. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Simple binary-protocol through network test
Weird... I use GHC 6.12.1, and I run Ubuntu 9.10 (32bits version). Would have I miss something? Like a flush or a close? Logically, I don't see where I would... Gregory Crosswhite-2 wrote: Yay, I'm glad to see someone else using my package. :-) Hmm, your program seems to work for me. I compiled and ran the Server (with ghc --make), then compiled and ran the Client, and then typed Operation 1.0 Mult 2.0 into the Client process, and the result it got was 2.0 with the output Just 2.0 on the Server. I got the same results running this on Mac OSX and (Gentoo) Linux, with GHC 10.4. What platform/GHC version are you running it on? Cheers, Greg On Apr 6, 2010, at 2:38 PM, Yves Parès wrote: Hello, I'm trying to use the packages Network and Control.Monad.BinaryProtocol together, with a very simple program in which a client sends an operation to the server, which computes the result and sends it back. But the server holds when trying to receive (Server.hs, line 22), whereas the client has actually sent the data (Client.hs, line 17). The server stops to hold only when the client is killed with a Ctrl-C. This should be rather simple, and I can't get to know why it doesn't work. The files are here: http://old.nabble.com/file/p28157883/Client.hs Client.hs http://old.nabble.com/file/p28157883/Server.hs Server.hs http://old.nabble.com/file/p28157883/SharedData.hs SharedData.hs - Yves Parès Live long and prosper -- View this message in context: http://old.nabble.com/Simple-binary-protocol-through-network-test-tp28157883p28157883.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe - Yves Parès Live long and prosper -- View this message in context: http://old.nabble.com/Simple-binary-protocol-through-network-test-tp28157883p28158514.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] [haskell.org Google Summer of Code] Student Applications Due Friday!
This is a friendly reminder that student applications for the summer of code are due to Google by Friday, April 9th. http://socghop.appspot.com/document/show/gsoc_program/google/gsoc2010/timeline That is just *3 days* from now! Keep in mind that while we've been tracking general interest in different projects through the trac, the application doesn't count unless you submit it to Google at http://socghop.appspot.com/gsoc/program/home/google/gsoc2010 While all details of the application do not need to be finalized, as much of the information from http://hackage.haskell.org/trac/summer-of-code/wiki/StudApply2010 as possible should probably be included in your application. If you are stuck and having a hard time thinking of ideas, I highly recommend the excellent guide that Don Stewart posted recently: http://donsbot.wordpress.com/2010/04/01/the-8-most-important-haskell-org-gsoc-projects/ I'd also recommend taking a look through the trac at http://hackage.haskell.org/trac/summer-of-code/report/1 to gauge interest. Please email me if you have any questions or concerns. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: GSoC: Improving Cabal's Test Support
Hello again! Based on the invaluable feedback I've received, I've made some revisions to the proposal I made a few days ago (at the end of this post, after my signature). I apologize for the length of my post, but I'd like once again to solicit feedback on this. Any commentary is very helpful! Thanks! -- Thomas Tuegel Throughout this proposal, examples are given to indicate how a package author would utilize the features proposed here. In all these examples, suppose that the programmer is the author of the 'haskell-foo' package, which exposes the module 'Foo' and has a single test executable, 'foo-tests', using the QuickCheck testing library. Package Description File Syntax The syntax for designating test executables in package description files will be based on the existing syntax for describing executables. Such a stanza in the hypothetical package's description file would look like: Test foo-tests main-is: foo-tests.hs build-depends: haskell-foo, Cabal, QuickCheck This example is obviously minimal; this is really an 'Executable' stanza by another name, so any options recognized there would also be valid here. Handling of Test Executables by Cabal The changes proposed here will make it possible to build, test, and install a Cabal package with the usual sequence of commands: $ cabal configure $ cabal build $ cabal test $ cabal install Cabal will recognize two new options during the 'configure' stage: '--enable-tests' and '--disable-tests'. If 'cabal configure' is invoked with the '--enable-tests' option, then any test executables designated in the package description file will be built. For the purposes of the 'configure' and 'build' stages, they will be handled as if they were ordinary executables, i.e., described by 'Executable' stanzas. With tests enabled, the test programs will be executed and their results collected by Cabal during the 'test' stage. If 'cabal configure' is invoked with the '--disable-tests' option (which should be the default if neither option is specified), then test executables designated in the package description file will be ignored, as if the 'Test' stanza were absent. Any attempt to invoke the 'test' stage with tests disabled should remind the user of that fact. Regardless of the status of tests (enabled or disabled), the 'install' stage will ignore any executables designated as test suites, since it is not desirable to install the test executables. Collection of Test Results Cabal will provide a standard interface, residing in the module 'Distribution.Test', for running tests independent of the testing library used. A minimal outline of this module looks like: module Distribution.Test where type Name = String type Result = Maybe Bool type Info = String type Output = String -- 'Compiler' and 'ComponentLocalBuildInfo' are already provided by Cabal. -- They are included here to aid in debugging test failures type Report = (Compiler, ComponentLocalBuildInfo, [(Name, Result, Info, Output)]) class Test t where wrap :: t - IO (Result, Info) runTests :: Test t = [(Name, t)] - IO Report writeResults :: Report - IO () Instances of 'Test' will run a type of test from one of the testing libraries; part of this project will therefore be patching QuickCheck and HUnit to provide these instances. Any other testing library providing this instance will also be compatible with the automated testing features this proposal introduces. The type 'Maybe Bool' is used throughout this framework to indicate a test result: 'Nothing' indicates a test was not run, 'Just False' indicates a failed test, and 'Just True' indicates a successful test. The 'Info' string captures any information provided by the testing library. However, because of the reliance of most test suites on standard output, Cabal will also capture the standard output produced during each test (when the test suite is invoked through 'cabal test'); the output will be included in the test result file. The function 'writeResults' will write the test results to a file. The 'Show' instance for the type of its single argument will therefore constitute the standard test result file format. This has the advantage of being human- and machine-readable without requiring any extra dependencies to parse the file. With this framework, the hypothetical package's author might write a test suite such as: module Main where import Distribution.Test import Foo import QuickCheck testBar :: Gen Bool testBar = ... testBaz :: Gen Bool testBaz = ... main = runTests [(testBar, testBar), (testBaz, testBaz)] = writeResults Reporting and Comparing Test Results The 'cabal test' command will run tests by default, but support two other options: 1. '--report [file]', which will produce a nicely formatted report of the test results stored in the named file, or of the last run of the package's test suite if no file is specified, and 2. '--diff file1 file2',
Re: [Haskell-cafe] Simple binary-protocol through network test
Hmm, I am guessing it is more likely that the problem is that the I/O system changed from 6.10.4 to 6.12.1 somehow in a way that broke the package. You could try turning off all buffering in the handle using hSetBuffering and seeing if that works. Cheers, Greg On Apr 6, 2010, at 3:44 PM, Yves Parès wrote: Weird... I use GHC 6.12.1, and I run Ubuntu 9.10 (32bits version). Would have I miss something? Like a flush or a close? Logically, I don't see where I would... Gregory Crosswhite-2 wrote: Yay, I'm glad to see someone else using my package. :-) Hmm, your program seems to work for me. I compiled and ran the Server (with ghc --make), then compiled and ran the Client, and then typed Operation 1.0 Mult 2.0 into the Client process, and the result it got was 2.0 with the output Just 2.0 on the Server. I got the same results running this on Mac OSX and (Gentoo) Linux, with GHC 10.4. What platform/GHC version are you running it on? Cheers, Greg On Apr 6, 2010, at 2:38 PM, Yves Parès wrote: Hello, I'm trying to use the packages Network and Control.Monad.BinaryProtocol together, with a very simple program in which a client sends an operation to the server, which computes the result and sends it back. But the server holds when trying to receive (Server.hs, line 22), whereas the client has actually sent the data (Client.hs, line 17). The server stops to hold only when the client is killed with a Ctrl-C. This should be rather simple, and I can't get to know why it doesn't work. The files are here: http://old.nabble.com/file/p28157883/Client.hs Client.hs http://old.nabble.com/file/p28157883/Server.hs Server.hs http://old.nabble.com/file/p28157883/SharedData.hs SharedData.hs - Yves Parès Live long and prosper -- View this message in context: http://old.nabble.com/Simple-binary-protocol-through-network-test-tp28157883p28157883.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe - Yves Parès Live long and prosper -- View this message in context: http://old.nabble.com/Simple-binary-protocol-through-network-test-tp28157883p28158514.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why does Haskell not infer most general type?
On Tue, Apr 06, 2010 at 05:18:34PM -0400, Job Vranish wrote: So in Haskell 98, would the added constraints result in a type error? Yes, because the types of the mutually recursive identifiers would be inferred together without using the type signatures, and then would fail to match the declared types. But then there aren't any implementations of Haskell 98 to test this on. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: GSoC: Improving Cabal's Test Support
Rather that starting from scratch, you should strongly consider adapting something like test-framework to this task, as it already has done the heavy work of creating a way to combine tests from different frameworks into a single suite and includes such features as displaying a progress bar during the QuickCheck tests. Furthermore, it is easily extendable to support new kinds of tests; for example, I found that it was relatively straightforward to add a new kind of statistical test to make sure that the average value of a function where where it should be. Cheers, Greg On Apr 6, 2010, at 3:51 PM, Thomas Tuegel wrote: Hello again! Based on the invaluable feedback I've received, I've made some revisions to the proposal I made a few days ago (at the end of this post, after my signature). I apologize for the length of my post, but I'd like once again to solicit feedback on this. Any commentary is very helpful! Thanks! -- Thomas Tuegel Throughout this proposal, examples are given to indicate how a package author would utilize the features proposed here. In all these examples, suppose that the programmer is the author of the 'haskell-foo' package, which exposes the module 'Foo' and has a single test executable, 'foo-tests', using the QuickCheck testing library. Package Description File Syntax The syntax for designating test executables in package description files will be based on the existing syntax for describing executables. Such a stanza in the hypothetical package's description file would look like: Test foo-tests main-is: foo-tests.hs build-depends: haskell-foo, Cabal, QuickCheck This example is obviously minimal; this is really an 'Executable' stanza by another name, so any options recognized there would also be valid here. Handling of Test Executables by Cabal The changes proposed here will make it possible to build, test, and install a Cabal package with the usual sequence of commands: $ cabal configure $ cabal build $ cabal test $ cabal install Cabal will recognize two new options during the 'configure' stage: '--enable-tests' and '--disable-tests'. If 'cabal configure' is invoked with the '--enable-tests' option, then any test executables designated in the package description file will be built. For the purposes of the 'configure' and 'build' stages, they will be handled as if they were ordinary executables, i.e., described by 'Executable' stanzas. With tests enabled, the test programs will be executed and their results collected by Cabal during the 'test' stage. If 'cabal configure' is invoked with the '--disable-tests' option (which should be the default if neither option is specified), then test executables designated in the package description file will be ignored, as if the 'Test' stanza were absent. Any attempt to invoke the 'test' stage with tests disabled should remind the user of that fact. Regardless of the status of tests (enabled or disabled), the 'install' stage will ignore any executables designated as test suites, since it is not desirable to install the test executables. Collection of Test Results Cabal will provide a standard interface, residing in the module 'Distribution.Test', for running tests independent of the testing library used. A minimal outline of this module looks like: module Distribution.Test where type Name = String type Result = Maybe Bool type Info = String type Output = String -- 'Compiler' and 'ComponentLocalBuildInfo' are already provided by Cabal. -- They are included here to aid in debugging test failures type Report = (Compiler, ComponentLocalBuildInfo, [(Name, Result, Info, Output)]) class Test t where wrap :: t - IO (Result, Info) runTests :: Test t = [(Name, t)] - IO Report writeResults :: Report - IO () Instances of 'Test' will run a type of test from one of the testing libraries; part of this project will therefore be patching QuickCheck and HUnit to provide these instances. Any other testing library providing this instance will also be compatible with the automated testing features this proposal introduces. The type 'Maybe Bool' is used throughout this framework to indicate a test result: 'Nothing' indicates a test was not run, 'Just False' indicates a failed test, and 'Just True' indicates a successful test. The 'Info' string captures any information provided by the testing library. However, because of the reliance of most test suites on standard output, Cabal will also capture the standard output produced during each test (when the test suite is invoked through 'cabal test'); the output will be included in the test result file. The function 'writeResults' will write the test results to a file. The 'Show' instance for the type of its single argument will therefore constitute the standard test result file format. This has the advantage of being human- and machine-readable
Re: [Haskell-cafe] Simple binary-protocol through network test
Okay, so I turned off every buffering using hSetBuffering hdl NoBuffering on both Client and Server, but I doesn't fix it... BTW, I tried to do the same without your package, i.e. simply through Lazy ByteString and Binary, but it doesn't work either, I come up against the same issue. Gregory Crosswhite-2 wrote: Hmm, I am guessing it is more likely that the problem is that the I/O system changed from 6.10.4 to 6.12.1 somehow in a way that broke the package. You could try turning off all buffering in the handle using hSetBuffering and seeing if that works. Cheers, Greg On Apr 6, 2010, at 3:44 PM, Yves Parès wrote: Weird... I use GHC 6.12.1, and I run Ubuntu 9.10 (32bits version). Would have I miss something? Like a flush or a close? Logically, I don't see where I would... Gregory Crosswhite-2 wrote: Yay, I'm glad to see someone else using my package. :-) Hmm, your program seems to work for me. I compiled and ran the Server (with ghc --make), then compiled and ran the Client, and then typed Operation 1.0 Mult 2.0 into the Client process, and the result it got was 2.0 with the output Just 2.0 on the Server. I got the same results running this on Mac OSX and (Gentoo) Linux, with GHC 10.4. What platform/GHC version are you running it on? Cheers, Greg On Apr 6, 2010, at 2:38 PM, Yves Parès wrote: Hello, I'm trying to use the packages Network and Control.Monad.BinaryProtocol together, with a very simple program in which a client sends an operation to the server, which computes the result and sends it back. But the server holds when trying to receive (Server.hs, line 22), whereas the client has actually sent the data (Client.hs, line 17). The server stops to hold only when the client is killed with a Ctrl-C. This should be rather simple, and I can't get to know why it doesn't work. The files are here: http://old.nabble.com/file/p28157883/Client.hs Client.hs http://old.nabble.com/file/p28157883/Server.hs Server.hs http://old.nabble.com/file/p28157883/SharedData.hs SharedData.hs - Yves Parès Live long and prosper -- View this message in context: http://old.nabble.com/Simple-binary-protocol-through-network-test-tp28157883p28157883.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe - Yves Parès Live long and prosper -- View this message in context: http://old.nabble.com/Simple-binary-protocol-through-network-test-tp28157883p28158514.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe - Yves Parès Live long and prosper -- View this message in context: http://old.nabble.com/Simple-binary-protocol-through-network-test-tp28157883p28158761.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: GSoC: Improving Cabal's Test Support
On Tue, Apr 6, 2010 at 7:03 PM, Gregory Crosswhite gcr...@phys.washington.edu wrote: Rather that starting from scratch, you should strongly consider adapting something like test-framework to this task, as it already has done the heavy work of creating a way to combine tests from different frameworks into a single suite and includes such features as displaying a progress bar during the QuickCheck tests. Furthermore, it is easily extendable to support new kinds of tests; for example, I found that it was relatively straightforward to add a new kind of statistical test to make sure that the average value of a function where where it should be. Thanks for the suggestion! I've taken a hard look at test-framework in particular already. I like it, but the reason I haven't already chosen to go with that is that it does a lot _more_ than I'm trying to do here. The way my proposal stands, whatever framework I go with gets integrated with Cabal at least to the degree that Cabal can read test results. Rogan suggested that test-framework will shortly support JUnit XML as an output format, so with the rest of my proposal we'd be talking about adding an XML parsing library to Cabal's dependencies. Now, if you're telling me I'm going off in the wrong direction by proposing to integrate a test framework into Cabal itself, that's another story. Should I pare down my proposal to only include support for a proper 'Test' stanza in the package description file and leave it at that? Thanks! -- Thomas Tuegel ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: GSoC: Improving Cabal's Test Support
On Tue, Apr 6, 2010 at 4:03 PM, Gregory Crosswhite gcr...@phys.washington.edu wrote: Rather that starting from scratch, you should strongly consider adapting something like test-framework to this task, as it already has done the heavy work of creating a way to combine tests from different frameworks into a single suite I want to second this -- test-framework would be a good place to start, and you would be able to accomplish quite a lot more during the summer. Your proposal addresses (at least!) two different problems: * updating cabal so that it can handle the build/test process; and, * combining HUnit / QuickCheck / etc. to present a uniform interface. test-framework and test-runner both address the second problem, and those solutions can be kept separate, at least for now. Figuring out the best way to specify test commands, dependencies, build/execution order, etc. is going to take some substantial effort, and I think that should be the first goal of the project. More comments in-line below... On Apr 6, 2010, at 3:51 PM, Thomas Tuegel wrote: Package Description File Syntax The syntax for designating test executables in package description files will be based on the existing syntax for describing executables. Such a stanza in the hypothetical package's description file would look like: Test foo-tests main-is: foo-tests.hs build-depends: haskell-foo, Cabal, QuickCheck This example is obviously minimal; this is really an 'Executable' stanza by another name, so any options recognized there would also be valid here. Cabal allows for multiple executable sections -- are multiple test sections allowed? If so, how are they handled when 'cabal test' is invoked? If not, will there be any support for running multiple test suites? (more on this below). While the test executable could be configured to run different sets of tests (at runtime? hm.. we may need more flags to 'cabal test'), there are some situations it's necessary to build multiple test suites because of odd library dependencies. (for example, testing certain combinations of libraries--imagine supporting multiple versions of ghc.) The existing Executable sections may serve the need fine, if we could specify how to run the tests in a different way. Perhaps a list of test commands could be specified instead, eg: TestCommands: foo-test-ghc6.6, foo-test-ghc6.8, foo-props --all Anyhow, just food for thought. described by 'Executable' stanzas. With tests enabled, the test programs will be executed and their results collected by Cabal during the 'test' stage. Where are the results collected, and in what format? My preference is to choose a sensible default (dist/test-results?) and allow it to be overridden in the cabal file. module Distribution.Test where type Name = String type Result = Maybe Bool I think you're reinventing the wheel a bit here, (see comments above about test-framework). That aside, Result is still too restrictive. Ignored tests may well need justification (why were they not run?). There may also be multiple ways to ignore tests, and it isn't clear to me what those are, or which are important. I also feel pretty strongly that Result should distinguish between test failures and tests that failed due to exceptional circumstances. I don't know of any frameworks that do this in Haskell yet, but it has proven to be a useful distinction in other languages. I'm not commenting on the rest of the framework proposal because I don't think the point of this SoC project is to write another testing framework. The 'cabal test' command will run tests by default, but support two other options: 1. '--report [file]', which will produce a nicely formatted report of the test results stored in the named file, or of the last run of the package's test suite if no file is specified, and 2. '--diff file1 file2', which will show the differences between the test results stored it two different files. See my comments about running multiple test suites, and parameterized test suites above. I think richer parameters are necessary. (possibly just a --pass-through flag that hands all the subsequent parameters off to the test executable(s)) --Rogan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskell.org re-design
On 7 April 2010 08:40, Thomas Schilling nomin...@googlemail.com wrote: On 6 April 2010 22:39, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: I like the layout, but hate the colour scheme. Wow, hate is a very strong word. OK, I dislike the colour scheme. Happy now? ;-) -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskell.org re-design
On 7 April 2010 00:57, Ivan Miljenovic ivan.miljeno...@gmail.com wrote: On 7 April 2010 08:40, Thomas Schilling nomin...@googlemail.com wrote: On 6 April 2010 22:39, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: I like the layout, but hate the colour scheme. Wow, hate is a very strong word. OK, I dislike the colour scheme. Happy now? ;-) That's still not constructive. I.e, is it the black, the gray, the orange? I played around with some more colours, but eg. blue link colour makes the site feel too cold. Using more intense colours for the bar at the top becomes distracting very quickly. A background other than white is either hard to read, or highly dependent on the screen. E.g., a nice bright beige on one screen can look too yellowish on another screen. Anyway, here's something with a bit more colour: http://i.imgur.com/LpQmH.png / Thomas -- Push the envelope. Watch it bend. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskell.org re-design
On 7 April 2010 10:02, Thomas Schilling nomin...@googlemail.com wrote: On 7 April 2010 00:57, Ivan Miljenovic ivan.miljeno...@gmail.com wrote: OK, I dislike the colour scheme. Happy now? ;-) That's still not constructive. I.e, is it the black, the gray, the orange? OK, it's the black; it seems a tad too strong for me (the fact that you have a black theme for your browser probably doesn't help). Using more intense colours for the bar at the top becomes distracting very quickly. How about a more neutral, paler colour? Anyway, here's something with a bit more colour: http://i.imgur.com/LpQmH.png Apart from the black up the top still, I think this is nicer. However, maybe the links in the description text up the top are a bit too obvious... -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: GSoC: Improving Cabal's Test Support
On Apr 6, 2010, at 4:40 PM, Thomas Tuegel wrote: Now, if you're telling me I'm going off in the wrong direction by proposing to integrate a test framework into Cabal itself, that's another story. Should I pare down my proposal to only include support for a proper 'Test' stanza in the package description file and leave it at that? Yes, I think that would be a better use of your time, and furthermore if you arrange this feature so that the programmer can use any test framework that they like, it has the advantage that you are not entrenching a particular way of combining tests from different modules. If you want there to be communication between Cabal and the test suite, it should be something simple like passing in a location to where the test results should be output (or a flag indicating that they should be written to the screen in verbose mode), and having Cabal in return receive from the test runner a single string with a summary of the test results to show to the user (when in summary as opposed to verbose mode) and possibly a flag if there were any failures so that the user can be specifically alerted to this fact and pointed to the full test report. Even if all you do is add systematic support for automatically building and running tests automatically as part of the build process, it would still be a major improvement; it would be especially awesome if you made it possible to separate out the test framework dependencies from the package dependencies, since at the moment people who want to include tests with their package often feel the need to include dependencies on packages such as QuickCheck in order to make life easier for themselves, but if you could modify cabal so it would only pull in such packages when the user requests that tests be run it would be awesome! Cheers, Greg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskell.org re-design
I concur that the latest version with the softer colors looks a lot nicer, and I approve of the overall design. I think that you should go back to using a change in the foreground color rather than the background color for the links in the main description, since at the moment it looks ugly. I also think that it would look better if you could align the two columns in the top (i.e., the description text and the major links above the News and Events section) so that they align better with the two columns below; you could probably also have the description text creep into the left margin so that it isn't exactly centered over the left column below, if that would look better. Cheers, Greg On Apr 6, 2010, at 5:16 PM, Ivan Miljenovic wrote: On 7 April 2010 10:02, Thomas Schilling nomin...@googlemail.com wrote: On 7 April 2010 00:57, Ivan Miljenovic ivan.miljeno...@gmail.com wrote: OK, I dislike the colour scheme. Happy now? ;-) That's still not constructive. I.e, is it the black, the gray, the orange? OK, it's the black; it seems a tad too strong for me (the fact that you have a black theme for your browser probably doesn't help). Using more intense colours for the bar at the top becomes distracting very quickly. How about a more neutral, paler colour? Anyway, here's something with a bit more colour: http://i.imgur.com/LpQmH.png Apart from the black up the top still, I think this is nicer. However, maybe the links in the description text up the top are a bit too obvious... -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: GSoC: Improving Cabal's Test Support
On Tue, Apr 6, 2010 at 7:43 PM, Rogan Creswick cresw...@gmail.com wrote: test-framework and test-runner both address the second problem, and those solutions can be kept separate, at least for now. Figuring out the best way to specify test commands, dependencies, build/execution order, etc. is going to take some substantial effort, and I think that should be the first goal of the project. Ok, this is the bottom-line that I didn't understand after our first exchange, but I think now I do: I should entirely scrap the second aspect of my proposal and focus exclusively on making Cabal build and run test programs. Cabal allows for multiple executable sections -- are multiple test sections allowed? If so, how are they handled when 'cabal test' is invoked? If not, will there be any support for running multiple test suites? (more on this below). While the test executable could be configured to run different sets of tests (at runtime? hm.. we may need more flags to 'cabal test'), there are some situations it's necessary to build multiple test suites because of odd library dependencies. (for example, testing certain combinations of libraries--imagine supporting multiple versions of ghc.) I had intended to allow multiple 'Executable' sections; that's what I meant by this is really an 'Executable' stanza by another name. I think that takes care of your concern about building multiple test suites with different dependencies, also. My thinking is that 'cabal test' should run all the tests that were built, and 'cabal test foo' should run only the test named 'foo'. The existing Executable sections may serve the need fine, if we could specify how to run the tests in a different way. Perhaps a list of test commands could be specified instead, eg: TestCommands: foo-test-ghc6.6, foo-test-ghc6.8, foo-props --all Anyhow, just food for thought. One of the reasons I prefer implementing a dedicated 'Test' stanza is that it makes it easier to tell which executables to install. There may be situations where we want to install test programs, but there will _always_ be situations where we _don't_ want to. (Maybe '--{en,dis}able-tests' passed to 'cabal install' should control this?) Could we take a 'TestCommands' list and parse out the options to get the executable names? Yes, but relying on that to work makes me uneasy. I think the more robust way to specify executable-specific options instead would be to add a field to the 'Test' section ('run-options' seems to be consistent with the naming scheme) that doesn't exist in 'Executable'. (I've snipped some of the comments here; if forget about test frameworks for this proposal, it's all tangential.) See my comments about running multiple test suites, and parameterized test suites above. I think richer parameters are necessary. (possibly just a --pass-through flag that hands all the subsequent parameters off to the test executable(s)) That is an excellent suggestion that I will definitely adopt in my eventual proposal. Thanks! -- Thomas Tuegel ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] what are the safety conditions for unsafeIOToST
On 07/04/2010, at 07:33, Nicolas Frisby wrote: I haven't been able to find it via Google or Haddock. An old message suggests is was just a matter of exceptions? I don't think that's correct. You can implement unsafePerformIO in terms unsafeIOToST: unsafePerformIO :: IO a - a unsafePerformIO p = runST (unsafeIOToST p) In fact, the only safe-ish use for it I have found is to use Storable-related functions in ST, hoping that the instances don't actually use any real IO functionality. Arguably, this shouldn't be necessary as Storable should live in ST anyway. I only want to use the IO for generating Data.Uniques to pair with STRefs in order to make a map of them. I'm guessing this would be a safe use since it's exception free (... right?). It's hard to tell without looking at your code. But if you are generating Uniques in ST then it's probably unsafe: foo :: () - Unique foo _ = runST (unsafeIOToST newUnique) What's the value of foo ()? Roman ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe