[Haskell-cafe] Haskell.org re-design

2010-03-28 Thread Christopher Done
This is a post about re-designing the whole Haskell web site.

We got a new logo but didn't really take it any further. For a while there's
been talk about a new design for the Haskell web site, and there are loads
of web pages about Haskell that don't follow a theme consistent with
Haskell.org's, probably because it doesn't really have a proper theme.

I'm not a designer so take my suggestion with a grain of salt, but something
that showed pictures of the latest events and the feeds we currently have
would be nice. The feeds let you know that the community is busy, and
pictures tell you that we are human and friendly.

Anyway, I came up with something to kick off a discussion:

http://haskell.org/haskellwiki/Image:Haskell-homepage-idea.png

It answers the basic questions:

   - What's Haskell?
   - Where am I on the site? (Answered by a universally recognised tab menu)
   - What's it like?
   - How do I learn it?
   - Does it have an active community?
   - What's going on in the community? What are they making?
   - This language is weird. Are they human? -- Yes. The picture of a recent
   event can fade from one to another with jQuery.

The colours aren't the most exciting, but someone who's a professional
designer could do a proper design. But I like the idea of the site being
like this; really busy but not scarily busy.

Subsections of the site could use the header and footer and heading theme,
but have a completely different primary-content layout. Probably
sub-sections would need a left-nav. Keeping the design simple like this also
makes it easy to theme the current Wiki to fit in with it seamlessly.

Personally I don't have a problem with the existing site, functionally. It
has all the stuff I want to look at. The only stuff that I had issue with as
a newbie was finding The One Book I Should Read and The One Download I
Should Get. The current site is starting to address this with a Download
Haskell button. However, looking at it as a marketing site, it does look
pretty lame and messy, and it gives you that impression of Haskell. So if
people who own the site are going to redesign it, I thought I'd contribute a
bit.

Anyway, please contribute your ideas. (Again, I'm not a designer, so you
don't need to pick at the aesthetics, a real designer can sort that out.)

Cheers!
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Are there any female Haskellers?

2010-03-28 Thread Christopher Done
Fran Allen talked about this in Coders at Work (I typed this up quickly so
forgive typos):

Allen: Recently I realized what was probably the root cause of this:
computer science had emerged between 1960 and 1970. And it mostly came out
of the engineering schools; some of it came from mathematics.

And the engineering schools were mostly all men in that period. And the
people IBM was hiring had to meet certain requirements: have certain degrees
and have taken certain courses in computer science. And so they were almost
all men because they were the ones that satisfied the requirements-because
it was a discipline now. The other thing that seemed to have happened is
that it was a profession-there were a lot of processes in place and chains
of management that implemented the processes and kept everything running
smoothly. So it was a very different place.

Seibel: I'm pretty sure sexism in society at large was prety rampant in the
'50s and '60s. Yet in that period you were working in groups that had lots
of women in them. Why was it so open to women then?

Allen: Software was the newest-of-the-new stuff that was going on. And it's
also probably still to this day considered a soft part of the science. And
that's where women gravitated. Early on they were programmers on ENIAC and
at Bletchley Park. Women were the computers-that was their name. But in
engineering and physics and the harder, older sciences there weren't as many
women. It was just divided that way, early on.

On 27 March 2010 18:56, Jason Dagit da...@codersbase.com wrote:



 On Sat, Mar 27, 2010 at 9:05 AM, Daniel Fischer 
 daniel.is.fisc...@web.dewrote:

 -Ursprüngliche Nachricht-
 Von: Günther Schmidt gue.schm...@web.de
 Gesendet: 27.03.2010 16:14:57
 An: haskell-cafe@haskell.org
 Betreff: [Haskell-cafe] Are there any female Haskellers?

 Hi all,
 
 from the names of people on the list it seems that all users here are
 males.
 
 Just out of curiosity are there any female users here, or are we guys
 only at the moment?
 
 Günther
 

 I'm pretty sure that Phil(l?)ip(p?)a Cowderoy is female, I've also seen a
 couple of other female names here and on the beginners list.
 (Since Ashley Yakeley seems to be located in the USA, I dare not guess
 whether Ashley is a man's name or a woman's in this case.)


 Ashley Yakeley is a man.

 I work with several female Haskellers.  And I've met several others who are
 at universities or use Haskell on the side.

 In general, I'd say women in computer science are a minority.  I would say
 mathematics has a higher percentage of women than computer science from my
 own anecdotal experience.  Why are there so few women in computer science?
  I don't know but it's an interesting question.  One professor I was talking
 to about this subject said he felt that at his university when CS was a part
 of math there were more women and when it became part of engineering the
 percentage of women dropped.

 It's possible that there are gender differences that cause men to be
 attracted to this field more frequently than women.  I'm hesitant to say
 that's the underlying reason though.  I suspect the following, based on
 conversations I've had with women in the field.  For some reason it started
 out as a male dominated field.  Let's assume for cultural reasons.  Once it
 became a male dominated field, us males unknowingly made the work and
 learning environments somewhat hostile or unattractive to women.  I bet I
 would feel out of place if I were the only male in a class of 100 women.

 Anyway, those are just observations I've made.  Don't take any of it too
 seriously and I certainly don't mean to offend anyone.  I know gender
 differences can be quite controversial at times.

 Jason

 ___
 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] Haskell.org re-design

2010-03-28 Thread Christopher Done
On 28 March 2010 22:00, Ivan Lazar Miljenovic ivan.miljeno...@gmail.comwrote:


 ^^ This.  It's too boring and depressing with all that grayscale.  Why
 not use the coloured version of the logo (
 http://haskell.org/sitewiki/images/a/a8/Haskell-logo-60.png ) and base
 the colour scheme off that?


I tried to do that but I found it difficult to make it look nice (and being
honest I don't like those colours). I agree though, and defer to someone
with more design talent!
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Has Try Haskell! An interactive tutorial in your browser been announced yet?

2010-03-28 Thread Christopher Done
Hi Benjamin,

Thanks for testing it and providing a detailed report. I've since done
more work on Try Haskell, but not too much. (My job has taken up a
very large amount of my time and energy. I am moving to another one
currently.) I will address your points just to clear it up and maybe
we can discuss where it's going in the future.

On 1 March 2010 12:03, Benjamin L. Russell dekudekup...@yahoo.com wrote:

 Apparently, there is a time limit for this tutorial.

 I just tried it out again in Safari 4.0.4 on Mac OS X 10.5.8 Leopard,
 and the tutorial run by the help command worked perfectly; however,
 when I then tried it out again in Firefox 3.5.8, the same tutorial
 stopped just after I entered the 'a' : [] expression with the
 following error:

  Time limit exceeded.

 This occurred approximately ten minutes after starting the tutorial in
 Safari.

 But then I tried the same tutorial approximately four minutes later in
 SeaMonkey 2.0.3, and this time the tutorial ran perfectly again.

I have since updated the Time limit exceeded message to be something
more friendly. The cause of this message is that some expressions take
too long to evaluate. Even simple expressions can sometimes take too
long and be killed. To confirm: there is no time limit for the
tutorial.

 So then, approximately four minutes after Firefox had returned the above
 error message, I returned to Firefox, clicked on the Reset button in the
 upper-right corner of the page, and restarted the tutorial.  This time,
 the tutorial behaved slightly different from before:  Earlier, I typed
 the following sequence of commands (listed in the first step of the
 tutorial):

  23*36
  reverse hello

 At that point, the tutorial had not started automatically.  However, for
 some reason, this time it did; then, I was able to continue with the
 tutorial until completion.  Then I started the tutorial again with the
 help command, and it workd fine again, too.

This was a bug. The cause is simple; the tutorial picks up the types
returned by the REPL and triggers the right tutorial page. Hitting the
reset button, wrongly, did not reset these hooks. I believe this bug
still exists.


 Then, about thirty-eight minutes after starting the second tutorial in
 Firefox (during which time I tried to run the tutorial in Camino 2.0.1,
 but Camino froze during the auto-update to 2.0.2, and when I manually
 updated it to 2.0.2, Camino 2.0.2 froze upon startup as well, so I
 finally gave up on trying the tutorial in Camino), I tried out the
 tutorial in Opera 10.10.

 For some reason, Opera inserted spaces after typing certain characters,
 and the spaces could not be deleted without also deleting the character
 just before the space as well.  Then I entered the above following sequence
 of commands again:

  23*36
  reverse hello

 Although the tutorial in Opera returned the correct responses to these
 statements, it did not move on to the next step automatically
 afterwards, so I had to type help to start the tutorial.  However, I
 was then able to complete the entire tutorial successfully (although the
 extra space bug manifested itself a few times during this tutorial as
 well).

I test on Opera 10.01 on Ubuntu Karmic, but I have seen this bug
elsewhere as someone demonstrated problems with Opera to me at
Zurihac. Opera is quite a fiddly browser compared to Firefox, Webkit
and IE.

I have personally developed it based on the following browsers:

Internet Explorer 6  7
Opera 10.01
Chromium 4.0.237.0 (Ubuntu build 31094)
Firefox 3.5.8

But indeed, hopefully I will have more time for testing and
development in the future.

Regarding future work, I hope to integrate Raphael[1] (which I already
did, but is disabled at the moment), exercises the answers to which
are checked by Smallcheck or QuickCheck, access to online feeds a bit
like Yahoo pipes, but one could use Tagsoup, RSS/Atom feeds, etc. to
access some limited set of feeds. I intend on changing the interface
to be like DrScheme, with a code frame and a REPL frame.

I have already added top-level definition of functions, types,
classes, etc. support to the JSON service. For example, here is how we
evaluate an expression, calling the eval method:

http://tryhaskell.org/haskell-eval.json?jsonrpc=2.0method=evalid=1params={expr:24*42}

=  {jsonrpc:2.0,id:1,result:{result:1008,type:(Num
t) = t,expr:24*42}}

Then we can provide it a Haskell file with contents: x=1

http://tryhaskell.org/haskell-eval.json?jsonrpc=2.0method=loadid=1params={contents:x
= 1}
= {jsonrpc:2.0,id:1,result:{success:}}

And then evaluate the top level value x:

http://tryhaskell.org/haskell-eval.json?jsonrpc=2.0method=evalid=1params={%22expr%22:%22x%22}
= 
{jsonrpc:2.0,id:1,result:{result:1,type:Integer,expr:x}}

The only security measure I take is to parse the module with
Language.Haskell.Parser or whatnot and then strip out imports.

Regarding development, I have uploaded everything to Github:

http://github.com/chrisdone/tryhaskell

And I know 

Re: [Haskell-cafe] Haskell.org re-design

2010-03-28 Thread Christopher Done
On 28 March 2010 22:54, Don Stewart d...@galois.com wrote:
 This looks great!

 What are the implementation details of having this go live?

* Ashley: would you be able to e.g. install an index.html like this,
  and hang the wiki under it?
* How do we allow editing (by trusted users?)

I've emailed Ashley about sorting this out. I'll stick to the way it's
currently done, wikimedia template for the home page. I'll just make
the index page a special case somehow or make a new index file to pull
the necessary bits from the wiki database. Let's go, Ashley!
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: Haskell.org re-design

2010-03-28 Thread Christopher Done
On 28 March 2010 23:32, Ashley Yakeley ash...@semantic.org wrote:
 There was a big competition for the logo, with this blind Condorcet voting
 and everything, and this is the shape that was picked. But it kind of ran
 out of steam before colours were decided upon. So I just copied the colours
 from the Haskell Platform logo...

Sure. Maybe the colours are great, I don't know. But I can't get them
to work very well, personally.

On 28 March 2010 23:25, Ashley Yakeley ash...@semantic.org wrote:
 Is the front page a wiki page?

By the looks of it, yes. If you go to 'Edit this page', you can see
that it's made out of wikimedia templates. But that's just a guess.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Haskell.org re-design

2010-03-28 Thread Christopher Done
On 29 March 2010 00:08, Don Stewart d...@galois.com wrote:
 On 28 March 2010 23:25, Ashley Yakeley ash...@semantic.org wrote:
 Is the front page a wiki page?

 By the looks of it, yes. If you go to 'Edit this page', you can see
 that it's made out of wikimedia templates. But that's just a guess.

 I meant, in the redesign, is the intent to make the front page a wiki
 page, or a special static page?


 I think the goal is an attractive non-wiki page with live content.


Right -- ideally the index page would be written separately from the
Wiki but maybe use its libraries or at least in some way access the
wiki database so that the index page can be manipulated through the
wiki. Each section is kind of modular anyway.

I'm trying out the 1.5 version I got from the mediawiki svn now. A
copy of the database sans users would be nice. How big is it? I can
construct my own example db but it's nice to work with the real thing.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: Haskell.org re-design

2010-03-29 Thread Christopher Done
On 29 March 2010 11:19, Simon Marlow marlo...@gmail.com wrote:
 Is the footer necessary?  I dislike sites that have too many ways to
 navigate, and the footer looks superfluous.  The footer will probably be off
 the bottom of the window in any case, which reduces its usefulness as a
 navigation tool.

Footer navigations are a way to provide a bit of a sitemap without
cluttering the top nav, good for SEO, and to provide the user with an
overview of the hierarchical structure of the site on every page.
According to the W3C, headings are easily navigable with a
screenreader; as someone using assistive technologies I'd get
something like:

Welcome to Haskell.org
Events
Learning
Headlines
Latest Packages
Quick Links
Download
Community
Wiki
Reports

We can get rid of it but I think it's a useful thing.

 If we want a tree of links for navigation, maybe the tabs at the top could
 be drop-down menus, or there could be a menu sidebar.

A side bar on sub pages sounds good.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Haskell.org re-design

2010-03-29 Thread Christopher Done
On 29 March 2010 16:16, Sean Leather leat...@cs.uu.nl wrote:
 On Mon, Mar 29, 2010 at 16:24, Simon Marlow wrote:
 IMHO, these aren't compelling reasons.  Note that already on your page
 there is an inconsistency between the tabs at the top and the headings at
 the bottom: I don't know where to look to find the content I want. Put the
 navigation in one place.

 A sitemap: sitemaps are for robots.  If you're worried about cluttering up
 the page, use drop-down menus.

 SEO: we shouldn't compromise the usability or appearance of the site for
 SEO.  If we do it right, SEO takes care of itself - and it's not like we
 care that much about SEO here, we're not competing with other sites to sell
 you Haskell.

 I like something like this footer (though I don't think this is a great one:
 page-specific wiki actions doesn't belong, and I don't get the Reports
 column). It clearly doesn't serve as main navigation. For me, it's the
 where do I go next collection of links for when I've read the page. I
 think it can improve usability, not hurt it.

 As for SEO, I don't think the concern should be do we show up high in the
 ranks? but rather does a query in a search engine take you to the most
 appropriate page? I've long been frustrated by Google not being able to
 find good answers to my Haskell-related questions. If there's anything we
 can do to improve this issue by changing the page layout and structure of
 haskell.org, then I'm all for it. This in itself is a matter of usability.


Well, I'm not a usability expert nor do I have any research handy
about how to do this properly. If someone is or has, that would be
great! I was going to ask the guy at work who is a usability expert
and up on W3C recommendations, but he wasn't in!

Meanwhile for the sake of productivity I'll just take it out and get
cracking. If someone thinks something's confusing we can just take it
out, no problem.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell.org re-design

2010-03-29 Thread Christopher Done
On 29 March 2010 21:51, Sebastiaan Visser sfvis...@cs.uu.nl wrote:
 Nice work, definitely beats the current version!

 A few remarks:
  - Please throw in a bit more color somehow. Like said before, this shade of 
 gray is a bit depressive.
  - The more links are far to prominent. These links are not that important 
 and form a very distractive part of the design. Maybe you can right-align 
 them and make them less button-like.
  - I would recommend to use a bit more conservative font for the headers and 
 the headlines. Why not stick with Helvetica, Gill Sans or Myriad Pro?
  - Don't use a bold font-face in running text.
  - Align the bottom of the tabs headers with the content frame?
  - Maybe you can make the right column less wide, making is more easy to 
 focus on the main content?

 These remarks might help to make the overall appearance a bit less heavy. 
 Your design is quite lean and quiet, which is good, but some of the details 
 make it a bit messy.

Useful tips, easy to change, thanks. I agree with all the points. I
will update the concept pic in the morning. I'm already building the
wikimedia skin now. I feel it's a good idea to get something real
built that talks to the real database and can be clicked and browsed.
Otherwise it will remain just an idea for a long time going through
tweaks and watershedding.

Regarding other colours, please help me. Here is the SVG of the site:

http://chrisdone.com/tmp/haskell.svg

If you can suggest one extra contrasting but complementing colour,
that would be great.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell.org re-design

2010-04-01 Thread Christopher Done
On 31 March 2010 12:01, Johan Tibell johan.tib...@gmail.com wrote:
 - There are several news streams going on at once. Perhaps Headlines
 and Events could be merged into one stream. After watching the
 Hackage RSS feed every day I don't know if it's interesting enough to
 put on a front page. Perhaps in a side bar which brings me to my next
 suggestions.

 - Multi column pages are tricky to scan! It works well in news papers
 since the page height is limited but for web pages I really prefer one
 main column. Perhaps the second column code be made more narrow?
 Perhaps the footer content could be promoted into this second column
 and have it be a more conventional right (or left) hand nav?


That's true, it's a nice idea but in practice it's hard to know where
to focus. I've gone with a left nav. I've built up the HTML which is
cross-browser (ie6/7/8/opera/firefox/safari/chrome compat), still need
to add some bits but I can tomorrow import it into a wikimedia skin.
It's kind of easy to re-shuffle now that I've built it.

http://82.33.137.16/haskell-website/

Feedback would be appreciated.

One has to think, what do I really want to see on the home page?
Personally, I want to see latest events and news, that's what I look
for on the current page. I'd also like to stick The Big Download
Button on there and a small embedded TryHaskell, maybe with random
runnable code samples. Similar to the code sample on
http://ruby-lang.org/ but something you can actually try in the
browser.

And yes, by the way, I'm taking inspiration from Ruby's site, Python's
site and Ubuntu's wiki page, and I'd forgotten about Scala so I'm
looking at their site for ideas, too.

 - The quick links seem a bit random where they now appear. :)

