Re[2]: [Haskell-cafe] Type system madness

2007-07-13 Thread Bulat Ziganshin
Hello Andrew,

Thursday, July 12, 2007, 10:15:00 PM, you wrote:
 While BOMs (Byte Order Mark) are pretty irrelevant to byte-oriented
 encodings like UTF-8, I think programs that fail on their presence can
 be considered buggy.
   

 Yay! Haskell's text I/O system is buggy. :-P

definitely. for example, on windows it doesn't support unicode
filenames nor files bigger than 4gb, so i use my own lib, a thin layer
around Windows API


-- 
Best regards,
 Bulatmailto:[EMAIL PROTECTED]

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


Re: [Haskell-cafe] Newbie question about tuples

2007-07-13 Thread Lukas Mai
Am Donnerstag, 12. Juli 2007 20:14 schrieb Andrew Coppin:

 The only thing the libraries provide, as far as I can tell, is the fact
 that tuples are all Functors. (In other words, you can apply some
 function to all the elements to get a new tuple.) I think that's about
 it. I doubt you can use that to define lifting functions...

Actually, they aren't (Functors). (,) takes two type arguments, (,,)
takes three, etc.  class Functor f requires f to take one type argument.
So something like

  instance Functor (,) where ...

won't compile. Besides, what should fmap (+1) (3, 4, foo) do?

(Somewhere in the libraries there is an
instance Functor (,) a where fmap f (x, y) = (x, f y)
but that's probably not what you expected.)

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


[Haskell-cafe] Re: Defaulting to Rational [was: Number overflow]

2007-07-13 Thread Jon Fairbairn
Henning Thielemann [EMAIL PROTECTED] writes:

 On Thu, 12 Jul 2007, Jon Fairbairn wrote:
  (ie limited precision, but unbounded magnitude). If we were
  to use BigFloat the base would need to be a power of ten to
  get the desired results for things like Don's example)
 
 People will be confused, that 'sin pi' won't lead to a result since the
 correct result is zero and it will need forever to normalize that number.

Surely the first few digits can be computed? I thought
sin pi was a computable numer, anyway. Note that in my
representation I didn't specify what form the small part
would take; I'm not sufficiently familiar with computing on
proper reals to know the best choice for that, but as I
undestand it, once we reach the point of showing a number to
a finite precision, we /can/ compute the necessary digits.

 They will be confused, that the result of 'sqrt 2 ^ 2' cannot be shown in
 usual decimal notation, since the formatting algorithm cannot decide
 between starting with 2. and 1..

Again, if it's being shown to finite precision, it can look
at the next digit after the last one to be shown and use
that to decide what to start with.  There's no reason why
show should be defined to truncate rather than defined to
round after the last digit, is there?

 In short, the Real number type will leed to all
 difficulties known from computable reals.

All the real ones, anyway :-).

-- 
Jón Fairbairn [EMAIL PROTECTED]

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


RE: [Haskell-cafe] Functional dependencies *not* part of the next Haskell standard?

2007-07-13 Thread Simon Peyton-Jones
| I think the implementation is some 90% complete though, in GHC head.
| Certainly you can write many associated types programs already -- the
| missing part is finishing off associated type synonyms, iirc.

...and we have a working implementation of that too, thanks to Tom Schrijvers.  
It's not in the HEAD yet, but it will be in a few weeks.

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


Re: [Haskell-cafe] Type system madness

2007-07-13 Thread Ketil Malde
On Thu, 2007-07-12 at 19:15 +0100, Andrew Coppin wrote:

  While BOMs (Byte Order Mark) are pretty irrelevant to byte-oriented
  encodings like UTF-8, I think programs that fail on their presence can
  be considered buggy.

 Yay! Haskell's text I/O system is buggy. :-P

Works for me, but feel free to file a bug or provide a more specific
report.

-k

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


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Jules Bean

Jim Burton wrote:

Very timely! It's sad that haskell-cafe has so much noise now.


I disagree with that characterisation. I don't mean to be pedantic, but 
I don't think haskell-cafe has lots of noise. I think it has lots of 
signal! Quite different.


We don't have a problem (in my perception, at least) with the quality of 
either posts of responses. Not a general one, anyway. The only problem 
is that the volume is increasing; which is a problem if that makes it 
hard for valuable contributors to keep contributing.


 As well as being nice, can't you sometimes tell people to RTFM?

The problems people have with haskell are often conceptual, and the 
manual doesn't help them, because they don't (yet) understand the 
language well enough to understand the manual.


I very, very rarely see a question here about 'how to use a library 
funciton' or similar which could, in fact, be easily looked up in a 
manual. People do quite often respond to posts with links to the online 
library documentation, which is great.


 Or, You've asked that before,

That's certainly a fair thing to say, if it's true. I don't see that 
happening very often.


 One way of protecting the community is to protect this list from drowning
 in noise and being a bit rough with newbies who don't do any research at
 all before asking is perfectly acceptable in my view.

I disagree with that on two separate levels:

(a) I don't think being rough with newbies is the right response.
(b) I also don't think it would achieve the goal you state. Being rough 
with one newbie will not, in my experience, particularly prevent the 
next question asked by the next newbie :)


All IMHO, obviously.

Jules


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


[Haskell-cafe] RE: Maintaining the community

2007-07-13 Thread Jim Burton



Simon Peyton-Jones wrote:
 
 [...]
 We need at least one forum in which it's acceptable to ask anything, no
 matter how naive, and get polite replies.  (RTFM isn't polite; but The
 answer is supposed to be documented here (\url); let us know if that
 doesn't answer your qn is fine.)   I'd be sorry to lose that.
 

I fully agree and I don't mean RTFM literally. The answer is supposed to be
documented here (\url)... is a very acceptable form of it...one can be
brisk without being rude and I'm always grateful when someone points me in
the direction of the right manual - if it's currently beyond my ken and I
need to read something else first then that's my problem. I'm not going to
waste your time by expecting you to read it for me and give quick answers to
deep questions.
-- 
View this message in context: 
http://www.nabble.com/Maintaining-the-community-tf4071917.html#a11577502
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

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


Re: [Haskell-cafe] Very freaky

2007-07-13 Thread Philip Armstrong

On Thu, Jul 12, 2007 at 10:11:07PM +0100, Andrew Coppin wrote:

Felipe Almeida Lessa wrote:

On 7/12/07, Andrew Coppin [EMAIL PROTECTED] wrote:

How come the set of all sets doesn't exist?


http://www.google.com/search?q=set+of+all+sets
leads to http://en.wikipedia.org/wiki/Set_of_all_sets which has the
answer, I think.


Ouch.

Clearly, set theory is way more complicated than people make out. (I always 
thought a set was just a collection of objects...)


If a set is just a *finite* collection of objects, then things are
usually fairly straightforward. It's those pesky infinite sets that
complicate things...especially the ones which aren't constructible.

Phil

--
http://www.kantaka.co.uk/ .oOo. public key: http://www.kantaka.co.uk/gpg.txt
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell monads for newbies (was Functional dependencies *not* part of the next Haskell standard?)

2007-07-13 Thread D . V .

On 7/12/07, Andrew Coppin [EMAIL PROTECTED] wrote:


Monads take a while to get used to, but they're not so scary after that...


The problem with monads is that there is a gazillion tutorials to
explain them, each with their own analogy that works well for the
author but not necessarily for you.

It adds to the complexity of something that is indeed, not so
difficult after all.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Multiple instancing of functions with FFI

2007-07-13 Thread Ian Lynagh

Hi Darrell,

On Mon, Jul 09, 2007 at 05:48:47PM -0700, Lewis-Sandy, Darrell wrote:
 I am having trouble exporting multiple instances of a polymorphic function
 similar to the example in the Haskell 98 Foreign Function Interface 1.0
 addendum (page 6).  My specific code is below:

Thanks for the detailed bug report!

I've put it in the bug tracker here:
http://hackage.haskell.org/trac/ghc/ticket/1533
milestoned to be fixed in the next release, and also added a test to the
testsuite for it.

 foreign export stdcall addByte (+):: Int8-Int8-Int8
 foreign export stdcall addInt  (+):: Int16-Int16-Int16
 foreign export stdcall addLong (+):: Int32-Int32-Int32

In the mean time, as a workaround, you can use

addByte :: Int8-Int8-Int8
addByte = (+)
addInt  :: Int16-Int16-Int16
addInt  = (+)
addLong :: Int32-Int32-Int32
addLong = (+)

foreign export stdcall addByte addByte :: Int8-Int8-Int8
foreign export stdcall addInt  addInt  :: Int16-Int16-Int16
foreign export stdcall addLong addLong :: Int32-Int32-Int32


Thanks
Ian

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


RE: [Haskell-cafe] Newbie question about tuples

2007-07-13 Thread peterv
I'm beginning to see that my old implementation in C++ clutters my Haskell
design.

You see, in C++ I can write:

// A vector is an array of fixed-length N and elements of type T
templatetypename T, int N struct Vector 
{
  T Element[N];

  friend T dot(const Vector a, const Vector b)
  {
 T result = 0;
 for( int i=0; iN; ++i )
 {
result += a.Element[i] * b.Element[i];
 }
 return result;
  }
};

So basically a wrapper around a fixed-size array of any length.
Implementations of (+), (-), dot, length, normalize, etc... then work on
vectors of any size, without the overhead of storing the size, and with
compile-time checking that only vectors of the same size can be used, etc...
This also fits in nicely when creating a MatrixT,N,M class.

I don't think Haskell has something like a fixed-length array or constant
expressions that *must* be resolved at compile-time (like the N in the C++
template)? Or like Digital Mars D's static if statement (which is a
control-flow statement that *must* succeed at compile time)?

Tuples allow a different type for each element (they are more like
anonymous structs), so are not really suitable for what I want to do. 

Now in C++ when implementing this (together with fixed-size matrices), you
can get a lot of overhead because the code needs to compute many
intermediate results; it has a hard time to unroll all the loops (although I
think the latest compilers are much better). Now when implementing something
like this in Haskell, I would guess that its laziness would allow to
interleave many of the math operations, reordering them to be as optimal
as possible, removing many intermediate results (like processing streams).
So you would automatically get something like the C++ Expression Templates
http://ubiety.uwaterloo.ca/~tveldhui/papers/Expression-Templates/exprtmpl.ht
ml... Well at least I hope so :) 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Lukas Mai
Sent: Friday, July 13, 2007 09:20
To: haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] Newbie question about tuples

Am Donnerstag, 12. Juli 2007 20:14 schrieb Andrew Coppin:

 The only thing the libraries provide, as far as I can tell, is the fact
 that tuples are all Functors. (In other words, you can apply some
 function to all the elements to get a new tuple.) I think that's about
 it. I doubt you can use that to define lifting functions...

Actually, they aren't (Functors). (,) takes two type arguments, (,,)
takes three, etc.  class Functor f requires f to take one type argument.
So something like

  instance Functor (,) where ...

won't compile. Besides, what should fmap (+1) (3, 4, foo) do?

(Somewhere in the libraries there is an
instance Functor (,) a where fmap f (x, y) = (x, f y)
but that's probably not what you expected.)

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

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.10.4/898 - Release Date: 12/07/2007
16:08
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.10.4/898 - Release Date: 12/07/2007
16:08
 

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


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Claus Reinke

As we sit here riding the Haskell wave:

   http://www.cse.unsw.edu.au/~dons/tmp/cafe.png

with nearly 2000 (!) people reading haskell-cafe@, perhaps its time to
think some more about how to build and maintain this lovely Haskell
community we have. 


my replies to some of the issues raised in this thread:

- gmane.org is great. i still read my main mailing lists via a mail reader,
   but i read some lists i follow less thoroughly via gmane's news 
   interface, and people often refer to gmane's web interface if they

   want to refer to whole threads rather than individual messages.
   no need to change the haskell.org setup - you can already choose!

- haskell-cafe is meant to be the general forum, that shouldn't change.
   but i think there is potential to spin off one or two more specialist
   lists (not too many, or they'll dry out, and not too specific, or they
   won't attract the haskell-cafe style of membership and content; we
   also do not want to start cross-postings to keep the synergies of
   a multitopic forum). 

   the most obvious one being 'haskell-performance' for shootout 
   entries, 'how do i improve this?', 'what is wrong here?', and 'why
   isn't haskell slow?' style of questions, profiling, spacetime leaks, 
   compiler benchmarks, optimizations, transformations, 
   representations, libs, tools, papers, etc. 

   another possible candidate, judging from mails and blog postings, 
   might be 'haskell-math', for numeric and algebra libs, apps, tools,
   classes, theory, and math-related algorithms and data structures, 
   and general discussions.


- with higher volume, the style of messages sometimes reminds me 
   more of newsgroup postings than of a mailinglist. but there are

   several hard-earned lessons from newsgroup experience:

   - don't try to police threads, unless you're willing to go to a
   fully moderated forum (which is exactly what -cafe isn't).
   it tends to be ineffective, and often counterproductive wrt
   to the general feel of the forum and the number of messages

   - you cannot manage volume by adding messages. there are
   only two things you can do with a thread you don't like:
   do not add to it, and ignore it

   - there are lots of faq, and it sometimes feels as if a question
   has just been answered when a newcomer asks it again!-)

   but unless you have a faq you can point to that comes
   very close to providing the answer, there is nothing you
   can do about that. the wiki is evolving, and i hope that
   the search engine fixes that have ben applied to robots.txt
   will ultimately make its contents easier to find. but if you
   want to avoid answering questions again and again on the
   list, you need to improve the cache of answers.

   personally, i tend to be more willing to answer questions
   on the list than to fiddle with wiki markup and conventions,
   but there is no reason why people who are happier with
   wiki editing cannot extract content from list answers to the
   wiki, especially if its a faq answer rather than a research
   result. memoization, organization and generation of answers
   do not all have to be done by the same set of persons.

   once there is a useful collection of faq answers, it should
   be made easier to find: the default signature of -cafe mails
   should be augmented to include pointers to:

   http://www.haskell.org/haskellwiki/Category:FAQ
   http://www.haskell.org/haskellwiki/Category:Glossary

   doing so should soon lead to useful results when googling
   for 'haskell faq', as well. note how one of these is rather 
   less exhaustive than one would expect, given the number 
   of faqs.. faq should include pointers to the list of mailing

   lists, the lists and repos of libraries, the language spec,
   list of tutorials, papers, tools, and implementations, and 
   to the guide about homework questions, among the 
   obvious technical answers.
   
   there is also the registration message, which could point
   to a wiki page dedicated to mailinglist newcomers and 
   their most likely information needs. which should be

   crosslinked with the faq answers.

well, enough additional traffic for now..:-)

