Re: [Haskell-cafe] The Haskell theme & Haskellers design

2010-10-22 Thread Nubis
On Sat, Oct 23, 2010 at 1:27 AM, Mark Lentczner wrote: > You might have seen the post I did yesterday about the Haskell project I'm > currently working on. In it I posted an screen shot or a web page, which you > can find here: > >http://mtnviewmark.files.wordpress.com/2010/10/source-edit

Re: [Haskell-cafe] The Haskell theme & Haskellers design

2010-10-22 Thread Mark Lentczner
You might have seen the post I did yesterday about the Haskell project I'm currently working on. In it I posted an screen shot or a web page, which you can find here: http://mtnviewmark.files.wordpress.com/2010/10/source-editing.png I think that page illustrates what I was thinking in t

[Haskell-cafe] Error Calling Lua Function

2010-10-22 Thread aditya siram
Hi all, I'm having some issues calling Lua functions from Haskell. I have the following in "Haskell2Lua.lua": function hello () return "hello world" end And my Haskell file "Haskell2Lua.hs" looks like this: import qualified Scripting.Lua as Lua main = do l <- Lua.newstate Lua.openlib

Re: [Haskell-cafe] Haskellers design

2010-10-22 Thread Nubis
Hi guys, It's me again, I made a new proposal for the website with the standard colors. I've put my pretentions of content being grouped by color, and just used what I thought looked better for each part of the site. Here's the link: http://previasports.com/haskellers_website_standard/ Let me know

Re: [Haskell-cafe] vector-space and standard API for vectors

2010-10-22 Thread wren ng thornton
On 10/22/10 8:46 AM, Alexey Khudyakov wrote: Hello everyone! It's well known that Num & Co type classes are not adequate for vectors (I don't mean arrays). I have an idea how to address this problem. Conal Elliott wrote very nice set of type classes for vectors. (Definition below). I used them

Re: [Haskell-cafe] readProcess exception

2010-10-22 Thread Bulat Ziganshin
Hello Leskó, Friday, October 22, 2010, 1:50:54 AM, you wrote: > I run into a problem with readProcessWithExitCode (from System.Process > module). Basically what i want is to start an exe file, giving it some > input on stdin and receiving the results on stdout. But id the stdin and look for othe

Re[2]: [Haskell-cafe] concurrency vs. I/O in GHC

2010-10-22 Thread Bulat Ziganshin
Hello John, Monday, October 18, 2010, 8:15:42 PM, you wrote: > If anyone is listening, I would very much like for there to be a > mechanism by which external functions can be called "unsafe"-ly, but > without blocking all other Haskell threads.  I have code that does this: +RTS -N2 -- Best reg

Re: [Haskell-cafe] Re: Scrap your rolls/unrolls