Ha, yes! I popped them on last minute. I'm not entirely sure if there
is a standard place for social networking icons to go. I'll have to
see about that. There are lots of places the icons could go quite
neatly.

I was also thinking, I am told by my designer friends, that long pages
are coming back, so I think we could afford another couple sections on
there. Plus, I can optimise the page's download time by gzipping the
HTML and caching the gzip binary result, outputting that, and
refreshing that cache when the HomePage page is changed (actually
Wikimedia probably already supports caching somewhat, though it is an
old version, I'll have to see).

Cheers!
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] True Random Numbers

2010-04-03 Thread Christopher Done
I've used this one before:

betterStdGen :: IO StdGen
betterStdGen = alloca $ \p - do
   h - openBinaryFile /dev/random ReadMode
   hGetBuf h p $ sizeOf (undefined :: Int)
   hClose h
   mkStdGen $ peek p
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2010-04-03 Thread Christopher Done
Nice report!

 Downloads in March 2010: 145,752 (new monthly record)

G Zurihac! Bring on SanFranHac!

Nice to see wxHaskell rising up.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Happy Easter / ZJD!

2010-04-04 Thread Christopher Done
I've been having a great holiday. Messing about with Hakyll and the
Cont monad all weekend. My new site and blog is built with Hakyll now!

http://chrisdone.com/

Made a little post about how to use Hakyll with Git in a nice way:

http://chrisdone.com/posts/2010-04-04-hakyll-and-git-for-you-blog.html

And started as a joke and then I implemented it, make Emacs tweet your
Haskell compile errors!

http://chrisdone.com/posts/2010-04-04-tweet-your-haskell-errors.html

Happy Easter!

On 4 April 2010 21:34, Gregory Crosswhite gcr...@phys.washington.edu wrote:
 Happy Easter to those of you who are Christian, and Happy Zombie Jesus Day to 
 those of you who aren't!

 - Greg

 ___
 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] Haskell JSON requests from your blog, roll your own Try Haskell!

2010-04-05 Thread Christopher Done
For those interested,

http://chrisdone.com/posts/2010-04-05-haskell-json-service-tryhaskell.html

I've updated the Haskell JSON service I whipped up a month ago and
made it much simpler, written some sample code for how to include this
in your blog or tutorials. It supports the JSONP way of making
requests, so you can use it from any domain. Thanks to that, Try
Haskell can now be run by anyone who has the HTML/JavaScript code and
an internet connection, which is nice. Lowers the barrier a bit for
people who'd like to write interactive tutorials but can't be bothered
messing around with FastCGI and a web server.

Don't worry about using it too much, it's on a Linode account with
200GB of bandwidth a month. AJAX requests really won't use that up. ;)

I hope someone uses it on a tutorial. *Hint hint* BONUS.

Hope you guys find it useful!
___
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-04-05 Thread Christopher Done
This discussion makes me ponder whether someone like _why the lucky
stiff would ever contribute Haskell packages, hehe. I can count on two
hands people I know in various programming communities who have
identity issues but are prolific creators. Are we missing out?
Probably. But at least there is github.
___
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-04-05 Thread Christopher Done
On 6 April 2010 01:52, Ivan Miljenovic ivan.miljeno...@gmail.com wrote:
 On 6 April 2010 10:48, Christopher Done chrisd...@googlemail.com wrote:
 This discussion makes me ponder whether someone like _why the lucky
 stiff would ever contribute Haskell packages, hehe.

 I think we can do without someone who hides behind anonymity and then
 suddenly decides to go and delete all of their work when they've had
 enough.

Yes, pseudonymous people tend to delete all their work, and
non-anonymous people are incapable of deleting all their work.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Haskell web dev - ASP .NET analogue?

2010-04-15 Thread Christopher Done
The state of Haskell web development is exciting and messy. We don't
have a de facto way to do it like Rails or Django or ASP .NET, but we
do have many imitations and ideas popping up. You can easily judge
whether the community is happy with the state of web development by
the number of new web frameworks coming out all the time.

I'm wondering if there is a ASP .NET analogue for Haskell. ASP .NET
manages compiled languages like C# well by compiling a given page when
you run it, and also allowing you to build pages into DLLs and then
link them in your project. I have used this development process for a
year in a commercial business and quite like it. It's just really easy
to develop. Often you make little mistakes on a given page, so you
just edit one bit of code -- you don't want to have to run a command
to reload this code yourself. I think that, with Hint, one could write
a Haskell equivalent. The nice thing is you can test your Haskell code
in GHCi and then save the page and load it in the browser and have it
auto-recompile. As to how pages are generated I guess is up to whoever
is using it.

You have a kind of standard separation in ASP .NET:

backend.vb:
Sub submit(sender As Object, e As EventArgs)
lbl1.Text=Your name is   txt1.Text
End Sub

frontend.asp:
form runat=server
Enter your name:
asp:TextBox id=txt1 runat=server /
asp:Button OnClick=submit Text=Submit runat=server /
pasp:Label id=lbl1 runat=server //p
/form

One could blatantly copy this model. And it's not a bad model. To
start with anyway. It has the benefit that it's familiar to many web
programmers, and, importantly, business practice/industry. My
coworkers who only deal with HTML/CSS/JavaScript wouldn't care if
backend.vb became backend.hs.