claus

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


Re: [Haskell-cafe] Re: Maintaining the community

2007-07-13 Thread Philippa Cowderoy
On Fri, 13 Jul 2007, Dave Bayer wrote:

 As a newcomer I was stunned that this otherwise very sophisticated 
 community was using an email list rather than a bulletin board. The 
 shear torrent of email was impacting my mail program performance.
 

This is a cultural thing, and assuming that it's a lack of sophistication 
on our part is a bad idea - on the contrary, some of the better reasons to 
avoid a web-based board are entirely about enabling sophistication.

Boards need polling. Boards force a single user interface on everyone. 
Boards don't enable local archives. Etc etc etc. With mail, you can pick a 
client to suit your needs.

 A bulletin board has the capabibility to evolve, e.g. into multiple 
 entry points.
 

So does a mailing list when you own the domain it's hosted on.

-- 
[EMAIL PROTECTED]

Sometimes you gotta fight fire with fire. Most
of the time you just get burnt worse though.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


RE: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Philippa Cowderoy
On Fri, 13 Jul 2007, Simon Peyton-Jones wrote:

 We need at least one forum in which it's acceptable to ask anything, no 
 matter how naive, and get polite replies.  (RTFM isn't polite; but The 
 answer is supposed to be documented here (\url); let us know if that 
 doesn't answer your qn is fine.)  I'd be sorry to lose that.
 

Agreed. That said, it might be worth developing a scary maths FAQ that's 
an explanation largely of why all the maths and why it may irritate a lot 
of people to get in a flap about it all. It seems to come up increasingly 
often, and... well, it's not just the community being elitist or shutting 
people out!

-- 
[EMAIL PROTECTED]

The task of the academic is not to scale great
intellectual mountains, but to flatten them.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] AngloHaskell 2007, dates and venue confirmed

2007-07-13 Thread Neil Mitchell

Hi,

We are pleased to announce AngloHaskell 2007

http://www.haskell.org/haskellwiki/AngloHaskell

Dates: 10th-11th of August (Friday-Saturday)
Location: Cambridge, with talks at Microsoft Research on Friday

All the details are on the wiki page, along with free registration.
Everyone is invited, we will have a day of talks at MSR, then a day of
other activities. There will be plenty of chance for general
discussions on anything.

If anyone in Cambridge is able to accommodate a few people for the
Friday or Saturday night, please add your name to the wiki, and accept
our thanks in advance. All that is needed is floor space.

Thanks

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


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Donald Bruce Stewart
claus.reinke:
 
personally, i tend to be more willing to answer questions
on the list than to fiddle with wiki markup and conventions,
but there is no reason why people who are happier with
wiki editing cannot extract content from list answers to the
wiki, especially if its a faq answer rather than a research
result. 

I've got a few tools that make wiki editing easier (shortcuts to open up
a new wiki page for editing in vim, syntax highlighting, console
access). These make wiki editing roughly as cheap as composing an email.

I tried an experiment this week of just taking someone's post (Conor's idiom
brackets), and putting directly on the wiki first, then letting the
author know that's happened.

How do people feel about allowing posts in -cafe to be placed on the
wiki, without extensive prior negotiation? What copyright do -cafe@
posts have?

If there was a rough consensus that this is ok, we could probably get a
lot more material directly on the wiki, since I for one would act first,
putting some interesting Clause Reinke posts there semi-verbatim, rather
than pondering whether to write an email to the author to seek
permission, or cojole them into doing it.

Should we feel free to put mailing list material onto the wiki?

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


Re: [Haskell-cafe] Newbie question about tuples

2007-07-13 Thread Jonathan Cast
On Friday 13 July 2007, peterv wrote:
 I'm beginning to see that my old implementation in C++ clutters my Haskell
 design.

 You see, in C++ I can write:

 // A vector is an array of fixed-length N and elements of type T
 templatetypename T, int N struct Vector
 {
   T Element[N];

   friend T dot(const Vector a, const Vector b)
   {
  T result = 0;
  for( int i=0; iN; ++i )
  {
 result += a.Element[i] * b.Element[i];
  }
  return result;
   }
 };

 So basically a wrapper around a fixed-size array of any length.
 Implementations of (+), (-), dot, length, normalize, etc... then work on
 vectors of any size, without the overhead of storing the size, and with
 compile-time checking that only vectors of the same size can be used,
 etc... This also fits in nicely when creating a MatrixT,N,M class.

 I don't think Haskell has something like a fixed-length array or constant
 expressions that *must* be resolved at compile-time (like the N in the C++
 template)?

I'm surprised no one has posted anything on type-level programming yet.  You 
might google for that.  And GHC 6.8 will have true type-level functions (with 
guaranteed termination, of course) which will help.  But I'm sure a good 
google will turn up a clearer explanation than I can provide; I've never 
needed or wanted to understand the type-level stuff.

Jonathan Cast
http://sourceforge.net/projects/fid-core
http://sourceforge.net/projects/fid-emacs
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: Re[12]: [Haskell-cafe] Toy compression algorithms [was: A very edgy language]

2007-07-13 Thread ajb
G'day.

Quoting Bulat Ziganshin [EMAIL PROTECTED]:

 sorry, but you really misunderstand how PPM works and why it's so
 efficient.

I understand PPM.  I really do.

I think what you don't understand is why LZW does as well as it does
considering how simple it is.  It's because it's a poor but cheap
approximation to what PPM does.

Part of the misunderstanding is that you're looking at what PPM does
algorithmically, whereas I'm talking about what it's equivalent to
mathematically.  It turns out that pretty much all known text compression
algorithms are equivalent in the sense that they give the same
compression ration on the same text to within a (possibly large)
constant factor.

BZip, for example, gives a compression ratio that's almost always
within 5% or so of the best PPM variants given an input text.  How
could that be, since they're so different?

The answer is that they're actually _not_ that different, mathematically
speaking.

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


[Haskell-cafe] Re: Maintaining the community

2007-07-13 Thread Dave Bayer
Claus Reinke claus.reinke at talk21.com writes:

 will ultimately make its contents easier to find. but if you
 want to avoid answering questions again and again on the
 list, you need to improve the cache of answers.

Bingo. On less technical forums, e.g. FlyerTalk, the do a search equivalent to
RTFM is rampant and people goal-tend without actually doing a test search to
find out if that search might not be coming up for some reason. Others say do a
search but demonstrate an effective keyword combination and the resulting
useful resource.

Here, the Wiki is fantastic but extraordinarily spotty (any healthy wiki will
always have much new growth, but the current gaps are surprising), and newcomers
like myself can and have been contributing to it.

If somehow the surge in Haskell Cafe interest could be harnessed to feed Wiki
content, that would be great. Something like I noticed the Wiki entry for list
comprehensions is just a stub, so I edited it to answer your question. Is the
answer clear? Your beginner perspective is invaluable; how can it be improved?

The only way to establish such a tradition is by example. I'll start giving it a
try.

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


Re: [Haskell-cafe] Re: Defaulting to Rational [was: Number overflow]

2007-07-13 Thread Jonathan Cast
On Friday 13 July 2007, Jon Fairbairn wrote:
 Henning Thielemann [EMAIL PROTECTED] writes:
  On Thu, 12 Jul 2007, Jon Fairbairn wrote:
   (ie limited precision, but unbounded magnitude). If we were
   to use BigFloat the base would need to be a power of ten to
   get the desired results for things like Don's example)
 
  People will be confused, that 'sin pi' won't lead to a result since the
  correct result is zero and it will need forever to normalize that number.

 Surely the first few digits can be computed?

That was my first thought, too.

We can't define

data Real = Real{
  wholePart :: Integer,
  fractionPart :: [Int]}

because you can't yield e.g. sin pi as an infinite list of digits, but you can 
define

data Real = Real{
  exponent :: Int,
  mantissa :: Int - [Int]}

where mantissa rounds the number when it's called.  But unless these can be 
memoized fairly well, I would expect performance to be *quite* surprising to 
new users. . .

 I thought 
 sin pi was a computable numer, anyway. Note that in my
 representation I didn't specify what form the small part
 would take; I'm not sufficiently familiar with computing on
 proper reals to know the best choice for that, but as I
 undestand it, once we reach the point of showing a number to
 a finite precision, we /can/ compute the necessary digits.

  They will be confused, that the result of 'sqrt 2 ^ 2' cannot be shown in
  usual decimal notation, since the formatting algorithm cannot decide
  between starting with 2. and 1..

 Again, if it's being shown to finite precision, it can look
 at the next digit after the last one to be shown and use
 that to decide what to start with.  There's no reason why
 show should be defined to truncate rather than defined to
 round after the last digit, is there?

  In short, the Real number type will leed to all
  difficulties known from computable reals.

 All the real ones, anyway :-).

Jonathan Cast
http://sourceforge.net/projects/fid-core
http://sourceforge.net/projects/fid-emacs
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Neil Mitchell

Hi


I tried an experiment this week of just taking someone's post (Conor's idiom
brackets), and putting directly on the wiki first, then letting the
author know that's happened.

How do people feel about allowing posts in -cafe to be placed on the
wiki, without extensive prior negotiation? What copyright do -cafe@
posts have?


If you email to a public mailing list, you clearly don't have a
problem with verbatim copying, since you already know its going to
appear in loads of different archives. You also don't have a problem
with selected copying, because quoting is how mailing lists work. I'd
just assume that all posts to haskell-cafe are for the good of
mankind, and then let them be reused at will.


Should we feel free to put mailing list material onto the wiki?


Yes!

Some people do email this list with disclaimers such as if this email
was not specifically addressed to you, and you accidentally remember
something from it, we reserve the right to lobotomise you at a future
date - but I think usually those are company policy rather than
personal choice.

Thanks

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


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Philippa Cowderoy
On Fri, 13 Jul 2007, Donald Bruce Stewart wrote:

 How do people feel about allowing posts in -cafe to be placed on the
 wiki, without extensive prior negotiation? What copyright do -cafe@
 posts have?
 

Currently, snagging the whole post for non-archive purposes isn't 
necessarily legit.

 If there was a rough consensus that this is ok, we could probably get a
 lot more material directly on the wiki, since I for one would act first,
 putting some interesting Clause Reinke posts there semi-verbatim, rather
 than pondering whether to write an email to the author to seek
 permission, or cojole them into doing it.
 

General is it okay if I put your interesting stuff up? permission works.

So does linking to existing archives.

-- 
[EMAIL PROTECTED]

There is no magic bullet. There are, however, plenty of bullets that
magically home in on feet when not used in exactly the right circumstances.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Lutz Donnerhacke
* Malcolm Wallace wrote:
 If anything, Usenet is even worse than mailing lists for volume,
 especially of spam.  Also, very few sites maintain their nntp servers
 adequately these days - e.g.  comp.lang.haskell has never made it to
 where I work.

I beg to differ. Of course, I'm an Usenet admin and involved in Usenet
administration since years.

Saing no Usenet is usually a sign of the famous not invented here
syndrom. I'd sugest to keep the 30+ years experience with large volume
distributed mass communication, instead of throwing good and infrastructure
and user interfaces away.

Wikis, Webformus and a lot of other Web 2.0 hypes are doomed to redo every
mistake which is solved since 20+ years.

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


Re: [Haskell-cafe] CGI test

2007-07-13 Thread Bjorn Bringert

On Jul 12, 2007, at 19:59 , Andrew Coppin wrote:


Hugh Perkins wrote:

...


Thanks for trying - but that doesn't actually work. (For starters,  
you need to prepend the HTTP status code to the data from the CGI  
script...)




Actually, as it turns out, the script I want to test needs to  
accept POST data, and the parsing is really quite complicated, and  
I want it to not crash out if I type the URL wrong, and...


Basically, the more I look at this, the more I realise that it  
really truely *is* going to be faster to just use a real web  
server. I thought I could just implement a tiny subset of it to get  
a working system, but it turns out the subset I need isn't so tiny...


Sorry guys.


As an earlier poster hinted, there is a version of Haskell Web Server  
that can run CGI programs:


http://www.cs.chalmers.se/~bringert/darcs/hws-cgi/

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


Re: [Haskell-cafe] HDBC-ODBC build/install problem.

2007-07-13 Thread Bjorn Bringert

On Jul 12, 2007, at 23:35 , Edward Ing wrote:


Hi,
I am trying to make HaskellDB work with HDBC-ODBC.
I did builds of HDBC/HDBC-ODBC. But when I am building
HaskellDB-HDBC-ODBC, I get the following message.

--
[1 of 1] Compiling Database.HaskellDB.HDBC.ODBC (
Database/HaskellDB/HDBC/ODBC.hs,
dist\build/Database/HaskellDB/HDBC/ODBC.o )
C:\Program Files\Haskell\HDBC-odbc-1.1.2.0\ghc-6.6.1/Database/HDBC/ 
ODBC/Connection.hi