2010-10-22 Thread Max Bolingbroke
On 22 October 2010 22:06, Dan Doel wrote: > SHE's pattern synonyms also work as expressions, so there's no asymmetry. They > work just like constructors as far as I can tell (with what little I've played > with them); you can even partially apply them (in expressions). I didn't realise that - pre

profiling and strictness (was: Re: [Haskell-cafe] An interesting paper from Google)

2010-10-22 Thread Evan Laforge
> Any time you see something "inexplicable" like lots of time being attributed > to something simple like "get", it means that something isn't strict enough > and "get" is having to force a bunch of lazy evaluations to do its job. > Since you're using State.Strict but lift-ing to get there, I'd fir

Re: [Haskell-cafe] HSCurses - Hello World? (can't find much documentation)

2010-10-22 Thread Ari Rahikkala
On Fri, Oct 22, 2010 at 11:18 PM, Anonymous Void wrote: > But since I've never seen how the HSCurses functions really integrate > together, or any tutorials/examples (besides hsFishEx), > I fear toying with it is going to be annoying until I figure it out on my > own, especially since I'm already

Re: [Haskell-cafe] Re: Scrap your rolls/unrolls

2010-10-22 Thread Dan Doel
On Friday 22 October 2010 7:24:37 am Max Bolingbroke wrote: > Ah yes, pattern synonyms. This solution is somewhat unsatisfying > because you will also need some smart constructors: > > """ > nil = Roll NilF > cons x xs = Roll (ConsF x xs) > """ > > Now the names of the smart constructors for buil

[Haskell-cafe] HSCurses - Hello World? (can't find much documentation)

2010-10-22 Thread Anonymous Void
Hi everyone, Haven't posted here since I was a kid, when this language first warped my poor imperative brain. My main work environment is a three-split terminal session using `Yakuake' as a dropdown-terminal (one for vim, one for interactive interpreter, one for MySQL). I don't mind using the MySQ

[Haskell-cafe] Redy to release gtk2hs-0.12.0!

2010-10-22 Thread Andy Stewart
Dear gtk2hs user: We have ready to release next version : gtk2hs-0.12.0 Please pull gtk2hs darcs to test, if no bug report, we will release. You can use below commands (Debian) to install gtk2hs darcs: darcs get --lazy http://code.haskell.org/gtk2hs/ cd ./gtk2hs sudo chmod +x ./bootstr

[Haskell-cafe] Re: A rant against the blurb on the Haskell front page

2010-10-22 Thread Ben Franksen
Heinrich Apfelmus wrote: > Henning Thielemann wrote: >> Vo Minh Thu schrieb: >> >>> Every once in a while, a discussion about the top-level text on >>> Haskell.org pops in this list. Without paying much attention to this >>> thread, and without digging the older threads, it occurs to me that >>> d

Re: [Haskell-cafe] JavaScript in a browser as a Windows GUI?

2010-10-22 Thread Jeremy Shaw
On Fri, Oct 22, 2010 at 12:05 PM, Andrew Coppin wrote: >  On 21/10/2010 07:00 PM, Jeremy Shaw wrote: >> >> But, you are correct that happstack does not currently have support >> for running CGI executables. I imagine that you could write a CGI >> handler (with out modifying the core code) in a few

Re: [Haskell-cafe] JavaScript in a browser as a Windows GUI?

2010-10-22 Thread Andrew Coppin
On 21/10/2010 07:00 PM, Jeremy Shaw wrote: But, you are correct that happstack does not currently have support for running CGI executables. I imagine that you could write a CGI handler (with out modifying the core code) in a few hours (maybe less). Mostly just a matter of turning the values in t

Re: [Haskell-cafe] tried to use the example given in the source of network.browser

2010-10-22 Thread Neil Brown
Hi, On 22/10/10 14:58, Michael Litchard wrote: main = do rsp<- Network.Browser.browse $ do setAllowRedirects True -- handle HTTP redirects request $ getRequest "http://google.com/"; fmap (take 100) (getResponseBody rsp) but I got this errortest

Re: [Haskell-cafe] The Haskell theme

2010-10-22 Thread Thomas Schilling
I agree with Mark that we shouldn't try to over-constrain things. However, basic startup-resources are perfectly fine. It gives a good default for people who don't really like (web-)design, and can serve as a baseline for others. I.e., encourage consistency but don't enforce it. On 12 October 20

[Haskell-cafe] ICFP 2011: Call for Workshop Proposals

2010-10-22 Thread Wouter Swierstra
CALL FOR WORKSHOP AND CO-LOCATED EVENT PROPOSALS ICFP 2011 16th ACM SIGPLAN International Conference on Functional Programming September 19 - 21, 2011 Tokyo, Japan http://www.icfpconference.org/i

[Haskell-cafe] tried to use the example given in the source of network.browser

2010-10-22 Thread Michael Litchard
This is what is in HTTPbis/Network/Browser.hs >do > rsp <- Network.Browser.browse $ do > setAllowRedirects True -- handle HTTP redirects > request $ getRequest "http://google.com/"; > fmap (take 100) (getResponseBody rsp) And how I changed it slightly to

[Haskell-cafe] vector-space and standard API for vectors

2010-10-22 Thread Alexey Khudyakov
Hello everyone! It's well known that Num & Co type classes are not adequate for vectors (I don't mean arrays). I have an idea how to address this problem. Conal Elliott wrote very nice set of type classes for vectors. (Definition below). I used them for some time and quite pleased. Code is c

[Haskell-cafe] Re: Scrap your rolls/unrolls

2010-10-22 Thread Max Bolingbroke
Forgot to reply to list On 22 October 2010 12:14, Dan Doel wrote: > Another solution, though, is SHE. With it, you can write: > >  data ListF a r = NilF | ConsF a r >  newtype List a = Roll (ListF a (List a)) > >  pattern Nil       = Roll NilF >  pattern Cons x xs = Roll (ConsF x xs) > > And not

Re: [Haskell-cafe] Re: Eta-expansion and existentials (or: types destroy my laziness)

2010-10-22 Thread Max Bolingbroke
On 22 October 2010 12:03, Dan Doel wrote: >  data Mu f = In { out :: f (Mu f) } > >  instance Show (f (Mu f)) => Show (Mu f) where >    show = show . out > > Is that an example of a value recursive dictionary? Assuming the Show (f (Mu f)) instance uses the (Mu f) one, AFAIK this should indeed bui

Re: [Haskell-cafe] Scrap your rolls/unrolls

2010-10-22 Thread Dan Doel
On Friday 22 October 2010 6:37:49 am Max Bolingbroke wrote: > This is all well and good, but it means when working with data types > defined in this manner you have to write Roll and unroll everywhere. > This is tedious :-( Your discovery is interesting (and I haven't seen it before). Another sol

Re: [Haskell-cafe] Convert Either to Tree - Occurs check

2010-10-22 Thread André Batista Martins
Tks for the answser, I need to continue a work that has already been developed. In this work i have Eithers and i want convert to another datatype with more information, because I want to generate Eithers, which will contain the information from the first but with positions exchanged. No dia 22

Re: [Haskell-cafe] Re: Eta-expansion and existentials (or: types destroy my laziness)

2010-10-22 Thread Dan Doel
On Friday 22 October 2010 5:48:28 am Max Bolingbroke wrote: > I think evaluating dictionaries strictly is more of a "want to have" > rather than "actually implemented". In particular, GHC supports > building value-recursive dictionaries - and making dictionary > arguments strict indiscriminately wo

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

2010-10-22 Thread Michael Snoyman
On Fri, Oct 22, 2010 at 11:36 AM, Sigbjorn Finne wrote: > > > On Fri, Oct 22, 2010 at 9:35 AM, Sittampalam, Ganesh > wrote: >> >> Bit Connor wrote: >> > On Sat, Oct 16, 2010 at 10:29 AM, Claus Reinke >> > wrote: >> >>> After it catches this error, the function returns (line 376): >> >>> >> >>> r

[Haskell-cafe] Scrap your rolls/unrolls

2010-10-22 Thread Max Bolingbroke
Hi Cafe, In generic programming, e.g. as in "Data Types a la Carte" and Compos, you often wish to work with data types in their fix-point of a functor form. For example: """ data ListF a rec = Nil | Cons a rec newtype List a = Roll { unroll :: ListF a (List a) } """ In some presentations, this i

Re: [Haskell-cafe] Convert Either to Tree - Occurs check

2010-10-22 Thread Neil Brown
On 22/10/10 09:23, André Batista Martins wrote: Tks for the answer, the data structure of Either is: data Either a b = Left a | Right bderiving (Eq, Ord, Read, Show) one example of what i want convert is: Left(Right(Left(Left( Hi, The problem here is that the t

Re: [Haskell-cafe] Re: Eta-expansion and existentials (or: types destroy my laziness)

2010-10-22 Thread Max Bolingbroke
On 19 October 2010 19:01, Dan Doel wrote: > However, this argument is a bit circular, since that eliminator could be > defined to behave similarly to an irrefutable match. Right. > Or, put another > way, eta expansion of a dictionary-holding existential would result in a value > holding a bottom

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

2010-10-22 Thread Sigbjorn Finne
On Fri, Oct 22, 2010 at 9:35 AM, Sittampalam, Ganesh < ganesh.sittampa...@credit-suisse.com> wrote: > Bit Connor wrote: > > On Sat, Oct 16, 2010 at 10:29 AM, Claus Reinke > > wrote: > >>> After it catches this error, the function returns (line 376): > >>> > >>> return (fail (show e)) > >>> > >>>

Re: [Haskell-cafe] Re: Haskell Weekly News: Issue 155 - October 20, 2010

2010-10-22 Thread Ketil Malde
Peter Hercek writes: >> I am. In part because I don't want to get two copies of everything, >> but in part because I'm lazy. > This is my case too. As for as the amount of messages, who cares. Right. So the question is, what is (or should be) the contents of the messages that are posted only t

Re: [Haskell-cafe] [ANNOUNCE] text 0.10.0.0 - fast Unicode text handling

2010-10-22 Thread Johan Tibell
On Fri, Oct 22, 2010 at 10:30 AM, Ivan Lazar Miljenovic wrote: > For example, I assume that it's better to try and use Text throughout > rather than continually packing String values (in my case, I'm looking > at using Text for I/O in graphviz; should I then start using Text > rather than String f

Re: [Haskell-cafe] [ANNOUNCE] text 0.10.0.0 - fast Unicode text handling

2010-10-22 Thread Ivan Lazar Miljenovic
On 22 October 2010 16:38, Bryan O'Sullivan wrote: > [Blog copy of the announcement here.] > > I just pushed it to bitbucket and github, and you can install it from > the text site on Hackage in the usual way: > > cabal update > cabal install text > > What's in this release? > > New functions for r

Re: [Haskell-cafe] Convert Either to Tree - Occurs check

2010-10-22 Thread André Batista Martins
Tks for the answer, the data structure of Either is: data Either a b = Left a | Right b deriving (Eq, Ord, Read, Show) one example of what i want convert is: Left(Right(Left(Left( No dia 22 de Outubro de 2010 04:58, Dan Piponi escreveu: > André Batista Martins asked: > > > i want

[Haskell-cafe] Re: Haskell Weekly News: Issue 155 - October 20, 2010

2010-10-22 Thread Peter Hercek
On 10/22/2010 09:37 AM, wren ng thornton wrote: On 10/21/10 5:38 AM, Ketil Malde wrote: I'm always getting two copies of everything in haskell@, since everything is cross-posted to -cafe. Are there actually people subscribed to -cafe, but *not* to hask...@? And if so, why? I am. In part beca

Re: [Haskell-cafe] Haskellers design

2010-10-22 Thread wren ng thornton
On 10/21/10 2:32 PM, Christopher Done wrote: [1] http://imgur.com/lnkE7.png [2] http://previasports.com/haskellers_website/ I like the colour theme of the former and the layout of the latter. The colour theme of the first is more professional, I think. I vote that styles should be consistent.

Re: [Haskell-cafe] Haskell Weekly News: Issue 155 - October 20, 2010

2010-10-22 Thread wren ng thornton
On 10/21/10 5:38 AM, Ketil Malde wrote: I'm always getting two copies of everything in haskell@, since everything is cross-posted to -cafe. Are there actually people subscribed to -cafe, but *not* to hask...@? And if so, why? I am. In part because I don't want to get two copies of everything,

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

2010-10-22 Thread Sittampalam, Ganesh
Bit Connor wrote: > On Sat, Oct 16, 2010 at 10:29 AM, Claus Reinke > wrote: >>> After it catches this error, the function returns (line 376): >>> >>> return (fail (show e)) >>> >>> The "fail" is running in the Either monad (The Result type = >>> Either). This calls the default Monad implementat

[Haskell-cafe] Re: suspected problem with network.curl version 1.3.5

2010-10-22 Thread Johannes Waldmann
Perhaps you can use Network.Browser (from HTTP) http://hackage.haskell.org/package/HTTP-4000.0.9 It handles cookies under the hood (you don't see it, but it works) because it keeps a browser session state. J.W. ___ Haskell-Cafe mailing list Haskel

Re: [Haskell-cafe] Regression test utility suggestions?

2010-10-22 Thread Bernie Pope
On 22 October 2010 08:38, Peter Schmitz wrote: > I am seeking suggestions for a regression test utility or framework > to use while developing in Haskell (in a MS Windows environment). > [snip] For this kind of task I use shelltestrunner http://hackage.haskell.org/package/shelltestrunner It