I wrote an ecommerce site (http://productsforhair.co.uk/) a year ago
in Haskell and used the Text.XHtml.Strict and hated it to be honest.
It looks like a complete mess. Look at these two examples of using
EDSLs to produce content. Messy and unmanageable.

http://paste.lisp.org/display/97840

http://paste.lisp.org/system-server/show/lisppaste/web-server

As much as I love EDSLs like html combinators, as soon as you get a
nontrivial project with big complex elements it soon gets out of hand.
BlazeHtml makes this a little nicer with its `do' syntax but it's
still a problem.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] nun.haskell.org http services down?

2010-05-05 Thread Christopher Done
Why does this happen so often? Broken hardware, software crash,
bandwidth overuse, etc.? I have 200GB of bandwidth/month on the
tryhaskell.org server. It's not much but hopefully I can make a
Hackage mirror out of it one weekend for when the main server goes
down.

On 5 May 2010 09:05, Jens Petersen peter...@haskell.org wrote:
 http://{code,community,projects}.haskell..org/ seem to be inaccessible.

 Could someone please look into it?

 Thanks, Jens
 ___
 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] [ANNOUNCE] First Public Release of the Snap Framework

2010-05-24 Thread Christopher Done
Agreed, I think Snap just raised the bar for presentation of Haskell
libraries. It even has a custom Haddock style sheet! I'm glad it is
built up of separate packages. I also look forward to using it.

On 22 May 2010 09:10, Chris Eidhof ch...@eidhof.nl wrote:
 Awesome! Congratulations on the first release, I look forward to working with 
 it. Also, the web design is great, possibly the best designed Haskell library 
 website I've seen so far.

 -chris

 On 22 mei 2010, at 07:25, Gregory Collins wrote:

 Hello all,

 To coincide with Hac Phi 2010
 (http://www.haskell.org/haskellwiki/Hac_%CF%86), the Snap team is happy
 to announce the first public release of the Snap Framework, a simple and
 fast Haskell web programming server and library for unix systems. For
 installation instructions, documentation, and more information, see our
 website at http://snapframework.com/.

 Snap is well-documented and has a test suite with a high level of code
 coverage, but it is early-stage software with still-evolving interfaces. Snap
 is therefore most likely to be of interest to early adopters and potential
 contributors.

 Snap is BSD-licensed and currently only runs on Unix platforms; it has been
 developed and tested on Linux and Mac OSX Snow Leopard.

 Snap Features:

 * A simple and clean monad for web programming, similar to happstack's but
   simpler.

 * A *fast* HTTP server library with an optional high-concurrency backend
   (using libev).

 * An XML-based templating system for generating xhtml that allows you to bind
   Haskell functionality to XML tags in your templates.

 * Some useful utilities for web handlers, including gzip compression and
   fileServe.

 * Iteratee-based I/O, allowing composable streaming in O(1) space without any
   of the unpredictable consequences of lazy I/O.

 If you have questions or comments, please contact us on our mailing list
 (http://mailman-mail5.webfaction.com/listinfo/snap) or in the
 #snapframework channel on the freenode IRC network.

 Cheers,
 G
 --
 Gregory Collins g...@gregorycollins.net
 ___
 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] TDD in Haskell

2010-05-25 Thread Christopher Done
On 25 May 2010 13:36, Ionut G. Stan ionut.g.s...@gmail.com wrote:
 I'm doing TDD in pretty much all of the languages that I know, and I want to
 introduce it early in my Haskell learning process. I wonder though, if
 there's some established process regarding TDD, not unit testing.

 I've heard of QuickCheck and HUnit, but I've also read that QuickCheck is
 used mostly for testing pure code, while HUnit for impure code?

 What framework lends itself better for writing tests before the actual
 production code? Can you point out to some resources regarding this?

Real World Haskell has a chapter dedicated to writing Tests for your
code using QuickCheck[1]. The writers of this book work in industries
where well tested programs are essential.

Personally I suppose I follow a methodology of type driven development
followed by tests. I wrote a simple Emacs library to make testing
QuickCheck properties easier[2]. It's convenient because it lets you
check a function when your cursor is at the definition, or test all
properties in the current file. It picks up properties by symbols
named foo_prop, where foo is the function that the foo_prop property
is written for. Maybe this workflow suites your needs.

 Oh, and a small off-topic question? Is it considered a good practice to use
 implicit imports in Haskell? I'm trying to learn from existing packages, but
 all those import all statements drive me crazy.

I would follow tibbe's Haskell style guide[3] because it is strict and
reasonable. To quote it on this topic:

Always use explicit import lists or qualified imports for standard
and third party libraries. This makes the code more robust against
changes in these libraries. Exception: The Prelude.

[1]: http://book.realworldhaskell.org/read/testing-and-quality-assurance.html
[2]: http://www.emacswiki.org/emacs-en/QuickCheckHaskell
[3]: http://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Wire GUI

2010-05-29 Thread Christopher Done
Conal Elliot's talk on Tangible Functional Programming might be of
interest. http://www.youtube.com/watch?v=faJ8N0giqzw

On 29 May 2010 09:43, Andrew Coppin andrewcop...@btinternet.com wrote:
 Malcolm Wallace wrote:

 I'm looking at a project which involves a GUI where you can insert
 components and wire up connections between them. Obviously the details of
 what the components are and what code gets executed for them is
 domain-specific, however the general idea of graphically wiring things
 together is quite generic. Has anybody already put together a Haskell
 library for doing this kind of thing?

 Blobs.  (warning: some danger of bitrot)

 http://www.cs.york.ac.uk/fp/darcs/Blobs/

 Thanks for the tip.

 ___
 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] design question/font metrics

2010-06-03 Thread Christopher Done
Maybe you could check out the FTGL package for inspiration on  using
the freetype as a conventional C library. I was going to try to write
a Hackage package but realised I know nothing about typography and had
to start reading the intro. on Freetype's homepage (which is pretty
good, actually). Maybe I'll try it on the weekend. I needed something
to measure the size in pixels of some text for a given font and point
size, so I used libgd and manually analysed the pixels. It wasn't fast
but it worked perfectly. So, Gery, if you don't really need speed all
that much, that's a quick route to success. Otherwise maybe we could
work on something with the Freetype library.

On 1 June 2010 18:22, Stephen Tetley stephen.tet...@gmail.com wrote:
 Hi Brandon

 Even that's not simple - freetype is essentially a framework for
 writing font processors rather than a conventional C library[*]. Saner
 perhaps is to write a C program using freetype to do the exact job you
 have in mind, then bind to your C program.

 Best wishes

 Stephen

 [*} Probably why several people Including me have attempted a binding,
 but no-one has delivered one.

 On 1 June 2010 17:18, Brandon S. Allbery KF8NH allb...@ece.cmu.edu wrote:

 The saner way to do this is to write a binding to freetype2.
 ___
 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] Cabal -j

2010-06-03 Thread Christopher Done
On 4 June 2010 00:05, Don Stewart d...@galois.com wrote:
 wasserman.louis:
 What, if anything, stands in the way of parallelizing Cabal installs, make -j
 style?

 Parallelizing ghc --make

    http://vimeo.com/6572966

Unless Louis meant what's stopping cabal-install from installing
dependancies in parallel instead of serial? In which case; nothing?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Removing alternate items from a list

2010-06-08 Thread Christopher Done
Can't forget fix in a game of code golf!

 (fix $ \f (x:_: xs) - x : f xs) [1..]
= [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,4...

2010/6/8 Yitzchak Gale g...@sefer.org:
 R J wrote:
 What's the cleanest definition for a function f :: [a] - [a] that takes a
 list and returns the same list, with alternate items removed?  e.g., f [0,
 1, 2, 3, 4, 5] = [1,3,5]?

 f = map head . takeWhile (not . null) . iterate (drop 2) . drop 1

 Regards,
 Yitz
 ___
 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] Removing alternate items from a list

2010-06-08 Thread Christopher Done
On 8 June 2010 15:13, Jürgen Doser jurgen.do...@gmail.com wrote:
 El dom, 06-06-2010 a las 14:46 +, R J escribió:
 What's the cleanest definition for a function f :: [a] - [a] that
 takes a list and returns the same list, with alternate items removed?
  e.g., f [0, 1, 2, 3, 4, 5] = [1,3,5]?

 adding another suggestion:

 import Data.Either(rights)

 f = rights . zipWith ($) (cycle [Left,Right])

Ohhh. Nice.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal problem on OS X

2010-06-08 Thread Christopher Done
I am also experiencing this problem.

I read that the problem was fixed in the latest Cabal-install version.
But I'm not sure, as I tried to install the latest Cabal-install and
got 50 linker errors which I'm not prepared to tackle until the
weekend.

On 8 June 2010 18:21, Gordon J. Uszkay uszka...@mcmaster.ca wrote:
 Did you manage to fix this problem, or are there any updates on it?  I am now 
 having the same issue - presumably due to updating my Mac OS X version, 
 because cabal was working fine before that.  I can't upgrade cabal or install 
 anything either, same reason.

 Gordon J. Uszkay
 uszka...@mcmaster.ca



 On May 22, 2010, at 7:27 AM, Ivan Lazar Miljenovic wrote:

 Bill Atkins watk...@alum.rpi.edu writes:

 When I run cabal update on my Mac (Snow Leopard, Intel), I get:

 % cabal update
 Downloading the latest package list from hackage.haskell.org
 cabal: Codec.Compression.Zlib: incompatible zlib version

 I'm going to randomly guess that the version of the C zlib library that
 Cabal was indirectly built against is different to the one on your
 machine.

 --
 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

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Using the ContT monads for early exits of IO ?

2010-06-10 Thread Christopher Done
2010/6/10 Günther Schmidt gue.schm...@web.de:
 Hi everyone,

 I'm about to write a rather lengthy piece of IO code. Depending on the
 results of some of the IO actions I'd like the computation to stop right
 there and then.

What's wrong with a mere if/else condition?

foo = do
  bar
  x - mu
  case x of
Bar - return ()
Mu - do y - zot
 case y of
   Zot - return ()
   Foo - gud

foo = do
 bar
 x - mu
 y - bar
 when (pred x y) $ do
zot x

Continuations are risky for causing confusion of readers (and the
author herself), do you definitely need this?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Using the ContT monads for early exits of IO ?

2010-06-11 Thread Christopher Done
On 11 June 2010 10:12, Roman Cheplyaka r...@ro-che.info wrote:
 * Günther Schmidt gue.schm...@web.de [2010-06-11 01:22:27+0200]
 there is nothing wrong with ifs as such except the won't actually
 exit a long piece of code, the computation will continue, just in a
 useless way.

 Can you clarify?

I think Günther assumed that I was suggesting:

do if x
  then return ()
  else bar
   continueComputation

The problem is that if 'x' is true, continueComputation should
never happen. So you can solve it like this, which is what I was
actually suggesting:

do if x
  then return ()
  else do bar; continueComputation

But then you have this problem, which Günther addressed:

2010/6/11 Günther Schmidt gue.schm...@web.de:
 Primarily for every if I need two forks, so at every if the
 branches double.

Which can be a big problem if you have a sequence of heterogenous
actions that must be executed in order and are dependant and
nested. Continutations solve this, as do ErrorT and MaybeT which
are both restricted subsets for returning values. I'd use MaybeT
if a value needed to be returned, or nothing.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: Re[2]: [Haskell-cafe] Using the ContT monads for early exits of IO ?

2010-06-11 Thread Christopher Done
On 11 June 2010 14:27, Bulat Ziganshin bulat.zigans...@gmail.com wrote:
 i format it this way:

 if x then return () else do
 bar
 continueComputation

That's a nice way of formatting! God bless optional formatting! I like
this problem-specific indentation. Another is:

if xthen foo
else if y then bar
else if z then mu
else zot

Kind of similar to a COND statement from Lisp.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: Re[4]: [Haskell-cafe] Using the ContT monads for early exits of IO ?

2010-06-11 Thread Christopher Done
On 11 June 2010 14:40, Bulat Ziganshin bulat.zigans...@gmail.com wrote:
 if x        then foo
 else if y then bar
 else if z then mu
 else             zot

 case () of
  _ | x - foo
   | y - bar
   | otherwise - zor

 it's usually considered as haskell way of doing this

The example is merely to demonstrate how optional layout can encode
useful patterns, not to claim there aren't other ways to do it in
Haskell. For what it's worth, this solution is pretty hackish and so
not really Haskelly.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Encoding the encoding type of a string into its type

2010-06-11 Thread Christopher Done
There are a lot of issues with string encoding type mismatches.
Especially automatic conversions. This mailing list gets enough
posts about encoding confusions.

Would it make sense to make the string depend on its encoding type?

E.g. a String UTF16 cannot be used with putStrLn :: String UTF8, it
has to be used with putStrLn :: String UTF16. Provided the fundamental
functions that read and write strings are type safe, there'll be no
mix-ups?

I'll think about this more later. Just putting the question out there
so that I remember when I get home.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: How does one get off haskell?

2010-06-17 Thread Christopher Done
At CREATE-NET we're hiring Haskellers. If you fancy working in Trento
(Italy) and you have experience, apply here. Try these trivial
questions http://hpaste.org/fastcgi/hpaste.fcgi/view?id=26317 The
question list doesn't indicate expertise but it does filter out
newbies. Don't bother if you struggle with these. Send me your CV and
links to or tarballs of nontrivial (e.g. 500~ LoC) Haskell projects.
Web experience a plus. SCM (Git) experience a plus.

On 17 June 2010 22:27, Evan Laforge qdun...@gmail.com wrote:
 So how does one get off haskell? Are there people in similar situations
 that have managed? How did you do it?

 I used to get annoyed about all the java boilerplate and awkwardness.
 But then I learned that if I relax and stop thinking so much about the
 aesthetics of what I'm writing, I can just let my fingers go on typing
 without having to think too much.  Yes, it would have been shorter and
 more graceful in more capable languages, but I would have had to think
 more about how to factor things or apply the right abstractions.

 Ultimately the problems to be solved are the same, it's just that java
 and c++ give you a lot of padding where you're writing boilerplate and
 workarounds for not having closures, monadic values, a nice type
 system, etc.  It could be relaxing in the same way that playing 3rd
 trombone could be: you still get to play technical music every once
 and a while, but you also get a lot of downtime to count rests and
 listen to the music, or play whole notes.  There is a pleasure in
 that, even if it's not the same as when you're in the 1st violin
 section.  Music is still being made, problems are still getting
 solved.
 ___
 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] ANN: BlazeHtml 0.1

2010-06-19 Thread Christopher Done
On 19 June 2010 12:50, Jasper Van der Jeugt jasper...@gmail.com wrote:
 Hello all,

 In light of Google Summer of Code, we are proud to release the first
 version of BlazeHtml today. It's a 0.1 release, so beware of bugs!
 Nevertheless, we encourage you to try it out. You can find more
 information:

Hurrah! I will use it in my next web project at work. Sounds good to
try with Snap. If I need to make any patches I'll contribute. Thanks
for your work!
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Mapping a list of functions

2010-06-20 Thread Christopher Done
I love that. It's great. Definitely going in my .ghci file.

On 20 June 2010 12:28, Liam O'Connor lia...@cse.unsw.edu.au wrote:
 swing map :: forall a b. [a - b] - a - [b]
 swing any :: forall a. [a - Bool] - a - Bool
 swing foldr :: forall a b. b - a - [a - b - b] - b
 swing zipWith :: forall a b c. [a - b - c] - a - [b] - [c]
 swing find :: forall a. [a - Bool] - a - Maybe (a - Bool)
   -- applies each of the predicates to the given value, returning the
 first predicate which succeeds, if any
 swing partition :: forall a. [a - Bool] - a - ([a - Bool], [a - Bool])


 Essentially, the main use case seems to be transforming HOFs that
 operate on a list of values and a single function into HOFs that
 operate on a list of functions and a single value.

 Cheers.
 ~Liam



 On 19 June 2010 19:30, Limestraël limestr...@gmail.com wrote:
 ???
 What does exactly swing do ?

 2010/6/18 Bulat Ziganshin bulat.zigans...@gmail.com

 Hello Martin,

 Thursday, June 17, 2010, 11:02:31 PM, you wrote:

  But what if I want to apply a list of functions to a single argument. I
  can

 one more answer is swing map:

 http://www.haskell.org/haskellwiki/Pointfree#Swing



 --
 Best regards,
  Bulat                            mailto:bulat.zigans...@gmail.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


 ___
 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] Control.Alternative --- some and many?

2010-06-22 Thread Christopher Done
I'm not sure how Alternative differs from MonadPlus, other than being
defined for Applicative rather than Monad.  They have the same laws
(identity and associativity).

Some and many are probably motivated by their usefulness in
parsers.  Hence optional, etc.  I'm sure there are plenty of other
uses for it.

On 23 June 2010 05:22, Gregory Crosswhite gcr...@phys.washington.edu wrote:
 Hey everyone,

 Could someone explain to me (or point me to a reference explaining) the
 purpose of the some and many methods of the Alternative class?

 Also, there is a link posted in the documentation for Control.Applicative to
 a paper which describes the motivation behind the Applicative class;  is
 there similarly a paper explaining the motivation behind the Alternative
 class?  (The problem with Googling for Alternative is that this word is
 used a whole lot of the time, and very rarely does it refer to the
 Alernative class.  :-) )

 Cheers,
 Greg

 ___
 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] FastCGI, new maintainer

2010-06-23 Thread Christopher Done
I'm the new maintainer of the FastCGI package[1].

Please upgrade to the latest version, 3001.0.2.3. It includes a fix
for a special but real case in which the library throws an exception
when the httpd server unexpectedly closes the connection[2], and the
base version and exceptions have been upgraded to the latest
versions.[3]

Any problems, get in touch, or post an issue on this github project:
http://github.com/chrisdone/fastcgi

If you have patches preferably fork the fastcgi project on github and
do a Pull request. Alternatively just send me a diff.

Cheers

[1]: http://hackage.haskell.org/package/fastcgi
[2]: 
http://github.com/chrisdone/fastcgi/commit/de8d303b30dec097a1d24a8991da85d331871a96
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Emacs script to align Haskell import list

2010-06-26 Thread Christopher Done
I whipped up a little Emacs script to align the import lines in the
current buffer. I am using it in my projects and have experienced no
problems. It's good at keeping within 80 columns.

http://gist.github.com/453933

I've pasted it as a gist on Github so that anyone can edit it, gists
also provide a simple revision history and comment support. Please
feel free to contribute some tweaks and fixes. I'll then see about
merging this into haskell-mode in some fashion.

It doesn't handle multiple line explicit imports as I have a personal
rule that any explicit import list with more than a few symbols should
be changed to an as X import, as an addition to tibbe's style
guide.[1]

I haven't decided on a recommended keybinding. I'm considering a
context-dependent binding of C-c C-. that indents the import list when
you are on an import line.

[1]: http://github.com/tibbe/haskell-style-guide
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: Emacs script to align Haskell import list

2010-06-26 Thread Christopher Done
mauke from the Freenode IRC channel has contributed a vim version:

http://gist.github.com/454255

On 26 June 2010 12:25, Christopher Done chrisd...@googlemail.com wrote:
 I whipped up a little Emacs script to align the import lines in the
 current buffer. I am using it in my projects and have experienced no
 problems. It's good at keeping within 80 columns.

 http://gist.github.com/453933

 I've pasted it as a gist on Github so that anyone can edit it, gists
 also provide a simple revision history and comment support. Please
 feel free to contribute some tweaks and fixes. I'll then see about
 merging this into haskell-mode in some fashion.

 It doesn't handle multiple line explicit imports as I have a personal
 rule that any explicit import list with more than a few symbols should
 be changed to an as X import, as an addition to tibbe's style
 guide.[1]

 I haven't decided on a recommended keybinding. I'm considering a
 context-dependent binding of C-c C-. that indents the import list when
 you are on an import line.

 [1]: http://github.com/tibbe/haskell-style-guide

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANN: Haskell-mode 2.8.0

2010-07-02 Thread Christopher Done
Hey Svein,

Any chance of including haskell-align-imports somehow in the next release?

http://gist.github.com/453933 (Re-license it for inclusion however you
wish, I don't care.)

On 2 July 2010 14:27, Svein Ove Aas svein@aas.no wrote:
 I'm happy to (finally) announce haskell-mode 2.8.0, which can be found at
 http://projects.haskell.org/haskellmode-emacs/

 This is a feature release. I'll let the changelog speak for itself:


 * Minimal indentation support for arrow syntax

 * Autolaunch haskell-mode for files starting with #!/usr/bin/runghc
  and similar

 * Added minimal major mode for parsing GHC core files, courtesy of Johan 
 Tibell.
  There is a corresponding Haskell menu entry.

 * Allow configuration of where-clause indentation; M-x customize-group
  haskell-indentation.


 You can expect a 2.8.1 or even 2.8.2 in the near future, as I attempt
 to empty the bug list, but I thought I might as well get the new
 features out there quickly. There's bound to be new bugs associated
 with them.

 --
 Svein Ove Aas
 ___
 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] ANN: Haskell-mode 2.8.0

2010-07-02 Thread Christopher Done
On 2 July 2010 14:45, Svein Ove Aas sve...@gmail.com wrote:
 My current project is to rewrite the indenter in haskell, using
 haskell-src-exts and such. Aligning imports will probably be trivial
 once that is done, but the work of integrating it now would probably
 also be wasted.

That sounds like a good idea. I considered using haskell-src-exts
myself but didn't bother at the time.

 I might do it anyway, if it's sufficiently little work. Let's see.

It should just be case of choosing what keybinding to use.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] gd on Win32

2010-07-02 Thread Christopher Done
I'll be the new maintainer. I've used it a fair bit. I'll setup a
github repository.

I don't have a Windows install available, but I've used Windows for
development in the past.

Hold up.

On 2 July 2010 20:00, Jason Felice jason.m.fel...@gmail.com wrote:
 Howdy,

 The listed maintainer for gd is no longer maintaining it.  I'm wondering if
 anyone else is, if there is a version control URL, and how I can send
 patches.  I need to get it working for Win32.

 Thanks

 ___
 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] gd on Win32

2010-07-02 Thread Christopher Done
On 2 July 2010 20:29, Matthew Gruen wikigraceno...@gmail.com wrote:
 I was wondering the same thing about submitting patches to expose more
 of the image functionality, including getting some functions to return
 Either instead of failing with a runtime error. Let me know when you
 get it set up.

That sounds like a good idea. I've setup a repo, I've merged in the
latest work I did on it, and I've just updated it to be latest
Prelude/base and to comply with -Wall. I'm just going to make it
consistent with tibbe's style guide[1] before we start patching it for
feature updates, so that we're singing from the same hymn sheet and
then I'll let you you here. The Github repo is here:

http://github.com/chrisdone/gd

What's your Github username? I will add you as a project admin so that
you can push to it directly.

[1]: http://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] gd on Win32

2010-07-02 Thread Christopher Done
OK, here's the cleaned up repo. ready for action:

http://github.com/chrisdone/gd

Uploaded to Hackage with me as maintainer: http://hackage.haskell.org/package/gd

On 2 July 2010 21:34, Christopher Done chrisd...@googlemail.com wrote:
 On 2 July 2010 20:29, Matthew Gruen wikigraceno...@gmail.com wrote:
 I was wondering the same thing about submitting patches to expose more
 of the image functionality, including getting some functions to return
 Either instead of failing with a runtime error. Let me know when you
 get it set up.

 That sounds like a good idea. I've setup a repo, I've merged in the
 latest work I did on it, and I've just updated it to be latest
 Prelude/base and to comply with -Wall. I'm just going to make it
 consistent with tibbe's style guide[1] before we start patching it for
 feature updates, so that we're singing from the same hymn sheet and
 then I'll let you you here. The Github repo is here:

 http://github.com/chrisdone/gd

 What's your Github username? I will add you as a project admin so that
 you can push to it directly.

 [1]: http://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Suggestions for an MSc Project?

2010-07-04 Thread Christopher Done
On 4 July 2010 12:03, John Smith volderm...@hotmail.com wrote:
 On 04/07/2010 12:00, Ivan Lazar Miljenovic wrote:

 My interests are in higher-level application programming, rather than
 low-level libraries or compiler hacking.

 What do you mean by this?

 Using web programming as an example, a CMS would be high-level, while a
 networking library would be low-level.

 I was thinking of having a go at a web framework, but the space seems to be
 filled with Happstack.

It isn't really filled with happstack. Many of us use FastCGI or a
straight web server like hyena or Snap, or salvia, etc. People keep
writing web frameworks because they're unsatisfied with what's
currently available. But yeah, I'd pick something more interesting
than a web framework.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] The Haskell module landscape

2010-07-04 Thread Christopher Done
I was pondering how naming Haskell packages with a proper hierarchy is
quite important, and wondered what the general hierarchy of the
Hackage packages was like. So I grabbed the tarball of pakage
descriptions[1] from Hackage and ran a little messy Haskell script[2]
and got this list:

http://gist.github.com/raw/463423/f8458d83b1a7cc26cdbf812747188993e50cd8a2/The%20Haskell%20module%20landscape

Here's a snippet:

hsdns:  ADNS
hsdns:  ADNS.Base
hsdns:  ADNS.Endian
hsdns:  ADNS.Resolver
cv-combinators: AI.CV.ImageProcessors
HOpenCV:AI.CV.OpenCV.CV
HOpenCV:AI.CV.OpenCV.CxCore
HOpenCV:AI.CV.OpenCV.HighGui

It's interesting to see how there are quite a few packages that could
be easily put into the proper namesace, e.g. ADNS below should be in
the Network hierarchy. It's also cool to see clusters of separate
packages providing functionality for the same module, e.g. check out
Control.Applicative!

special-functors: Control.Applicative
base: Control.Applicative
applicative-extras:   Control.Applicative.Backwards
applicative-extras:   Control.Applicative.Compose
applicative-extras:   Control.Applicative.Error
InfixApplicative: Control.Applicative.Infix
category-extras:  Control.Applicative.Parameterized
action-permutations:  Control.Applicative.Permutation
applicative-extras:   Control.Applicative.State
yjtools:  Control.Applicative.Tools
unicode-symbols:  Control.Applicative.Unicode
base-unicode-symbols: Control.Applicative.Unicode
Control.Concurrent also has a lot going on inside it. There are quite
a lot of packages under Network, too.

One idea: Hackage could have an additional page which displays this,
fully linked up to the packages in question, with an MSDN-style
complete collapsible/expandable module hierarchy menu on the left and
documentation on the right. I'm not saying that's the right way to do
it, but it certainly makes for fun browsing for Haskell's entire open
source codebase. (It would also encourage library writers to put their
libraries in a useful namespace.)

[1]: http://hackage.haskell.org/packages/archive/00-index.tar.gz
[2]: http://gist.github.com/463472
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Suggestions for an MSc Project?

2010-07-04 Thread Christopher Done
Don't you have your own ideas? I have a long line of projects *I'd*
want to work on if I had the time.

On 4 July 2010 20:38, John Smith volderm...@hotmail.com wrote:
 On 04/07/2010 15:44, Felipe Lessa wrote:

 What about [1]?  Such a graphical editor could be used, for example,
 for an EDSL.  =D

 Cheers,

 [1]
 http://www.reddit.com/r/haskell_proposals/comments/9n8nc/write_a_scratchlike_graphical_editor_for_a/

 Already exists :-)
 http://mypage.iu.edu/~gdweber/software/sifflet/

 ___
 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] Merge hsql and HDBC -- there can only be one!

2010-07-06 Thread Christopher Done
One thing that would be nice is a unification of the general database
libraries hsql and HDBC. What is the difference between them? Why are
there two, and why are there sets of drivers for both (duplication of
effort?)? I've used both in the past but I can't discern a real big
difference (I used the hsql-sqlite library and the HDBC-postgresql
library, whichever worked...). It seems the best thing to do is either
actively merge them together and encourage the community to move from
one to the other -- judging from what I've read HDBC is more up to
date and newer than hsql -- or have some documentation with damn good
reasons to choose one or the other, because currently this is a
needless source of confusion and possible duplication of effort for
Haskell's database libraries.

I wasn't going to post until I'd actually researched the difference
myself properly but I didn't get chance to have a look over the
weekend, but I thought I'd pose the question. Do people actually care
about this?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Merge hsql and HDBC -- there can only be one!

2010-07-07 Thread Christopher Done
I did try Takusen with PostgreSQL and it worked perfectly for me, too.
The only reason I'm using HDBC is because there was already a
HaskellDB HDBC driver. I was considering writing a Takusen driver for
HaskellDB, in fact (if possible).

Anyway, the point remains, we need a single goto database library. I
don't know if Takusen's left-fold typeable way of doing things is
different enough to disqualify it from The Great Merge or not. Though
the lack of response to this thread makes me think no one particularly
thinks this is a problem. Is it worth the effort having one very high
quality stable library instead of three fairly okay
not-really-that-different maybe-working libraries?

On 7 July 2010 19:29, Gregory Crosswhite gcr...@phys.washington.edu wrote:
  I've been using Takusen for all of my database needs, which most of the
 time means interfacing to a PostgreSQL database, and it has worked out
 pretty well in practice.  In fact, I experimented with hsql and HDBC a while
 back and for some reason I can't remember they turned out to be less
 convenient than Takusen so I changed the code I was working on back over to
 Takusen.

 Cheers,
 Greg

 On 7/7/10 2:17 AM, Nick Rudnick wrote:

 Hi Chris,


 these are good questions -- actually, you might have mentioned Takusen,
 too.

 Clearly, HDBC is the largest of these projects, and there are lots of
 things well done there.

 Takusen has an interesting approach, and I would like to see a discussion
 here about the practical outcomes, as I have done no testing yet.

 I myself quite a time ago had an opportunity to do a Haskell job with a
 PostgreSQL backend for a client, where I tried out all three and got hsql
 running easiest. A maintainer was vacant, so I stepped in happily -- doing
 refactorings, fixing problems at request, giving advice to people.

 I can say that I am quite a little PostgreSQL centric and that I have a
 GIS project in sight, for which I want to try to adapt hsql.

 Cheers,

   Nick


 Christopher Done wrote:

 One thing that would be nice is a unification of the general database
 libraries hsql and HDBC. What is the difference between them? Why are
 there two, and why are there sets of drivers for both (duplication of
 effort?)? I've used both in the past but I can't discern a real big
 difference (I used the hsql-sqlite library and the HDBC-postgresql
 library, whichever worked...). It seems the best thing to do is either
 actively merge them together and encourage the community to move from
 one to the other -- judging from what I've read HDBC is more up to
 date and newer than hsql -- or have some documentation with damn good
 reasons to choose one or the other, because currently this is a
 needless source of confusion and possible duplication of effort for
 Haskell's database libraries.

 I wasn't going to post until I'd actually researched the difference
 myself properly but I didn't get chance to have a look over the
 weekend, but I thought I'd pose the question. Do people actually care
 about this?
 ___
 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

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] bug in ghci ?

2010-07-08 Thread Christopher Done
Hehe, seems like a -W-mutual-recursive-default-methods option is in order.

On 8 July 2010 15:47, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote:
 Pasqualino \Titto\ Assini tittoass...@gmail.com writes:

 Thanks for the explanation.

 What I meant is not that is a bug that it recurses but rather the fact
 that the compiler will accept this incomplete definition without
 complaining.

 This problem has bitten me twice while trying to use automatic
 derivation of a data type in another file.

 In my innocence I wrote:

 instance Show Test

 rather than

 deriving  instance Show Test

 I didn't notice the error as GHC seemed to be happy and then when I
 tried to use it: BANG!

 Very confusing.

 I suppose that Haskell has spoiled me, if it compiles I assume that it
 will work :-)

 As I said, there would be no error as all the methods have a definition
 (whether or not they make sense in this case is a different story); it
 will still successfully load a file if any methods don't have
 definitions but will provide a warning in those situations.

 --
 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] Comments on Haskell 2010 Report

2010-07-09 Thread Christopher Done
On 10 July 2010 01:22, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote:

 Brandon S Allbery KF8NH allb...@ece.cmu.edu writes:

  On 7/8/10 22:25 , Alex Stangl wrote:
  1. I.E. and e.g. should be followed by commas -- unless UK usage
  differs from US standards. (Page 3 and elsewhere, although FFI chapter
 
  I don't think I've ever seen them *followed* by commas.  Preceded,
  always.

From The Haskell 98 Library Report:

 partition takes a predicate and a list and returns a pair of lists: those 
elements of the argument list that do and do not satisfy the predicate, 
respectively; i.e., [...]

I don't think you should bother nitpicking about commas here. As
Gregory said, anywhere there is i.e., you can substitute it for
that is. Consider if the spec. was written with that is instead of
i.e., would you then criticise where and where not commas are used?
Does this arbitrary prescription really matter?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] The site has been exploited (again)

2010-07-11 Thread Christopher Done
http://haskell.org/

It says TO BUY Cilamox ONLINE, etc.

Whoever has power please fix this and upgrade the bloody wiki. This is
ridiculous. Point the domain at tryhaskell.org or something. I'll put
a holder page up. Anything.

Cheers
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] The site has been exploited (again)

2010-07-12 Thread Christopher Done
On 11 July 2010 20:53, Don Stewart d...@galois.com wrote:

 It looks like after the Yale machine was repaved, and the mediawiki
 instance restored, some plugins (and templates) went missing, including
 those that previously prevented such spam accounts.

 A new machine has been purchased this week that will become the primary
 home for haskell.org, and work is just started to migrate everything to
 the new machine -- at which point we'll have a *current* MediaWiki for
 the first time in a long time, new templates etc.

 -- Don

Fantastic news! I look forward to it.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] lists of arbitrary depth

2010-07-13 Thread Christopher Done
On 13 July 2010 10:58, vadali shlomivak...@gmail.com wrote:

 hello,
 iam really new to haskell,

 i want to define a function which takes as a parameter a list which can
 contain other lists, eg. [1,[2,3],[4,[5,6]]]

 how would i define a function that can iterate through the items so (in this
 example)
 iter1 = 1
 iter2 = [2,3]
 iter3 = [4,[5,6]]

 ?

 ( can i do that without using the Tree data type? )

Maybe this should be moved to Haskell-Beginnners.

It's impossible to have a function that works on a list of arbitrary
nesting. But you could use a tree data type, yeah.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Design for 2010.2.x series Haskell Platform site

2010-07-16 Thread Christopher Done
Hi Don,

What's the ETA on getting the site wiki upgraded and to what version
will it be? If we're looking at another couple of weeks I'll come up
with a new wiki template this weekend to replace the current one.

Regarding the Haskell Platform, maybe a summer theme is in order?
Sunrise, here's a whole platform upgrade. Get it while it's hot, etc.

Regarding the home page, I think we should involve more piccies of
people active in the community at conferences and hackathons, etc.
Seeing pictures of Haskellers is great. It tells everyone this
language is busy and active, it motivates existing or budding
Haskellers to contribute and get active, and it's easy to slap a
picture up on the home page.

code.haskell.org's going a bit slow -- hope we're not facing another
weekend meltdown!

Ciao!

On 16 July 2010 20:09, Don Stewart d...@galois.com wrote:
 Hey all,

 As you might know, the next major release of the Haskell Platform is
 coming up next week. We've had the current download site design for a
 while now:

    http://haskell.org/platform/

 However, I'm thinking it would be nice to have themed release designs.
 Examples:

    http://www.gnome.org/
    GNOME 2.30

 Ubuntu, http://www.ubuntu.com/ and so on.

 If anyone is interested in a 2010.2 series design for the HP site, the
 repository containing the stylesheet is here:

    http://code.haskell.org/haskell-platform/

 And you can find the index.html and style.css in the download-website/
 directory.

 We worked faily hard on the content, but feel free to play with the
 style.

 -- Don


 ___
 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] Design for 2010.2.x series Haskell Platform site

2010-07-16 Thread Christopher Done
On 16 July 2010 20:37, Don Stewart d...@galois.com wrote:
 chrisdone:
 Regarding the Haskell Platform, maybe a summer theme is in order?
 Sunrise, here's a whole platform upgrade. Get it while it's hot, etc.

    That's a great idea! :-)

Maybe you could work on a theme like this. Probably OTT.

http://imgur.com/NjiVh

Just an idea. My Inkscape-fu is weak.

Here's one for a laugh: http://imgur.com/PQAgC

I have ideas, I'm just not very good at executing them, haha. Probably
a blue summer sky thing would fit better with the Haskell theme. Can
someone with Photoshop make a shiny Haskell logo? I mean, literally
shiny. Like the OS X logo.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Design for 2010.2.x series Haskell Platform site

2010-07-17 Thread Christopher Done
On 17 July 2010 01:43, Don Stewart d...@galois.com wrote:
 Here's a first cut in the repo with the new design converted to CSS

    http://code.haskell.org/haskell-platform/download-website/

 If anyone would like to clean it up further, please send me patches to
 the style.css file or index.html.

Wow, this is totally awesome! Excellent work! I darcs send'd you a
tiny patch to make the download section more centered (it was offset
on my screen res).

Will submit more patches when I get home.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Design for 2010.2.x series Haskell Platform site

2010-07-17 Thread Christopher Done
On 17 July 2010 13:37, Andrew Coppin andrewcop...@btinternet.com wrote:
 Thomas Schilling wrote:
 Haters gonna hate.
 Well, I don't *hate* it. It just looks a little muddy, that's all. I tend to
 go for bright primary colours. But, as you say, each to their own...
 The actual layout isn't bad. A bit tall-and-thin, but otherwise OK.
 The new wiki will have a user preference to switch back to the default
 monobook style.  You can always do that if you want.  It doesn't work
 fully, yet, but that's on my ToDo list.
 Heh, well, maybe if we make half a dozen styles, there will be at least one
 that everyone is happy with. ;-)

Hi Andy, thanks for the kind words. Whether we like the default theme
or not right now, I still think it's important that the first thing a
newbie sees makes a good impression. The fact that you can change the
default theme to something else is irrelevant. Personally I agree it's
a bit Ubuntu without the modernness, it's more Age of Empires/CIV,
we-do-archeology-with-our-italics-serif-font (I find it a chore to
read, can't imagine what people who aren't native to the Latin
character would think), and the Haskell logo is oddly placed so that
it looks more like an advertisement, search should always be on the
right hand side, navigation should really be on the left, putting on
the right is iffy. I do like the orange links. But also if we liked
it, regardless, we should do user testing (checkout Don't Make Me
Think, Rocket Surgery Made Easy).

Sadly nobody has the time nor inclination to do proper web development
and actually test designs and get feedback, so I suppose we're working
with the time we've got. At least with theme support, we can write a
load of themes, and then perhaps do a vote on what people think makes
the best impression as a default. That seems most efficient and fair.
I'll certainly make a couple.

Hats off to Thomas for implementing a more friendly theme.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Design for 2010.2.x series Haskell Platform site

2010-07-17 Thread Christopher Done
Have you got SVG or PNG versions of those logos?

On 17 July 2010 14:54, Phyx loneti...@gmail.com wrote:
 Hi Chris,
 I like it, I just have 2 small observations:

 1. I don't think it's actually centered, on my resolution from the left to 
 the The Haskell Platform is about 8 inches, but from the right to it is 11.
    My eyes just keep telling me something's wrong

 2. Could you maybe update the windows flag from that xp flag to the current 
 mate one? I think it would also look better on that design 
 http://www.microsoft.com/presspass/images/gallery/logos/web/Windows_generic_v_web.jpg

 Or the current windows 7 flag 
 http://www.microsoft.com/presspass/images/gallery/logos/web/Windows7_v_Web.jpg

 The colors I believe are much nicer on those.

 Regards,
 Phyx

 -Original Message-
 From: haskell-cafe-boun...@haskell.org 
 [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Christopher Done
 Sent: Saturday, July 17, 2010 14:32
 To: Andrew Coppin
 Cc: haskell-cafe@haskell.org
 Subject: Re: [Haskell-cafe] Design for 2010.2.x series Haskell Platform site

 On 17 July 2010 13:37, Andrew Coppin andrewcop...@btinternet.com wrote:
 Thomas Schilling wrote:
 Haters gonna hate.
 Well, I don't *hate* it. It just looks a little muddy, that's all. I
 tend to go for bright primary colours. But, as you say, each to their own...
 The actual layout isn't bad. A bit tall-and-thin, but otherwise OK.
 The new wiki will have a user preference to switch back to the
 default monobook style.  You can always do that if you want.  It
 doesn't work fully, yet, but that's on my ToDo list.
 Heh, well, maybe if we make half a dozen styles, there will be at
 least one that everyone is happy with. ;-)

 Hi Andy, thanks for the kind words. Whether we like the default theme or not 
 right now, I still think it's important that the first thing a newbie sees 
 makes a good impression. The fact that you can change the default theme to 
 something else is irrelevant. Personally I agree it's a bit Ubuntu without 
 the modernness, it's more Age of Empires/CIV, 
 we-do-archeology-with-our-italics-serif-font (I find it a chore to read, 
 can't imagine what people who aren't native to the Latin character would 
 think), and the Haskell logo is oddly placed so that it looks more like an 
 advertisement, search should always be on the right hand side, navigation 
 should really be on the left, putting on the right is iffy. I do like the 
 orange links. But also if we liked it, regardless, we should do user testing 
 (checkout Don't Make Me Think, Rocket Surgery Made Easy).

 Sadly nobody has the time nor inclination to do proper web development and 
 actually test designs and get feedback, so I suppose we're working with the 
 time we've got. At least with theme support, we can write a load of themes, 
 and then perhaps do a vote on what people think makes the best impression as 
 a default. That seems most efficient and fair.
 I'll certainly make a couple.

 Hats off to Thomas for implementing a more friendly theme.
 ___
 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] Design for 2010.2.x series Haskell Platform site

2010-07-17 Thread Christopher Done
On 17 July 2010 16:21, Thomas Schilling nomin...@googlemail.com wrote:
 Webdesign for an open source project is pretty much doomed from the
 beginning.  Design requires a few opinionated people rather than
 democracy.  This is design is a result of a haskell-cafe thread which
 naturally involved a lot of bikeshedding.  It has its flaws, but it's
 certainly better than the old design and I know of no programming
 language website that has a particular great design, either.

This is why I mentioned that with theme support, we can provide lots
of alternatives and then vote on the best one. Like the logo. That's
democracy.

 Sure, there's always room for improvement.  Usability tests would be
 nice, but they're also time consuming.

This is what I said:

 On 17 July 2010 13:31, Christopher Done chrisd...@googlemail.com wrote:
 Sadly nobody has the time nor inclination to do proper web development
 and actually test designs and get feedback, so I suppose we're working
 with the time we've got.

On 17 July 2010 16:21, Thomas Schilling nomin...@googlemail.com wrote:
 Fighting CSS to do what you
 want it to and make it work on at least all modern browsers is
 annoying and a huge time sink as well.

I don't know about that; Firefox, Chrome, Safari, Opera and IE8 are
pretty much equivalent from a CSS2 stand-point. It's not like anything
fancy is needed.

On 17 July 2010 16:21, Thomas Schilling nomin...@googlemail.com wrote:
 I put the search field on the
 right (it's not very useful anyway), but otherwise I disagree with
 your requested changes.

I wasn't requesting any changes, I was demonstrating that I could pick
at parts of the design but in the end it's down to user testing:

 On 17 July 2010 13:31, Christopher Done chrisd...@googlemail.com wrote:
 But also if we liked it, regardless, we should do user testing (checkout 
 Don't Make Me
 Think, Rocket Surgery Made Easy).

Then I said no one's going to do user testing, so maybe a vote would
be the best:

 On 17 July 2010 13:31, Christopher Done chrisd...@googlemail.com wrote:
 Sadly nobody has the time nor inclination to do proper web development
 and actually test designs and get feedback, so I suppose we're working
 with the time we've got. At least with theme support, we can write a
 load of themes, and then perhaps do a vote on what people think makes
 the best impression as a default. That seems most efficient and fair.
 I'll certainly make a couple.

On 17 July 2010 16:21, Thomas Schilling nomin...@googlemail.com wrote:
 I put the search field on the
 right (it's not very useful anyway), but otherwise I disagree with
 your requested changes.

But now you've put the login on the left, which should also be on the right:

1. https://github.com/
2. http://ubuntuforums.org/
3. http://www.reddit.com/
4. http://www.amazon.com/
5. http://en.wikipedia.org/wiki/Main_Page
6. http://www.youtube.com/
7. http://www.facebook.com/
8. http://twitter.com/
9. http://www.myspace.com/
10. http://www.ebay.com/
11. http://wordpress.com/
12. http://www.flickr.com/explore/
13. http://dictionary.reference.com/

See how the login is always on the top right? It's a usability
standard. You can see how the sites focused on searching (google,
youtube, twitter, myspace, ebay) have the search bar in the middle,
but the ones where searching is secondary is always on the right. Logo
on the left, search and login on the right, menu on the top or the
left (or on the right if you want to freak your visitors out).

On 17 July 2010 16:21, Thomas Schilling nomin...@googlemail.com wrote:
 The logo on the left is inspired by http://www.alistapart.com.  It
 works quite well on pages that are not the home page.  The main
 feature of the design is that it scales quite nicely to different
 screen sizes (on recent enough browsers) -- try resizing your window.
 Also note that the exact contents can be edited (and probably shoud
 be).

It actually fits in on A List Apart (same theme).

But, again, these criticisms are academic; design it how you like.
Once the new Wiki's up we can submit patches/modifications or
different themes and vote.

One easy way to do user testing which is actually useful is through a
site like reddit or Hacker News. I got valuable feedback from Hacker
News, because the people were my target audience, i.e.,
none-Haskellers: http://news.ycombinator.com/item?id=1393593 It's
possible to use the same method for haskell.org. It just requires some
follow through to actually do what people request.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] RE: Design for 2010.2.x series Haskell Platform site (Don Stewart)

2010-07-17 Thread Christopher Done
On 17 July 2010 18:18, Niemeijer, R.A. r.a.niemei...@tue.nl wrote:
 Here's my take on the new design:

 Screenshot: http://imgur.com/9LHvk.jpg
 Live version: 
 http://dl.dropbox.com/u/623671/haskell_platform_redesign/index.htm

O, I like it! Nice one for building it. Would you consider doing a
design for the Haskell web site based on this template? (MediaWiki,
remember)

Might I suggest making The Haskell Platform coloured in a shade of
the blue you're using? What do you think? It might look too flat, I
don't know. Nevermind.

Anyway, fantastic! What does everyone else think?

So we have:

http://hackage.haskell.org/platform/ (Kudos to Don for coming up with
the original design and content from nothing.)

http://imgur.com/NjiVh =
http://code.haskell.org/haskell-platform/download-website/

http://imgur.com/9LHvk.jpg =
http://dl.dropbox.com/u/623671/haskell_platform_redesign/index.htm

I'm leaning towards Neimeijer's.

By the way, what tools did you use to make this?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Design for 2010.2.x series Haskell Platform site

2010-07-17 Thread Christopher Done
Thought I'd bring Neimeijer's design into the mix, because I think
it's brilliant (and it's been built):

(For some reason it didn't appear in this thread in my GMail inbox;
perhaps the Subject field got altered. Posting this here incase it
happened like that for everyone else so that we can continue the
discussion within this thread.)

On 17 July 2010 18:18, Niemeijer, R.A. r.a.niemei...@tue.nl wrote:
 Here's my take on the new design:

 Screenshot: http://imgur.com/9LHvk.jpg
 Live version: 
 http://dl.dropbox.com/u/623671/haskell_platform_redesign/index.htm
 ___
 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 survey

2010-07-20 Thread Christopher Done
 Do you value libraries/tools that are shipped through Hackage?

* Yes, I always use only libraries/tools available on Hackage
* Yes, but if a package is not available on Hackage, I will still use it

I'm torn between the first two. I picked the first. If it's not
available on Hackage, I will usually package it up and put it on
Hackage. (E.g. the Frisby library hasn't been on Hackage for some
reason so I uploaded it http://hackage.haskell.org/package/frisby)

Anyway, I took the survey. Nice idea. How much response have you had so far?

On 20 July 2010 13:08, Sylvain Le Gall sylv...@le-gall.net wrote:
 I give again the survey URL:
 http://polldaddy.com/s/2C49D15023CB88C6

 On 20-07-2010, Ketil Malde ke...@malde.org wrote:
 Ivan Lazar Miljenovic ivan.miljeno...@gmail.com writes:

 I'd like to request some clarification of some of the questions:

 You might want to add a don't know or similar option, so that people
 don't have to fill in questions arbitrarily in the case they feel none
 of the answers match.


 You can just skip the question. No question are mandatory.

 3. I use cabal-install only in testing my own packages (as it's easier
    to do cabal foo than runhaskell Setup.hs foo).

 I generally try to use distribution packages first, and (manually)
 download from hackage in case my distribution doesn't supply what I
 need.  I'm not quite sure what to answer here.


 I think the answer:
 I use cabal-install when my Linux/Mac/Windows distribution doesn't
 provide the package
 should be ok.

 Thank you for answering the survey.

 Regards,
 Sylvain Le Gall

 ___
 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: gd on Win32

2010-07-21 Thread Christopher Done
Hi Kevin,

You probably have to install the mingw versions of these libraries.
Should be trivial to do with mingw's installation manager. Or was that
cygwin? The one with the package manager. I haven't used Windows for a
while, apologies.

On 21 July 2010 09:51, Kevin Jardine kevinjard...@gmail.com wrote:
 Is there an easy way to install this module on Windows?

 I just ran

 cabal install gd

 and got the rather intimidating response:

 Missing C libraries: gd, png, z, jpeg, fontconfig, freetype, expat

 I actually have some of these libraries installed (eg. expat) but not
 most.

 I'm using MinGW.

 Cheers,
 Kevin

 On Jul 3, 12:27 am, Christopher Done chrisd...@googlemail.com wrote:
 OK, here's the cleaned up repo. ready for action:

 http://github.com/chrisdone/gd

 Uploaded to Hackage with me as 
 maintainer:http://hackage.haskell.org/package/gd

 On 2 July 2010 21:34, Christopher Done chrisd...@googlemail.com wrote:

  On 2 July 2010 20:29, Matthew Gruen wikigraceno...@gmail.com wrote:
  I was wondering the same thing about submitting patches to expose more
  of the image functionality, including getting some functions to return
  Either instead of failing with a runtime error. Let me know when you
  get it set up.

  That sounds like a good idea. I've setup a repo, I've merged in the
  latest work I did on it, and I've just updated it to be latest
  Prelude/base and to comply with -Wall. I'm just going to make it
  consistent with tibbe's style guide[1] before we start patching it for
  feature updates, so that we're singing from the same hymn sheet and
  then I'll let you you here. The Github repo is here:

 http://github.com/chrisdone/gd

  What's your Github username? I will add you as a project admin so that
  you can push to it directly.

  [1]:http://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md

 ___
 Haskell-Cafe mailing list
 haskell-c...@haskell.orghttp://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] Experiences with cabal-install and Hackage

2010-07-22 Thread Christopher Done
That sounds like a good idea. I'd like to know when my packages fail
to build or show warnings about deprecated features, etc.

On 22 July 2010 09:16, Ketil Malde ke...@malde.org wrote:

 I've rather recently started to use cabal-install to install packages
 from Hackage.  Unfortunately, so far many packages fail to install.  I
 try to email authors/maintainers, but when I check build logs on
 Hackage, I discover that some of these packages have failed building for
 some time.

 Wouldn't it make sense to provide automated notification of the package
 author when a package fails to build?  I certainly would like to know
 about it, but of course, I never remember to check back to see.

 -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 mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Experiences with cabal-install and Hackage

2010-07-22 Thread Christopher Done
I don't know how wise that is; I tend to fix packages when I find
they're broken. I'd prefer a way for there to be more than one
maintainer for a package, i.e., collaborators, like on Github, so that
a maintainer can add me as a collaborator. My only problem with
Hackage is I feel like the maintainer is a fence I have to climb every
time I want to upload a bugfix or a non-broken version of the package.
I just want to fix it, upload it, and continue with my work. Also a
last seen a la StackOverflow would be good, so that you can see what
a maintainer was last on Hackage. That's assuming the new Hackage will
support logins.

On 22 July 2010 09:52, Isak Hansen isak.han...@gmail.com wrote:
 On Thu, Jul 22, 2010 at 9:16 AM, Ketil Malde ke...@malde.org wrote:

 I've rather recently started to use cabal-install to install packages
 from Hackage.  Unfortunately, so far many packages fail to install.  I
 try to email authors/maintainers, but when I check build logs on
 Hackage, I discover that some of these packages have failed building for
 some time.

 Wouldn't it make sense to provide automated notification of the package
 author when a package fails to build?  I certainly would like to know
 about it, but of course, I never remember to check back to see.


 How about taking it one step further, actually hiding unmaintained
 packages after a grace period?

 Unless the user runs cabal with an --include-deprecated option, or something.


 Isak

 -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 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] Haskell Forum

2010-07-26 Thread Christopher Done
I'd only really go on a Haskell forum hosted at haskell.org. If there
wlil be one, I'd moderate. Only things a forum has over a mailing list
is syntax highlighting and attachments imo. Cons are being tied to a
web site, anonymity, existence of moderators, etc. Seems a bit like
spreading the community thin. It's not *that* big.

On 26 July 2010 15:30, Daniel Díaz lazy.dd...@gmail.com wrote:
 Hi all,

 I want to open a Haskell forum based on phpBB, but I need some collaborators
 for organize its content, and moderate its use. When we have finished, I
 will open this forum for the entire community of Haskell!

 If you are interested, mail me:
 danield...@asofilak.es

 Thanks in advance.

 ___
 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] Memory and Threads - MVars or TVars

2010-07-29 Thread Christopher Done
This could be useful: Beautiful concurrency by Simon Peyton Jones

http://research.microsoft.com/en-us/um/people/simonpj/papers/stm/beautiful.pdf

On 29 July 2010 02:23, Eitan Goldshtrom thesource...@gmail.com wrote:
 Hi everyone. I was wondering if someone could just guide me toward some good
 information, but if anyone wants to help with a personal explanation I
 welcome it. I'm trying to write a threaded program and I'm not sure how to
 manage my memory. I read up on MVars and they make a lot of sense. My real
 question is what is atomic and how does it apply to TVars? I don't
 understand what atomic transactions are and I can't seem to find a concise
 explanation. I also saw some stuff about TMVars? But I can't find much on
 them either. Any help would be appreciated.

 -Eitan

 ___
 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] Maybe to Either -- is there a better way?

2010-08-02 Thread Christopher Done
It's available in MissingH:

http://hackage.haskell.org/packages/archive/MissingH/latest/doc/html/Data-Either-Utils.html#v:maybeToEither

You can find this using Hayoo, which indexes Hackage.

MissingH is pretty huge, though, just for one function. It's kind of
annoying. I'm using this function in my library and one other, in the
hopes I'll need more to make depending on MissingH worth it.

On 2 August 2010 16:14, Tom Davies tgdav...@gmail.com wrote:
 I find it convenient sometimes to convert a Maybe value to an Either thus 
 (excuse the syntax, it's CAL, not Haskell):

 maybeToEither :: a - Maybe b - Either a b;
 maybeToEither errorValue = maybe (Left errorValue) (\x - Right x);

 but that seemingly obvious function isn't in Hoogle, AFAICT, so perhaps 
 there's some other approach?

 Thanks,
  Tom___
 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] ANNOUNCE: DSTM 0.1.1

2010-08-03 Thread Christopher Done
This is very cool, thanks for writing it. I will try it when I get home tonight.

On 3 August 2010 10:35, Frank Kupke f...@informatik.uni-kiel.de wrote:
 Hi,

 DSTM is an implementation of a robust distributed Software Transactional
 Memory (STM) library for Haskell. Many real-life applications are
 distributed by nature. Concurrent applications may profit from robustness
 added by re-implementation as distributed applications. DSTM extends the STM
 abstraction to distributed systems and presents an implementation efficient
 enough to be used in soft real-time applications. Further, the implemented
 library is robust in itself, offering the application developer a high
 abstraction level to realize robustness, hence, significantly simplifying
 this, in general, complex task.

 The DSTM package consists of the DSTM library, a name server application,
 and three sample distributed programs using the library. Provided are a
 simple Dining Philosophers, a Chat, and a soft real-time Bomberman game
 application. Distributed communication is transparent to the application
 programmer. The application designer uses a very simple name server
 mechanism to set up the system. The DSTM library includes the management of
 unavailable process nodes and provides the application with abstract error
 information thus facilitating the implementation of robust distributed
 application programs.

 For usage please look into the documentation file: DSTMManual.pdf.

 The package including the documentation can be found on:
 http://hackage.haskell.org/package/DSTM-0.1.1

 Best regards,
 Frank Kupke

 ___
 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] Software architecture

2010-08-04 Thread Christopher Done
This came up a month or so ago, Don Stewart and others overviewed this
topic in detail:

http://www.haskell.org/pipermail/haskell-cafe/2010-May/077154.html

On 4 August 2010 13:07, Charles-Pierre Astolfi c...@crans.org wrote:
 Hey there,

 I'm searching for software designs in Haskell ; for example, I have a
 pretty good ideo of how I would arrange my modules/classes (in
 ocaml/(java/c++)) and how they would all fit together to create, say,
 a website aspirator. But I don't have any clue of the right way to do
 it with Haskell.

 I don't need a solution for this example, I'd just like to see how to
 manage non-trivial code. I haven't found any pointers on the
 interwebs.

 On an unrelated note, what is the simplest way to get the llvm
 bitcode? I understand I can compile myself ghc but it there an easier
 way?

 Thanks a lot!
 --
 Cp
 ___
 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] ANNOUNCE: DSTM 0.1.1

2010-08-04 Thread Christopher Done
On 4 August 2010 10:43, Chris Eidhof ch...@eidhof.nl wrote:
 This looks very cool! It would be nice to put the pdf online somewhere, and 
 add a link from the package documentation

Regarding that, it would be nice if Hackage let you access the files
in the package instead of having to extract the .tar.gz, as in this
case the PDF is in the package; it makes sense to make it clickable
somewhere on the package page.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Maybe to Either -- is there a better way?

2010-08-04 Thread Christopher Done
On 4 August 2010 18:40, Alexander Dunlap alexander.dun...@gmail.com wrote:
 It's also nice for people reading code if common functions are
 functions from common libraries. This allows readers' vocabulary of
 common functions to increase, so they don't have to trawl through
 someone's personal utility library to figure out what each utility
 function does.


Agreed. That's why I like readMay. There are many ways to write a reads wrapper:

case reads str of [(x,_)] - Just x; _ - Nothing

vs

case reads str of [(x,)] - Just x; _ - Nothing -- stricter

Etc. It seems everyone defines their one, where as Safe.readMay is
common. There could be others defined in Safe that encompass most
cases.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Video for Linux (v4l) library for Haskell

2009-12-27 Thread Christopher Done
Hackage and Google turn up nothing¹, so I am asking here; has anyone written
a v4l library for Haskell?

I have been reading the v4l documentation² and I am ready to implement a
Haskell interface for webcams, but it would be a waste of effort if
someone's already got one knocking about. I could hack on theirs!

Cheers!

Christopher Done

¹ In fact, the only Google result is a posting to this mailing list asking
if there is a v4l library to which the single response is no, write an FFI
interface.
² http://pages.cpsc.ucalgary.ca/~sayles/VFL_HowTo/ and
http://pages.cpsc.ucalgary.ca/~sayles/VFL_HowTo/Video4LinuxAPI.html
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] hdbc-mysql broken on snow-leopard?

2010-08-08 Thread Christopher Done
Did you install libmysqlclient? sudo port install should handle this, IIRC.

There's also this problem in general with MySQL, it seems:

http://www.google.co.uk/#q=libmysqlclient+os+x

On 8 August 2010 03:27, Carter Schonwald carter.schonw...@gmail.com wrote:
 Hey All,
 when i build hdbc-mysql and then try to run some example code, i get the
 following error message:

 Loading package HDBC-mysql-0.6.3 ... can't load .so/.DLL for: mysqlclient
 (dlopen(libmysqlclient.dylib, 9): no suitable image found.  Did find:
    /usr/local/lib/libmysqlclient.dylib: mach-o, but wrong architecture)

 does this mean that it won't build on OS X snow leopard?
 (and yes, I am aware of hdbc-odbc, but i was curious if I could use
 hdbc-mysql
 thanks
 -Carter

 ___
 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] What is -

2010-08-08 Thread Christopher Done
In shortyes, do z - ..; foo desugars to ... = \z - foo

The Haskell Report describes `do' notation in detail:

http://www.haskell.org/onlinereport/exps.html#sect3.14

Real World Haskell describes its uses:

http://book.realworldhaskell.org/read/io.html#io.bind

On 8 August 2010 15:36, michael rice nowg...@yahoo.com wrote:

 What is - ? Couldn't find anything on Hoogle.

 1)  main = do
   x - getLine   -- get the value from the IO monad
   putStrLn $ You typed:  ++ x

 2)  pythags = do
   z - [1..] --get the value from the List monad?
   x - [1..z]
   y - [x..z]
   guard (x^2 + y^2 == z^2)
   return (x, y, z)



 From: http://en.wikibooks.org/wiki/Haskell/Syntactic_sugar

 Do and proc notation


   SweetUnsweet
 Monadic binding  do x - getLIne  getLine = \x -
 putStrLn $ You typed:  ++ x putStrLn $ You
 typed:  ++ x


 So, Example 2 desugared becomes...

  [1..] == \z -  ?





 Michael



 ___
 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] What is -