Declaration for connectODBC:
 Failed to load interface for `Database.HDBC.ODBC.ConnectionImpl':
   Use -v to see a list of the files searched for.
Cannot continue after interface file error
--


From this, I know the problem is the linkage between

Database.HDBC.ODBC.Connection and Database.HDBC.ODBC.ConnectionImple.
(Also I looked at the code to see the reference.)

I did a little further investigation. I looked at the package registry
area (C:\Program
Files\Haskell\HDBC-odbc-1.1.2.0\ghc-6.6.1\Database\HDBC\ODBC) and
notice that ConnectionImpl.hi is not there.

I went back to the build directory and did find ConnectoinImpl.hi and
ConnectionImpl.o.
It seems like runghc Setup.hs install, did not install  
ConnectionImpl.hi.


I looked into the file named .installed-pkg-config and I saw this:


exposed-modules: Database.HDBC.ODBC
hidden-modules: Database.HDBC.ODBC.Connection
   Database.HDBC.ODBC.Statement Database.HDBC.ODBC.Types
   Database.HDBC.ODBC.Utils Database.HDBC.ODBC.TypeConv
import-dirs: C:\\Program Files\\Haskell\\HDBC-odbc-1.1.2.0\ 
\ghc-6.6.1
library-dirs: C:\\Program Files\\Haskell\\HDBC-odbc-1.1.2.0\ 
\ghc-6.6.1

hs-libraries: HSHDBC-odbc-1.1.2.0
extra-libraries: odbc32
--

No mention of ConnectionImple.hi. It looks like the setup up script
did not install ConnectionImpl.hi.

Did ConnectionImpl.o get bound into libHSHDBC-odbc-1.1.2.0.a even
though ConnectionImpl.hi did not get successfully installed?

Does anyone know why the install target does not install
ConnectionImpl.hi and how I can get around this problem?

(Where is the odbc32 to be found anyways?)


Here are a few things I did try which did NOT work:

1. Copy ConnectionImpl.hi over manually. HaskellDB-HDBC-ODBC builds,
but at runtime there is a link error.

2. Manually alter .installed-pkg-config to add ConnectionImpl.hi as
hidden module.

Please comment on why these would not work ( I will learn from this.)

Help would be appreciated.


Hi Edward,

the right approach would be to add it to other-modules in HDBC- 
odbc.cabal file, where it should have been all along. This is a bug  
in HDBC-odbc, I recommend that you send a patch to the maintainer.


Approach 1 doesn't work since that does not include the .o file in  
the installed .a archive.


Approach 2 doesn't work for several reasons, which exactly depend on  
what else you did, and which .installed-pkg-config file you changed.


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


RE: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Simon Peyton-Jones
|  Very timely! It's sad that haskell-cafe has so much noise now.
|
| I disagree with that characterisation. I don't mean to be pedantic, but
| I don't think haskell-cafe has lots of noise. I think it has lots of
| signal! Quite different.
|
| We don't have a problem (in my perception, at least) with the quality of
| either posts of responses. Not a general one, anyway. The only problem
| is that the volume is increasing; which is a problem if that makes it
| hard for valuable contributors to keep contributing

FWIW I agree with Jules's response here.  Yes, the traffic is increasing, but 
much of it is in long threads with multiple response, and email readers are 
good at letting you skip that if you don't want to read it.  Furthermore, we 
have the much-lower-bandwidth '[EMAIL PROTECTED]' list, for those who want to 
see announcements and discussion starters, but don't want the full haskell-cafe 
experience.

We need at least one forum in which it's acceptable to ask anything, no matter 
how naive, and get polite replies.  (RTFM isn't polite; but The answer is 
supposed to be documented here (\url); let us know if that doesn't answer your 
qn is fine.)   I'd be sorry to lose that.

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


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Jim Burton



Jules Bean wrote:
 
 Jim Burton wrote:
 Very timely! It's sad that haskell-cafe has so much noise now.
 
 I disagree with that characterisation. I don't mean to be pedantic, but 
 I don't think haskell-cafe has lots of noise. I think it has lots of 
 signal! Quite different.
 
 
I think you're right actually. I was exaggerating the problem due to having
woken up as a bad tempered spartan.


 [...]
 
   One way of protecting the community is to protect this list from
 drowning
   in noise and being a bit rough with newbies who don't do any research
 at
   all before asking is perfectly acceptable in my view.
 
 I disagree with that on two separate levels:
 
 (a) I don't think being rough with newbies is the right response.
 (b) I also don't think it would achieve the goal you state. Being rough 
 with one newbie will not, in my experience, particularly prevent the 
 next question asked by the next newbie :)
 
 All IMHO, obviously.
 
 Jules
 
 
You notice I said people who do no research at all? It might be unfriendly
and counter to the way things happen here, but I think the most helpful
response is to tell them to do some research.

-- 
View this message in context: 
http://www.nabble.com/Maintaining-the-community-tf4071917.html#a11577694
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

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


Re: [Haskell-cafe] Functional dependencies *not* part of the next Haskell standard?

2007-07-13 Thread Tom Schrijvers

| I think the implementation is some 90% complete though, in GHC head.
| Certainly you can write many associated types programs already -- the
| missing part is finishing off associated type synonyms, iirc.



...and we have a working implementation of that too, thanks to Tom
Schrijvers.  It's not in the HEAD yet, but it will be in a few weeks.


so it will be a part of 6.8? great news! afaiu, ATS, rather than AT,
is direct substitution for FD?


Functional dependencies desugar to indexed type families, an extension
of the original associated, in GHC head already. For the full story,
see the wiki page.

   http://haskell.org/haskellwiki/GHC/Indexed_types

which includes an example of porting functional dependencies to
associated types

   
http://haskell.org/haskellwiki/GHC/Indexed_types#A_associated_type_synonym_example


It's really simple to replace a functional dependency with a type 
function.


A class declaration

class C a b | a - b

becomes:

class FD a ~ b = C a b where
  type FD a

and an instance

instance C [x] x

becomes

instance C [x] x where
  type FD [x] = x

That's it: only class and instance declarations have to be modified.

Now you can start to drop dependent parameters, if you want.

There are a few examples in my slides as well (if you don't mind 
the pptx): http://www.cs.kuleuven.be/~toms/Research/talks/Tyfuns.pptx


Cheers,

Tom

--
Tom Schrijvers

Department of Computer Science
K.U. Leuven
Celestijnenlaan 200A
B-3001 Heverlee
Belgium

tel: +32 16 327544
e-mail: [EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Jules Bean

Malcolm Wallace wrote:

Yes, the sheer volume of posts is definitely becoming a problem (for me,
at least).  All your suggestions for keeping the community polite and
helpful are good.  But I wonder if there are also any useful technical
tips for users like myself, who would like to be able to keep up, but
feel they are gradually drowning?


Non-specific, I'm afraid, but technical advice:

Get a decent mailreader, and learn how to use it well. Spending two 
hours or so learning the keybindings/advanced features of your mail 
reader will pay itself back 100 times over.


Some people find that news readers are better than mail readers (really 
this is a feature of the programs, not the protocols; but they the 
programs tend to have different emphases). I believe the folks at gmane 
have setup a working two-way mail to news gateways for the haskell lists.


Most people find it good to have a threading feature. (A few people have 
broken email clients which break threads when they reply, fortunately 
not too many on this list. If you're one of them, please fix it!). 
Couple this with the ability to either 'really delete', or just 'hide' a 
thread from view if it's not interesting to you and you start to work 
through the volume.


It's stupid, but the the single feature that helps mail reading for me 
most of all is simply the fact that SPACE doubles up as 'page down in 
this email' and 'advance to next email in thread'. You can get through 
messages very fast this way.


I use thunderbird, FWIW. And I don't think it's a panacea, but it works 
for me. In the past I've used mutt with some success. The emacs-based 
mailreaders are very powerful, but you will need to spend some time 
learning the keys. There are plenty of other mail readers out there. 
(Mind you, some of them are truly dire).


Jules


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


[Haskell-cafe] Re: Maintaining the community

2007-07-13 Thread Dave Bayer
Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk writes:
 Yes, the sheer volume of posts is definitely becoming a problem (for me,
 at least).

As a newcomer I was stunned that this otherwise very sophisticated community was
using an email list rather than a bulletin board. The shear torrent of email was
impacting my mail program performance.

Then I chased somes repies leading to earlier threads, and found bulletin-board
stye access to our list at

http://thread.gmane.org/gmane.comp.lang.haskell.cafe/

I much prefer this access, even if I wish the window spit vertically rather than
horizontally.

A bulletin board has the capabibility to evolve, e.g. into multiple entry 
points.

Are there statistics on who reads which way? Posting stats should be obvious
with a little script, for anyone who still has a hoard of messagess at homne.

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


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Felipe Almeida Lessa

Besides traffic, which is something I'm quite used to (try to read the
Python mailing list), I think dons made a quite good point.

On 7/12/07, Donald Bruce Stewart [EMAIL PROTECTED] wrote:

That is, to help people progress from newbie, to intermediate, to
expert, and thus ensure the culture is maintained (avoiding `Eternal
September'). This graphic[1] sums the main issue up nicely, in my view:

http://headrush.typepad.com/photos/uncategorized/buildingausercommunity.jpg


I consider myself an intermediate-going-to-advanced Haskeller. I mean,
I can go on with my own legs most of time, even if that means to read
a couple of times some good papers on the subject, so I don't need to
ask lots of questions on the list. OTOH, I also rarely feel confident
to give some answer that I know. Mostly because I only *feel* that I
know -- however I'm not certain of that -- and sometimes because I
think that I can't give the complete answer -- so I leave it to
someone else.

So from now on I'll try to answer more times. But, anyway, that's a
big problem. I'm not the only one on this situation. And probably
there'll always be someone. Dons' tips are really nice (i.e.
necessary), but I wonder if they are sufficient.

Cheers,

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


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Dougal Stanton

On 13/07/07, Jim Burton [EMAIL PROTECTED] wrote:


As well as being nice, can't you sometimes tell people to RTFM? Or,
You've asked that before, or That's an FAQ, search the archive?


I suppose you could, but speaking as someone who doesn't know much but
tries to answer questions when he does know - I would feel put off
from answering questions in that case. If the easy questions become
second-class citizens, I would be less likely to answer them. I don't
want to give the impression that *I* am encouraging the degeneration
of the list.

So I would vote for only saying read the manual/FAQ/etc after the
question has been answered. (That being said, I can never find what
I'm looking for on the Haskell wiki; and as mentioned in other threads
Google doesn't index it. So finding the relevant answers can be
tricky.)

Cheers,

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


Re[2]: [Haskell-cafe] Functional dependencies *not* part of the next Haskell standard?

2007-07-13 Thread Bulat Ziganshin
Hello Simon,

Friday, July 13, 2007, 11:37:59 AM, you wrote:

 | I think the implementation is some 90% complete though, in GHC head.
 | Certainly you can write many associated types programs already -- the
 | missing part is finishing off associated type synonyms, iirc.

 ...and we have a working implementation of that too, thanks to Tom
 Schrijvers.  It's not in the HEAD yet, but it will be in a few weeks.

so it will be a part of 6.8? great news! afaiu, ATS, rather than AT,
is direct substitution for FD?


-- 
Best regards,
 Bulatmailto:[EMAIL PROTECTED]

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


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Jim Burton



Donald Bruce Stewart wrote:
 
 As we sit here riding the Haskell wave:
 
 [...]
 
 * Give tips on how to answer questions
 
 Answering politely, and in detail, explaining common
 misunderstandings
 is better than one word replies.
 
 
 * Adopt a near-zero-tolerance Be Nice policy when people answer
 questions
 
 We are very good here already, both on email and IRC.
 
 
Very timely! It's sad that haskell-cafe has so much noise now. I haven't
been around very long at all but it has gone downhill dramatically even in
the last 6 months (I think I could put a date on it but lets not get into
that). As well as being nice, can't you sometimes tell people to RTFM? Or,
You've asked that before, or That's an FAQ, search the archive? One way of
protecting the community is to protect this list from drowning in noise and
being a bit rough with newbies who don't do any research at all before
asking is perfectly acceptable in my view. It goes without saying that
everything you say about the quality of the help here is true but I don't
think you should treat us with kid gloves. 

-- 
View this message in context: 
http://www.nabble.com/Maintaining-the-community-tf4071917.html#a11576127
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

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


Re: [Haskell-cafe] Very freaky

2007-07-13 Thread Alexis Hazell
On Thursday 12 July 2007 22:57, Steve Downey wrote:
 Almost, I think. A functor is a mapping from the arrows, or morphisms,
 in a category to arrows in a category.

Oops, yes, indeed. Good catch, thanks. :-)


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


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Ian Lynagh
On Fri, Jul 13, 2007 at 09:35:09AM +0100, Malcolm Wallace wrote:
 
 Yes, the sheer volume of posts is definitely becoming a problem (for me,
 at least).

The Haskell lists are quite peculiarly named; the haskell@ list is
pretty much what would be haskell-announce@ anywhere else, and
haskell-cafe@ what would be haskell@ elsewhere. A haskell-cafe@ list
elsewhere would probably be where the haskell@ people discuss things
which aren't actually related to Haskell (like e.g. the demon.local
newsgroup). I think the number of posts in the wrong place would be
lower if these were more conventionally named (although there aren't a
lot of them anyway).

I think it would make sense to:

* Rename haskell@ to haskell-announce@, and redirect mails from haskell@
  to haskell-announce@ for some period.

* After that, rename haskell-cafe@ to haskell@ in a similar manner.

* At any point, create [EMAIL PROTECTED]
  This would have the advantage that people might not be so intimidated
  at making their first post here, and posts wouldn't be answered with
  category theory or scary type extensions.
  The disadvantages are that it makes an artificial barrier (when is
  someone ready to post to haskell@ instead?) and it doesn't split the
  discussion up by topic (if you want to see all the discussion about X,
  you need to follow both lists so you have the same amount of mail to
  read).
  I'm not sure if this is a good idea.

* At any point, create topic-specific lists, e.g. a list for discussion
  type system extensions (not sure if that's a good one, as often an
  extension is the /answer/ to a question how do I do foo?).
  This needs people to work out which lists would allow us to make a
  significant dent to the haskell-cafe traffic.


Thanks
Ian, also drowning

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


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Lutz Donnerhacke
* Magnus Therning wrote:
 One obvious solution is to split the list into several, more specialised
 lists.  It's far from obvious, at least to me, how to do that with this
 list though.

