Re: [Haskell-cafe] New repo location for the network package

2010-10-28 Thread Magnus Therning
On Wed, Oct 27, 2010 at 22:53, Johan Tibell johan.tib...@gmail.com wrote:
 Hi all,

 To ease my maintenance burden, I've moved the network package repo to:

    http://github.com/haskell/network

 Patches are accepted either in the git mbox format, as normal (diff)
 patch files, or as GitHub pull requests.

 P.S. If you want to get added to the haskell GitHub organization, just
 drop me an email.

Ah, the use of github is spreading :-)

If I, as the developer of the FOO Haskell package, want to move to use
github, can I get a source repo under that organisation as well?
I'm asking since I am considering taking some of my packages from
patch-tag to github (it's really github I want, it's unfortunate that
it also means I'll have to leave darcs), it would then be nice to have
those repos as a part of the haskell organisation.

/M

-- 
Magnus Therning                        (OpenPGP: 0xAB4DFBA4)
magnus@therning.org          Jabber: magnus@therning.org
http://therning.org/magnus         identi.ca|twitter: magthe
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2010-10-28 Thread Christopher Done
On 28 October 2010 03:41, Victor Oliveira rhapso...@gmail.com wrote:
 Hi Cafe,

 I really liked the new colors of haskell theme, but...

 Is really red a good color for links?  At least for me, red links looks like 
 broken or already visited ones.

 And the worst is hackage docs. It is really eye tiring to read.

 It's just a thought. Maybe it just with me.

 What about you?

This was my initial impression. Red means broken. Links are blue. I
thought maybe no one would be bothered by it, but I see one person at
least.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2010-10-28 Thread Michael Snoyman
On Thu, Oct 28, 2010 at 9:50 AM, Christopher Done
chrisd...@googlemail.com wrote:
 On 28 October 2010 03:41, Victor Oliveira rhapso...@gmail.com wrote:
 Hi Cafe,

 I really liked the new colors of haskell theme, but...

 Is really red a good color for links?  At least for me, red links looks like 
 broken or already visited ones.

 And the worst is hackage docs. It is really eye tiring to read.

 It's just a thought. Maybe it just with me.

 What about you?

 This was my initial impression. Red means broken. Links are blue. I
 thought maybe no one would be bothered by it, but I see one person at
 least.

I'm not incredibly bothered by it, but I did find it a bit strange.

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


Re: [Haskell-cafe] Re: Does it deserve to be a hackage package?

2010-10-28 Thread Dmitry V'yal

On 27.10.2010 13:16, Andy Stewart wrote:

Christopher Donechrisd...@googlemail.com  writes:


On 27 October 2010 10:13, Dmitry V'yalakam...@gmail.com  wrote:

While ago I had a question about opening the url in the default browser from
haskell program. I didn't get any immediate answers so I wrote my own
solution. On Linux it uses xdg-open and on Windows - ShellExecute Api.



Does it deserve to be a hackage package?


If it's not in an existing small library, yes. If I have to have a
dependency on gtk2hs just to do that, I'd rather have a small library.
Does it work on OS X? If not, I'm sure someone would submit a patch
for that. This can also be used for opening the file browser and such,
right?

It's APIs in GIO library (a sub-library in gtk2hs), you just need depend
on GIO don't need depend any other library.

Dmitry, it's unnecessary since GIO can do better with same experience
both Windows and Linux, don't need any external program help.
Infact, GIO not just call default browser for url, it can call any
program to open any format.


Ok then. I'll wait for it.
I hope binary package for Windows would be provided too. Currently I 
can't figure out how build gtk2hs there.

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


Re: [Haskell-cafe] On being called a troll

2010-10-28 Thread Ketil Malde
Antoine Latter aslat...@gmail.com writes:

 I have posted to this list for over 3 years now and until lately it was an
 enlightening experience. The responses to my questions have usually been
 helpful and friendly.

Right - in most cases, the Haskell community is fanatically non-hostile.
At least compared to other mailing lists or newsgroups I've subscribed
to. 

 I'm in favor of keeping personal accusations off of this list. Calling
 someone a troll on a public list isn't really helpful to the conversation.

+1 

I think the trollishness refers to somebody with three years experience
with Haskell and this list, insisting that there should be a centralized
leadership, or that somebody ought to commission some particular
functionality.  This shows a surprising lack of understanding of how an
open-source community works, which is easyly interpreted as trolling
(i.e. posting just to provoke a response).

 In extreme cases, I think some folks have the ability to moderate the
 list - so it isn't like we need to resort to public personal attacks
 to keep the discussion productive.

 I am 42 now and am surprised how much this still hurts, after all I survived
 the schoolyard bullies and who would have thought that these times would
 ever come again?

One difference is that online memory is very short.  When you ask
another question, this thread will be forgotten, and focus will be back
on subject, not person.

 I urge you, my fellow haskellers, to show some restraint when we are dealing
 with one another on this list. And to think twice before you launch a
 personal attack.

I replied in this thread - I hope you didn't find my replies offensive,
but if I were, I apologize. 

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2010-10-28 Thread Alexander Kjeldaas
Hi haskellers.

Reading through the Haskell Prime suggestions, one that caught my eye is the
CompositionAsDot issue.

I'm especially thinking of the Pro issue:
* Paves the way for using . as the selection operator in improved record or
module systems

I think I recognize this issue from common lisp.  Basically the code becomes
verbose because accessor functions usually need to redundantly encode the
name of the module or struct in its name.  The alternative is to require
users to import qualified, and that doesn't deal with the occasional
intra-module collision.

This is a typical large-software-system issue and it annoys me a little that
Haskell seems to have inherited the problems from common lisp.

I worry that in large systems, a very conservative coding standard is needed
with quite verbose naming conventions as that's the only safe way to avoid
these conflicts in a large system while allowing refactoring code etc.

What is the current thinking on this issue?

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


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

2010-10-28 Thread Erik Hesselink
On Wed, Oct 27, 2010 at 23:09, Andrew Coppin
andrewcop...@btinternet.com wrote:
 On 27/10/2010 05:00 PM, John Lato wrote:

 I am somewhat surprised that all capabilities must be ready for GC; I
 thought with the parallel GC that wouldn't be necessary.  But I don't know
 much about GC implementations so I try not to let their behavior surprise me
 too much.

 GHC has a _parallel_ GC implementation, meaning that the GC event runs in
 parallel on several cores. But it does not (yet) have _concurrent_ GC,
 meaning that a GC event can happen at the same time as Haskell threads are
 running. (Basically, which Haskell code running, the references between
 objects could change while the GC engine is trying to analyse them, which
 would be Bad.) I understand that the developers are actively working on
 fixing this, since it can sometimes have a significant effect on the
 performance of multicore programs...

I thought that young generations could be GC'ed while other threads
were running, while collecting the old generation required
synchronizing all threads. This seems to be what is shown on
http://hackage.haskell.org/trac/ghc/blog/new-gc-preview as well.

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


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

2010-10-28 Thread Christopher Done
On 28 October 2010 10:15, Alexander Kjeldaas
alexander.kjeld...@gmail.com wrote:
 I think I recognize this issue from common lisp.  Basically the code becomes
 verbose because accessor functions usually need to redundantly encode the
 name of the module or struct in its name.  The alternative is to require
 users to import qualified, and that doesn't deal with the occasional
 intra-module collision.

 This is a typical large-software-system issue and it annoys me a little that
 Haskell seems to have inherited the problems from common lisp.
 I worry that in large systems, a very conservative coding standard is needed
 with quite verbose naming conventions as that's the only safe way to avoid
 these conflicts in a large system while allowing refactoring code etc.

As someone with a nontrivial project (5k~ LoC) I recently I
experienced first hand this issue. I first went with records with
whatever field names I wanted, and then imported qualified. But then I
need a module for every single record type in case (and they did) of
clashes. I have 40~ record types in this project, so that's just no
feasible. I did it anyway. I really don't like having to qualify
everything though. I end up with a huge import list of as X, as Y, as
Z, etc. and this is difficult to follow. And I don't like reading
qualified code so much. If I import with more descriptive names, e.g.
`as Submission', `as SubmissionAuthor', etc. it becomes more verbose
than merely prefixing the accessor functions. I tried out record
systems like Has, because that system has accessors which only care if
a record /has/ a certain field, and new ones can be constructed
arbitrarily. But then I miss out of Haddock's documentation, not to
mention deriving goodies and pattern matching. So I stuck with the
Common Lisp approach.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] New repo location for the network package