2010-08-08 Thread Christopher Done
On 8 August 2010 16:21, michael rice nowg...@yahoo.com wrote:

 getLine = \x -  -- x is a string at this point

 [1..] = \x --- x is WHAT at this point?


Num n = n

A number from the list.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Some Haskell mode extensions

2010-08-09 Thread Christopher Done
Hi there,

I've written some very simple Emacs modules for making using Haskell
in Emacs a little bit nicer:

http://github.com/chrisdone/haskell-mode-exts

You can download the project with git, or pick and choose individual files:

http://github.com/chrisdone/haskell-mode-exts/raw/master/haskell-navigate-modules.el

http://github.com/chrisdone/haskell-mode-exts/raw/master/haskell-align-imports.el

http://github.com/chrisdone/haskell-mode-exts/raw/master/haskell-sort-imports.el

http://github.com/chrisdone/haskell-mode-exts/raw/master/haskell-installed-packages.el

More documentation about installed module completion here, I need to
do another module for syntax-aware import editing, but this module is
already quite usable:
http://www.chrisdone.com/posts/2010-08-07-emacs-haskell-installed-packages.html

I have a few more in the works and more planned, e.g. (some of which
may already have been implemented somewhere, but):

1) syntax aware import line editing (think: tabbing between sections,
toggling qualified on/off, etc.)
2) controlling cabal through inferior-haskell-mode (already done this,
but I need to make it portable)
3) tidying up of inferior-haskell (it wastes a lot of space)
4) more interactiveness with inferior-haskell e.g. you need
-XExtension should really just prompt me whether I want to add it to
the file or enable it in ghci, and then do it. (When you're in the
middle of working, adding extensions to the top of the file is
laborious.)
5) automatic integration with etags and some improvement to its little issues
6) a high-level .cabal file editing mode
7) unit testing integration