Switch to Usenet. The new haskell group will die, if the traffic will not
increase.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Magnus Therning
On Fri, Jul 13, 2007 at 09:35:09 +0100, Malcolm Wallace wrote:
[EMAIL PROTECTED] (Donald Bruce Stewart) writes:

 As we sit here riding the Haskell wave:
 
 http://www.cse.unsw.edu.au/~dons/tmp/cafe.png
 
 with nearly 2000 (!) people reading haskell-cafe@, perhaps its time to
 think some more about how to build and maintain this lovely Haskell
 community we have.

Yes, the sheer volume of posts is definitely becoming a problem (for
me, at least).  All your suggestions for keeping the community polite
and helpful are good.  But I wonder if there are also any useful
technical tips for users like myself, who would like to be able to keep
up, but feel they are gradually drowning?

One obvious solution is to split the list into several, more specialised
lists.  It's far from obvious, at least to me, how to do that with this
list though.

Personally I try to read the first post in every conversation thread.
If it doesn't grab be then I delete the whole thread.  Not an ideal
strategy, but it helps me keeping my day job ;-)

/M

-- 
Magnus Therning (OpenPGP: 0xAB4DFBA4)
[EMAIL PROTECTED] Jabber: [EMAIL PROTECTED]
http://therning.org/magnus


pgpwDnERALoFN.pgp
Description: PGP signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Malcolm Wallace
[EMAIL PROTECTED] (Donald Bruce Stewart) writes:

 As we sit here riding the Haskell wave:
 
 http://www.cse.unsw.edu.au/~dons/tmp/cafe.png
 
 with nearly 2000 (!) people reading haskell-cafe@, perhaps its time to
 think some more about how to build and maintain this lovely Haskell
 community we have.

Yes, the sheer volume of posts is definitely becoming a problem (for me,
at least).  All your suggestions for keeping the community polite and
helpful are good.  But I wonder if there are also any useful technical
tips for users like myself, who would like to be able to keep up, but
feel they are gradually drowning?

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


Re[12]: [Haskell-cafe] Toy compression algorithms [was: A very edgy language]

2007-07-13 Thread Bulat Ziganshin
Hello ajb,

Friday, July 13, 2007, 12:10:54 PM, you wrote:

 it seems that you either misunderstood PPM or make too wide
 assumptions.

 More likely I'm not explaining myself well.

 in classical fixed-order ppm each char probability
 found in context of previous N chars. i.e. when encoding abcdef..
 with order 3, 'd' encoded in context of 'abc', 'e' encoded in context
 of 'bcd' and so on

 Let's suppose that abcdef is a context in PPM, and we're starting from
 the start state (which usually isn't the case, of course).  Then to
 encode it, you encode the probability of finding an a in the start state,
 followed by the probability of finding a b in the a state, followed by
 the probability of finding a c in the ab state...

sorry, but you really misunderstand how PPM works and why it's so
efficient. it searches probability of each symbol in context of
previous N chars where N is fixed. lzw can be directly compared with
ppm modification you described here, but this modification isn't ppm
itself. also, because ppm encodes each symbol separately, making its
probabilities flat effectively disables compression - the key why flat
probabilities still work in lzw is that it encodes whole word with
this flat model


-- 
Best regards,
 Bulatmailto:[EMAIL PROTECTED]

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


Re: [Haskell-cafe] Functional dependencies *not* part of the next Haskell standard?

2007-07-13 Thread Jules Bean

Simon Peyton-Jones wrote:

| I think the implementation is some 90% complete though, in GHC head.
| Certainly you can write many associated types programs already -- the
| missing part is finishing off associated type synonyms, iirc.

...and we have a working implementation of that too, thanks to Tom Schrijvers.  
It's not in the HEAD yet, but it will be in a few weeks.



Excellent news!

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


Re: [Haskell-cafe] Functional dependencies *not* part of the next Haskell standard?

2007-07-13 Thread Donald Bruce Stewart
bulat.ziganshin:
 Hello Simon,
 
 Friday, July 13, 2007, 11:37:59 AM, you wrote:
 
  | I think the implementation is some 90% complete though, in GHC head.
  | Certainly you can write many associated types programs already -- the
  | missing part is finishing off associated type synonyms, iirc.
 
  ...and we have a working implementation of that too, thanks to Tom
  Schrijvers.  It's not in the HEAD yet, but it will be in a few weeks.
 
 so it will be a part of 6.8? great news! afaiu, ATS, rather than AT,
 is direct substitution for FD?

Functional dependencies desugar to indexed type families, an extension
of the original associated, in GHC head already. For the full story,
see the wiki page.

http://haskell.org/haskellwiki/GHC/Indexed_types

which includes an example of porting functional dependencies to 
associated types


http://haskell.org/haskellwiki/GHC/Indexed_types#A_associated_type_synonym_example

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


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Malcolm Wallace
Lutz Donnerhacke [EMAIL PROTECTED] wrote:

 Switch to Usenet. The new haskell group will die, if the traffic will
 not increase.

If anything, Usenet is even worse than mailing lists for volume,
especially of spam.  Also, very few sites maintain their nntp servers
adequately these days - e.g.  comp.lang.haskell has never made it to
where I work.

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


RE: [Haskell-cafe] Newbie question about tuples

2007-07-13 Thread peterv
 with guaranteed termination, of course

Just out of curiosity (not Haskell related): I always get confused when
people speak about guaranteed termination; what about the halting problem?
In which context can one check for guaranteed termination, as the halting
problem says it's not *generally* possible? 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jonathan Cast
Sent: Friday, July 13, 2007 16:21
To: haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] Newbie question about tuples

On Friday 13 July 2007, peterv wrote:
 I'm beginning to see that my old implementation in C++ clutters my Haskell
 design.

 You see, in C++ I can write:

 // A vector is an array of fixed-length N and elements of type T
 templatetypename T, int N struct Vector
 {
   T Element[N];

   friend T dot(const Vector a, const Vector b)
   {
  T result = 0;
  for( int i=0; iN; ++i )
  {
 result += a.Element[i] * b.Element[i];
  }
  return result;
   }
 };

 So basically a wrapper around a fixed-size array of any length.
 Implementations of (+), (-), dot, length, normalize, etc... then work on
 vectors of any size, without the overhead of storing the size, and with
 compile-time checking that only vectors of the same size can be used,
 etc... This also fits in nicely when creating a MatrixT,N,M class.

 I don't think Haskell has something like a fixed-length array or
constant
 expressions that *must* be resolved at compile-time (like the N in the C++
 template)?

I'm surprised no one has posted anything on type-level programming yet.  You

might google for that.  And GHC 6.8 will have true type-level functions
(with 
guaranteed termination, of course) which will help.  But I'm sure a good 
google will turn up a clearer explanation than I can provide; I've never 
needed or wanted to understand the type-level stuff.

Jonathan Cast
http://sourceforge.net/projects/fid-core
http://sourceforge.net/projects/fid-emacs
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.10.4/898 - Release Date: 12/07/2007
16:08
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.10.4/898 - Release Date: 12/07/2007
16:08
 

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


Re: [Haskell-cafe] Re: Maintaining the community

2007-07-13 Thread Jules Bean

Dave Bayer wrote:

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk writes:

Yes, the sheer volume of posts is definitely becoming a problem (for me,
at least).


As a newcomer I was stunned that this otherwise very sophisticated community was
using an email list rather than a bulletin board. The shear torrent of email was
impacting my mail program performance.


I find it incredibly surprising whenever I discover than an otherwise 
sophisticated community has adopted a bulletin board rather than email ;)





Then I chased somes repies leading to earlier threads, and found bulletin-board
stye access to our list at

http://thread.gmane.org/gmane.comp.lang.haskell.cafe/

I much prefer this access, even if I wish the window spit vertically rather than
horizontally.

A bulletin board has the capabibility to evolve, e.g. into multiple entry 
points.


Conversely, a bulletin board cannot be read offline, traps users into a 
single UI (in every case I've used, slow, ugly, and lacking in 
functionality) over which they have no control.


Modern email programs have sophisticated sorting, filtering, scoring, 
processes (not just the MUA, but other programs during the delivery 
chain of my emails score them and sort them); and they allow me to read 
messages while offline, search them locally, etc etc. They have 
customisable key bindings, they allow me to read all of my mailing lists 
in one place, they are scriptable, may support plugins... all of this 
under full user control.


Of course, having a bulletin board interface available for those who 
prefer it is a very nice thing.


Jules

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


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Thorkil Naur
Hello,

On Friday 13 July 2007 16:45, Ian Lynagh wrote:
 ...
 * At any point, create [EMAIL PROTECTED]
   This would have the advantage that people might not be so intimidated
   at making their first post here, and posts wouldn't be answered with
   category theory or scary type extensions.
   The disadvantages are that it makes an artificial barrier (when is
   someone ready to post to haskell@ instead?) 

Just an idea: How about haskell-first-post@ to encourage the second post to go 
to [EMAIL PROTECTED] Or is that too dictator-like?

   ...
   I'm not sure if this is a good idea. 

I'm not sure either ...

 ...

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


[Haskell-cafe] Re: Newbie question about tuples

2007-07-13 Thread Chung-chieh Shan
peterv [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in 
gmane.comp.lang.haskell.cafe:
 I don't think Haskell has something like a fixed-length array or constant
 expressions that *must* be resolved at compile-time (like the N in the C++
 template)? Or like Digital Mars D's static if statement (which is a
 control-flow statement that *must* succeed at compile time)?

Actually, Haskell can do it one better: you can have fixed-length arrays
whose length is known only at run time.  That is, you can have the
compiler check that you will only be adding arrays with the same length,
but find out what that length is (and pass it around non-redundantly) at
run time.  (You can encode the same idea, more verbosely, using generics
in Java and C#.)

Please see (among other work):
http://ofb.net/~frederik/vectro/
http://www.cs.rutgers.edu/~ccshan/prepose/
http://www.eecs.usma.edu/webs/people/okasaki/icfp99.ps

-- 
Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig
http://www.unaids.org/en/HIV_data/epi2006/
UNAIDS/WHO AIDS Epidemic Update: December 2006

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


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Jonathan Cast
On Friday 13 July 2007, Donald Bruce Stewart wrote:
 claus.reinke:
 personally, i tend to be more willing to answer questions
 on the list than to fiddle with wiki markup and conventions,
 but there is no reason why people who are happier with
 wiki editing cannot extract content from list answers to the
 wiki, especially if its a faq answer rather than a research
 result.

 I've got a few tools that make wiki editing easier (shortcuts to open up
 a new wiki page for editing in vim, syntax highlighting, console
 access). These make wiki editing roughly as cheap as composing an email.

 I tried an experiment this week of just taking someone's post (Conor's
 idiom brackets), and putting directly on the wiki first, then letting the
 author know that's happened.

 How do people feel about allowing posts in -cafe to be placed on the
 wiki, without extensive prior negotiation?

Well, anything /I/ write is OK. . .

 What copyright do -cafe@ 
 posts have?

Legally?  I'd imagine it's pretty restrictive; morally, I think we should 
encourage people to wave whatever rights they have (like with the wiki).

 If there was a rough consensus that this is ok, we could probably get a
 lot more material directly on the wiki, since I for one would act first,
 putting some interesting Clause Reinke posts there semi-verbatim, rather
 than pondering whether to write an email to the author to seek
 permission, or cojole them into doing it.

 Should we feel free to put mailing list material onto the wiki?

We should.  We may not, yet, but that should change.

Jonathan Cast
http://sourceforge.net/projects/fid-core
http://sourceforge.net/projects/fid-emacs
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


RE: [Haskell-cafe] Looking for final year project - using Haskell, or another functional language

2007-07-13 Thread Re, Joseph (IT)
I actually meant that simply as beyond opengl bindings, but added
'better' to make reference to Hugh's suggestion.  The website sure could
be better though ;)

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Claus Reinke
Sent: Thursday, July 12, 2007 7:23 PM
To: haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] Looking for final year project - using
Haskell,or another functional language



Building on what Hugh was getting at, beyond better opengl bindings,

i'm curious: just what do you think is missing in haskell's opengl
binding?

just be sure to ignore http://www.haskell.org/HOpenGL/ , which should be
moved to the wiki or to /dev/null. instead, look at the implementation,
mailing list and and api docs (which need to be read side-by-side with
the specs):

http://darcs.haskell.org/packages/OpenGL
http://www.haskell.org/mailman/listinfo/hopengl

 
http://www.haskell.org/ghc/docs/latest/html/libraries/OpenGL/Graphics-Re
ndering-OpenGL-GL.html

the mailing list has occasional progress info like this

http://www.haskell.org/pipermail/hopengl/2006-November.txt

Implement the entire opengl 1.3 interface specifications in Haskell.

 
http://www.haskell.org/ghc/docs/latest/html/libraries/OpenGL/Graphics-Re
ndering-OpenGL-GL-BasicTypes.html

This module corresponds to section 2.3 (GL Command Sytax)
of the OpenGL 2.1 specs.

claus

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


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


RE: [Haskell-cafe] Re: Newbie question about tuples

2007-07-13 Thread peterv
Super. This is really a great mailing list :)

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Chung-chieh Shan
Sent: Friday, July 13, 2007 16:54
To: haskell-cafe@haskell.org
Subject: [Haskell-cafe] Re: Newbie question about tuples

peterv [EMAIL PROTECTED] wrote in article
[EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe:
 I don't think Haskell has something like a fixed-length array or
constant
 expressions that *must* be resolved at compile-time (like the N in the C++
 template)? Or like Digital Mars D's static if statement (which is a
 control-flow statement that *must* succeed at compile time)?