2010-10-28 Thread John Lato

 From: Magnus Therning mag...@therning.org

 On Wed, Oct 27, 2010 at 22:53, Johan Tibell johan.tib...@gmail.com
 wrote:
  Hi all,
 
  To ease my maintenance burden, I've moved the network package repo to:
 
  Â  Â http://github.com/haskell/network
 
  Patches are accepted either in the git mbox format, as normal (diff)
  patch files, or as GitHub pull requests.
 
  P.S. If you want to get added to the haskell GitHub organization, just
  drop me an email.

 Ah, the use of github is spreading :-)

 If I, as the developer of the FOO Haskell package, want to move to use
 github, can I get a source repo under that organisation as well?
 I'm asking since I am considering taking some of my packages from
 patch-tag to github (it's really github I want, it's unfortunate that
 it also means I'll have to leave darcs), it would then be nice to have
 those repos as a part of the haskell organisation.


Similarly, what's the remit of the Haskell organization on github?  Is the
intention to be an umbrella for any haskell package, or more restricted?  I
have the same question as Magnus (although in my case I took over something
on github; if I could move to darcs and preserve history I would).

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


Re: [Haskell-cafe] Re: Does it deserve to be a hackage package?

2010-10-28 Thread Andy Stewart
Dmitry V'yal akam...@gmail.com writes:

 On 27.10.2010 13:16, Andy Stewart wrote:
 Christopher Donechrisd...@googlemail.com  writes:

 On 27 October 2010 10:13, Dmitry V'yalakam...@gmail.com  wrote:
 While ago I had a question about opening the url in the default browser 
 from
 haskell program. I didn't get any immediate answers so I wrote my own
 solution. On Linux it uses xdg-open and on Windows - ShellExecute Api.

 Does it deserve to be a hackage package?

 If it's not in an existing small library, yes. If I have to have a
 dependency on gtk2hs just to do that, I'd rather have a small library.
 Does it work on OS X? If not, I'm sure someone would submit a patch
 for that. This can also be used for opening the file browser and such,
 right?
 It's APIs in GIO library (a sub-library in gtk2hs), you just need depend
 on GIO don't need depend any other library.

 Dmitry, it's unnecessary since GIO can do better with same experience
 both Windows and Linux, don't need any external program help.
 Infact, GIO not just call default browser for url, it can call any
 program to open any format.

 Ok then. I'll wait for it.
 I hope binary package for Windows would be provided too. Currently I can't 
 figure out how build
 gtk2hs there.
I guess we won't provide binary package for Windows, but i can tell you
how to build gtk2hs on Windows:

First:
see http://code.haskell.org/gtk2hs/INSTALL

short summary:

http://www.gtk.org/download-windows.html

and download one of the All-in-one bundles.

Note that you need to have ~/.cabal/bin on your PATH since otherwise building
the libraries will fail, saying that e.g. gtk2hsC2hs cannot be found.

Then do cabal install gtk2hs-buildtools gtk will install gtk2hs.

I suggest you pull gtk2hs darcs code first to test the GIO code i send
you before.

When build gtk2hs darcs, you need replace cabal install gtk2hs-buildtools gtk 
with below commands:

   darcs get --lazy http://code.haskell.org/gtk2hs/
   cd ./gtk2hs
   sudo chmod +x ./bootstrap.sh
   ./bootstrap.sh 

Cheers,

  -- Andy



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


Re: [Haskell-cafe] Re: Map constructor in a DSL

2010-10-28 Thread Dupont Corentin
Thank you for your rich responses.

Indeed I think I miss some thinks in my DSL, that would make things easier
to deal with lists and first class functions.
I don't really know what for now.
Perhaps a List Constructor? Or a constructor on functions like yours Ryan?
EAp :: Exp ref (a - b) - Exp ref a - Exp ref b
It's from which DSL? It is accessible on the net?

Chris suggested me that I can only define the Foldr constructor and deduce
Map from it.
But maybe I have to add a List constructor for that.

But in the suggestions from Ryan and Brandon I don't understand why I should
add an extra type parameter and what it is!

Steffen: Wow nice. I'll integrate that ;)

I'm also looking at the Atom's DSL to get inspiration.
Something I don't understand in it is that it has two languages, on typed:

data E a where
  VRef:: V a - E a
  Const   :: a - E a
  Cast:: (NumE a, NumE b) = E a - E b
  Add :: NumE a = E a - E a - E a
etc.

And, along with it, an untyped counterpart:

-- | An untyped term.
data UE
  = UVRef UV
  | UConst Const
  | UCast  Type UE
  | UAdd   UE UE
etc.

What that for? What's the use of having beautiful GADT if you have to
maintain an untyped ADT aside??

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


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

2010-10-28 Thread John Smith

On 28/10/2010 10:15, Alexander Kjeldaas wrote:


Hi haskellers.

Reading through the Haskell Prime suggestions, one that caught my eye is the 
CompositionAsDot issue.

I'm especially thinking of the Pro issue:
* Paves the way for using . as the selection operator in improved record or 
module systems

I think I recognize this issue from common lisp.  Basically the code becomes 
verbose because accessor functions usually
need to redundantly encode the name of the module or struct in its name.  The 
alternative is to require users to import
qualified, and that doesn't deal with the occasional intra-module collision.

This is a typical large-software-system issue and it annoys me a little that 
Haskell seems to have inherited the
problems from common lisp.

I worry that in large systems, a very conservative coding standard is needed 
with quite verbose naming conventions as
that's the only safe way to avoid these conflicts in a large system while 
allowing refactoring code etc.

What is the current thinking on this issue?

Thanks,
Alexander


TypeDirectedNameResolution would solve the problem you describe, and make Haskell a lot more suitable for real-world 
development (which is usually large-software-system, or at least must be capable of scaling to one).


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


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

2010-10-28 Thread Victor Oliveira
Maybe we can keep at least the docs without red links. It's very eye tiring to 
read. One option is to keep the links black with :hover red.

[]s
Victor

On Oct 28, 2010, at 5:52 AM, Michael Snoyman wrote:

 On Thu, Oct 28, 2010 at 9:50 AM, Christopher Done
 chrisd...@googlemail.com wrote:
 On 28 October 2010 03:41, Victor Oliveira rhapso...@gmail.com wrote:
 Hi Cafe,
 
 I really liked the new colors of haskell theme, but...
 
 Is really red a good color for links?  At least for me, red links looks 
 like broken or already visited ones.
 
 And the worst is hackage docs. It is really eye tiring to read.
 
 It's just a thought. Maybe it just with me.
 
 What about you?
 
 This was my initial impression. Red means broken. Links are blue. I
 thought maybe no one would be bothered by it, but I see one person at
 least.
 
 I'm not incredibly bothered by it, but I did find it a bit strange.
 
 Michael

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


[Haskell-cafe] ANN: language-java-0.1.0

2010-10-28 Thread Niklas Broberg
Hi café,

I found myself in need of a source manipulation suite for Java code. A
hackage search turned up nothing, so I wrote one:

http://hackage.haskell.org/package/language-java

I'm sure there are a number of bugs waiting to be discovered, my own
testing hasn't been overly extensive. I'm setting up a trac, will
follow up with its location once it's up.

Known short-coming: Annotations are not yet supported.

Cheers,

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


[Haskell-cafe] Re: ANN: language-java-0.1.0

2010-10-28 Thread Niklas Broberg
 I'm sure there are a number of bugs waiting to be discovered, my own
 testing hasn't been overly extensive. I'm setting up a trac, will
 follow up with its location once it's up.

http://trac.haskell.org/language-java

Cheers,

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


Re: [Haskell-cafe] New repo location for the network package

2010-10-28 Thread Malcolm Wallace

 if I could move to darcs and preserve history I would.


Search for git fastexport and darcs-fastconvert.

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


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

2010-10-28 Thread Sebastian Fischer

Maybe we can keep at least the docs without red links.


Pick the Classic style in the style menu. It will remember your  
choice.


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


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

2010-10-28 Thread Victor Nazarov
On Wed, Oct 27, 2010 at 7:46 PM, Martijn Schrage mart...@oblomov.com wrote:
 On 27-10-10 16:20, Victor Nazarov wrote:

 Very cool. I'll incorporate your changes, If you don't mind.

 Not at all.

 However, I have some minor remarks.
 You shouldn't override hscall function, or you may break partial
 application implementation. And you shouldn't overide properties of
 evalFn, I wonder that this doesn't break your example...

 Ah, yes, that was the guessing part. I just hacked around a bit and thought
 I'd leave the correct definition to someone who actually knows what they're
 doing :-)

 var evalFn = new $hs.Func(1);
 evalFn.evaluate(arg) = function(arg) {
   var argStr = $hs.fromHaskellString(arg);
   var res = eval(argStr);
   return $hs.toHaskellString(arg); // This function should be added to
 $hs object/namespace
 }

 This works without any problems (after changing the second line to:
 evalFn.evaluate = function(arg) {)

 I think we should do something like this:

 data JsObject = ... -- Should be made abstract

 and

 eval :: String -  [JsObject] -  JS JsObject

 So we can pass around javascript-objects in haskell program and bind
 them back into javascript calls.
 And use some conversion functions in case when we need data:

 jsObjectToString :: JsObject -  JS String
 jsObjectToInt :: JsObject -  JS Int

 Yes, that seems logical. The JsObjects can then be treated similar to
 IORefs.

 What are your plans with the package? In my opinion, this work could be
 extremely useful for building Ajax apps, and it doesn't seem to be that far
 from being usable already.

 Some interesting near-future work I can think of:

 - Make it work on all major browsers
This shouldn't be a problem...

 - A faster and more robust module loader (now it loses a lot of time on 404
 errors, trying to access modules in the wrong package dir)
I agree that this is important. I'll look into it...

 - Basic type checking for the top-level Haskell functions
I think this should be implemented via FFI export implementation.

 - Marshaling between Haskell and JavaScript values
Again It's mostly implementation of Haskell FFI

 - JQuery support
 - Nice ways to build JavaScript (and JQuery) expressions in Haskell
Dmitry Golubovski had a code generator from WebIDL wich he used to
support HTML5 DOM in YHC.

 - Support more libraries and packages (Parsec would be interesting)

I think Parsec should work right now out of the box. But I don't have
time to investigate it...

 I can find some spare time to work on this. I'm sure there will be others as
 well.


I want to make code generator more smart and generate more optimized
code. To archive this I need to rewrite it in Monad or
ApplicativeFunctor style. I need Reader monad there to pass some
environment.

I think ghc-packages support is rather trivial to add. So module
loader will always know the one true location of module.

I want to implement continuation passing style calling convention for
Haskell-values as an alternative to two existing ones: plain and
trampoline. This will even allow multithreading emulation (with
setTimer as a scheduling mechanism...)

And last, I want to dig into FFI implementation. I think GHC doesn't
allow extensible FFI. So you won't be able to write javascript
calling convention in Haskell source file. But I think we can overcome
this using ccall for example...

I don't know what tasks are of most priority. I do what I feel like
doing :) I'll be very interested to see what other people can do with
all this. And I think that we should switch to application driven
development some time with something like Yampa-based game running in
web-browser...

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


[Haskell-cafe] Re: Map constructor in a DSL

2010-10-28 Thread steffen
I think you would love to have a look at AwesomePrelude[1] or a fork
of AwesomePrelude using associated types[2]
Some more background information by Tom Lokhorst [3][4].

[1] http://github.com/tomlokhorst/AwesomePrelude
[2] http://github.com/urso/AwesomePrelude
[3] http://tom.lokhorst.eu/2009/09/deeply-embedded-dsls
[4] http://tom.lokhorst.eu/2010/02/awesomeprelude-presentation-video

On 28 Okt., 12:09, Dupont Corentin corentin.dup...@gmail.com wrote:
 Thank you for your rich responses.

 Indeed I think I miss some thinks in my DSL, that would make things easier
 to deal with lists and first class functions.
 I don't really know what for now.
 Perhaps a List Constructor? Or a constructor on functions like yours Ryan?
 EAp :: Exp ref (a - b) - Exp ref a - Exp ref b
 It's from which DSL? It is accessible on the net?

 Chris suggested me that I can only define the Foldr constructor and deduce
 Map from it.
 But maybe I have to add a List constructor for that.

 But in the suggestions from Ryan and Brandon I don't understand why I should
 add an extra type parameter and what it is!

 Steffen: Wow nice. I'll integrate that ;)

 I'm also looking at the Atom's DSL to get inspiration.
 Something I don't understand in it is that it has two languages, on typed:

 data E a where
   VRef    :: V a - E a
   Const   :: a - E a
   Cast    :: (NumE a, NumE b) = E a - E b
   Add     :: NumE a = E a - E a - E a
 etc.

 And, along with it, an untyped counterpart:

 -- | An untyped term.
 data UE
   = UVRef UV
   | UConst Const
   | UCast  Type UE
   | UAdd   UE UE
 etc.

 What that for? What's the use of having beautiful GADT if you have to
 maintain an untyped ADT aside??

 Corentin

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