And so on. There's loads that can be done. I'm just implementing the
stuff I want, and if some of it's useful in general, maybe it can be
absorbed into the general haskell-mode distrib.

The haskell-emacs mailing list is down at the moment, so I thought I'd
post here.

Cheers!
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Unused import warnings.

2010-08-10 Thread Christopher Done
On 10 August 2010 22:22, Lyndon Maydwell maydw...@gmail.com wrote:
 Hi Cafe.

 I have written some QuickCheck properties in my source and am using
 these for testing, however, when I compile my program I get warned
 about unused imports:

 Warning: Module `Test.QuickCheck' is imported, but nothing from it is used

 Is there a way to suppress these warnings for a particular module by
 using a pragma directive or something similar?

You can do:

import Test.QuickCheck ()
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Unused import warnings.

2010-08-10 Thread Christopher Done
On 10 August 2010 22:25, Lyndon Maydwell maydw...@gmail.com wrote:
 On Wed, Aug 11, 2010 at 4:23 AM, Christopher Done
 chrisd...@googlemail.com wrote:
 On 10 August 2010 22:22, Lyndon Maydwell maydw...@gmail.com wrote:
 Hi Cafe.

 I have written some QuickCheck properties in my source and am using
 these for testing, however, when I compile my program I get warned
 about unused imports:

 Warning: Module `Test.QuickCheck' is imported, but nothing from it is used

 Is there a way to suppress these warnings for a particular module by
 using a pragma directive or something similar?

 You can do:

 import Test.QuickCheck ()

 I'm using qualified properties with (import Test.QuickCheck ((==)))
 so that may not be possible.