Actually, Haskell can do it one better: you can have fixed-length arrays
whose length is known only at run time.  That is, you can have the
compiler check that you will only be adding arrays with the same length,
but find out what that length is (and pass it around non-redundantly) at
run time.  (You can encode the same idea, more verbosely, using generics
in Java and C#.)

Please see (among other work):
http://ofb.net/~frederik/vectro/
http://www.cs.rutgers.edu/~ccshan/prepose/
http://www.eecs.usma.edu/webs/people/okasaki/icfp99.ps

-- 
Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig
http://www.unaids.org/en/HIV_data/epi2006/
UNAIDS/WHO AIDS Epidemic Update: December 2006

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

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.10.4/898 - Release Date: 12/07/2007
16:08
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.10.4/898 - Release Date: 12/07/2007
16:08
 

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


Re: [Haskell-cafe] Newbie question about tuples

2007-07-13 Thread Jules Bean

peterv wrote:

with guaranteed termination, of course


Just out of curiosity (not Haskell related): I always get confused when
people speak about guaranteed termination; what about the halting problem?
In which context can one check for guaranteed termination, as the halting
problem says it's not *generally* possible? 


The simplest answer to that is 'rule out recursion'.

Mind you, that rules out an awful lot of important programs.

There are better answers involving restricting the kind of recursion you 
allow.


Google for 'total programming' and also for 'epigram'.

Jules

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


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Thorkil Naur
Hello,

On Friday 13 July 2007 17:08, Neil Mitchell wrote:
 Hi
 
   * At any point, create [EMAIL PROTECTED]
 This would have the advantage that people might not be so intimidated
 at making their first post here, and posts wouldn't be answered with
 category theory or scary type extensions.
 The disadvantages are that it makes an artificial barrier (when is
 someone ready to post to haskell@ instead?)
 
  Just an idea: How about haskell-first-post@ to encourage the second post 
to go
  to [EMAIL PROTECTED] Or is that too dictator-like?
 
 Why not [EMAIL PROTECTED], for people who aren't using Haskell to
 do things, but are working through tutorials.

The idea with haskell-first-post@ would be to make it extremely easy for 
people to select which list to post to. For example, with a learning list, 
I would be uncertain myself. Whether it would also be easy for answerers to 
figure out how to behave, I don't know. In any case, it is important (as 
others have also said) not to lose the situation that mixes new-comers with 
experts.

 A number of questions 
 relate directly to books such as SOE, and these could be easily
 answered there.
 
 Thanks
 
 Neil
 

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


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Neil Mitchell

Hi


 * At any point, create [EMAIL PROTECTED]
   This would have the advantage that people might not be so intimidated
   at making their first post here, and posts wouldn't be answered with
   category theory or scary type extensions.
   The disadvantages are that it makes an artificial barrier (when is
   someone ready to post to haskell@ instead?)

Just an idea: How about haskell-first-post@ to encourage the second post to go
to [EMAIL PROTECTED] Or is that too dictator-like?


Why not [EMAIL PROTECTED], for people who aren't using Haskell to
do things, but are working through tutorials. A number of questions
relate directly to books such as SOE, and these could be easily
answered there.

Thanks

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


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread brad clawsie
On Fri, Jul 13, 2007 at 02:30:49AM -0700, Jim Burton wrote:
 Very timely! It's sad that haskell-cafe has so much noise now. I haven't
 been around very long at all but it has gone downhill dramatically even in
 the last 6 months

just look for the date of my first post...

to improve the list, might i suggest

- push chatter to IRC

- take this service off of email entirely. try a web forum system (you
  may have to slum it and use php). i don't recommend nntp, that just
  forces us to use gmane since very few isps provide nntp now. a web
  forum would allow you to segment interest sections while retaining a
  global search etc. if you use code like slash, you can just moderate
  noise makers off the page. you can set up a yahoo group in ten minutes.

- just get used to noise if indeed you want haskell to grow in
  popularity. use digest-mode, read on gmane, or use client email
  filters to remove individual noise generators

- please don't split the lists, people will still just email cafe
  anyway, and it causes tension when a moderator-type continually asks
  them to take the issue to haskell-*

- in the worst case, get volunteer moderators to filter submissions to
  the list. this will reduce traffic dramatically but also remove the
  immediacy of direct email. a web forum would probably be easier.

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


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Conor McBride

Hi Don

On 13 Jul 2007, at 14:47, Donald Bruce Stewart wrote:

I tried an experiment this week of just taking someone's post  
(Conor's idiom

brackets), and putting directly on the wiki first, then letting the
author know that's happened.


Seemed entirely reasonable to me. If I have a spare moment, I might  
even finally get around to registering so I can add the other thing I  
usually bundle (for inserting effectful computations which don't  
contribute an argument to the main function).


 data Ig  =  Ig

 instance Idiomatic i f g  = Idiomatic i f (Ig - i x - g) where
   idiomatic fi Ig xi  = idiomatic (fi * xi)

so that   iI f a Ig (putStrLn Boo!) b Ii
isdo {a' - a; putStrLn Boo!; b' - b; return (f a b)}

If I'm writing for a mailing list, I'm certainly willing (if  
surprised) to be exploited in this way.


If there is any legalistic need for explicit permission, then we  
should have a permanent permission system on an opt-in basis, perhaps  
recorded in some suitable central and accessible place (like,  
erm, ...). I'm in.


Cheers

Conor

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


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Philippa Cowderoy
On Fri, 13 Jul 2007, brad clawsie wrote:

 to improve the list, might i suggest
 
 - push chatter to IRC
 

This is problematic for some kinds of techie chatter, where email makes it 
easier to get all the maths down.

 - take this service off of email entirely. try a web forum system (you
   may have to slum it and use php). i don't recommend nntp, that just
   forces us to use gmane since very few isps provide nntp now. a web
   forum would allow you to segment interest sections while retaining a
   global search etc. if you use code like slash, you can just moderate
   noise makers off the page. you can set up a yahoo group in ten minutes.
 

A global search might be an idea to add to our existing archives, 
otherwise I'm still not convinced.

-- 
[EMAIL PROTECTED]

Society does not owe people jobs.
Society owes it to itself to find people jobs.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Nicolas Frisby

Perhaps an information retrieval pipedream, but what if we attempted
an automated FAQ answerer? I'm sure some keywords pop-up often enough
in certain chunks of first posts (heterogenous lists, existential
error messages, SOE and graphics, category functor monad, etc). It
could respond with the standard links to the Wiki pages and research
papers.

Of course we would want to keep it on a leash for a while during
training and taming.

If we integrate it with the list, it might even belay the list
message, giving the user a chance to read its response before
selecting:
* not quite helpful, send to list anyway
* never send me this rubbish again
Or we could avoid such invasive methods all together and just
auto-post a rather comprehensive answer.

Just a neat thought -- and another potentially nifty and well-sought
tool written in Haskell.

On 7/13/07, Philippa Cowderoy [EMAIL PROTECTED] wrote:

On Fri, 13 Jul 2007, brad clawsie wrote:

 to improve the list, might i suggest

 - push chatter to IRC


This is problematic for some kinds of techie chatter, where email makes it
easier to get all the maths down.

 - take this service off of email entirely. try a web forum system (you
   may have to slum it and use php). i don't recommend nntp, that just
   forces us to use gmane since very few isps provide nntp now. a web
   forum would allow you to segment interest sections while retaining a
   global search etc. if you use code like slash, you can just moderate
   noise makers off the page. you can set up a yahoo group in ten minutes.


A global search might be an idea to add to our existing archives,
otherwise I'm still not convinced.

--
[EMAIL PROTECTED]

Society does not owe people jobs.
Society owes it to itself to find people jobs.
___
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] Maintaining the community

2007-07-13 Thread Nicolas Frisby

FYI, Gmail *can* kill threads, the Geniuses just deemed it unworthy of
a UI presence. This is news to me and related to earlier comments in
this thread. HTH

http://mail.google.com/support/bin/answer.py?hl=enanswer=47787

On 7/13/07, Nicolas Frisby [EMAIL PROTECTED] wrote:

Perhaps an information retrieval pipedream, but what if we attempted
an automated FAQ answerer? I'm sure some keywords pop-up often enough
in certain chunks of first posts (heterogenous lists, existential
error messages, SOE and graphics, category functor monad, etc). It
could respond with the standard links to the Wiki pages and research
papers.

Of course we would want to keep it on a leash for a while during
training and taming.

If we integrate it with the list, it might even belay the list
message, giving the user a chance to read its response before
selecting:
 * not quite helpful, send to list anyway
 * never send me this rubbish again
Or we could avoid such invasive methods all together and just
auto-post a rather comprehensive answer.

Just a neat thought -- and another potentially nifty and well-sought
tool written in Haskell.

On 7/13/07, Philippa Cowderoy [EMAIL PROTECTED] wrote:
 On Fri, 13 Jul 2007, brad clawsie wrote:

  to improve the list, might i suggest
 
  - push chatter to IRC
 

 This is problematic for some kinds of techie chatter, where email makes it
 easier to get all the maths down.

  - take this service off of email entirely. try a web forum system (you
may have to slum it and use php). i don't recommend nntp, that just
forces us to use gmane since very few isps provide nntp now. a web
forum would allow you to segment interest sections while retaining a
global search etc. if you use code like slash, you can just moderate
noise makers off the page. you can set up a yahoo group in ten minutes.
 

 A global search might be an idea to add to our existing archives,
 otherwise I'm still not convinced.

 --
 [EMAIL PROTECTED]

 Society does not owe people jobs.
 Society owes it to itself to find people jobs.
 ___
 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] HDBC-ODBC build/install problem.

2007-07-13 Thread Edward Ing

This solved the particular problem as you suggested, but I ran into
other problems and stuck at another one.
So I have another question.

When I am using DBDirect from haskelldb to connect through HDBC-odbc.
I get the following error message (I got pass the compile problems)

DBDirect.exe: user error (Couldn't load
Database.HaskellDB.HDBC.ODBC.driver from package
haskelldb-hdbc-odbc-0.10)

I looked into the package directories and the *.o and *.a file is there.
Also I looked into the installed.pkg-config file and found.

exposed: True
exposed-modules: Database.HaskellDB.HDBC.ODBC

So it appears to me that Database.HaskellDB.HDBC.ODBC  has been
installed properly.

Does the build of DBDirect have to be configured some way? I did not
configure anything for DBDirect.
Has it anything to do with hs-plugins?

Your help would be appreciated.


Edward Ing




On 7/13/07, Bjorn Bringert [EMAIL PROTECTED] wrote:

On Jul 12, 2007, at 23:35 , Edward Ing wrote:




Hi Edward,

the right approach would be to add it to other-modules in HDBC-
odbc.cabal file, where it should have been all along. This is a bug
in HDBC-odbc, I recommend that you send a patch to the maintainer.



/Björn

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


[Haskell-cafe] Re: Simple newbie question - Int and Integer

2007-07-13 Thread Dave Bayer
Gregory Propf gregorypropf at yahoo.com writes:

 So what the hell is the difference between them?  Int and Integer.
 They aren't synonyms clearly.  What's going on?

http://www.haskell.org/haskellwiki/Learn_Haskell_in_10_minutes

is a good starting point for answering this and similar questions.


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


[Haskell-cafe] Re: Very freaky

2007-07-13 Thread Al Falloon
This is the best intro to category theory I have ever heard. I finally 
understand. Thank you.


Dan Piponi wrote:

I thought I'd dive in with a comment to explain why category theory is
an important subject and why it often crops up in Haskell programming.
The key thing is this: in many branches of mathematics people draw
what are known as commutative diagrams:
http://mathworld.wolfram.com/CommutativeDiagram.html

So what do these diagrams represent? The letters at the 'vertices'
(known as objects) often represent sets and the arrows represent
functions. But in different branches of mathematics the same diagrams
appear with the objects and arrows having a quite different
interpretation. For example you could use a diagram like 1 - 2 to
mean 12. Or you could use X - Y to mean X implies Y. Or in {1,2} -
{4,5,6} the arrow might mean containment and so on. But here's a
remarkable fact: you can often take a definition in one branch of
mathematics and write it diagrammatically. You can then reinterpret
that diagram in a different branch of mathematics as different
definition. Sometimes the new definition isn't interesting, but often
it is. So now you can define things in multiple branches of
mathematics at the same time. It gets better. Statements of theorem
can also sometimes be written in purely diagrammatic language so a
theorem that holds in one branch of mathematics turns out to be an
interesting theorem in another. Sometimes the entire proof can be
written diagrammatically meaning you can solve problems in different
branches of mathematics at the same time. This whole
'multidisciplinary' subject is known as Category Theory.

To a good approximation (and there is a certain amount of choice over
which approximation you pick) Haskell also forms a category. The
objects are types and the arrows are functions. But as I've also
hinted above, objects can represent propositions and arrows can
represent implication. So that suggests theorems about logic might
carry over to theorems about Haskell. They do, as has been mentioned
in another thread. But that's a special case of a much wider
phenomenon where constructions in different parts of mathematics can
feed into Haskell.

So knowing category theory can help you to bring to bear mathematical
knowledge from other fields when writing Haskell code. A big example
of that payoff has been the notion of a monad. But there are many
more.

It also works the other way too. As you acquire a grasp of Haskell you
get insight into other parts of mathematics and computer science, even
if you don't yet know it! Haskell has certainly helped me this way.
(And I should confess that this is one of my primary motivations for
learning it.)


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


[Haskell-cafe] When is extra-libraries config in .cabal

2007-07-13 Thread Edward Ing

I am building and running some haskelldb/HDBC/HSQL libraries on
Windows XP (using the MinGW minimals system (MSYS))  with GHC
environment.

I ran into runtime link problems, foreign functions would not found.
eg. atoi,from C standard; recv from sockets.

To solve the problem, I added dll's to the build configuration field
extra-libraries, MSVCRT (c runtime), KERNEL32, WSOCK32 (sockets).
This solved the problem.

1. But is there a better way to solve the problem? I am expecting that
those libraries are available through the OS and do not need explicit
loading. I am confuse by what does the loading of the libraries.

2. Does a UNIX/POSIX system not have this problem?