Re: [Haskell-cafe] Re: Map constructor in a DSL

2010-10-28 Thread Dupont Corentin
This is really cool.
The blog post [3] finally explained to me why I had so much difficulties
implementing the Equal constructor ;)
I shared this in a previous thread:
http://osdir.com/ml/haskell-cafe@haskell.org/2010-06/msg00369.html

Maybe latter I'll shift to a class type based DSL. They seem more generic
than data type based.

Corentin

On Thu, Oct 28, 2010 at 2:02 PM, steffen steffen.sier...@googlemail.comwrote:

 I think you would love to have a look at AwesomePrelude[1] or a fork
 of AwesomePrelude using associated types[2]
 Some more background information by Tom Lokhorst [3][4].

 [1] http://github.com/tomlokhorst/AwesomePrelude
 [2] http://github.com/urso/AwesomePrelude
 [3] http://tom.lokhorst.eu/2009/09/deeply-embedded-dsls
 [4] http://tom.lokhorst.eu/2010/02/awesomeprelude-presentation-video

 On 28 Okt., 12:09, Dupont Corentin corentin.dup...@gmail.com wrote:
  Thank you for your rich responses.
 
  Indeed I think I miss some thinks in my DSL, that would make things
 easier
  to deal with lists and first class functions.
  I don't really know what for now.
  Perhaps a List Constructor? Or a constructor on functions like yours
 Ryan?
  EAp :: Exp ref (a - b) - Exp ref a - Exp ref b
  It's from which DSL? It is accessible on the net?
 
  Chris suggested me that I can only define the Foldr constructor and
 deduce
  Map from it.
  But maybe I have to add a List constructor for that.
 
  But in the suggestions from Ryan and Brandon I don't understand why I
 should
  add an extra type parameter and what it is!
 
  Steffen: Wow nice. I'll integrate that ;)
 
  I'm also looking at the Atom's DSL to get inspiration.
  Something I don't understand in it is that it has two languages, on
 typed:
 
  data E a where
VRef:: V a - E a
Const   :: a - E a
Cast:: (NumE a, NumE b) = E a - E b
Add :: NumE a = E a - E a - E a
  etc.
 
  And, along with it, an untyped counterpart:
 
  -- | An untyped term.
  data UE
= UVRef UV
| UConst Const
| UCast  Type UE
| UAdd   UE UE
  etc.
 
  What that for? What's the use of having beautiful GADT if you have to
  maintain an untyped ADT aside??
 
  Corentin
 
  ___
  Haskell-Cafe mailing list
  haskell-c...@haskell.orghttp://
 www.haskell.org/mailman/listinfo/haskell-cafe
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe

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


[Haskell-cafe] cabal mystery (#562?)

2010-10-28 Thread Conor McBride

Hi

I've just installed cabal-install (just as a user: I am nowhere
near root) on our unix server at work. That went fine.

Clearly, the sensible thing to do next is get hold of an up-to-date
package list. So, I tried

co...@cafe:~$ cabal update
Downloading the latest package list from hackage.haskell.org
cabal: Codec.Compression.Zlib: premature end of compressed stream

Here's the verbose version.

co...@cafe:~$ cabal -v3 update
Downloading the latest package list from hackage.haskell.org
Sending:
GET http://hackage.haskell.org/packages/archive/00-index.tar.gz HTTP/1.1
User-Agent: cabal-install/0.8.2
Host: hackage.haskell.org
proxy uri host: www-cache.strath.ac.uk, port: :8080
Creating new connection to www-cache.strath.ac.uk:8080
Received:
HTTP/1.0 200 OK
Date: Thu, 28 Oct 2010 12:59:17 GMT
Server: Apache/2.2.9 (Debian) mod_python/3.3.1 Python/2.5.2
Last-Modified: Thu, 28 Oct 2010 12:38:17 GMT
ETag: 1888003-20bb4e-493ac9dbe6040
Accept-Ranges: bytes
Content-Length: 2145102
Content-Type: application/x-tar
Content-Encoding: x-gzip
X-Cache: MISS from rouble-1.cc.strath.ac.uk
X-Cache-Lookup: MISS from rouble-1.cc.strath.ac.uk:8080
Via: 1.1 rouble-1.cc.strath.ac.uk:8080 (squid/2.7.STABLE7)
Connection: close
Downloaded to
/home/s3/conor/.cabal/packages/hackage.haskell.org/00-index.tar.gz
cabal: Codec.Compression.Zlib: premature end of compressed stream

So I poked about a bit, and I see it's a known issue. As a user, I'm
wondering what to do.

Just now,

  wget http://hackage.haskell.org/packages/archive/00-index.tar.gz

is chugging away quite nicely.

Anyhow, is there
  (a) something I can do to avoid this problem? I couldn't quite
grasp what to do from the TRAC
  (b) some way to persuade cabal to use the file I'm currently
downloading?

Any tips to keep the gremlins at bay gratefully appreciated.

Thanks

Conor

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


Re: [Haskell-cafe] Test command line programs

2010-10-28 Thread Dupont Corentin
Thanks for your responses.
Of course I already test every pure parts of my program easily.

For now, user input is treated in 2 different ways:
- direct IO with hgetLine and like functions (blocking)
- the same but I directly push the strings on a TChan for another thread to
treat them (not blocking).

The second is easy to test, since all I have to do is to insert test strings
on the TChan to simulate user's input.
Maybe I can do everything this way.

But for example I had a bug of two threads inter-blocked on the handle.
These tests were not able to show it, since the test takes place not on the
handle itself but a little after.
Maybe mock handle can help.

Corentin


On Tue, Oct 26, 2010 at 11:32 PM, Antoine Latter aslat...@gmail.com wrote:

 On Tue, Oct 26, 2010 at 11:11 AM, Dupont Corentin
 corentin.dup...@gmail.com wrote:
  Hello again café,
 
  I have a command line program that takes input from various handles
  (actually network sockets) like this:
 
  s - hGetLine h
  etc.
 
  I'd like to unit test this. How can I do?
  I'd like to inject data on the handle so that all the input chain is
 tested.

 I haven't tested it yet, but this mock handle will eventually work in GHC
 7:


 http://hackage.haskell.org/trac/ghc/attachment/ticket/4144/ByteStringHandle.hs

 At least, the bug report about how it didn't work has now been closed :-)

 I don't remember which operations worked and which didn't - getChar
 would work, but getContents would fail.

 The others have great advice, that you should try to isolate the logic
 of your code from IO for precisely this reason - so it is easily
 testable.

 Antoine

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


Re: [Haskell-cafe] Re: Map constructor in a DSL

2010-10-28 Thread Emil Axelsson

2010-10-28 12:09, Dupont Corentin skrev:

I'm also looking at the Atom's DSL to get inspiration.
Something I don't understand in it is that it has two languages, on typed:

data  E  a  where
   VRef ::  V  a  -  E  a
   Const::  a  -  E  a
   Cast ::  (NumE  a,  NumE  b)  =  E  a  -  E  b
   Add  ::  NumE  a  =  E  a  -  E  a  -  E  a

etc.

And, along with it, an untyped counterpart:

-- | An untyped term.
data  UE

   =  UVRef  UV
   |  UConst  Const

   |  UCast   Type  UE
   |  UAddUE  UE

etc.

What that for? What's the use of having beautiful GADT if you have to maintain 
an untyped ADT aside??