Ah, ok. In that case you can use -fno-warn-unused-imports. You can
pass that to GHC, or put it in as an OPTIONS pragma:

{-# OPTIONS -fno-warn-unused-imports #-}
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] hackage.haskell.org cannot be accessed?

2010-08-12 Thread Christopher Done
We can only be so immutable. ;-) /groan

On 12 August 2010 17:50, Don Stewart d...@galois.com wrote:
 ivan.miljenovic:
 On 12 August 2010 16:45, Magicloud Magiclouds
 magicloud.magiclo...@gmail.com wrote:
  Hi,
   Today I found out that I cannot access hackage.haskell.org. I have
  tried vpn/proxy to see if my network has something wrong. No luck.

 http://downforeveryoneorjustme.com/http://hackage.haskell.org agrees.

 Wait a few hours, it might be back up then (it was up a few hours ago...).

 Turns out the physical line into the building in which the hackage
 server resides was cut by a contractor around 5pm PST last night. Repair
 workers splice the line back together around 2am, and everything is
 working now.

 -- Don
 ___
 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] Maintainer wanted for pappy

2010-08-17 Thread Christopher Done
Hi,

I thought I'd go through my uploaded Hackage packages and decide which
ones I am going to maintain, which are worth others maintaining, and
which are probably not worth maintaining (spoiler, most aren't).

1. Interested in and will continue maintaining:
gd, higherorder, cgi-utils, fastcgi, ircbouncer

For gd, cgi-utils, fastcgi, ircbouncer I'd like to write test cases
and do some profiling and general proper quality assurance. For the
rest...

2. Not really interested in maintaining, but in a good state and
probably worth maintaining:
pappy (Bryan Ford gave me permission to upload and for someone to maintain this)

3. Not interested in maintaining, but in a good state, not worth maintaining:
kibro, blogination, simplesmtpclient (this has been usurped by
http://hackage.haskell.org/package/hsmtpclient (same author))

4. Not interested in maintaining, in a bad state (i.e. build failure):
validate, lojban, goa, wordcloud

The build failure ones and ones not worth maintaining are probably
best being taken out back.

What do we do with packages we're not interested in maintaining
anymore? Gracenotes recommended something like changing the category
to Unmaintained (and on Hackage 2.0, a tag). Good idea for now?

Chars!
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Maintainer wanted for pappy

2010-08-17 Thread Christopher Done
I've never used the cairo library as it was part of gtk2hs and thus
not on Hackage. Looks like it's on Hackage now as of last may. I'll
take a look next time I want to do graphics. I imagine it's faster.

On 17 August 2010 23:48, Felipe Lessa felipe.le...@gmail.com wrote:
 On Tue, Aug 17, 2010 at 5:38 PM, Christopher Done
 chrisd...@googlemail.com wrote:
 1. Interested in and will continue maintaining:
 gd, higherorder, cgi-utils, fastcgi, ircbouncer

 Just out of curiosity, why do you use gd instead of cairo?

 Cheers! =)

 --
 Felipe.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Maintainer wanted for pappy

2010-08-18 Thread Christopher Done
On 18 August 2010 01:30, John Meacham j...@repetae.net wrote:
 On Tue, Aug 17, 2010 at 10:38:53PM +0200, Christopher Done wrote:
 2. Not really interested in maintaining, but in a good state and
 probably worth maintaining:
 pappy (Bryan Ford gave me permission to upload and for someone to maintain 
 this)

 I actually have been actively developing and maintaining pappy for a
 while as I use it in many of my projects. It has several major
 improvements over the original version. (parsing things other than Char,
 better type inference, ability to generate stand-alone as well as shared
 parsers, bug fixes, etc...)

 http://repetae.net/repos/pappy/

Why don't you put it on Hackage and set yourself as the maintainer?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Embedded scripting Language for haskell app

2010-08-18 Thread Christopher Done
On 18 August 2010 01:41, Felipe Lessa felipe.le...@gmail.com wrote:
 On Tue, Aug 17, 2010 at 7:07 PM, Christopher Done
 chrisd...@googlemail.com wrote:
 Sadly this is true. I went ahead and tested this to confirm; compiled
 mueval (which uses hint), copied the executable to a virtual machine
 and it required the GHC package repo among other GHC-related
 libraries.

 The size is indeed a problem. But how much? How does this compare to Lua et 
 al?

 IIRC, the Haskell Platform installer for Windows has around 70 MiB.
 So, if you want a simple installer to include in your installer, be
 prepared to have another 70 MiB.  I said a dozen mebibytes (12 MiB)
 because I think the bare minimum needs to have at least this size to
 have something useful for an app, but this isn't backed up by
 anything.

I mean, not using the Haskell Platform. I think if you're an
experienced developer you'd package just the things your project
needs, instead of using the whole Haskell Platform. I don't think the
Haskell Platform is the bare minimum.

 Lua, on the other hand, is embedded in the executable and weights less
 than 200 KiB, probably much less than a typical Haskell executable.  I
 don't know about other interpreters.

True, that's pretty small.

 $ du -hs /usr/lib/ghc-6.12.3/
 [..]
 So using one of the best generic compression algorithms available, the
 size of one of the biggest libraries that a program using hint may
 need comes down to 4.5 MiB.  Probably if someone is careful enough to
 include only what really is necessary, the program installer will be
 at most 10 MiB and will need at most 50 MiB on disk.  I think this is
 doable, but a lot more than Lua; hint can't be used on set-top boxes
 =).