Information for understanding this problem would be great.
Edward Ing
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Malcolm Wallace
Ian Lynagh [EMAIL PROTECTED] wrote:

 I think the number of posts in the wrong place would be
 lower if these were more conventionally named (although there aren't a
 lot of them anyway).

There are very few inappropriate posts to the haskell@ list.
I very much doubt that the list names are a problem.

 * At any point, create [EMAIL PROTECTED]

This would pretty-much guarantee that no-one with the necessary
expertise to answer questions was actually listening to them.  :-(

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


[Haskell-cafe] [Math] Category theory research programs?

2007-07-13 Thread Creighton Hogg

Hi Haskell,
Sorry to contribute to the noise but given that we've been talking about
categories lately, I was wondering if anyone had any opinions on good
universities for studying category theory.  I'm trying to figure out where
to apply for my phd.  I want to either be at a place with a strong category
theory program or a strong differential geometry program.

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


Re: [Haskell-cafe] Type system madness

2007-07-13 Thread Stefan O'Rear
On Fri, Jul 13, 2007 at 10:26:38AM +0200, Ketil Malde wrote:
 On Thu, 2007-07-12 at 19:15 +0100, Andrew Coppin wrote:
 
   While BOMs (Byte Order Mark) are pretty irrelevant to byte-oriented
   encodings like UTF-8, I think programs that fail on their presence can
   be considered buggy.
 
  Yay! Haskell's text I/O system is buggy. :-P
 
 Works for me, but feel free to file a bug or provide a more specific
 report.

He's not trying to report a bug; he's just complaining about base's
long-known lack of support for non-latin1 encodings. (IIUC)

Stefan


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


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread James Britt

Donald Bruce Stewart wrote:
 As we sit here riding the Haskell wave:

 http://www.cse.unsw.edu.au/~dons/tmp/cafe.png

 with nearly 2000 (!) people reading haskell-cafe@, perhaps its time to
 think some more about how to build and maintain this lovely Haskell
 community we have. Just yesterday I received an email:

 I posted it to Haskell-Cafe and received loads of brilliant
 responses. Wow, those guys are awesome. I'm definitely going to
 learn Haskell now.

 Which is *exactly* the kind of (view of the) community we want to build
 and encourage, so we can keep the Haskell project growing into the
 future.

Hear, hear.

I'm a Haskell newbie.  I've not posted much, but my copy of The Haskell 
School of Expression just arrived from Amazon, and I'm stoked.



 I think the main thing we need to remember is to help train new experts
 in the community, to be fluent in the culture, ensuring that expertise
 and a knowledge of the culture diffuses through the new people arriving.


All important.

I've spent a fair amount of time in the Ruby community.  I got started 
on Ruby around 2001, and found the community welcoming and helpful, even 
when I was asking what were likely many dopey questions.


The general climate was sufficient to make me want to be more involved; 
I went and started ruby-doc.org to do my share to help the community 
grow, and tried to stay active on Ruby lists to help others as I had 
been helped.  This was quite different from my experiences when learning 
other languages. To be fair, I don't really recall to what extent I was 
using  Usenet and discussion groups when learning Perl, PHP, or Java, 
but I don't think there was the same emphasis on niceness and the 
promotion of an explicit community culture.



I think Haskell has a reputation for being hard, of being a dense, 
academic, egghead language. In short, it's scary.  The more people who 
try it who can report good responses from the community and code success 
stories the more people there will be who can help each batch of newcomers.



Thanks,


James Britt

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


Re[2]: [Haskell-cafe] Newbie question about tuples

2007-07-13 Thread Bulat Ziganshin
Hello peterv,

Friday, July 13, 2007, 5:03:00 PM, you wrote:

 think the latest compilers are much better). Now when implementing something
 like this in Haskell, I would guess that its laziness would allow to
 interleave many of the math operations, reordering them to be as optimal
 as possible, removing many intermediate results (like processing streams).

don't forget that laziness by itself makes programs an orders of
magnitude slower :)


-- 
Best regards,
 Bulatmailto:[EMAIL PROTECTED]

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


Re: [Haskell-cafe] [Math] Category theory research programs?

2007-07-13 Thread Dipankar Ray


are you applying to computer science programs or math programs?

for category theory, you might look at where the Ken Shans of the world 
went to grad school.


for diff geo, there are a host of great places. and I don't know exactly 
what you mean by diff geo. You could be into gauge theory, in which case 
places like Imperial College, Cambridge, Oxford, Columbia, Duke, MIT come 
to mind (advisors like Donaldson, Hamilton, Morgan, Bryant, dozens I'm 
neglecting to mention). The other standard top US schools (Harvard, 
Princeton, Stanford, Berkeley, Chicago, Michigan) are all pretty strong in 
both algebra and geometry, of course (Yau, Givental, Eliashberg, etc, are 
at these schools). Other places like UT Austin, Northwestern, UIUC, UCLA, 
and even UW (University of Washington) come to mind. In Canada, UBC.


Also, you may find that your interests are closer to (say) algebraic 
geometry, which is intimately connected to the kind of diff geo that's 
done in relation to physics these days. In which case you might want to 
consider Chicago and Northwestern strongly, as these schools have amazing 
alg geo groups these days. Of course Harvard is the historical leader here 
(some have left, but Mumford, Mazur, Yau, Griffiths, Harris, Siu, Richard 
Taylor, etc), and Princeton is also incredibly strong.


Pretty much any of these schools will give you a plenty strong background 
in category theory to understand it for haskell, I'd say (perhaps this is 
overstatement, but (for example) algebraic geometers tend to become quite 
expert at category theory).


On Fri, 13 Jul 2007, Creighton Hogg wrote:


Hi Haskell,
Sorry to contribute to the noise but given that we've been talking about
categories lately, I was wondering if anyone had any opinions on good
universities for studying category theory.  I'm trying to figure out where
to apply for my phd.  I want to either be at a place with a strong category
theory program or a strong differential geometry program.

Thanks,
Creighton


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


Re: [Haskell-cafe] When is extra-libraries config in .cabal

2007-07-13 Thread Duncan Coutts
On Fri, 2007-07-13 at 12:05 -0400, Edward Ing wrote:
 I am building and running some haskelldb/HDBC/HSQL libraries on
 Windows XP (using the MinGW minimals system (MSYS))  with GHC
 environment.
 
 I ran into runtime link problems, foreign functions would not found.
 eg. atoi,from C standard; recv from sockets.
 
 To solve the problem, I added dll's to the build configuration field
 extra-libraries, MSVCRT (c runtime), KERNEL32, WSOCK32 (sockets).
 This solved the problem.
 
 1. But is there a better way to solve the problem? I am expecting that
 those libraries are available through the OS and do not need explicit
 loading. I am confuse by what does the loading of the libraries.

 2. Does a UNIX/POSIX system not have this problem?

On unix the C compiler generally links to the standard C library without
you having to ask for it explicitly.

I'm not sure that if we automatically linked to msvcrt that everyone
would be happy. Many people seem to think msvcrt is to be avoided in
preference of 'native' win32 calls.

 Information for understanding this problem would be great.

This is a slightly tricky problem because the names of the libraries to
link to are different on different operating systems.

We don't have a proper solution to this at the moment. I'm posting this
to the cabal-devel list in case anyone has any good practical realistic
suggestions.

Duncan

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


[Haskell-cafe] Re: Maintaining the community

2007-07-13 Thread Bárður Árantsson
Philippa Cowderoy wrote:
 On Fri, 13 Jul 2007, Dave Bayer wrote:
 
 As a newcomer I was stunned that this otherwise very sophisticated 
 community was using an email list rather than a bulletin board. The 
 shear torrent of email was impacting my mail program performance.

 
 This is a cultural thing, and assuming that it's a lack of sophistication 
 on our part is a bad idea - on the contrary, some of the better reasons to 
 avoid a web-based board are entirely about enabling sophistication.
 
 Boards need polling. Boards force a single user interface on everyone. 
 Boards don't enable local archives. Etc etc etc. With mail, you can pick a 
 client to suit your needs.

Indeed, and if you prefer newsgroups, you can even get a newsgroup
interface with gmane.org.

Incidentally, I've generally found gmane.org to be one of best ways to
manage volume -- like someone said: Usenet/NNTP has already solved many
of the issues with high volume.

-- 
Bardur Arantsson
[EMAIL PROTECTED]

DISCLAIMER: No humor intended as to not annoy the humor impaired.
All speculative humor is purely in the mind of the insane reader
and has no bearing on reality. Author cannot be held liable for
any damages due to enjoyment (or lack thereof) of said humor.
Offer void in Massachusetts and Utah. Only while supplies last.

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


[Haskell-cafe] Re: Type system madness

2007-07-13 Thread Aaron Denney
On 2007-07-13, Stefan O'Rear [EMAIL PROTECTED] wrote:
 He's not trying to report a bug; he's just complaining about base's
 long-known lack of support for non-latin1 encodings. (IIUC)

Which is a bug.  Base needs to support (in an /obvious/ way)
(1) direct I/O of octets (bytes), with no character interpretation set
(2) I/O of text in UTF-8.

In addition, it would be nice to support 
(3) (On Unix) use of locale to determine text encoding
but users can work around this themselves, and will often need to, even
if (3) is supported.

(2) can also be layered atop (1), but something is wrong if you have to
write your own layer to do simple text input and output.  It's even
worse if you can't without going to the FFI.

(1) can currently be done, but it's not at all clear how to do so, or
once you have figured out how to do so, why it works.

(This may be a bit out of date, but seeing this brought up again, I
think not.)

-- 
Aaron Denney
--

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


[Haskell-cafe] Re: Maintaining the community

2007-07-13 Thread apfelmus
Donald Bruce Stewart wrote:
 What copyright do -cafe@ posts have?

I'm not a lawyer but everything you write down is automatically
copyrighted in most countries assuming that it meets some low
requirement of skill, originality and work. Which is likely to be the
case for posts that are eligible to make it into the wiki. For mailing
lists, archiving and quoting are considered fair use. Explicit
permission from the author is required to put posts on the wiki since
that means to license them under the Simple Permissive License.

Regards,
apfelmus

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


[Haskell-cafe] Re: Maintaining the community

2007-07-13 Thread Aaron Denney
On 2007-07-13, brad clawsie [EMAIL PROTECTED] wrote:
 - take this service off of email entirely. try a web forum system (you
   may have to slum it and use php). i don't recommend nntp, that just
   forces us to use gmane since very few isps provide nntp now. a web
   forum would allow you to segment interest sections while retaining a
   global search etc. if you use code like slash, you can just moderate
   noise makers off the page. you can set up a yahoo group in ten minutes.

Switching to a web forum system will kill any interest I have in
following this community.  I suspect I'm not alone.  It's usenet done
/wrong/.  E-mail, the gmane web interface, and the gmane nntp interface
combine into a very serviceable system, where I can choose my client,
and on two of those paths, my client keeps track of what I read, rather
than pushing that onto an overloaded server.

The one thing that I can suggest is putting a note about other ways of
access on the mailing list pages, and heck, on community introduction
pages.

-- 
Aaron Denney
--

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


Re: [Haskell-cafe] reading existential types

2007-07-13 Thread Andrea Rossato
On Mon, Jul 09, 2007 at 09:41:32PM +0100, Claus Reinke wrote:
  hiding concrete types in existentials sometimes only defers problems
  instead of solving them, but exposing class interfaces instead of types is a 
  useful way to mitigate that effect. it just so happens that this particular 
  problem, reading an existential type, slightly exceeds that pattern, as 
  'read' needs to know the hidden type to do its job ('read' does not 
  determine the type from the input form, but uses the type to determine what 
  form.the input should have). 
  a workaround is to try to read all possible types, then hide the type again 
  once a match is found. the main disadvantage of this method is that we need 
  a list of all the types that could possibly be hidden

As a follow up, mainly meant to thank you, I wanted to let you know
that I adopted this approach in a piece of software I'm writing.

It's a status bar for the XMonad Window Manager, the tiling WM written
in Haskell.[1] 

Actually it is a text based status bar that can be used with any
WM, but we love XMonad particularly...;-)

More information about this status bar can be found here:
http://www.haskell.org/pipermail/xmonad/2007-July/001442.html
with link to the source code, a screen shot and eve a link to a
binary.

I obviously credited you for the help and the code![2]
One again, thank you.

All the best,
Andrea


[1] http://xmonad.org/
[2] http://gorgias.mine.nu/repos/xmobar/Runnable.hs

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


RE: Re[2]: [Haskell-cafe] Newbie question about tuples

2007-07-13 Thread peterv
Yes but doesn't GHC have a good strictness analyzer (or how is this
called?)? I haven't looked at the generated assembly code yet (if this is at
all readable; but good C/C++ compilers *do* generate reasonably readable
assembly code)

-Original Message-
From: Bulat Ziganshin [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 13, 2007 6:43 PM
To: peterv
Cc: 'Lukas Mai'; haskell-cafe@haskell.org
Subject: Re[2]: [Haskell-cafe] Newbie question about tuples

Hello peterv,

Friday, July 13, 2007, 5:03:00 PM, you wrote:

 think the latest compilers are much better). Now when implementing
something
 like this in Haskell, I would guess that its laziness would allow to
 interleave many of the math operations, reordering them to be as optimal
 as possible, removing many intermediate results (like processing streams).

don't forget that laziness by itself makes programs an orders of
magnitude slower :)


-- 
Best regards,
 Bulatmailto:[EMAIL PROTECTED]


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


RE: [Haskell-cafe] Looking for final year project - using Haskell, or another functional language

2007-07-13 Thread peterv
Yes, for a newbie like me it was actually the reason to abandon Haskell
initially; none of the examples at http://www.haskell.org/HOpenGL compiled!