The general reason for this (I can't speak for Atom specifically) is 
that the typed representation can be quite hard to work with when you 
want to transform the expressions. But you can still often limit the use 
of the untyped representation to the last stages in the backend, which 
means that you can enjoy the typed representation in the initial stages.


In the development version of Feldspar, we use a typed representation 
combined with type-safe casting using Data.Typeable. Although not ideal, 
this seems to be better than having two different representations.


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


Re: [Haskell-cafe] cabal mystery (#562?)

2010-10-28 Thread Daniel Fischer
On Thursday 28 October 2010 15:08:09, Conor McBride wrote:
 So I poked about a bit, and I see it's a known issue. As a user, I'm
 wondering what to do.

Try with HTTP-4000.0.9 instead of 4000.0.7?


 Just now,

    wget http://hackage.haskell.org/packages/archive/00-index.tar.gz

 is chugging away quite nicely.

 Anyhow, is there
    (a) something I can do to avoid this problem? I couldn't quite
          grasp what to do from the TRAC
    (b) some way to persuade cabal to use the file I'm currently
          downloading?

 Any tips to keep the gremlins at bay gratefully appreciated.

Don't feed after midnight, don't get them wet, I think were the tips.


 Thanks

 Conor

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


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

2010-10-28 Thread Ben Millwood
On Thu, Oct 28, 2010 at 11:12 AM, John Smith volderm...@hotmail.com wrote:
 On 28/10/2010 10:15, Alexander Kjeldaas wrote:

 Hi haskellers.

 Reading through the Haskell Prime suggestions, one that caught my eye is
 the CompositionAsDot issue.

 I'm especially thinking of the Pro issue:
 * Paves the way for using . as the selection operator in improved record
 or module systems


Here's the wiki page:
http://hackage.haskell.org/trac/haskell-prime/wiki/CompositionAsDot

Personally I think function composition is what Haskell is all about
and it is absolutely essential that the syntax for it be lightweight.
If we think using . as qualification as well as composition is
confusing, I'm much more inclined to say using it as qualification was
a mistake.

The comment on the wiki page about $ being more common in reality is
not even close to true for my own code, and I don't think I'm unusual
in that regard.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2010-10-28 Thread Kevin Jardine
To be fair to the Haddock designer, red links are common these days.

Here's two examples (among many):

http://www.bbc.co.uk/
http://www.slate.com/

In the second case the site uses blue, black *and* red links to
distinguish different types of content. They are all in bold and
underline when hovered over so are not hard to distinguish from
ordinary text.

Kevin.

On Oct 28, 9:52 am, Michael Snoyman mich...@snoyman.com wrote:
 On Thu, Oct 28, 2010 at 9:50 AM, Christopher Done



 chrisd...@googlemail.com wrote:
  On 28 October 2010 03:41, Victor Oliveira rhapso...@gmail.com wrote:
  Hi Cafe,

  I really liked the new colors of haskell theme, but...

  Is really red a good color for links?  At least for me, red links looks 
  like broken or already visited ones.

  And the worst is hackage docs. It is really eye tiring to read.

  It's just a thought. Maybe it just with me.

  What about you?

  This was my initial impression. Red means broken. Links are blue. I
  thought maybe no one would be bothered by it, but I see one person at
  least.

 I'm not incredibly bothered by it, but I did find it a bit strange.

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


Re: [Haskell-cafe] New repo location for the network package

2010-10-28 Thread Johan Tibell
On Thu, Oct 28, 2010 at 12:19 AM, Magnus Therning mag...@therning.org wrote:
 If I, as the developer of the FOO Haskell package, want to move to use
 github, can I get a source repo under that organisation as well?
 I'm asking since I am considering taking some of my packages from
 patch-tag to github (it's really github I want, it's unfortunate that
 it also means I'll have to leave darcs), it would then be nice to have
 those repos as a part of the haskell organisation.

The GitHub organization was intended for core packages (i.e. packages
in the Haskell Platform.) By having a shared organization, these
libraries don't have to live under any single developer's account and
we can change maintainers without changing the repo location.

For any other package, just upload it under your own GitHub user.

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


Re: [Haskell-cafe] New repo location for the network package

2010-10-28 Thread Johan Tibell
On Thu, Oct 28, 2010 at 2:41 AM, John Lato jwl...@gmail.com wrote:
 Similarly, what's the remit of the Haskell organization on github?  Is the
 intention to be an umbrella for any haskell package, or more restricted?  I
 have the same question as Magnus (although in my case I took over something
 on github; if I could move to darcs and preserve history I would).

See my reply to Magnus. I don't think it's scalable to put every
Hackage package under one organization (and I don't think we gain much
from doing so.) For now I think we should reserve the organization for
core packages (i.e. HP packages.)

For converting a repo and preserve history, see


http://www.serpentine.com/blog/2010/10/21/how-to-migrate-from-darcs-to-mercurial-or-git/

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


Re: [Haskell-cafe] New repo location for the network package

2010-10-28 Thread Magnus Therning
On Thu, Oct 28, 2010 at 15:58, Johan Tibell johan.tib...@gmail.com wrote:
 On Thu, Oct 28, 2010 at 12:19 AM, Magnus Therning mag...@therning.org wrote:
 If I, as the developer of the FOO Haskell package, want to move to use
 github, can I get a source repo under that organisation as well?
 I'm asking since I am considering taking some of my packages from
 patch-tag to github (it's really github I want, it's unfortunate that
 it also means I'll have to leave darcs), it would then be nice to have
 those repos as a part of the haskell organisation.

 The GitHub organization was intended for core packages (i.e. packages
 in the Haskell Platform.) By having a shared organization, these
 libraries don't have to live under any single developer's account and
 we can change maintainers without changing the repo location.

Fair enough.  Do you have enough buy-in to make sure that the github
organisation becomes the best location for *all* HP packages?

That is, can I stop going to Hackage to find the home for HP packages?

/M

-- 
Magnus Therning                        (OpenPGP: 0xAB4DFBA4)
magnus@therning.org          Jabber: magnus@therning.org
http://therning.org/magnus         identi.ca|twitter: magthe
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] New repo location for the network package

2010-10-28 Thread Johan Tibell
On Thu, Oct 28, 2010 at 8:06 AM, Magnus Therning mag...@therning.org wrote:
 Fair enough.  Do you have enough buy-in to make sure that the github
 organisation becomes the best location for *all* HP packages?

 That is, can I stop going to Hackage to find the home for HP packages?

Probably not. I don't want to force any maintainers to switch VCS. For
now, I would just like to make it possible for people who prefer Git
(and GitHub) to use that to maintain their packages.

There's also an issue with libraries that GHC depends on: the current
build system relies on being able to check these out using darcs.

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


[Haskell-cafe] libffi mystery

2010-10-28 Thread Conor McBride

Hi again

This is what happens when you write actual for-users for-running
programs, I guess. It's been a while...

I've been writing some software with Network.CGI etc, which we
run on the deparmental web server for my students to use. But
we just had a bit of an upgrade on the system, and now (once
cabal was properly installed) everything compiles again but
nothing works.

The reason appears to be that the executables now depend on a
dynamic library

  libffi.so.5

which is not (and I am told cannot become) available on our
web server.

The current workaround is to compile with 6.8.2, which is
survivable and will hopefully get me through the semester, but
not ideal.

Is there some way I can get some more static linking to happen?
I did poke about online a bit and found some remarks to the
effect that GHC got so much more portable after switching to the
dynamic libffi. That sounds great, but tough luck for me.

So, being both powerless and clueless, I can only ask:

  how hosed am I?

I'd be grateful for any glimmers of light.

Thanks

Conor

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


Re: [Haskell-cafe] New repo location for the network package

2010-10-28 Thread Bryan O'Sullivan
On Thu, Oct 28, 2010 at 8:06 AM, Magnus Therning mag...@therning.orgwrote:

 Fair enough.  Do you have enough buy-in to make sure that the github
 organisation becomes the best location for *all* HP packages?

 That is, can I stop going to Hackage to find the home for HP packages?


That's never been our intention. github is for in-progress source trees;
Hackage is for releases of code.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


RE: [Haskell-cafe] libffi mystery

2010-10-28 Thread Sittampalam, Ganesh
Conor McBride wrote:

 Is there some way I can get some more static linking to happen?
 I did poke about online a bit and found some remarks to the effect
 that GHC got so much more portable after switching to the dynamic
 libffi. That sounds great, but tough luck for me.  
 
 So, being both powerless and clueless, I can only ask:
 
how hosed am I?
 
 I'd be grateful for any glimmers of light.

Have you tried passing -optl-static to ghc (which causes -static to be
passed to ld)?

Ganesh

=== 
Please access the attached hyperlink for an important electronic communications 
disclaimer: 
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html 
=== 

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


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

2010-10-28 Thread Andrew Coppin

On 28/10/2010 09:25 AM, Erik Hesselink wrote:

On Wed, Oct 27, 2010 at 23:09, Andrew Coppin
andrewcop...@btinternet.com  wrote:

GHC has a _parallel_ GC implementation, meaning that the GC event runs in
parallel on several cores. But it does not (yet) have _concurrent_ GC,
meaning that a GC event can happen at the same time as Haskell threads are
running. (Basically, which Haskell code running, the references between
objects could change while the GC engine is trying to analyse them, which
would be Bad.) I understand that the developers are actively working on
fixing this, since it can sometimes have a significant effect on the
performance of multicore programs...

I thought that young generations could be GC'ed while other threads
were running, while collecting the old generation required
synchronizing all threads. This seems to be what is shown on
http://hackage.haskell.org/trac/ghc/blog/new-gc-preview as well.


I expect it to land in GHC HEAD in a few months time, and it should be 
in the autumn 2011 major release of GHC.


In other words, this isn't how GHC works now, it's how some future 
version will work.


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


Re: [Haskell-cafe] Re: Map constructor in a DSL

2010-10-28 Thread Ryan Ingram
On Thu, Oct 28, 2010 at 3:09 AM, Dupont Corentin
corentin.dup...@gmail.com wrote:
 EAp :: Exp ref (a - b) - Exp ref a - Exp ref b
 It's from which DSL? It is accessible on the net?

It's my own, just written off the top of my head as an example.
Accessible on the net: yes, it's in your email. there's nothing
more.

 But in the suggestions from Ryan and Brandon I don't understand why I should
 add an extra type parameter and what it is!

I don't know in Brandon's case, but in my case it's for two reasons:
(1) It allows you to write multiple interpreters for the language by
changing the type of variables passed around.  But, that's not
important if you are only planning to have a single interpreter.
(2) By parametricity, any CExp can't inspect the insides of a
reference; all ELam can do with its argument is pass it to EVar.  If
you have a concrete variable type, you can do weird things like

ELam (\(V x) - EVar (V (x+1)))

which doesn't quite make sense. (how are you returning a variable
containing a different value than the one you passed in?

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


Re: [Haskell-cafe] libffi mystery

2010-10-28 Thread Ketil Malde
Sittampalam, Ganesh ganesh.sittampa...@credit-suisse.com writes:

 Have you tried passing -optl-static to ghc (which causes -static to be
 passed to ld)?

It used to be: -optl-static -optl-pthread
But it doesn't seem to work anymore on my install.

  % ./a.out
  a.out: ../sysdeps/unix/sysv/linux/getpagesize.c:32: __getpagesize: Assertion 
`_rtld_global_ro._dl_pagesize != 0' failed.

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2010-10-28 Thread Erik Hesselink
On Thu, Oct 28, 2010 at 19:06, Andrew Coppin
andrewcop...@btinternet.com wrote:
 On 28/10/2010 09:25 AM, Erik Hesselink wrote:

 On Wed, Oct 27, 2010 at 23:09, Andrew Coppin
 andrewcop...@btinternet.com  wrote:

 GHC has a _parallel_ GC implementation, meaning that the GC event runs in
 parallel on several cores. But it does not (yet) have _concurrent_ GC,
 meaning that a GC event can happen at the same time as Haskell threads
 are
 running. (Basically, which Haskell code running, the references between
 objects could change while the GC engine is trying to analyse them, which
 would be Bad.) I understand that the developers are actively working on
 fixing this, since it can sometimes have a significant effect on the
 performance of multicore programs...

 I thought that young generations could be GC'ed while other threads
 were running, while collecting the old generation required
 synchronizing all threads. This seems to be what is shown on
 http://hackage.haskell.org/trac/ghc/blog/new-gc-preview as well.

 I expect it to land in GHC HEAD in a few months time, and it should be in
 the autumn 2011 major release of GHC.

 In other words, this isn't how GHC works now, it's how some future version
 will work.

Ah, sorry, I missed that.

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


[Haskell-cafe] Edit Hackage

2010-10-28 Thread Andrew Coppin
Today I uploaded a package to Hackage, and rediscovered something that 
you already know: I'm an idiot.


More specifically, I copied the Cabal description from another package 
and then updated all the fields. Except that I forgot to update one. And 
now I have a package which I've erroneously placed in completely the 
wrong category.


Is there any danger that at some point in the future, it might be 
possible to edit a package /after/ it has been released on Hackage? 
There are several reasons why you might wish to do this (beyond 
realising you did something wrong five minutes after hitting the upload 
button): The maintainer might change. The homepage might move. A better 
package might come along, making the existing one obsolete. Or you might 
want to stick a message on the package saying hey, this version has a 
serious bug, please use the next version up instead!


(I guess you wouldn't want to actually change the code content of a 
package. That leaves the potential for several /different/ variants of 
the same package floating around, depending on when people installed 
it. That would be Bad.)


Is there any danger that we might be able to do these kinds of things 
sometime soon?


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


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

2010-10-28 Thread Andrew Coppin

On 28/10/2010 12:30 PM, Sebastian Fischer wrote:

Maybe we can keep at least the docs without red links.


Pick the Classic style in the style menu. It will remember your choice.


Yes, at least with new Haddock you can *change* the style without having 
to actually patch (and recompile) Haddock itself. :-)


In the category of annoying things: Is there any particular *reason* why 
Source appears before Contents? I would think the latter is going to 
get clicked infinitely more often than the former...


(Also, for reasons I can't quite pin down, sometimes the Style button 
appears on top of the Source button. I don't know what causes this 
glitch yet...)


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


Re: [Haskell-cafe] Edit Hackage

2010-10-28 Thread Gregory Crosswhite

On 10/28/10 12:34 PM, Andrew Coppin wrote:
More specifically, I copied the Cabal description from another package 
and then updated all the fields. Except that I forgot to update one. 
And now I have a package which I've erroneously placed in completely 
the wrong category.
I am glad to hear that I am not the only one who has done this.  :-)  I 
second the notion that it would nice to be able to tweak the meta-data 
of a package after uploading it.


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


Re: [Haskell-cafe] Edit Hackage

2010-10-28 Thread Don Stewart
gcross:
 On 10/28/10 12:34 PM, Andrew Coppin wrote:
 More specifically, I copied the Cabal description from another package  
 and then updated all the fields. Except that I forgot to update one.  
 And now I have a package which I've erroneously placed in completely  
 the wrong category.

 I am glad to hear that I am not the only one who has done this.  :-)  I  
 second the notion that it would nice to be able to tweak the meta-data  
 of a package after uploading it.


Status of Infrastructure questions like this are best asked on the
Haskell Reddit.

http://www.reddit.com/r/haskell/search?q=hackagerestrict_sr=onsort=new

In fact, there was a recent announcement about this:

http://cogracenotes.wordpress.com/2010/08/14/policy-on-hackage-server/

Where you can edit tags live on the new server.

-- Don

P.S. I encourage people to use the online forums: Haskell Reddit and Stack
Overflow, as a lot of the question-answering activity has shifted there
now, away from -cafe@

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


Re: [Haskell-cafe] Edit Hackage

2010-10-28 Thread Stephen Tetley
On 28 October 2010 20:59, Don Stewart d...@galois.com wrote:

 Status of Infrastructure questions like this are best asked on the
 Haskell Reddit.

[SNIP]

 P.S. I encourage people to use the online forums: Haskell Reddit and Stack
 Overflow, as a lot of the question-answering activity has shifted there
 now, away from -cafe@

Err, Why?

Having to track three places for information rather than one doesn't
seem like a good swap to me...
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Edit Hackage

2010-10-28 Thread Aleksandar Dimitrov
On Thu, 28 Oct 2010 22:44:04 +0200, Stephen Tetley  
stephen.tet...@gmail.com wrote:
P.S. I encourage people to use the online forums: Haskell Reddit and  
Stack

Overflow, as a lot of the question-answering activity has shifted there
now, away from -cafe@


Err, Why?

Having to track three places for information rather than one doesn't
seem like a good swap to me...


Same here - I find mailing lists a lot easier to follow than both the  
Haskell Reddit and especially StackOverflow. I'm already following Haskell  
Reddit, but I never found StackOverflow to be very nice :-\


Also, I think that the haskell-beginners mailing list is great, I would be  
pained to see it abandoned in favor of StackOverflow.


Just my 2¢.
Aleks
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Edit Hackage

2010-10-28 Thread Don Stewart
stephen.tetley:
 On 28 October 2010 20:59, Don Stewart d...@galois.com wrote:
 
  Status of Infrastructure questions like this are best asked on the
  Haskell Reddit.
 
 [SNIP]
 
  P.S. I encourage people to use the online forums: Haskell Reddit and Stack
  Overflow, as a lot of the question-answering activity has shifted there
  now, away from -cafe@
 
 Err, Why?

The online services provide searchable content, tagging, and the ability
to rate, edit and refer to previous content.  E.g.

http://stackoverflow.com/questions/tagged/haskell?sort=hotpagesize=15
  
 Having to track three places for information rather than one doesn't
 seem like a good swap to me...

It's too late.

The number of subscribers to the Haskell Reddit, for example, is double
the -cafe@, and there are comparable numbers of questions being asked on
the Stack Overflow [haskell] tag, as here -- so anyone who only reads
-cafe@ is already missing a lot of stuff.

A lot of the community has already voted on the efficacy of mailing
lists for large communities, by moving their discussion elsewhere.

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


Re: [Haskell-cafe] Edit Hackage

2010-10-28 Thread Daniel Fischer
On Thursday 28 October 2010 22:44:04, Stephen Tetley wrote:
 On 28 October 2010 20:59, Don Stewart d...@galois.com wrote:
  Status of Infrastructure questions like this are best asked on the
  Haskell Reddit.

 [SNIP]

  P.S. I encourage people to use the online forums: Haskell Reddit and
  Stack Overflow, as a lot of the question-answering activity has
  shifted there now, away from -cafe@

 Err, Why?

 Having to track three places for information rather than one doesn't
 seem like a good swap to me...

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


Re: [Haskell-cafe] Edit Hackage

2010-10-28 Thread John Millikin
On Thu, Oct 28, 2010 at 12:34, Andrew Coppin
andrewcop...@btinternet.com wrote:
 Today I uploaded a package to Hackage, and rediscovered something that you
 already know: I'm an idiot.

 More specifically, I copied the Cabal description from another package and
 then updated all the fields. Except that I forgot to update one. And now I
 have a package which I've erroneously placed in completely the wrong
 category.

Don't worry; of all the various ways to screw up a Hackage upload,
setting the wrong category is just about the least important. Wait
until you've got a few dozen packages in the air, and your hair will
turn grey ;)

 Is there any danger that at some point in the future, it might be possible
 to edit a package /after/ it has been released on Hackage? There are several
 reasons why you might wish to do this (beyond realising you did something
 wrong five minutes after hitting the upload button):

Sadly, the current Hackage maintainers follow the immutability is
good school of design. A few aspects of packages can be modified, but
most (those contained in the .cabal file) cannot.

 The maintainer might change. The homepage might move.

Both of these are handled by uploading a package with a _._._.Z
version number; in general, package version numbers are:

X.X.Y.Z

X.X - the package's major version. Bump this when there's a
backwards-incompatible change (eg, dependent packages might break)

Y - minor version. Bump this when the package changes, but in a
backwards-compatible way.

Z - patch version. Bump this when you just change something that
doesn't affect the code itself (comments, documentation, cabal
properties)

 A better package might come along, making the existing one obsolete.

The only way to mark packages as obsolete, as far as I know, is to
email a Hackage administrator.

 Or you might want to stick a message on the package saying hey, this version 
 has a serious
 bug, please use the next version up instead!

This would be useful; maybe a feature for Hackage 2?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2010-10-28 Thread John Goerzen

On 10/27/2010 10:08 AM, Günther Schmidt wrote:

Dear Malcolm,

since there is no mail client library even after 10+ years I suggest to
rethink the approach, because frankly, it's not working.


Why do you keep suggesting this?

http://hackage.haskell.org/package/WashNGo

There is no need for a mail client library on many platforms.  Just pipe 
the data to /usr/sbin/sendmail and poof.  Done.


Has it occurred to you that there is no mail client library because 
there is no need for one?  Frankly I am unimpressed with monster 
10,000-SLOC mail client libraries that make it a lot harder for me to 
pipe some stuff to sendmail.


-- John



Günther
___
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] who's in charge?

2010-10-28 Thread John Goerzen

On 10/27/2010 11:55 AM, Ketil Malde wrote:

What does essential mean?  Something a hypothetical dictator wants,
but nobody else?  For surely, if your email library was so essential,
it'd be included among the hundreds of libraries on Hackage?  Perhaps it
is a lot less important than you think?  (None of my programs need to
send email, so it's certainly not essential to me.)

Or perhaps sufficient functionality is in the libraries suggested by
Michael, and you just didn't find it when you looked?


The third option is that sending mail is so ridiculously simple that no 
library is needed.  This is, at least, the case for plain text messages 
on *nix.


I will grant that when you toss MIME and Windows into the mix, 
s/simple/complex/ may become more appropriate.


But we do already have MIME libraries.

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


Re: [Haskell-cafe] If Python now has a good email library; how challenging is it to call Python from Haskell?

2010-10-28 Thread John Goerzen

On 10/27/2010 01:22 PM, Donn Cave wrote:

Don't know, but probably challenging enough to make it worth challenging
the assumption that Python now has a good email library.


From a cursory look at the 3.0 library documentation, it looks to

me like IMAP support still means the old imaplib module.  That's
pretty rudimentary, compared to the HaskellNet IMAP support.


Not just rudimentary, but hideously buggy and with a terrible API. 
imaplib2 improves the API a bit but makes the bugginess worse.


I wrote and maintained OfflineIMAP from 2001 (I think) to 2010 so have 
just a wee bit of experience with that issue.


Python's mail system is not strong in my book.  It barely scrapes by. 
The MIME bits are decent, but the mail client stuff is very poor.  There 
is no abstraction system over generic mailbox repositories IIRC.  If you 
want to support IMAP, POP, Maildirs, mboxes, etc. you have to code up 
support for each.


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


Re: [Haskell-cafe] New repo location for the network package

2010-10-28 Thread Magnus Therning
On 28/10/10 17:14, Bryan O'Sullivan wrote:
 On Thu, Oct 28, 2010 at 8:06 AM, Magnus Therning mag...@therning.orgwrote:

 Fair enough.  Do you have enough buy-in to make sure that the github
 organisation becomes the best location for *all* HP packages?

 That is, can I stop going to Hackage to find the home for HP packages?

 That's never been our intention. github is for in-progress source trees;
 Hackage is for releases of code.

You misunderstood me.  Currently I go to Hackage to look for stuff like:

  Source repository git clone git://github.com/haskell/network.git

If all of HP were on github, then I wouldn't have to click my way through
Hackage when I wanted to get to the source repos.

/M

-- 
Magnus Therning(OpenPGP: 0xAB4DFBA4)
magnus@therning.org   Jabber: magnus@therning.org
http://therning.org/magnus identi.ca|twitter: magthe



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


Re: [Haskell-cafe] If Python now has a good email library; how challenging is it to call Python from Haskell?

2010-10-28 Thread Evan Laforge
On Thu, Oct 28, 2010 at 3:05 PM, John Goerzen jgoer...@complete.org wrote:
 On 10/27/2010 01:22 PM, Donn Cave wrote:

 Don't know, but probably challenging enough to make it worth challenging
 the assumption that Python now has a good email library.

 From a cursory look at the 3.0 library documentation, it looks to

 me like IMAP support still means the old imaplib module.  That's
 pretty rudimentary, compared to the HaskellNet IMAP support.

 Not just rudimentary, but hideously buggy and with a terrible API. imaplib2
 improves the API a bit but makes the bugginess worse.

 I wrote and maintained OfflineIMAP from 2001 (I think) to 2010 so have just
 a wee bit of experience with that issue.

This is off-subject, but I too wrote a mail program in python around
1999 or so.  I eventually gave up on imaplib and wrote my own which
was (if I may say so myself) simpler, easier to use, and less buggy.
If no one has replaced it 10 years later, I'm guessing not too many
people care about it.  I was pretty tired of email by that point and
tossed the whole project into some dark corner and forgot about it.

Nowadays if I want to send email, it's cmdline sendmail all the way.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2010-10-28 Thread Günther Schmidt

Dear John,

Am 28.10.10 23:57, schrieb John Goerzen:

On 10/27/2010 10:08 AM, Günther Schmidt wrote:

Dear Malcolm,

since there is no mail client library even after 10+ years I suggest to
rethink the approach, because frankly, it's not working.


Why do you keep suggesting this?

http://hackage.haskell.org/package/WashNGo


Thanks for this, I wasn't aware that it also offered email handling.


There is no need for a mail client library on many platforms.  Just
pipe the data to /usr/sbin/sendmail and poof.  Done.


That would work well for sending (on Unix), but not for receiving.


Has it occurred to you that there is no mail client library because
there is no need for one?


No, to be honest, it never has. I absolutely cannot conceive of it. It'd 
be like not having HDBC for instance and having to roll my own database 
driver. It wouldn't have mattered how great a language haskell is, had 
it not had HDBC I would have had no choice but to drop it and move on. 
Database connectivity to me is one of the essential things I need to be 
able to do, and so is email, as is xml, as is http.



Frankly I am unimpressed with monster 10,000-SLOC mail client
libraries that make it a lot harder for me to pipe some stuff to
sendmail.

Well it's not necessarily only about sending mail, it's more about the 
whole shebang one wants / needs to do with mail.


Günther

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


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

2010-10-28 Thread John Goerzen

On 10/28/2010 05:44 PM, Günther Schmidt wrote:

There is no need for a mail client library on many platforms. Just
pipe the data to /usr/sbin/sendmail and poof. Done.


That would work well for sending (on Unix), but not for receiving.


Quite true.  For receiving, we have tools like fetchmail, imapsync, 
offlineimap, MH, the list goes on.


The Unix philosophy is all about pluggable bits and pieces that can be 
reused all over the place.  I like that philosophy.  It means that one 
doesn't have to reinvent mail handling n times for n languages.  As long 
as your language can do some piping, you can handle the basics of mail.


Now, I'll grant you that fetchmail won't solve every possible mail 
access scenario.  It isn't, for instance, good enough to be the backend 
of OfflineIMAP.  But I do want to push back on the notion that, on POSIX 
platforms, these things have to be reinvented for each language.  It 
just isn't so.



Has it occurred to you that there is no mail client library because
there is no need for one?


No, to be honest, it never has. I absolutely cannot conceive of it. It'd
be like not having HDBC for instance and having to roll my own database
driver. It wouldn't have mattered how great a language haskell is, had


Hmm, I am perhaps uniquely qualified to say been there, done that ;-)

The existing Haskell database drivers at the time didn't meet my needs. 
 They lacked some things I considered rudimentary and standard.  I felt 
about them approximately the way you did about mail.


I decided that Haskell would be enough of a long-term win to justify 
writing HDBC.  So I did, and I'm glad of it.


I think you are getting some resistance here because you appear to be 
demanding that others volunteer their time to meet your pet need.  This 
attitude doesn't usually work.



it not had HDBC I would have had no choice but to drop it and move on.


Or you could have written HDBC.  Or you could have used unixODBC, which 
already solved that problem.  (Whoops, did I do a tiny bit of wheel 
reinvention myself?  Indeed I did, with the PostgreSQL HDBC backend. 
There are reasons for it though.)



Database connectivity to me is one of the essential things I need to be
able to do, and so is email, as is xml, as is http.


HTTP is another thing that can easily be outsourced.  I've been 
somewhat unhappy at various points in time with the Haskell HTTP 
libraries.  No problem, though; there's always Curl.  One can choose the 
Haskell libcurl binding or call the Curl binary directly; it's even 
portable to all sorts of platforms, and you get not just HTTP, but FTP, 
Gopher, SCP, and some other useful protocols along for the ride.



Well it's not necessarily only about sending mail, it's more about the
whole shebang one wants / needs to do with mail.


So if it's not about sending, it's about receiving or accessing stored mail.

The Maildir spec is very simple and easily implemented.  Google tells me 
there is an implementation in xmonad already.  Tools to get mail into 
Maildirs are plentiful and featureful.


My point is this: using existing tools on your system, and turning a 
blind eye to their implementation language, can be a perfectly workable, 
and even elegant, solution.


Example: say you needed to copy a directory containing files and 
directories.  Is that easy to do?  You could probably whip up some sort 
of recursive file copying thing to do that in a few lines of code.  But 
will it handle things like preserving permissions bits, ownership, ACLs, 
symbolic links, not following symlinks, etc. correctly?  We already have 
a tool that does all those things (cp -a), so using it is, in my book, 
more elegant than writing a (probably more buggy and certainly less 
tested) clone.


So I'm pushing back on your unstated premise; namely, that a Haskell 
library for mail handling is necessary for efficient mail handling in 
Haskell.  I don't think it is.


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


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

2010-10-28 Thread Christopher Done
On 28 October 2010 16:48, Kevin Jardine kevinjard...@gmail.com wrote:
 To be fair to the Haddock designer, red links are common these days.

 Here's two examples (among many):

 http://www.bbc.co.uk/
 http://www.slate.com/

 In the second case the site uses blue, black *and* red links to
 distinguish different types of content. They are all in bold and
 underline when hovered over so are not hard to distinguish from
 ordinary text.

I don't think two examples of big sites prove good usability. Both of
those sites are jumbled messes anyway. For what it's worth, (1) links
are blue, (2) red means error, (3) search goes on the top right, (4)
login goes on the top right, (5) logo goes on the top left, (6)
breadcrumb goes at the top left above or below the logo, (7) menu goes
on the left or top, (8) basket goes on the right. These are standards,
the fact one big web site decides to go against the standard doesn't
mean you should. What colour are the links your email web client is
using right now? But eh, whatever, no one listens to me on the topic
of design so I guess I don't know what I'm talking about.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2010-10-28 Thread Lennart Augustsson
It's working just fine.  I've never wanted a mail client library. :)

  -- Lennart

2010/10/27 Günther Schmidt gue.schm...@web.de:
 Dear Malcolm,

 since there is no mail client library even after 10+ years I suggest to
 rethink the approach, because frankly, it's not working.

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

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


[Haskell-cafe] Re: Does it deserve to be a hackage package?

2010-10-28 Thread Simon Michael

On 10/27/10 1:13 AM, Dmitry V'yal wrote:

Code I wrote works quite well for my purposes and I copied it into
several my programs. In order to make maintenance easier I recently
thought about uploading it to hackage. But given a wast amount of
half-dead packages with intersecting functionality there I'd like to ask
the opinion of community. Does such library look helpful to you?


Absolutely! Please do release it in its own package. Gtk2hs is certainly too 
heavy a dependency for this.

I don't think you'll find anything in it, but here's what I've been using:

http://joyful.com/darcsweb/darcsweb.cgi?r=hledger;a=headblob;f=/hledger/Hledger/Cli/Utils.hs
 - openBrowserOn

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


Re: [Haskell-cafe] Haskell meeting in Berlin

2010-10-28 Thread Daniel van den Eijkel

Hi,

thanks to all participants for the funny meeting! I had a lot of fun and 
I'm looking forward to see you again.


Best,
Daniel


Sönke Hahn schrieb:

Hi all!

There will be an informal Haskell meeting in Berlin.

Date: Thursday, October 28th
Time: from 20:00
Location: c-base, Rungestrasse 20, 10179 Berlin

The bi-monthly lisp meeting takes place at the same time and place [1].

This is the first of hopefully more meetings to come, so we will probably 
discuss the details of following meetings.


If you're in Berlin and want to talk to other Haskell users (or want to yell 
at lisp users for being from the dark side of the force), please come by.


Cheers,
Sönke


[1] http://www.c-base.org/calender/phpicalendar/month.php
___
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] who's in charge?

2010-10-28 Thread Günther Schmidt

Dear John,


Am 29.10.10 01:23, schrieb John Goerzen:

On 10/28/2010 05:44 PM, Günther Schmidt wrote:

There is no need for a mail client library on many platforms. Just
pipe the data to /usr/sbin/sendmail and poof. Done.


That would work well for sending (on Unix), but not for receiving.


Quite true.  For receiving, we have tools like fetchmail, imapsync, 
offlineimap, MH, the list goes on.


The Unix philosophy is all about pluggable bits and pieces that can be 
reused all over the place.  I like that philosophy.  It means that one 
doesn't have to reinvent mail handling n times for n languages.  As 
long as your language can do some piping, you can handle the basics of 
mail.


Now, I'll grant you that fetchmail won't solve every possible mail 
access scenario.  It isn't, for instance, good enough to be the 
backend of OfflineIMAP.  But I do want to push back on the notion 
that, on POSIX platforms, these things have to be reinvented for each 
language.  It just isn't so.



Has it occurred to you that there is no mail client library because
there is no need for one?


No, to be honest, it never has. I absolutely cannot conceive of it. It'd
be like not having HDBC for instance and having to roll my own database
driver. It wouldn't have mattered how great a language haskell is, had


Hmm, I am perhaps uniquely qualified to say been there, done that ;-)

The existing Haskell database drivers at the time didn't meet my 
needs.  They lacked some things I considered rudimentary and 
standard.  I felt about them approximately the way you did about mail.


I decided that Haskell would be enough of a long-term win to justify 
writing HDBC.  So I did, and I'm glad of it.


I think you are getting some resistance here because you appear to be 
demanding that others volunteer their time to meet your pet need.


Well this is exactly what I have the most problem with. This assumption. 
It is exactly this where I am seriously taking offense. I suddenly am 
taking fire from all sides for things that were actually said more 
bluntly by people before me. One of the responses out of the hysteria 
that developed even suggested I was calling for a dictator. Get a grip.


Other people before me lamented about the lack of a good email client 
library as can be seen here:


http://www.reddit.com/r/haskell_proposals/top/?t=year

Do not assume that the words that were put into my mouth by hysterical 
posters are indeed my own, they are not. Consider what I did say and not 
what others suggest I did.


I also noticed that one of your co-authors made statements regarding the 
quality of available libraries on hackage, without being blown to bits. 
My own posts in this thread did not come close to even suggesting that.



This attitude doesn't usually work.


Nor should it.

it not had HDBC I would have had no choice but to drop it and move on.


Or you could have written HDBC.  Or you could have used unixODBC, 
which already solved that problem.  (Whoops, did I do a tiny bit of 
wheel reinvention myself?  Indeed I did, with the PostgreSQL HDBC 
backend. There are reasons for it though.)



Database connectivity to me is one of the essential things I need to be
able to do, and so is email, as is xml, as is http.


HTTP is another thing that can easily be outsourced.  I've been 
somewhat unhappy at various points in time with the Haskell HTTP 
libraries.  No problem, though; there's always Curl.  One can choose 
the Haskell libcurl binding or call the Curl binary directly; it's 
even portable to all sorts of platforms, and you get not just HTTP, 
but FTP, Gopher, SCP, and some other useful protocols along for the ride.



Well it's not necessarily only about sending mail, it's more about the
whole shebang one wants / needs to do with mail.


So if it's not about sending, it's about receiving or accessing stored 
mail.


The Maildir spec is very simple and easily implemented.  Google tells 
me there is an implementation in xmonad already.  Tools to get mail 
into Maildirs are plentiful and featureful.




I appreciate that you are a proficient Unix / Posixler but it just so 
happens that I was thinking more about accessing POP3 account, which I 
imagine to a fairly common usage scenario. To my defense I did mention 
that the lack of certain libraries does not cause the same problem to 
more capable people, such as yourself, as they do to people less 
capable. Hey you rolled your own database access library (and shared it, 
much appreciated). But most would struggle with such a lack.


There is this one posters who likes to repeatedly point out how none of 
his programs ever needed email, so how could it be a problem then. Well 
good for him, but in my experience it's needed.


My point is this: using existing tools on your system, and turning a 
blind eye to their implementation language, can be a perfectly 
workable, and even elegant, solution.


Example: say you needed to copy a directory containing files and 
directories.  Is 

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

2010-10-28 Thread Günther Schmidt

Hello Lennart,

Am 29.10.10 01:44, schrieb Lennart Augustsson:

It's working just fine.  I've never wanted a mail client library. :)


Yes, that is wonderful, I'm really happy for you :P


   -- Lennart


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


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

2010-10-28 Thread Daniel Peebles

 There is this one posters who likes to repeatedly point out how none of his
 programs ever needed email, so how could it be a problem then. Well good for
 him, but in my experience it's needed.


This is the main issue I think people had with your original posts. You say
good for him, but I need it now, and others have said (approximately, with
varying niceness) we're sorry for you, but we haven't need it so far. You
may have had words put in your mouth, but suggesting that the community's
approach isn't working (your actual words) simply because something _you_
need isn't available (or of sufficient quality to you) is bound to cause
some hostility.

Saying something along the lines of:

I noticed that there isn't a fully functional mail library on par with X in
 language Y, and need one for project Z (insert motivating description here).
 I think this is a useful library because applications A, B, C could all
 benefit from it, and we may attract users from other languages too. I had a
 friend who told me he didn't use Haskell for his latest project because it
 had no mail library, too.



Would anyone be interested in a project for a full-featured mail library? I
 don't think I'm capable of writing the whole thing myself, but I've started
 a github project at URL and would be happy to collaborate in IRC channel
 #channel on freenode.


Would have resulted in a very different response.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2010-10-28 Thread Alexy Khrabrov
I am happy to announce fundata1 -- the largest-ever program per RAM allocation 
in Haskell, originally implemented in Clojure and then OCaml and Haskell for 
social network modeling.  

http://github.com/alexy/fundata1

It has now become the first large-scale social networking benchmark with a real 
dynamic social graph built from the actual Twitter gardenhose, with the data 
OK'd by Twitter and supplied along with the benchmark.

I wrote three reference implementations, all on github as well.  Clojure and 
OCaml are quite basic, while Haskell community had a chance to optimize its 
data structures and in fact fix a GC integer overflow while working on it.  
You're welcome to fork and improve all of these implementations, and supply 
others!

There's a Google Group, 

http://groups.google.com/group/fundata/

to discuss the shootout.  There's also a blog about it and other functional 
things at

http://functional.tv/

Let the fun begin!

-- Alexy Khrabrov
firstname.lastnameATgmaildotcom

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


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

2010-10-28 Thread Johan Tibell
Great stuff! I have an improvements to HashMaps that I'm working on
that will hopefully work well here.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Edit Hackage

2010-10-28 Thread Ivan Lazar Miljenovic
On 29 October 2010 07:53, Daniel Fischer daniel.is.fisc...@web.de wrote:
 On Thursday 28 October 2010 22:44:04, Stephen Tetley wrote:
 On 28 October 2010 20:59, Don Stewart d...@galois.com wrote:
  Status of Infrastructure questions like this are best asked on the
  Haskell Reddit.

 [SNIP]

  P.S. I encourage people to use the online forums: Haskell Reddit and
  Stack Overflow, as a lot of the question-answering activity has
  shifted there now, away from -cafe@

 Err, Why?

 Having to track three places for information rather than one doesn't
 seem like a good swap to me...

 + 1

+1; I see no need to sign up for a reddit account to ask a question there, etc.

(and the few times I tried to use my OpenID account to answer
questions on StackOverflow I couldn't quite work out what some of the
options meant, etc.)

IIUC, [one of] the prime motivating factor[s] behind both reddit and
StackOverflow is the accumulation of karma, which leads to people
posting just to try and accumulate karma even if they don't know what
they're talking about.  Here, we are (hopefully) above such mundane
things.

Another point against reddit: Don posted a link to my survey on the
naming of fgl a few months back.  Someone then queried [1] the two
naming choices that were available on reddit rather than reading the
discussions that had already taken place here on -cafe or bothering to
actually ask _me_.  Similar things go with submitted blog posts:
rather than discussing the content as comments on the blog post, they
discuss them on reddit thus depriving readers of the post itself of
what they think.

[1]: 
http://www.reddit.com/r/haskell/comments/cp50y/should_the_new_graph_library_be_called_fgl_or/c0u6b6n

-- 
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
IvanMiljenovic.wordpress.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2010-10-28 Thread John Goerzen

On 10/28/2010 07:48 PM, Daniel Peebles wrote:

Would anyone be interested in a project for a full-featured mail
library? I don't think I'm capable of writing the whole thing
myself, but I've started a github project at URL and would be happy
to collaborate in IRC channel #channel on freenode.


Would have resulted in a very different response.


That is absolutely well put.

Günther, I don't condone hostility on the part of anyone on this list, 
obviously.  If you experienced it, it's not right.


By the same token, you came in here talking about escalating a 
problem, and saying that an entire process was fundamentally broken 
because you hadn't found a solution to your particular problem.


What people are trying to tell you is:

1) That argument isn't well-formed, because that conclusion doesn't 
follow from the premise.  In other words, your pet problem may not 
indicate a bad community/process.


2) This is a doocracy (man do I hate that word!).  If there is a 
problem, here's what you should do about it, in descending order of 
attractiveness:


a) Fix it yourself

b) Pay someone else to fix it

c) Motivate or politely encourage others to fix it, providing moral 
support, etc.


The key point is: you haven't paid any of us for this, and you have 
nothing even close to some sort of support contract.  I perceive a sense 
of entitlement on your part that people owe you no-cost coding.  That's 
just not how the community works.  Whether or not you really have that 
sense, I don't know, but your messages convey it nonetheless.


3) There are several existing solutions for doing mail in Haskell, and 
those of us that have used them have, to date, found them perfectly 
adequate.


a) Some of them Google or hackage searches could have informed you of. 
You should do more research before insulting an entire community.


b) It is, of course, possible that these solutions don't meet your 
needs.  In that event, see #2.



On a personal note, some of you with moderately long and extremely sharp 
memories, or perhaps access to Google, may find some messages from me in 
my early Haskell days grousing about this or that problem.  Ultimately, 
the questions for me were:


1) Is the problem real?  In other words, was there simply something I 
didn't know/understand about the language that would have made it go away?


2) Can I fix it?  If so, I should try.

3) How annoying is it?

I wrote some of my libraries when I was still a Haskell newbie (and with 
the number of Ph. D's around here, I'm not always sure I've shed that 
title yet!)... sometimes that shows in the older code that's out there. 
 But that's OK; it solved my problem and, truly, I had fun writing them.


Sometimes it is easier to write a Haskell library to solve the problem 
than to use an off-the-shelf library in $LANGUAGE.


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


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

2010-10-28 Thread Günther Schmidt

Dear John,

The key point is: you haven't paid any of us for this, and you have 
nothing even close to some sort of support contract.  I perceive a 
sense of entitlement on your part that people owe you no-cost coding.
Would you please stop perceiving this then? Because no I don't. I won't 
deny that I'd be happy if it was there but that I think that I'm 
entitled to it is just off. So you may stop it, please.


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


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

2010-10-28 Thread Antoine Latter
On Thu, Oct 28, 2010 at 2:42 PM, Andrew Coppin
andrewcop...@btinternet.com wrote:
 On 28/10/2010 12:30 PM, Sebastian Fischer wrote:

 Maybe we can keep at least the docs without red links.

 Pick the Classic style in the style menu. It will remember your choice.

 Yes, at least with new Haddock you can *change* the style without having to
 actually patch (and recompile) Haddock itself. :-)

 In the category of annoying things: Is there any particular *reason* why
 Source appears before Contents? I would think the latter is going to get
 clicked infinitely more often than the former...

Well, I can almost always use the back button to go to 'Contents,'
however I don't have any other options for getting to source.

I guess I use them about equally when I'm browsing Hackage.

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


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

2010-10-28 Thread wren ng thornton

On 10/28/10 10:42 AM, Ben Millwood wrote:

Here's the wiki page:
http://hackage.haskell.org/trac/haskell-prime/wiki/CompositionAsDot

Personally I think function composition is what Haskell is all about
and it is absolutely essential that the syntax for it be lightweight.
If we think using . as qualification as well as composition is
confusing, I'm much more inclined to say using it as qualification was
a mistake.

The comment on the wiki page about $ being more common in reality is
not even close to true for my own code, and I don't think I'm unusual
in that regard.


Agreed on both counts. Personally, I'd much rather have name 
qualification and record selection use a different character than to 
remove (.) as composition. And replacing (.) with some abomination like 
`o` is unthinkable.


As for the selector character, I'm partial to # but that would clash 
with MagicHash.


--
Live well,
~wren
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: Edit Hackage

2010-10-28 Thread Ertugrul Soeylemez
Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote:

 On 29 October 2010 07:53, Daniel Fischer daniel.is.fisc...@web.de wrote:
  On Thursday 28 October 2010 22:44:04, Stephen Tetley wrote:
  On 28 October 2010 20:59, Don Stewart d...@galois.com wrote:
 
  P.S. I encourage people to use the online forums: Haskell Reddit
  and Stack Overflow, as a lot of the question-answering activity
  has shifted there now, away from -cafe@
 
  Err, Why?
 
  Having to track three places for information rather than one
  doesn't seem like a good swap to me...
 
  + 1

 +1; I see no need to sign up for a reddit account to ask a question
 there, etc.

Another +1.  I always find it painful to sign up for yet another account
on yet another web service.  No, I have no OpenID account, nor am I
planning to create one.  Also I strictly refuse to go to Reddit or
StackOverflow.  I agree that having to track three independent sites is
stupid and not in any way productive.

Mailing lists and newsgroups share one very desirable property:  They
are independent of the design choices of a single entity, whereas in
Reddit and StackOverflow the webmasters choose what's supposed to be
good for you.

To say that by not going to Reddit/StackOverflow you miss a lot of
information is almost like propaganda, a cheap way to enforce one's
preferences.  A professional community member should never say such a
thing.  Personal opinion.


Greets,
Ertugrul


-- 
nightmare = unsafePerformIO (getWrongWife = sex)
http://ertes.de/


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


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

2010-10-28 Thread Steve Severance
 2) This is a doocracy (man do I hate that word!).  If there is a problem,
 here's what you should do about it, in descending order of attractiveness:

 a) Fix it yourself

 b) Pay someone else to fix it

 c) Motivate or politely encourage others to fix it, providing moral support,
 etc.

 The key point is: you haven't paid any of us for this, and you have nothing
 even close to some sort of support contract.  I perceive a sense of
 entitlement on your part that people owe you no-cost coding.  That's just
 not how the community works.  Whether or not you really have that sense, I
 don't know, but your messages convey it nonetheless.

I understand why this and have accepted it. That being said the lack
of certain well documented high quality and widely written about
libraries are probably the biggest challenge to Haskell adoption after
the IO Monad. As a beginner I really have struggled to understand what
the right libraries to use are for common problems (specifically
databases). However other problems like the lack of a high resolution,
well documented date time library were also a source of friction. The
reason I am using haskell is to solve specific types of difficult
problems in machine learning and it is very good at that. Gluing a
fully working stack together has been challenging.

I agree that people need to be proactive about solving their own
problems but whenever I here any open source community
(yeah...everyone not just haskell) tell beginners to contribute a
package I always scratch my head with a little bit of wonder. Would
you really want a package that someone like me who is still trying to
figure out how to utilize haskell's features would build? Do you want
my outrageous non-use of the Monads that haskell offers?  Haskell
adoption is a frequently discussed topic and I personally believe that
haskell will and should remain a niche language for solving certain
types of problems. However if others in the community take the
position that success is determined by adoption then Haskell needs to
have a solid and well documented story about all the problems that
developers that write regular applications face including database
communication, ORMs, XML, Web Services, web pages (I know there is
Yesod just making the point),model view controllers (hits self in
head), etc... If regular developers are the target then they want to
be told what to do and what to use (with something like MSDN or some
of the big java toolkits), not discover it for themselves. I say this
with superior confidence after spending 2 years in a large (2000+)
developer organization.

I believe as a relative newcomer that haskell is best utilized when
solving complex and difficult to reason about problems that involve
small teams of highly skilled developers. Most software does not meet
this criteria. There are a wide variety of inferior technologies ;-)
(ahem java) that can be used to build most applications in the world.
Haskell should not try to compete because it can't (marketing
problem), and there are many things that it enables to be done better.

Not intending to flame (or otherwise ignite the fires of passion) at all.

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


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

2010-10-28 Thread Jeremy Shaw


On Oct 27, 2010, at 10:08 AM, Günther Schmidt wrote:


Dear Malcolm,

since there is no mail client library even after 10+ years I suggest  
to rethink the approach, because frankly, it's not working.


Hello!

I am in charge, sorry for the delay!

A number of years ago I tried to form a MIME strike force to create  a  
library that would be suitable for composing mail messages, decoding  
mail messages, or transforming mail messages. But received no real  
interest:


http://www.mail-archive.com/haskell-cafe@haskell.org/msg21872.html

The fact that it is now considered an oddity (by some) that there is  
no standard, well support mail library is a sign of great progress in  
my opinion.


The driving force is likely to be web development platforms such as  
happstack, snap, and yesod, because one often wants to integrate email  
with a web site. (such as send emails to members, etc).


That said, there have been many attempts at various portions of the  
mail infrastructure over the years.


As part of that strike force attempt I create this mime library (not  
on hackage):


http://src.seereason.com/haskell-mime/

It can parse and decode multipart messages. And it has the beginning  
of an interface for composing messages. One thing I attempted to do  
was create a mail composition DSL that only allowed you to construct  
valid messages. For example, some headers can only appear once, and  
others can appear multiple times. So I attempted to encode that into  
the DSL. I was successful to some degree.


There is also the mime-string library on hackage which does MIME  
parsing.


There is the new mime-mail library for creating and sending MIME  
messages.


happstack had the beginnings of a MTA at one point in time, but was  
removed until someone comes along with the desire and time to really  
implement it.


There is the Postmaster ESMTP server,

http://gitorious.org/postmaster

which acts as a MDA for receiving mail and filtering it into folders.  
It allows you to write your filtering rules in Haskell instead of some  
obtuse filter language (e.g., procmail).


And there are other projects I have not mentioned as well.

I guess part of the question is, do you specifically mean a 'mail  
client'. There are a lot of pieces to the mail puzzle including, MUA,  
MTA, MDA, MIME, etc.  And there is the reading of saved mail formats  
like mbox, Maildir, etc. And then there are the various protocols like  
SMTP, POP3,  IMAP4, etc. And things like GPG signatures and encryption.


Using the libraries that are available right now I can create a mime  
email and send it via sendmail or via an SMTP smart host. I can also  
use a well established program like dovecot to receive mail and then  
decode messages using mime-string on haskell-mime.  That gets me  
pretty far for what I need to do.


Writing a competitor to mutt or gmail would be more difficult due to  
some missing pieces. But, then again, I think most people are  
satisfied enough with mutt and gmail, so not many people have any  
motivation to replace them. Same thing with a competitor to qmail/ 
dovecot/etc. Those tools are in place and work pretty well. So,  
replacing any of those really only becomes interesting if you are  
going to do something really new -- not just implementing them in your  
favorite language.


Anyway, I do think there will be growth in the haskell mail library  
domain. Specifically the stuff that would be useful for integration  
with web applications.


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


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

2010-10-28 Thread aditya siram
I understand your frustration at not having free tested libs ready-to-go,
Java/any-other-mainstream-language programmers tend to expect this and
usually get it.

If a lack of libs is a dealbreaker for you and you want to use a functional
programming language with some of Haskell's advantages (like immutability,
lazy data structures and STM) I encourage you to check out Clojure [1] a
nicely designed Lisp. It is tightly integrated in to the JVM and you have
access to all the Java libs you want.

-deech

[1] http://clojure.org/

2010/10/27 Günther Schmidt gue.schm...@web.de

 Hi Malcolm,

 well if I would like to point out that, for instance, Haskell exists for a
 lot more than 10 years now, and that, while the language per se rocks, and
 there are cool tools (cabal) and libraries (list, Set, Map), there still
 isn't even a mail client library, I wonder whom to escalate this to, and who
 is going to do something about it.

 I understand some parties wish to avoid success at all costs, while others,
 commercial users, benefit from the edge haskell gives them already and which
 probably can help themselves in case of, again, for instance a missing mail
 client library.

 And then there is the ones like me, which also want to benefit from the
 edge Haskell gives them over users of other languages and want to develop
 Real World Apps and who cannot easily help themselves in case of a missing
 mail client library.


 So while there are many aspects of the future of haskell, who effectively
 is it that steers the boat?

 Günther

 ___
 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] who's in charge?

2010-10-28 Thread Gregory Crosswhite
Or if you want to keep the advantages of a powerful type system, you can 
use Scala.


Cheers,
Greg

On 10/28/10 9:53 PM, aditya siram wrote:
I understand your frustration at not having free tested libs 
ready-to-go, Java/any-other-mainstream-language programmers tend to 
expect this and usually get it.


If a lack of libs is a dealbreaker for you and you want to use a 
functional programming language with some of Haskell's advantages 
(like immutability, lazy data structures and STM) I encourage you to 
check out Clojure [1] a nicely designed Lisp. It is tightly integrated 
in to the JVM and you have access to all the Java libs you want.


-deech

[1] http://clojure.org/

2010/10/27 Günther Schmidt gue.schm...@web.de 
mailto:gue.schm...@web.de


Hi Malcolm,

well if I would like to point out that, for instance, Haskell
exists for a lot more than 10 years now, and that, while the
language per se rocks, and there are cool tools (cabal) and
libraries (list, Set, Map), there still isn't even a mail client
library, I wonder whom to escalate this to, and who is going to do
something about it.

I understand some parties wish to avoid success at all costs,
while others, commercial users, benefit from the edge haskell
gives them already and which probably can help themselves in case
of, again, for instance a missing mail client library.

And then there is the ones like me, which also want to benefit
from the edge Haskell gives them over users of other languages and
want to develop Real World Apps and who cannot easily help
themselves in case of a missing mail client library.


So while there are many aspects of the future of haskell, who
effectively is it that steers the boat?

Günther

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



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


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