That's pretty good! Encouraging if I write an end-user desktop
application and want to embed Haskell as a scripting language.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Creating binary distributions with Cabal

2010-08-20 Thread Christopher Done
Does Cabal have a way to produce binary distributions from a package?

I need to create a binary distribution of my project which does not
depend on GHC or any development tools. The package should include all
required data files and configuration files. I've got the latter
covered with Data-Files and getDataFileName, but not sure about what
to do regarding configuration files -- read/write to
$HOME/.myproject/config or $HOME/.myprojectrc, etc., or what?

I'm specifically targeting Redhat because that's the production
server, but I'm wondering if there is or will be a way to agnostically
access data files and configuration files without having to think
about what OS it will be running on, in the same way I can use sockets
or file access without worrying about the particular OS.

Something like cabal sdist --binary --rpm/deb/arch/win/etc?

How does everyone else package up their Haskell programs for binary
distribution?

Cheers!
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Code that writes code

2010-08-20 Thread Christopher Done
Check out the userHooks in Cabal[1]. I believe you can use, e.g.
hookedPreProcessors[2], or preBuild to preprocess your files into
regular Haskell files before building takes place.

[1]: 
http://www.haskell.org/ghc/docs/6.12.1/html/libraries/Cabal/Distribution-Simple-UserHooks.html#t%3AUserHooks
[2]: 
http://www.haskell.org/ghc/docs/6.12.1/html/libraries/Cabal/Distribution-Simple-UserHooks.html#v%3AhookedPreProcessors

On 19 August 2010 23:00, Andrew Coppin andrewcop...@btinternet.com wrote:
 I'm working on a small Haskell package. One module in particular contains so
 much boilerplate that rather than write the code myself, I wrote a small
 Haskell program that autogenerates it for me.

 What's the best way to package this for Cabal? Just stick the generated file
 in there? Or is there some (easy) way to tell Cabal how to recreate this
 file itself?

 ___
 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] Creating binary distributions with Cabal

2010-08-20 Thread Christopher Done
On 20 August 2010 11:43, Duncan Coutts duncan.cou...@googlemail.com wrote:
 On 20 August 2010 10:18, Christopher Done chrisd...@googlemail.com wrote:
 Does Cabal have a way to produce binary distributions from a package?

 No but it's not too hard to do.

 If you actually want an RPM or a DEB etc, then look into the cabal2rpm
 etc tools, they help automate the process.

Thanks, I hadn't seen this! It's ideal for my specific use case. :-)

 If you want a generic binary then:

 You first prepare an image, but using:

 cabal copy --destdir=./tmp/image/

 Now you tar up the image directory, unpack it on the target.

 Note that the prefix/paths you specified at configure time need to be
 the same on the target machine. There is no support yet on unix for
 relocatable / prefix independent binaries. In particular it needs the
 paths to be correct to be able to find data files.

Hmm, this is okay for me in this particular case anyway as I'm just
giving a distribution to the production admins who then unpack it,
i.e. I know the configuration of the target machine.

 Right, config files you should just look in a per-user or global
 location. You can use a data file to store a default so that the
 program can work with no config file.

Seems reasonable when someone else says it. Wasn't sure if there might
be a standard API for dealing with this. Thus far I've been relying on
a --config=PATH argument to the program. I suppose a combination
thereof encompasses most use cases.

On 20 August 2010 18:25, John MacFarlane j...@berkeley.edu wrote:
 Do you know about getAppUserDataDirectory in System.Directory?

Thanks, I'd forgotten about that.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Creating binary distributions with Cabal