Another very cool albeit difficult project would be automatic retargeting of
Haskell code to the graphics processor unit (GPU), or IBM Synergistic
Processor Unit  (SPU aka Cell processor, if you can get your hands on such a
board...). I think IBM has been working on something like that for
imperative languages, but it would be interesting to see how far you one can
go with Haskell. If this is not yet done of course...

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Stefan O'Rear
Sent: Friday, July 13, 2007 3:37 AM
To: wp
Cc: Haskell-Cafe@haskell.org
Subject: Re: [Haskell-cafe] Looking for final year project - using Haskell,
or another functional language

On Fri, Jul 13, 2007 at 02:31:58AM +0100, wp wrote:
 just be sure to ignore http://www.haskell.org/HOpenGL/ , which should 
 be moved to the wiki or to /dev/null.

 sorry for the basic question: why is hopengl so bad?

HOpenGL, the library, isn't bad at all.  It's the website that's absolutely
horrible.

Stefan

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


Re: [Haskell-cafe] Lazy Lists and IO - Redux

2007-07-13 Thread Ronald Guida

[Ronald Guida, 07/11/07]
 Suppose I have a function f that reads a lazy list, such that f
 only consumes as much of the list as it needs to.  Laziness allows me
 to apply f to an infinite list without creating an infinite loop.

 Now I want to connect the console to f, such that the list of inputs
 to f comes from the console, one item at a time.


How do I do this?