2010-08-20 Thread Christopher Done
Hey autopackage looks swish! WiX also looks like a nice, more native
solution for Windows. Cheers!

On 20 August 2010 11:36, Magnus Therning mag...@therning.org wrote:
 On Fri, Aug 20, 2010 at 10:18, Christopher Done
 chrisd...@googlemail.com wrote:
 Does Cabal have a way to produce binary distributions from a package?

 I need to create a binary distribution of my project which does not
 depend on GHC or any development tools. The package should include all
 required data files and configuration files. I've got the latter
 covered with Data-Files and getDataFileName, but not sure about what
 to do regarding configuration files -- read/write to
 $HOME/.myproject/config or $HOME/.myprojectrc, etc., or what?

 I'm specifically targeting Redhat because that's the production
 server, but I'm wondering if there is or will be a way to agnostically
 access data files and configuration files without having to think
 about what OS it will be running on, in the same way I can use sockets
 or file access without worrying about the particular OS.

 Something like cabal sdist --binary --rpm/deb/arch/win/etc?

 How does everyone else package up their Haskell programs for binary
 distribution?

 This is what package managers like rpm, dpkg, pacman, etc shines at.  So for
 Distribution for Linux that's what I suggest you use.  For Windows you'd
 probably have to hook things up to some installer-generator (WiX[1] maybe?).

 Other options are autopackage[2] and zeroinstall[3].

 /M


 [1] http://wix.sourceforge.net/
 [2] http://www.autopackage.org/
 [3] http://zero-install.sourceforge.net/
 --
 Magnus Therning                        (OpenPGP: 0xAB4DFBA4)
 magnus@therning.org          Jabber: magnus@therning.org
 http://therning.org/magnus         identi.ca|twitter: magthe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Changing my Profile

2010-08-23 Thread Christopher Done
I don't know about doing it at the server side.

I've been trying to setup the right filters and quick links in my
GMail to filter out emails I'm not interested. I'd like to recieve
*all* emails, but be able to filter out the ones I'm not interested in
so I never see them again.

I tried an Uninteresting (for my taste) tag and then searching by
-label:uninteresting. This kinda works, but it's unpredictable. It
will filter out some conversations, but it seems not to filter out
others labelled Uninteresting. If I open the offending conversation
and unlabel it, then label it Uninteresting again, and then go back to
my search results, and refresh, it goes from the list. But having to
do it manually kind of defies the point. I don't want to have to deal
with messages I'm not competent to understand nor/or interested to
bother to read.

Any suggestions would be appreciated.

On 23 August 2010 19:35, David Webster dwwebste...@gmail.com wrote:
 Is there any way to change my profile or signup options so that I don't get
 CC'ed on every posting to Haskell-Cafe?

 David
 ___
 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] TryHaskell in the classroom!

2010-09-04 Thread Christopher Done
On 4 September 2010 02:02, Fritz Ruehr fru...@willamette.edu wrote:
 I just wanted to send out a more public Thanks! to Chris Done for the
 tryhaskell.org website and to everyone else
 (including Chris) who was on the #haskell channel of IRC this afternoon when
 I tried haskell, along with the chat feature,
 during my introductory functional programming class.

Glad to hear it! This is an ideal scenario for Try Haskell! Thanks for using it!

On 4 September 2010 02:11, Benjamin L. Russell dekudekup...@yahoo.com wrote:
 I have also enjoyed using Try Haskell.  It would be wonderful if it
 could be expanded with more content.  Many thanks to the developers for
 their efforts!

Community contributed lessons are welcome! I'll be adding some hpaste
integration too. A markdown format like the below should be
sufficient:

Title: Example
Message:

Here is a message about integers! Here are some numbers:

23^75
23/52

Enter a number like `23`.

Title: Well done
Type-Trigger: Num t = t
Value-Trigger: 23
Message:

Great, you typed %value% and it has type %type%.

Etc.

And so on. Until I write a tutorial composer.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANNOUNCE: Haddock version 2.8.0 - HTML vs. XHTML

2010-09-06 Thread Christopher Done
On 6 September 2010 17:11, Mark Lentczner ma...@glyphic.com wrote:
 On Sep 6, 2010, at 2:40 AM, Henning Thielemann wrote:
 ... focusing on a small set of assumed popular browsers ...

 I didn't want to assume either. I ran a survey of the Haskell community and 
 got over a 150 responses.

 On Sep 6, 2010, at 2:40 AM, Henning Thielemann wrote:
 and complying to their quirks is the wrong way.

 I believe the only sop to browser quirks in the current Haddock output are 
 three lines of CSS that came from YUI 3: CSS Fonts [2] to achieve consistent 
 font sizing in IE. These are well researched and minimal.

Speaking as someone who worked at a company where we had to write 100%
valid XHTML and CSS for *non-trival* designs (groans at the
recollection), generally for fairly simple documents you can write
standard compliant web pages with (X)HTML/CSS/JavaScript and it will
render the same on Firefox/Chrome/Safari/Opera/IE8. It will probably
work but look less fancy on IE6 if it's simple. If other browsers
don't render correctly, that's not your problem. Regarding font
sizing, you shouldn't really have to care about the size of the font.
If your page renders differently on different browsers due to
different font settings, that's because the user/browser chose that
font set. Why do you care about consistent font sizes?

Personally I'm pragmatic, I don't care about W3C validation, I do care
about standards and accessibility. If your page is semantic,
usable/accessible across the major browsers then you've done a great
job and W3C validation is just a pat on the back. I think it's a
matter of priorities. If we're going to appeal to authority, Google
see it fit to start using HTML5 straight away (and they really care
about validity) and (I was told at the Zurich Google offices by
someone who works on YouTube) that we have no business sending XHTML
to web browsers. But I don't see the particular mark-up as a Big Deal
like others do, when (as I demonstrate below) there are more important
issues to deal with that most people don't get right.

 As I did the work on Haddock, I tested the results on five browser/os 
 combinations on my own machines, and about 30 browser/os combinations via 
 browsershots[1].

FWIW there's a great web site that provides screenshots of IE
immediately: http://ipinfo.info/netrenderer/ Don't waste your time on
obscure browsers. You have better things to be doing.

 There were a few times where I tried something (usually a choice of markup 
 and CSS) that looked nice in WebKit browsers (Safari and Chrome), but didn't 
 work in Firefox or others. In those cases I retreated to other approaches. A 
 notable example is the Portability box in the upper right. I wanted that to 
 be a dl list, and could get it to style nicely in all browsers except Firefox 
 on Linux! I retreated to a table in that case. Since both the thing I tried 
 and the result were valid markup and CSS, I'm hoping you won't consider this 
 a major concession to quirks.

I'd like to see such cases of inconsistency between Webkit and Firefox
(on Linux), I can help out if you're having trouble. You want to do
the portability box as a definition list? For semantic meaning and
search engines, there should be one h1 in the page, many h2's, and
subheadings, etc. A really easy way to check your site's quality as a
structured document is by rendering it without CSS or JavaScript,
because it can make you aware of problems immediately:

http://i.imgur.com/7ksCW.png

There's no h1, what's the title of this page? The h2s have been
written as h1's, and the contents, title and description aren't
headings at all. The portability table is done with tds (table *data*)
with no th's (table *heading*) and there's no actual description for
the table. Headings are useful for navigating the document -- this is
how blind people work in a browser, they get a list of headings and
tab through it quickly (I have a reference study for this, I'll find
it if you're interested). Just think about what are the main points of
this document and the way to code it comes naturally. Like I said,
you're priority has been cross-platform and validation but basic
things like semantic document structure have been overlooked.

Anyway, I think you're doing a sterling job and you seem to really
care about doing it right, good job! It looks really nice, gives a
professional sheen to Haskell's documentation. I know you need to
build up a thick skin to deal with all the bikeshed-like criticism
that always seems to crop up when web sites are discussed. Don't worry
about my criticisms, I'm constructive about it! If you care about this
stuff then I'll put my money where my mouth is and send some patches
to address whatever I think could be improved, you don't have to lift
a finger. If you're not really bothered then disregard all my above
comments and just imagine I said awesome design, good job!
___
Haskell-Cafe mailing list

Re: [Haskell-cafe] Unified Haskell login

2010-09-19 Thread Christopher Done
OpenID sounds like a plan. I'll probably add OpenID support to
hpaste.org for management over pastes/remembering user details/default
language, tracking annotations of your pastes, etc. We already have an
OpenID Haskell implementation. Programming sites are already using it
(Google, StackOverflow), we should follow suite.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Web development work

2010-09-19 Thread Christopher Done
FWIW we're still looking for web programming Haskellers at CREATE-NET!

http://www.haskell.org/pipermail/haskell-cafe/2010-September/083550.html

On 16 September 2010 09:52, Michael Snoyman mich...@snoyman.com wrote:
 Hi all,

 Often times when trying to pitch Haskell to potential clients the
 concern is the lack of qualified developers willing to take on
 projects. As I'm sure many of you are familiar with, clients prefer
 not to be locked in to a single programmer: an errant bus can
 significantly reduce the value of their investment.

 So I'd like to get an idea of how many people out there would be
 interested in Haskell web development work. For the moment I'm just
 interested in doing this informally via email, though perhaps in the
 future it would be beneficial to the community to have this
 information centralized on a website. I think it would be useful to
 have some basic skills and experience information, including system
 administration abilities.

 I might also have one or two Yesod projects that I'll need to pass off
 in the future, though it's still unclear if this will happen. If
 you're interested in that, please let me know, I can give some more
 details privately.

 Michael
 ___
 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] Can't make a derived instance of `Typeable (A B)': `A' has arguments of kind other than `*'

2010-09-24 Thread Christopher Done
Suppose I have a data type:

data A f = A { a :: f Integer }

why can't I derive a Typeable instance like so?

deriving instance Typeable (A Maybe)

I get:

Can't make a derived instance of `Typeable (A Maybe)':
  `A' has arguments of kind other than `*'
In the stand-alone deriving instance for `Typeable (A Maybe)'

I would have expected that the arguments are instantiated by the Maybe
type constructor and thus the type of A would be:

Maybe Integer - A

What am I missing?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: Can't make a derived instance of `Typeable (A B)': `A' has arguments of kind other than `*'

2010-09-24 Thread Christopher Done
Just for what it's worth, the following does work:

newtype AMaybe = AMaybe { unMaybe :: A Maybe }
deriving instance Typeable AMaybe

Which leads me to be kind of baffled by the above error message.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: Can't make a derived instance of `Typeable (A B)': `A' has arguments of kind other than `*'

2010-09-24 Thread Christopher Done
Actually I suppose the newtype one makes sense because it's opaque and
not paramerized so it doesn't inspect the unMaybe. I'll think about
this some more.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: Can't make a derived instance of `Typeable (A B)': `A' has arguments of kind other than `*'

2010-09-24 Thread Christopher Done
On 24 September 2010 22:18, Christopher Done chrisd...@googlemail.com wrote:
    Can't make a derived instance of `Typeable (A Maybe)':
      `A' has arguments of kind other than `*'
    In the stand-alone deriving instance for `Typeable (A Maybe)'

Nevermind, I figured it out. The arguments refer to the type
constructor A. I'll think some more before posting a thread next time.
Ciao!
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Web application framework comparison?

2010-09-28 Thread Christopher Done
Hmm. Maybe we should sort this out. It's incomplete. The Web category
is sporadic: http://www.haskell.org/haskellwiki/Category:Web

Supposing we made a Web/Foo namespace and got some proper hierarchy.
Of interest to most people are:

* What can I do?
* How can I do it?
* Who has already done it?
* Why did they do it like this?
* What needs doing?
* How up to date is all this information?

Our discussions here, on IRC and on web-devel should really be
documented. It should be that whenever we create or discover something
substantial for web dev we should document it with examples on the
Wiki. There isn't much centralised comparison of frameworks and
libraries, either. One could make a table of frameworks/libraries and
their features a la Wikipedia does. I don't know many frameworks but
other people can fill the holes in.

http://haskell.org/haskellwiki/Web is a good start, as is
http://haskell.org/haskellwiki/Applications_and_libraries/Web_programming
for examples

http://www.haskell.org/haskellwiki/Formlets is also a good example of
giving examples of a library. It's nice to link to some blog or
external page but those disappear or lose relevance/compatibility over
time, whereas a Wiki remains, and anyone can update it. For this
reason I think it's a good idea for us to put work into the wiki.

I'll reformat the entire Web category (immutably! I'll do it in
Web/..) as a proposal, see what you guys think.

Cheers

On 27 September 2010 09:24, Jasper Van der Jeugt jasper...@gmail.com wrote:
 Hey Dave,

 You should check out this page (if you haven't already):
 http://haskell.org/haskellwiki/Web

 Cheers,
 Jasper

 On Sun, Sep 26, 2010 at 8:41 PM, Dave Hinton beaker...@googlemail.com wrote:
 There are 179 packages in the Web category on Hackage.

 It am finding it difficult, as someone who is not familiar with any of
 the Haskell web application frameworks on Hackage (and there seem to
 be at least 9), to determine which are good quality, which do things I
 would like a web framework to do for me, and which insist on doing
 things I would rather do myself.

 Is there a page comparing the major frameworks somewhere? I've been
 unable to find one via Google.
 ___
 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] Web application framework comparison?

2010-09-28 Thread Christopher Done
On 28 September 2010 13:15, Michael Snoyman mich...@snoyman.com wrote:
 +1. I did the rewrite of the /Web wiki page to try to make it more
 accessible. If you have a better format and want to move some of that
 content around, feel free to do so. Also, if you need any content or
 other assistance, please let me know.

Yeah, the /Web page is good stuff. The dates are especially a good
idea! I want to flesh out the TODOs and re-shuffle some bits. I think
the lists could be made into tables. The site's stylesheet doesn't
really help.

 I think we need to improve our image on the wiki.

Agreed. Hopefully the new wiki will be rolled out soon. The current
style sheet is printable. It kinda makes every page look like a dead
site.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


  1   2   3   >