[Stefan O'Rear]
 Not very nicely.

Apparently, the solution gets ugly.

[Stefan O'Rear]
 Option 1. Ignore purity [using unsafeInterleaveIO]
 Option 2. Ignore lists

[Felipe Almeida Lessa]
 Option 3. Use continuations

I would like to understand *why* it gets ugly, and I think I figured it
out.

[Ronald Guida, 07/11/07]
 To create a specific example, lets suppose I want to read and
 accumulate the contents of a list, and I want to stop when the sum
 reaches or exceeds a specified cutoff.

 I can write this as a function that reads elements from an infinite list:

 [Snipped: Ronald Guida's newb implementation of accumUntilCutoff]

[Stefan O'Rear, 07/11/07, Improved implementation]

 accumUntilCutoff :: (Ord a, Num a) = a - [a] - (a, [a])
 accumUntilCutoff cutoff xs =
 findAcceptLast ((= cutoff) . fst) (zip (scanl (+) 0 xs) (inits xs))

 findAcceptLast :: (a - Bool) - [a] - a
 findAcceptLast pred lst = fromMaybe (last lst) (find pred lst)


First, if I start with an arbitrary pure function, then I can build a
dependency graph to determine what to evaluate.  Since pure functions
are referentially transparent, I am free to evaluate the nodes of my
dependency graph in any order, provided that I respect the
dependencies.

On the one hand, suppose I want to read a list with IO.  In order to
use IO, or any monad for that matter, I have to pass a baton[1] from
one operation to the next.  If a create a complicated function that
involves a monad, then every time I use the bind operator, I am
adding an edge to my dependency graph.  Since I receive a baton from
the outside, and I have to return it, I end up threading that baton
through my dependency graph.  Now when my function is evaluated, the
evaluation order, at least for monadic actions, is locked down.

On the other hand, I can compare a lazy list function, such as
accumUntilCutoff, to a multi-layer perceptron[2].  The input layer of
this perceptron receives the contents of a lazy list.  List processing
functions, such as init, zipWith, and map, construct hidden layers of
neurons.  For example, zipWith (+) xs $ tail xs builds a hidden
layer such that each neuron computes the sum of two adjacent inputs.

The major contrast between a lazy list function and a multi-layer
perceptron is that for some functions, such as filter, takeWhile,
dropWhile, and find, I can't build the corresponding neural
interconnections until runtime, since these connections depend on the
actual *data* that is presented to the inputs.

A complicated function, like accumUntilCutoff, is almost a
multi-layer perceptron, except for the fact that parts of the
dependency graph are constructed at runtime based on the input data.
This makes it very hard to thread a baton through the dependency
graph.

So I want to make accumUntilCutoff read its input, lazily, from the
console.  That means:

1. I need to provide a way to hand the IO baton to accumUntilCutoff
   and get it back at the end.

2. The baton must be passed, sequentially, to each element of the
   input list, up to and including the last element that I need.

Here is my key observation -- Suppose that:
1. I have two functions f and g that both process a lazy list.
2. I feed the same lazy list from the console to both functions.
3. Function f consumes part of the list, and g consumes more than f.
4. I choose to print the result of f, then interact with the user,
   and later, based on user input, possibly print the result of g.

Then:
1. In order to print the result of f, I must pass the baton through f,
   so the baton will be sequenced through a prefix of my lazy list.
2. In order to determine whether to evaluate g, I must get the baton
   back from f and use it to interact with the user.
3. If I later need to print the result of g, then I need to pass the
   baton through g, and the baton must be sequenced *starting in the
   middle* through my lazy list of user input.
As a result, I have to interleave IO operations.

Example pseudo-code:

1.  main :: IO
2.  main = do
3. putStrLn Hello.
4. xs - getLazyListOfNumbersFromUser
5. let ys = zipWith (+) xs $ tail xs
6. print (ys !! 0)-- depends on xs !! 0 and 1
7. b - askUserBool Would you like to continue? 
8. if b
9.   then print (ys !! 1) -- depends on xs !! 1 and 2
10.  else return ()
11.putStrLn Goodbye.

We *must* ask the user for the first two elements of xs because we
have to print the result before asking the user a question.  We
*can't* ask the user for the third element of xs at this time because
the user gets to decide whether we need it.  As a result, we must
interleave 

Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Andrea Rossato
On Fri, Jul 13, 2007 at 12:11:58PM +1000, Donald Bruce Stewart wrote:
 As we sit here riding the Haskell wave:
 
 http://www.cse.unsw.edu.au/~dons/tmp/cafe.png
 
[..]
 That is, to help people progress from newbie, to intermediate, to
 expert, and thus ensure the culture is maintained (avoiding `Eternal
 September'). This graphic[1] sums the main issue up nicely, in my view:
 
 
 http://headrush.typepad.com/photos/uncategorized/buildingausercommunity.jpg

I feel somehow in the Nothing area and I feel somehow ashamed for
that: I used to ask a lot when I was a newbie, but now I'm not
answering very much. I ask some questions sometimes, and that's it.

At first, when I was learning, I tried to help others who seemed even
more novice then I was, but usually the experts used to jump in, and
show, with their wonderfully conceived examples, how basically
ridiculous my code was and how many better ways there are to do
things. I did not want to sound clever, and, moreover, I was just
trying to make my code as simple as clear as I, newbie, I would have
wanted to see. Nevertheless it's not very rewarding to publicly face
your ignorance at ever single message you dare to send. So you just
quit.

Now, I'm telling this because I believe that the expert ones are in
part responsible for the gap the picture shows. But only when I'll be
an expert I'll be able to prove that. In the meanwhile I'd better shut
up!
;-)

Just my 2 cents.

all the best,
andrea
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Type system madness

2007-07-13 Thread Andrew Coppin

Donald Bruce Stewart wrote:


By the way Andrew, have you noticed that you're generating 50% of the
traffic on this list? Perhaps we can work a bit more on improving the
signal/noise ratio. My inbox can only take so much of this... ;)
  


o_O

My God... even the Haskell mailing list is complaining I talk about 
Haskell too much... That's *advanced*!


(Everybody in the main forum I inhabit has now taken to auto-deleting 
any post that mentions the word Haskell. Except for Mr C++, who seems 
to seek out such threads so he can tell me how superior C++ is to 
Haskell...)


Oh well, the problem is easily fixed... *sigh*

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


Re: [Haskell-cafe] problem with IO, strictness, and let

2007-07-13 Thread Andrew Coppin

Stefan O'Rear wrote:

The problem is that you're closing the file twice.  When you call any
function of the getContents family, you assign to that function the
responsibility to close the file, no sooner than it is no longer needed.
Don't call hClose yourself, Bad Things will happen.
  


Care to elaborate on bad things? (I.e., will this just crash the 
program with an error, or will it do something more serious?) I must 
admit, I thought closing such a file was simply no-op.


I can't remember why exactly, but somewhere or other I wrote some code 
that does this. (Basically I want to shut the file without reading all 
of it, so I can reopen it and start reading from the beginning again.) 
Is there a sane way to do this? Or am I going to have to start playing 
with explicit reads and writes? (Obviously I could just hang on to *all* 
of the input stream returned from getContents - but that could be quite 
large. The current way gives me low memory usage...)


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


Re: [Haskell-cafe] Type system madness

2007-07-13 Thread Andrew Coppin

Bulat Ziganshin wrote:

Hello Andrew,

  

Yay! Haskell's text I/O system is buggy. :-P



definitely. for example, on windows it doesn't support unicode
filenames nor files bigger than 4gb


...OK, that's quite worrying...


so i use my own lib, a thin layer around Windows API
  


Has a bug been reported for this? Have you (or anyone else) thought 
about offering up code to fix it?


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


Re: [Haskell-cafe] Newbie question about tuples

2007-07-13 Thread Andrew Coppin

Lukas Mai wrote:

Am Donnerstag, 12. Juli 2007 20:14 schrieb Andrew Coppin:

  

The only thing the libraries provide, as far as I can tell, is the fact
that tuples are all Functors. (In other words, you can apply some
function to all the elements to get a new tuple.) I think that's about
it. I doubt you can use that to define lifting functions...



Actually, they aren't (Functors).


Oh. Kay... well that makes me look *very* intelligent. :-}


(,) takes two type arguments, (,,)
takes three, etc.  class Functor f requires f to take one type argument.
  


Ah. A kind error. Yes, you're right about that... oops.


Besides, what should fmap (+1) (3, 4, foo) do?
  


I was assuming it's only defined for (a,a), not for (a,b)...


(Somewhere in the libraries there is an
instance Functor (,) a where fmap f (x, y) = (x, f y)
but that's probably not what you expected.)
  


Indeed.

Oh well...

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


Re: [Haskell-cafe] Type system madness

2007-07-13 Thread Andrew Coppin

Ketil Malde wrote:

On Thu, 2007-07-12 at 19:15 +0100, Andrew Coppin wrote:

  

While BOMs (Byte Order Mark) are pretty irrelevant to byte-oriented
encodings like UTF-8, I think programs that fail on their presence can
be considered buggy.
  


  

Yay! Haskell's text I/O system is buggy. :-P



Works for me, but feel free to file a bug or provide a more specific
report.
  


I was actually commenting on the other guy's remark that anything that 
chokes on a BOM can be considered buggy - not entirely seriously. ;-)


If there is a bug to be reported, it is merely that [the GHC 
implementation of] Haskell appears to interpret files as containing 
8-bit ASCII, rather than doing real character encodings. I have no 
idea whether anybody has filed a bug report / feature request for this. 
(Come to think of it, I have no idea how to check either...)


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


Re: [Haskell-cafe] Re: Maintaining the community

2007-07-13 Thread Andrew Coppin

Dave Bayer wrote:

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk writes:
  

Yes, the sheer volume of posts is definitely becoming a problem (for me,
at least).



As a newcomer I was stunned that this otherwise very sophisticated community was
using an email list rather than a bulletin board. The shear torrent of email was
impacting my mail program performance.
  


Seconded. (I also commented on it at the time, and was told use IRC or 
SMTP. Personally I'd prefer NNTP, but apparently I'm a minority here...)


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


Re: [Haskell-cafe] problem with IO, strictness, and let

2007-07-13 Thread Stefan O'Rear
On Fri, Jul 13, 2007 at 07:59:22PM +0100, Andrew Coppin wrote:
 Stefan O'Rear wrote:
 The problem is that you're closing the file twice.  When you call any
 function of the getContents family, you assign to that function the
 responsibility to close the file, no sooner than it is no longer needed.
 Don't call hClose yourself, Bad Things will happen.
   

 Care to elaborate on bad things? (I.e., will this just crash the program 
 with an error, or will it do something more serious?) I must admit, I 
 thought closing such a file was simply no-op.

If you close the file, the stream will suddenly end.  I believe silent
data corruption is worse than a crash :)  (currently, hGetContents also
truncates on I/O error, but that's much less common and syslog will tell
you about it anyway)

 I can't remember why exactly, but somewhere or other I wrote some code that 
 does this. (Basically I want to shut the file without reading all of it, so 
 I can reopen it and start reading from the beginning again.) Is there a 
 sane way to do this? Or am I going to have to start playing with explicit 
 reads and writes? (Obviously I could just hang on to *all* of the input 
 stream returned from getContents - but that could be quite large. The 
 current way gives me low memory usage...)

Did you actually try it?  getContents is *lazy*.  it doesn't read any
more of the file than it has to.  If it read the whole file immediately,
you obviously DO need the whole file.

This is also why closing a file after getContentsing it is Bad -
getContents can't keep reading after you've closed the handle.

Stefan


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


Re: [Haskell-cafe] Type system madness

2007-07-13 Thread Stefan O'Rear
On Fri, Jul 13, 2007 at 08:05:36PM +0100, Andrew Coppin wrote:
 Ketil Malde wrote:
 On Thu, 2007-07-12 at 19:15 +0100, Andrew Coppin wrote:

   
 While BOMs (Byte Order Mark) are pretty irrelevant to byte-oriented
 encodings like UTF-8, I think programs that fail on their presence can
 be considered buggy.
   

   
 Yay! Haskell's text I/O system is buggy. :-P
 

 Works for me, but feel free to file a bug or provide a more specific
 report.
   

 I was actually commenting on the other guy's remark that anything that 
 chokes on a BOM can be considered buggy - not entirely seriously. ;-)

 If there is a bug to be reported, it is merely that [the GHC 
 implementation of] Haskell appears to interpret files as containing 8-bit 
 ASCII, rather than doing real character encodings. I have no idea whether 

There is no such thing as 8-bit ASCII - base assumes files contain
ISO-8859-1.

 anybody has filed a bug report / feature request for this. (Come to think 
 of it, I have no idea how to check either...)

http://hackage.haskell.org/trac/ghc/query

Stefan


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


Re: [Haskell-cafe] Re: Maintaining the community

2007-07-13 Thread Andrew Coppin

Jules Bean wrote:
I find it incredibly surprising whenever I discover than an otherwise 
sophisticated community has adopted a bulletin board rather than email ;)


Erm... why?

Conversely, a bulletin board cannot be read offline, traps users into 
a single UI (in every case I've used, slow, ugly, and lacking in 
functionality) over which they have no control.


Oh... I suppose.

Still, a newsreader doesn't appear to have those limitations.

Modern email programs have sophisticated sorting, filtering, scoring, 
processes and they allow me to read messages while offline, search 
them locally, etc etc. They have customisable key bindings, they allow 
me to read all of my mailing lists in one place, they are scriptable, 
may support plugins... all of this under full user control.


I'd just prefer not to have to wait through 100 emails a day to find the 
few that interest me. With a newsreader, I can simply mark ignore on 
the threads that don't interest me, and I'm done.


(Also, either my ISP or Thunderbird itself keeps magically loosing 
certain emails, which is rather irritating...)


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


Re: [Haskell-cafe] CGI test

2007-07-13 Thread Andrew Coppin

Bjorn Bringert wrote:

On Jul 12, 2007, at 19:59 , Andrew Coppin wrote:

Basically, the more I look at this, the more I realise that it really 
truely *is* going to be faster to just use a real web server. I 
thought I could just implement a tiny subset of it to get a working 
system, but it turns out the subset I need isn't so tiny...


Sorry guys.


As an earlier poster hinted, there is a version of Haskell Web Server 
that can run CGI programs:


http://www.cs.chalmers.se/~bringert/darcs/hws-cgi/


Thanks. I'll take a look...

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


Re: [Haskell-cafe] Haskell monads for newbies (was Functional dependencies *not* part of the next Haskell standard?)

2007-07-13 Thread Andrew Coppin

D.V. wrote:

On 7/12/07, Andrew Coppin [EMAIL PROTECTED] wrote:

Monads take a while to get used to, but they're not so scary after 
that...


The problem with monads is that there is a gazillion tutorials to
explain them, each with their own analogy that works well for the
author but not necessarily for you.

It adds to the complexity of something that is indeed, not so
difficult after all.


What was the phrase? Monads are possibly the most tutorialised concept 
ever...?


Still, while the concept is simple, it's hard to sum up in just a few 
words what a monad is. (Especially given that Haskell has so many 
different ones - and they seem superficially to bear no resemblence to 
each other.)


Maybe I'll give it a shot some day. ;-)

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


Re: [Haskell-cafe] Re: Maintaining the community

2007-07-13 Thread Andrew Coppin

Dave Bayer wrote:

Claus Reinke claus.reinke at talk21.com writes:

  

will ultimately make its contents easier to find. but if you
want to avoid answering questions again and again on the
list, you need to improve the cache of answers.



Bingo. 
  



Here, the Wiki is fantastic but extraordinarily spotty (any healthy wiki will
always have much new growth, but the current gaps are surprising), and newcomers
like myself can and have been contributing to it.
  


Whenever I find that something isn't on the Wiki, I try to add it. 
(E.g., the articles on alpha/beta/eta reduction.)


On the other hand, when I find something isn't there, it's usually 
because I'm trying to look it up because I don't understand it. ;-) To 
some extend, incorrect information can be worse than no information... :-(


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


Re: [Haskell-cafe] Re: Maintaining the community

2007-07-13 Thread Stefan O'Rear
On Fri, Jul 13, 2007 at 08:23:41PM +0100, Andrew Coppin wrote:
 Dave Bayer wrote:
 Here, the Wiki is fantastic but extraordinarily spotty (any healthy wiki 
 will
 always have much new growth, but the current gaps are surprising), and 
 newcomers
 like myself can and have been contributing to it.
   

 Whenever I find that something isn't on the Wiki, I try to add it. (E.g., 
 the articles on alpha/beta/eta reduction.)

 On the other hand, when I find something isn't there, it's usually because 
 I'm trying to look it up because I don't understand it. ;-) To some extend, 
 incorrect information can be worse than no information... :-(

Conversely, it's generally easier for us to fix an incorrect page than
to write a new one from scratch.

Stefan


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


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Dan Weston
The following recent reply from Dave Bayer is IMHO nearly optimal for 
Maintaining the Community, and I applaud him for it:


Dave Bayer wrote:
 [someone] writes:

 So what the hell is the difference between them?  Int and Integer.
 They aren't synonyms clearly.  What's going on?

 http://www.haskell.org/haskellwiki/Learn_Haskell_in_10_minutes

 is a good starting point for answering this and similar questions.

0) The question that was actually asked was answered, saving follow-on 
frustration, discouragement, and noise. The experience level of the 
answer matches the (inferred) experience level of the question.


1) The provocative word hell is appropriately ignored without comment, 
allowing leeway for occasional frustration, especially from newbies.


2) No assumption was made that the person who posed the question was 
being lazy, stupid, or acting in bad faith.


3) A useful link was provided to enable the questioner to answer his own 
question without excess frustration, and without the useless that was 
already answered in a previous e-mail (but who knew? I just joined the 
list...) was not deployed.


4) The last line pleasantly (read: effectively) encouraged optimal 
future interaction. The inevitably irritating phrase Next time, was 
wonderfully avoided.


5) Phrases like of course, wild guess, why don't you, if you 
just, next time, before you do ..., that provide only heat without 
light were not deployed in arrogance or anger.


Dan Weston

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


[Haskell-cafe] Re: Maintaining the community

2007-07-13 Thread Bárður Árantsson
Andrew Coppin wrote:
 Dave Bayer wrote:
 Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk writes:
  
 Yes, the sheer volume of posts is definitely becoming a problem (for me,
 at least).
 

 As a newcomer I was stunned that this otherwise very sophisticated
 community was
 using an email list rather than a bulletin board. The shear torrent of
 email was
 impacting my mail program performance.
   
 
 Seconded. (I also commented on it at the time, and was told use IRC or
 SMTP. Personally I'd prefer NNTP, but apparently I'm a minority here...)

What are you on about? Use gmane.org...

-- 
Bardur Arantsson
[EMAIL PROTECTED]

Nuke unborn gay whales for Jebus!
 Most Broadly Offensive Slogan Ever

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


Re: [Haskell-cafe] problem with IO, strictness, and let

2007-07-13 Thread Andrew Coppin

Stefan O'Rear wrote:

On Fri, Jul 13, 2007 at 07:59:22PM +0100, Andrew Coppin wrote:
  
Care to elaborate on bad things? (I.e., will this just crash the program 
with an error, or will it do something more serious?) I must admit, I 
thought closing such a file was simply no-op.



If you close the file, the stream will suddenly end.  I believe silent
data corruption is worse than a crash :)
  


Agreed...! o_O

I can't remember why exactly, but somewhere or other I wrote some code that 
does this. (Basically I want to shut the file without reading all of it, so 
I can reopen it and start reading from the beginning again.) Is there a 
sane way to do this? Or am I going to have to start playing with explicit 
reads and writes? (Obviously I could just hang on to *all* of the input 
stream returned from getContents - but that could be quite large. The 
current way gives me low memory usage...)



Did you actually try it?


I am not 100% sure about this. I wrote code that had an execution path 
that does this, but I don't know if I ever actually *excercised* it...


(The idea was to read, say, 10% of the file, and then close it and start 
reading from the beginning again.)


How about redundantly closing the file after you've already read all of 
it anyway? Is that dangerous?


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


Re: [Haskell-cafe] Lazy Lists and IO - Redux

2007-07-13 Thread Dan Piponi

On 7/13/07, Ronald Guida [EMAIL PROTECTED] wrote:

[Ronald Guida, 07/11/07]
  Now I want to connect the console to f, such that the list of inputs
  to f comes from the console, one item at a time.
How do I do this?

[Stefan O'Rear]
  Not very nicely.

Apparently, the solution gets ugly.


If we have to throw in the towel for a request that is so elementary,
surely it means that pure functional programming is broken. Let's not
throw in the towel just yet...

We just need a bunch of library functions. We hide the ugliness in the library.

Rather than post an overlong mail here's some code I threw together
last night building on ListT done right on the Wiki:
http://hpaste.org/1657

The library itself looks ugly but scroll to the end where you see I
use 'lifted' versions of foldl, foldlM, filter and takeWhile. It works
with ghc, it's easy to use and the input and output are fully
interleaved. The IO is almost completely decoupled from the logic.

It'd be nice to put together a more complete library that does this
kind of stuff.

An interesting project might be to try defining a GeneralisedList
type class of which [] and ListT are both instances so we don't need
to distinguish between filter and filterT, say. Then we could make
interleaving IO and lists fairly transparent.

(And sorry if I'm duplicating what someone else said. The thread is
long and I haven't read every word of all of it.)
--
Dan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Type system madness

2007-07-13 Thread Andrew Coppin

Stefan O'Rear wrote:

On Fri, Jul 13, 2007 at 08:05:36PM +0100, Andrew Coppin wrote:
  

I was actually commenting on the other guy's remark that anything that
chokes on a BOM can be considered buggy - not entirely seriously. ;-)

If there is a bug to be reported, it is merely that [the GHC 
implementation of] Haskell appears to interpret files as containing 8-bit 
ASCII, rather than doing real character encodings. I have no idea whether 



There is no such thing as 8-bit ASCII - base assumes files contain
ISO-8859-1.
  


Indeed - ASCII is actually a 7-bit standard. But all known systems use 8 
bits/character, and use the extra bit in various random ways. Everybody 
seems to *call* this 8-bit ASCII, despite that being a rather silly name.


I have no idea what ISO-8859-1 is. (But let's not start another thread 
about that...)


anybody has filed a bug report / feature request for this. (Come to think 
of it, I have no idea how to check either...)



http://hackage.haskell.org/trac/ghc/query
  


Ah... OK.

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


Re: [Haskell-cafe] Re: Maintaining the community

2007-07-13 Thread Andrew Coppin

Stefan O'Rear wrote:

On Fri, Jul 13, 2007 at 08:23:41PM +0100, Andrew Coppin wrote:
  
Whenever I find that something isn't on the Wiki, I try to add it. (E.g., 
the articles on alpha/beta/eta reduction.)


On the other hand, when I find something isn't there, it's usually because 
I'm trying to look it up because I don't understand it. ;-) To some extend, 
incorrect information can be worse than no information... :-(



Conversely, it's generally easier for us to fix an incorrect page than
to write a new one from scratch.
  


...hence my usual tacktic of adding the page and putting in the comments 
somebody should probably check this...


Sometimes it works. ;-)

(It worked for the beta and eta articles - somebody quickly pointed out 
that I actually got the names the wrong way round! Oops... On the other 
hand, I updated the Existential Type article, and apparently nobody 
noticed that one of my examples don't actually compile due to 
gratuetusly invalid syntax.)


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


Re: [Haskell-cafe] better error expression in IO function

2007-07-13 Thread Albert Y. C. Lai

Derek Elkins wrote:

On Wed, 2007-07-11 at 17:10 -0700, Jeremy Shaw wrote:

At Thu, 12 Jul 2007 09:18:14 +1000,
Thomas Conway wrote:

On 7/12/07, Andrew Coppin [EMAIL PROTECTED] wrote:

It's fairly common to use the Either type for this. By convention,
Right means correct, and by elimination Left means an error...

Presumably, this is because the world is dominated by dull,
conventional, right handed people. :-)
Personally, I blame it on the Romans. 


Personally, I blame it on biology.


I blame it on partial application at the type level. instance Monad 
(Either x) and instance MonadError (Either x) determine that x has no 
hope of being the normal return type and is stuck as the exception type.


But I guess you can still blame the Romans for writing everything from 
left to right, writing Either x y rather than y x rehtiE, thus 
designating the first argument x as Left. Actually, it predates the 
Romans too: they learned that from the Greeks, and the Greeks got that 
from God-knows-who. (Actually, God knows, just that I don't know.)

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


Re: [Haskell-cafe] Type system madness

2007-07-13 Thread Andrew Coppin

Bryan O'Sullivan wrote:

Andrew Coppin wrote:


Oh well, the problem is easily fixed... *sigh*


I doubt that anybody minds having you talk about Haskell.  You've been 
responsible for spawning a lot of interesting threads.


[And that one about compression that's still going on somewhere... lol!]

All I would suggest is that you take your cue from the other people 
who post to the list, and try a few tactics before you post:


- If you have a chatty one-line comment, do 2,000 other people need to 
see it?


Mmm. This is why I prefer NNTP. (If a thread becomes tangent, everybody 
just marks it ignore and they don't have to waste time downloading it 
or reading it.) But yeah, point taken...


- If you have a question to ask, try to spend 2 minutes with Google or 
the Haskell wiki to find the anwer.


I continue to be surprised at the things that don't seem to be on the 
Wiki... Google is typically no help at all with anything 
Haskell-related, because Haskell is so completely obscure. The various 
haddoc documentation is also frustratingly sparse in places. (E.g., 
Control.Concurrent.STM.TVar contains *nothing* but terse type 
signatures. And concurrent programming is already a tricky thing to get 
right.) Some things seem to be well known yet not actually written 
down anywhere - e.g., the finer points of using seq to make stuff go 
faster.


But sure, I do like to try to puzzle a thing out first before posting 
here. (If something else, I kind of enjoy a challenge...)


- Join us on #haskell on IRC.  It's extremely chatty, and you'll be 
welcome.


Not in my experience, no.

(Maybe I ask the wrong way... but almost everybody seems to simply 
ignore me. Actually, usually when I go there absolutely nobody is 
speaking at all. What time zone do these people live in?)


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


Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Andrew Coppin

brad clawsie wrote:

to improve the list, might i suggest

- push chatter to IRC

- take this service off of email entirely. try a web forum system (you
  may have to slum it and use php). i don't recommend nntp, that just
  forces us to use gmane since very few isps provide nntp now.
  


Just curiose, but... what does NNTP have to do with your ISP?

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


  1   2   >