Re: [Haskell-cafe] Link errors in Gtk2Hs are more general than I thought.

2009-04-05 Thread Colin Paul Adams
 Jeff == Jeff Wheeler j...@nokrev.com writes:

Jeff I installed Gtk2Hs on a similar machine earlier tonight,
Jeff with much success, even with Yi.

Jeff I did not use MacPorts, and instead followed the
Jeff instructions on the HaskellWiki [1] under Using the GTK+ OS
Jeff X Framework (including compiling pkg-config from src). I'm
Jeff not sure how having attempted the installation through
Jeff MacPorts may have littered your system, unfortunately.

A lot I think (I tried the Framework install once, and spent a LOT of
time cleaning up, and the same when I reverted  macports).

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


Re: [Haskell-cafe] ANNOUNCE: fad 1.0 -- Forward Automatic Differentiation library

2009-04-05 Thread Kalman Noel
Henning Thielemann schrieb:
 with advanced type classes:
 http://hackage.haskell.org/packages/archive/numeric-prelude/0.0.5/doc/html/MathObj-PowerSeries.html

I'll take this as another opportunity to point out that the Haddock docs
of the Numeric Prelude are highly unreadable, due to all qualified class
and type names appearing as just C or T.  I'm wondering, too, if the
Numeric Prelude could be organized more cleanly if we had a fancier
module system - does someone have sufficient experience with, say,
ML-style module systems to tell?

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


[Haskell-cafe] Hackage not updating package list

2009-04-05 Thread Johan Tibell
Hi,

I just uploaded network-2.2.1. It appears on Hackage [1] but a `cabal
update` followed by `cabal install network-2.2.1` results in:

Resolving dependencies...
cabal: There is no available version of network that satisfies ==2.2.1

The upload took a very long time and it seemed to time out at some
point. My guess is that Hackage got itself into an inconsistent state.
Could someone who has access to the Hackage server check what
happened?

1. http://hackage.haskell.org/cgi-bin/hackage-scripts/package/network-2.2.1

Cheers,

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


[Haskell-cafe] Re: Haskell EDSL to generate SQL?

2009-04-05 Thread GüŸnther Schmidt

Hi Jeremy,

apologies for my initial response, that was definately premature. I had 
a second look and am quite impressed now.


What is the best resource to look for more detail examples?

Günther


Jeremy Shaw schrieb:

At Sat, 04 Apr 2009 15:40:56 +0200,
GüŸnther Schmidt wrote:

But I hope to be able to use an DSL from which I can automatically 
generate SQL-Strings instead of writing the SQL statements literally.


Has anyone else taken a similar approach?


HaskellDB has an DSL for generating SQL strings. Though, it is not a
straightforward mapping. The haskellDB DSL provides you with
relational algebra operators that you use to build your query. 


 - jeremy



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


[Haskell-cafe] ANN: network-bytestring 0.1.2

2009-04-05 Thread Johan Tibell
I am pleased to announce a new release of network-bytestring, a Haskell library
for fast socket I/O using ByteStrings.

New in this release is support for scatter/gather I/O (also known as
vectored I/O). Scatter/gather I/O provides more efficient I/O by using
one system call to send several separate pieces of data and by
avoiding unnecessary copying.

I would like to thank Brian Lewis, Bryan O'Sullivan, and Thomas
Schilling for contributing patches for this release.

Get it:

   cabal install network-bytestring

And on Hackage:

   http://hackage.haskell.org/cgi-bin/hackage-scripts/package/network-bytestring

Windows hackers needed:

   I've made sure that the library builds on Windows but since I don't
use Windows myself I haven't implemented scatter/gather I/O support
for Windows. It should be straightforward to add and I'd be happy to
review the patches.

Cheers,

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


[Haskell-cafe] Numeric Prelude and identifiers (Was: fad 1.0 -- Forward AutomaticDifferentiation library)

2009-04-05 Thread Henning Thielemann


On Sun, 5 Apr 2009, Kalman Noel wrote:


Henning Thielemann schrieb:

with advanced type classes:
http://hackage.haskell.org/packages/archive/numeric-prelude/0.0.5/doc/html/MathObj-PowerSeries.html


I'll take this as another opportunity to point out that the Haddock docs
of the Numeric Prelude are highly unreadable, due to all qualified class
and type names appearing as just C or T.


It's Haddock's fault. :-) I have written a Trac ticket, but 
trac.haskell.org does currently not respond.


 I'm wondering, too, if the Numeric Prelude could be organized more 
cleanly if we had a fancier module system - does someone have sufficient 
experience with, say, ML-style module systems to tell?


Are you complaining about the organisation or about the identifiers? If 
you mean the former, then what organisation do you propose? If you mean 
the latter ... Many proposals about extended import facilities I saw were 
complicated and could simply be avoided using the naming style I use.

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


Re: [Haskell-cafe] Numeric Prelude and identifiers (Was: fad 1.0 -- Forward AutomaticDifferentiation library)

2009-04-05 Thread Jan-Willem Maessen


On Apr 5, 2009, at 9:33 AM, Henning Thielemann wrote:



On Sun, 5 Apr 2009, Kalman Noel wrote:


Henning Thielemann schrieb:

with advanced type classes:
http://hackage.haskell.org/packages/archive/numeric-prelude/0.0.5/doc/html/MathObj-PowerSeries.html


I'll take this as another opportunity to point out that the Haddock  
docs
of the Numeric Prelude are highly unreadable, due to all qualified  
class

and type names appearing as just C or T.


It's Haddock's fault. :-) I have written a Trac ticket, but  
trac.haskell.org does currently not respond.


I may be treading in murky waters here, but I do think a large part of  
the problem is that the Numeric Prelude has chosen to use ML naming  
conventions (which refer to types in a module as T, etc.) when you're  
writing a Haskell program.  Surely if the types, classes, and so forth  
were given evocative names, numeric prelude programs would become  
readable?  And as a special bonus, though it may offend your  
sensibilities, numeric prelude programs might be able to use  
unqualified import in certain circumstances?


-Jan-Willem Maessen
 [For each language, its own idiom!]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Lazy vs correct IO [Was: A round of golf]

2009-04-05 Thread Jason Dusek
2008/09/18  o...@okmij.org:
 Operationally, the code does not open more than one file at a
 time. More importantly, the code *never* reads more than 4096
 characters at a time. A block of the file is read, split into
 words, counted, and only then another chunk is read. After one
 file is done, it is closed, and another file is processed. One
 can see that only one file is being opened at a time by
 enabling traces. The processing is fully incremental.

  It opens and closes each file in turn; but it would it be
  unwise to open and close each file as we'd read a chunk from
  it? This would allow arbitrary interleaving.

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


Re: [Haskell-cafe] Lazy vs correct IO [Was: A round of golf]

2009-04-05 Thread Jason Dusek
  I hate to say it; but you know you can tweak the OS to allow
  excessive file handle usage.

  I once wrote a Haskell script to empty a very, vary large S3
  bucket. On Linux, I had to put it in a shell while loop to
  keep it going, due to file handle exhaustion. On my Mac it ran
  without incident.

 :; ulimit
  unlimited

  Turns out the `ulimit` on my Mac is pretty high.

--
Jason Dusek


 |...tweak the OS...|
  http://www.kegel.com/c10k.html#limits.filehandles
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Lazy vs correct IO [Was: A round of golf]

2009-04-05 Thread Jason Dusek
  Oh, curses. I didn't run it with the right option.

 :; ulimit -a
core file size  (blocks, -c) 0
data seg size   (kbytes, -d) 6144
file size   (blocks, -f) unlimited
max locked memory   (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files  (-n) 256
pipe size(512 bytes, -p) 1
stack size  (kbytes, -s) 8192
cpu time   (seconds, -t) unlimited
max user processes  (-u) 266
virtual memory  (kbytes, -v) unlimited

  So now I'm not sure why it worked on my Mac.

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


[Haskell-cafe] EclipseFP proposal for Google Summer of Code

2009-04-05 Thread Thomas ten Cate
To everyone involved in the Google Summer of Code program,

I have submitted a GSoC proposal to work on EclipseFP, the Haskell
plugin for Eclipse. The proposal is crossposted to both haskell.org
and the Eclipse Foundation, each in their respective templates. This
is also stated at the top of the proposal.

I send this e-mail because of possible scheduling issues: I will be
away starting on April 15. So, if you want to ask me things, have
suggestions for improvement, or want to do an interview or something,
this can only be done *before* that date.

This is also stated in the proposal, but since I have no idea how the
proposals are processed by the mentoring organizations, I figured that
an explicit notification would be a good idea.

For your convenience, here are links to the proposal.
haskell.org version:
http://socghop.appspot.com/student_proposal/show/google/gsoc2009/thomastc/t12376710
and also on http://docs.google.com/Doc?id=dfmvb7sr_13fzdg5qhr
Eclipse Foundation version:
http://socghop.appspot.com/student_proposal/show/google/gsoc2009/thomastc/t123867654843
and also on http://docs.google.com/Doc?id=dfmvb7sr_15gb9258fg

If my schedule causes any problems, please let me know. Also, comments
on the proposal in general would be much appreciated.

Thanks,

Thomas

P.S. I hope it's okay that I post this to the haskell-cafe list as
well; since haskell.org has no GSoC-specific mailing list, it seems to
be the most appropriate place that I could find.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] System.Process.Posix

2009-04-05 Thread Cristiano Paris
On Sat, Apr 4, 2009 at 10:28 PM, Don Stewart d...@galois.com wrote:
 cristiano.paris:
...
 Isn't this the goal of the process package?

Hi Don,

thank you for the reference. I saw System.Process but when I needed it
I was in a hurry and having a UNIX background I googled for some
snippet daemonizing a process which led me to the System.Process.Posix
package.

Yet, I was surprised not to find it in Hoogle as I thought it to be a
comprehensive search engine. But I was wrong :D

Thanks.

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


Re: [Haskell-cafe] Lazy vs correct IO [Was: A round of golf]

2009-04-05 Thread Rick R
It depends on the underlying file control used by ghc. if it's the FILE
stream pointer, some implementations suffer from a 255 file limit. If it's a
standard file descriptor (open instead of fopen), then it's limited by
ulimit.

On Sun, Apr 5, 2009 at 10:35 AM, Jason Dusek jason.du...@gmail.com wrote:

  Oh, curses. I didn't run it with the right option.

  :; ulimit -a
 core file size  (blocks, -c) 0
 data seg size   (kbytes, -d) 6144
 file size   (blocks, -f) unlimited
 max locked memory   (kbytes, -l) unlimited
 max memory size (kbytes, -m) unlimited
 open files  (-n) 256
 pipe size(512 bytes, -p) 1
 stack size  (kbytes, -s) 8192
 cpu time   (seconds, -t) unlimited
 max user processes  (-u) 266
 virtual memory  (kbytes, -v) unlimited

  So now I'm not sure why it worked on my Mac.

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




-- 
We can't solve problems by using the same kind of thinking we used when we
created them.
   - A. Einstein
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Hackage not updating package list

2009-04-05 Thread Don Stewart
johan.tibell:
 Hi,
 
 I just uploaded network-2.2.1. It appears on Hackage [1] but a `cabal
 update` followed by `cabal install network-2.2.1` results in:
 
 Resolving dependencies...
 cabal: There is no available version of network that satisfies ==2.2.1
 
 The upload took a very long time and it seemed to time out at some
 point. My guess is that Hackage got itself into an inconsistent state.
 Could someone who has access to the Hackage server check what
 happened?
 
 1. http://hackage.haskell.org/cgi-bin/hackage-scripts/package/network-2.2.1
 

Seems to have worked now. We had time out problems a couple of weeks ago
too. Unknown cause at this point.

All seems to be working though:

$ cabal install network-bytestring
...
Installing library in
/home/dons/.cabal/lib/network-bytestring-0.1.2/ghc-6.10.1
Registering network-bytestring-0.1.2...
Reading package info from dist/installed-pkg-config ... done.
Writing new package config file... done.

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


[Haskell-cafe] Confused about readline/editline

2009-04-05 Thread Martijn van Steenbergen

Hello café,

I'm trying to write an executable that depends on Yogurt-0.3, readline 
(indirectly) and hint. However, including hint in the build-depends 
field causes cabal to link the executable against editline instead of 
readline. Here is a small test case:


File: Test.cabal


Name: Test
Version: 0

Build-Type: Simple
Cabal-Version: = 1.2

Executable test
  Main-Is:Test.hs
  Build-Depends:  base, Yogurt, hint
  GHC-Options:-threaded


File: Test.hs


module Main where

import Network.Yogurt

main:: IO ()
main = do
  connect eclipse.cs.pdx.edu 7680 (return ())


The example doesn't use any functions from hint, but simply mentioning 
it in the cabal file causes this behaviour. What's going on? How can I 
fix or work around this?


I am able to reproduce this behaviour in two configurations:
* Leopard Intel; cabal-install version 0.6.2, using version 1.6.0.1 of 
the Cabal library; GHC 6.10.1
* Ubuntu; cabal-install version 0.6.2, using version 1.6.0.3 of the 
Cabal library; GHC 6.10.2


Thank you very much in advance,

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


[Haskell-cafe] high probability of installation problems and quality of the glorious implementation

2009-04-05 Thread FFT
I'm still learning Haskell and also evaluating whether I want to use
the language in my work.

It seems like a fascinating language so far (although I don't know if
laziness will be a detriment later for me eventually), but I'm a bit
worried about the overall quality of its GHC implementation.

For example, I tried installing GHC-6.10.2 on my Ubuntu 8.04 machine
(probably the most mainstream Linux these days).

1st attempt: binary = failed the impossible happened, report bug (I
think it's already in bugzilla for an even earlier version)

2nd attempt: source and docs = followed README, but make failed
while building docs

3rd attempt: source only, no docs = make install succeeded, but ghci
now seems to have its readline screwed up (no editing, can't quit
even with Ctrl-C or Ctrl-D), while Ubuntu-bundled 6.8.* ghci works
fine in this regard.

If these kinds of issues are common only during installation, I can
live with that, but if GHC is flaky overall, having to deal with this
may cancel out whatever productivity advantages Haskell provides.

If the quality of the installation procedures is different from the
compiler itself, can you explain why?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Hackage not updating package list

2009-04-05 Thread Edward Kmett
It has been slow for me today as well. I spammed up 3 released of a package
in rapid succession because it wasn't showing up in the list. Apparently
stuff is at least showing up several minutes after the upload completes
though as evidenced by the fact that I can see all of those versions now.
-Edward Kmett

On Sun, Apr 5, 2009 at 12:47 PM, Don Stewart d...@galois.com wrote:

 johan.tibell:
  Hi,
 
  I just uploaded network-2.2.1. It appears on Hackage [1] but a `cabal
  update` followed by `cabal install network-2.2.1` results in:
 
  Resolving dependencies...
  cabal: There is no available version of network that satisfies ==2.2.1
 
  The upload took a very long time and it seemed to time out at some
  point. My guess is that Hackage got itself into an inconsistent state.
  Could someone who has access to the Hackage server check what
  happened?
 
  1.
 http://hackage.haskell.org/cgi-bin/hackage-scripts/package/network-2.2.1
 

 Seems to have worked now. We had time out problems a couple of weeks ago
 too. Unknown cause at this point.

 All seems to be working though:

$ cabal install network-bytestring
...
Installing library in
/home/dons/.cabal/lib/network-bytestring-0.1.2/ghc-6.10.1
Registering network-bytestring-0.1.2...
Reading package info from dist/installed-pkg-config ... done.
Writing new package config file... done.

 ___
 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] Confused about readline/editline

2009-04-05 Thread Judah Jacobson
On Sun, Apr 5, 2009 at 10:06 AM, Martijn van Steenbergen
mart...@van.steenbergen.nl wrote:
 Hello café,

 I'm trying to write an executable that depends on Yogurt-0.3, readline
 (indirectly) and hint. However, including hint in the build-depends field
 causes cabal to link the executable against editline instead of readline.
 Here is a small test case:

 File: Test.cabal

 Name: Test
 Version: 0

 Build-Type: Simple
 Cabal-Version: = 1.2

 Executable test
  Main-Is:        Test.hs
  Build-Depends:  base, Yogurt, hint
  GHC-Options:    -threaded

 File: Test.hs

 module Main where

 import Network.Yogurt

 main:: IO ()
 main = do
  connect eclipse.cs.pdx.edu 7680 (return ())

 The example doesn't use any functions from hint, but simply mentioning it in
 the cabal file causes this behaviour. What's going on? How can I fix or work
 around this?

 I am able to reproduce this behaviour in two configurations:
 * Leopard Intel; cabal-install version 0.6.2, using version 1.6.0.1 of the
 Cabal library; GHC 6.10.1
 * Ubuntu; cabal-install version 0.6.2, using version 1.6.0.3 of the Cabal
 library; GHC 6.10.2


Probably what's happening is that hint depends on the ghc package,
which links to editline in 6.10 since it includes all the code for
ghci.

I'm not sure, but there might be some order of flags or packages you
could give to Cabal which would cause it to link to readline first; I
think if gcc gets -lreadline -ledit in that order then it will do
what you want.  Passing -v or -v3 to cabal build should let you
see what's going on.

For ghc-6.12 there's plans to prevent this issue by separating out
ghci as a separate program than the core ghc package.

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


Re: [Haskell-cafe] high probability of installation problems and quality of the glorious implementation

2009-04-05 Thread John Dorsey
FFT,

 I'm still learning Haskell and also evaluating whether I want to use
 the language in my work.

I've been learning and using GHC in spare hours for several years.  I've
had challenges installing it on MacOSX-ppc, and on RHEL4; kind folks on
irc and the mailing lists have always been very helpful, and if you
haven't gone to either for help it's strongly recommended.  Bring as
much detail as you can about your environment and the errors you're
getting.

I should add that a lot of the great code available for Haskell is in
the form of libraries on the hackage site.  It's worth the time to get
cabal-install working before doing anything else; many of those libraries
will then install without a fuss.  But the quality of packages varies
(naturally), and the cabal tools, while handy, have their quirks.  When in
doubt, ask what packages people like, and ask for help before you're
frustrated.

There's reason to think that installation issues are about to improve
somewhat, with the release of The Haskell Platform (THP).  Take a
minute to read about it if you haven't heard of it.  THP promises to
provide installation packages for common platforms, bundling the
compiler, cabal-install, and a set of libraries with compatible versions
and with active support.  It's a small set for now, THP is in its
infancy.

Before you give up, consider using GHC 6.8.* for the time being, since
it sounds like ubuntu's installer works for that.  I think a lot of
folks are still using 6.8, and earlier versions, quite happily.  If you
do end up giving up on Haskell because of installation frustrations,
come back in a few months and see if things are better.

Once it's installed and working, GHC's a very decent compiler.  Naturally,
it's not as mature as GCC.  There are outstanding bugs and corner cases
where performance isn't what it should be.  From where I'm sitting, it
seems to be improving in all those areas.

There are several individuals and companies in this community who are
using GHC, in production, with commercial success.

Overall, challenges with the toolset have been less of a hurdle for me
than mastering the language.  I hope you are able to spend some time
using it.

Regards,
John

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


Re: [Haskell-cafe] Confused about readline/editline

2009-04-05 Thread Martijn van Steenbergen

Judah Jacobson wrote:

I'm not sure, but there might be some order of flags or packages you
could give to Cabal which would cause it to link to readline first; I
think if gcc gets -lreadline -ledit in that order then it will do
what you want.  Passing -v or -v3 to cabal build should let you
see what's going on.


Yes, -v3 indeed shows that edit comes before readline.

Adding this extra line fixes it:


  Extra-Libraries:  readline


Is adding that extra line a robust, portable and documented way of 
solving the problem?


Whew, I'm really glad it's fixed now. It took me half a day to narrow 
the problem down. :-)


Thanks,

Martijn.

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


Re: [Haskell-cafe] high probability of installation problems and quality of the glorious implementation

2009-04-05 Thread FFT
On Sun, Apr 5, 2009 at 12:35 PM, John Dorsey hask...@colquitt.org wrote:

 Once it's installed and working, GHC's a very decent compiler.

My general null hypothesis is, as Alec Baldwin put it, that a loser is
a loser, or a buggy project is buggy.

If GHC is robust overall (which I'm yet to find out), why is the
installation so broken?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] high probability of installation problems and quality of the glorious implementation

2009-04-05 Thread Peter Verswyvelen
That is strange, I'm using Ubuntu myself, and I come from Windows so know
absolutely nothing about Linux whatsoever, but GHC 6.10.2 binary installed
without problems.

But anyway, in this case, if you're on Windows, installation of GHC works
like a charm: download, install, play. But for most of the packages on
Hackage, Windows is not a good platform :)

On Sun, Apr 5, 2009 at 10:19 PM, FFT fft1...@gmail.com wrote:

 On Sun, Apr 5, 2009 at 12:35 PM, John Dorsey hask...@colquitt.org wrote:

  Once it's installed and working, GHC's a very decent compiler.

 My general null hypothesis is, as Alec Baldwin put it, that a loser is
 a loser, or a buggy project is buggy.

 If GHC is robust overall (which I'm yet to find out), why is the
 installation so broken?
 ___
 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] binary package: memory problem decoding an IntMap

2009-04-05 Thread Manlio Perillo

Manlio Perillo ha scritto:

Hi.

I'm having memory problems decoding a big IntMap.

The data structure is:

IntMap (UArr (Word16 :*: Word8))


There are 480189 keys, and a total of 100480507 elements
(Netflix Prize).
The size of the encoded (and compressed) data is 184 MB.

When I load data from the Netflix Prize data set, total memory usage is
1030 Mb.



It seems there is a problem with tuples, too.

I have a:
[(Word16, UArr (Word32 :*:* Word8))]

This eats more memory than it should, since tuples are decoded lazily.



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


Re: [Haskell-cafe] high probability of installation problems and quality of the glorious implementation

2009-04-05 Thread Miguel Mitrofanov

What about 6.10.1? Is it failing too?

On 5 Apr 2009, at 22:22, FFT wrote:


I'm still learning Haskell and also evaluating whether I want to use
the language in my work.

It seems like a fascinating language so far (although I don't know if
laziness will be a detriment later for me eventually), but I'm a bit
worried about the overall quality of its GHC implementation.

For example, I tried installing GHC-6.10.2 on my Ubuntu 8.04 machine
(probably the most mainstream Linux these days).

1st attempt: binary = failed the impossible happened, report bug (I
think it's already in bugzilla for an even earlier version)

2nd attempt: source and docs = followed README, but make failed
while building docs

3rd attempt: source only, no docs = make install succeeded, but ghci
now seems to have its readline screwed up (no editing, can't quit
even with Ctrl-C or Ctrl-D), while Ubuntu-bundled 6.8.* ghci works
fine in this regard.

If these kinds of issues are common only during installation, I can
live with that, but if GHC is flaky overall, having to deal with this
may cancel out whatever productivity advantages Haskell provides.

If the quality of the installation procedures is different from the
compiler itself, can you explain why?
___
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] high probability of installation problems and quality of the glorious implementation

2009-04-05 Thread wren ng thornton

FFT wrote:

John Dorsey wrote:
 Once it's installed and working, GHC's a very decent compiler.

My general null hypothesis is, as Alec Baldwin put it, that a loser is
a loser, or a buggy project is buggy.

If GHC is robust overall (which I'm yet to find out), why is the
installation so broken?


Part of the problem is that GHC 6.6 is the last version that supported 
bootstrapping. Some of the changes in 6.8 broke that, and so the longer 
it goes the harder bootstrapping/installation becomes. It's a major bug 
that many people would like fixed; I don't know the details, but I'm 
sure the GHC mailing lists[1] or #ghc would have more to say about it. 
There are also some issues about libeditline which is used for the 
interactive debugger, and has a lot to do with Linux vs BSD nonsense.


Once these two issues are dealt with, the rest is smooth sailing. As the 
flagship Haskell compiler a lot of work has been invested in 
optimizations and the general running of GHC. Installation is less 
glorious work, so less academic and corporate investment has been paid 
to that part of things.


Since most of the community already has a GHC installed, the 
bootstrapping issue isn't devastating to those already in the loop. 
Consequently, a lot of work has been done on making the post-compiler 
development cycle more robust with projects like Cabal, Hackage, 
cabal-install, and the Haskell Platform. These projects are still under 
rapid development, but they are fairly stable and they make it very 
friendly to install libraries--- which greatly speeds up development.



[1] 
http://www.haskell.org/ghc/docs/latest/html/users_guide/introduction-GHC.html#mailing-lists-GHC


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


Re: [Haskell-cafe] high probability of installation problems and quality of the glorious implementation

2009-04-05 Thread John Dorsey
Quoth FFT:
 My general null hypothesis is, as Alec Baldwin put it, that a loser is
 a loser, or a buggy project is buggy.

I can't see the world in such black and white terms.  GHC has strengths
and weaknesses, as do other projects.  GHC is changing over time, as are
other projects.

Formally verified software is still rare.  Most of the useful stuff lies
somewhere between buggy and bug-free.

 If GHC is robust overall (which I'm yet to find out), why is the
 installation so broken?

History.  Limited resources.  Complexity and diversity of target
environments.  Moving targets.  Day jobs.

Of course, you have to determine what your needs and standards are for
any product you use.

Regards,
John

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


Re: [Haskell-cafe] binary package: memory problem decoding an IntMap

2009-04-05 Thread Nicolas Pouillard
Excerpts from Manlio Perillo's message of Sun Apr 05 22:41:57 +0200 2009:
 Manlio Perillo ha scritto:
  Hi.
  
  I'm having memory problems decoding a big IntMap.
  
  The data structure is:
  
  IntMap (UArr (Word16 :*: Word8))
  
  
  There are 480189 keys, and a total of 100480507 elements
  (Netflix Prize).
  The size of the encoded (and compressed) data is 184 MB.
  
  When I load data from the Netflix Prize data set, total memory usage is
  1030 Mb.
  
 
 It seems there is a problem with tuples, too.
 
 I have a:
  [(Word16, UArr (Word32 :*:* Word8))]
 
 This eats more memory than it should, since tuples are decoded lazily.

Why not switch to [(Word16 :*: UArr (Word32 :*: Word8))] then?

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


Re: [Haskell-cafe] binary package: memory problem decoding an IntMap

2009-04-05 Thread Manlio Perillo

Manlio Perillo ha scritto:

[...]

It seems there is a problem with tuples, too.

I have a:
[(Word16, UArr (Word32 :*:* Word8))]

This eats more memory than it should, since tuples are decoded lazily.



My bad, sorry.

I simply solved by using a strict consumer (foldl' instead of foldl).


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


Re: [Haskell-cafe] high probability of installation problems and quality of the glorious implementation

2009-04-05 Thread Erik de Castro Lopo
FFT wrote:

 I'm still learning Haskell and also evaluating whether I want to use
 the language in my work.

 snip

 For example, I tried installing GHC-6.10.2 on my Ubuntu 8.04 machine
 (probably the most mainstream Linux these days).

I'm on Ubuntu 8.10 and soon to move to 9.04 and I agree that the
standard 6.8.2 compiler on Debian/Ubuntu is a PITA.

I haven't tried 6.10.2 yet, but the way I installed 6.10.1 and a bunch
of other packages was by installing them from the Debian unstable
source packages.

HTH,
Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] high probability of installation problems and quality of the glorious implementation

2009-04-05 Thread Jason Dagit
On Sun, Apr 5, 2009 at 4:13 PM, Erik de Castro Lopo
mle...@mega-nerd.com wrote:
 FFT wrote:

 I'm still learning Haskell and also evaluating whether I want to use
 the language in my work.

  snip

 For example, I tried installing GHC-6.10.2 on my Ubuntu 8.04 machine
 (probably the most mainstream Linux these days).

 I'm on Ubuntu 8.10 and soon to move to 9.04 and I agree that the
 standard 6.8.2 compiler on Debian/Ubuntu is a PITA.

In particular, I advise my friends not to install GHC from apt on
Debian/Ubuntu because of the way the packages are fractured on those
distros.  Nothing but problems for casual Haskell hackers.  If you
know your distro and Haskell well, then sure it's easy to install all
the packages that constitute a normal ghc install.  For everyone else
it's just confusing and frustrating.  I've heard that from a distro
point of view the split packages are nice and that the solution to my
complaint is a proper meta or virtual package.

I wonder when we'll get a good haskell virtual package on Debian?

Just my $0.02,
Jason
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] high probability of installation problems and quality of the glorious implementation

2009-04-05 Thread Erik de Castro Lopo
Jason Dagit wrote:

 In particular, I advise my friends not to install GHC from apt on
 Debian/Ubuntu because of the way the packages are fractured on those
 distros.

Fractured?

  Nothing but problems for casual Haskell hackers.  If you
 know your distro and Haskell well, then sure it's easy to install all
 the packages that constitute a normal ghc install.

Well I admit that having done a lot of debian packaging in my day job
I know the debian packaging system pretty well.

I chose to stick to the debian packages because I found cabal to be a
pain in the neck in comparison :-).

 I've heard that from a distro
 point of view the split packages are nice and that the solution to my
 complaint is a proper meta or virtual package.

My overwhelming complaint about the packages in Ubuntu and Debian
stable/testing is that they are for ghc-6.8.2.

 I wonder when we'll get a good haskell virtual package on Debian?

What would this package do?

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] high probability of installation problems and quality of the glorious implementation

2009-04-05 Thread FFT
On Sun, Apr 5, 2009 at 1:41 PM, Peter Verswyvelen bugf...@gmail.com wrote:
 That is strange, I'm using Ubuntu myself, and I come from Windows so know
 absolutely nothing about Linux whatsoever, but GHC 6.10.2 binary installed
 without problems.

Are you running 32-bit Ubuntu 8.04 ?

/etc/lsb-release and /etc/issue* may contain this info, also
$ uname -a

It may also be the presence or absence of some packages that the
installation requires, but ./configure doesn't check.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [darcs-users] [Haskell-cafe] Reverting to any old version using Darcs

2009-04-05 Thread Eric Kow
On Wed, Apr 1, 2009 at 11:25 PM, Claus Reinke claus.rei...@talk21.comwrote:
  Perhaps the rumours refer to non-tagged versions? In conventional
  non-distributed version control systems, one
  might go back to the version on a specific date, while with
  darcs, that only makes sense wrt a specific repo (I think?).

On Wed, Apr 01, 2009 at 23:43:36 +0200, Peter Verswyvelen wrote:
 Yes, that might be the rumor indeed, it surely sounds like it :)
 Darcs is really very different, so it takes a while to get used to it when
 coming from other systems.

This has been said in one of the earlier responses, but I thought it was
worth repeating: darcs has a notion of context files which can be used to
retrieve exactly another version of a repository with darcs get
--context name-of-file.

You can generate such files by invoking darcs changes --context.  For
that matter, patch bundles (as created by darcs send) can also be used
as context files.  It's sometimes quite handy to do something like darcs
get --context foo.dpatch to retrieve exactly the version of the
repository a patch bundle was meant to apply to.

This is one of the little known features of darcs, and should probably
appear in some kind of darcs tips series of blog articles :-)

-- 
Eric Kow http://www.nltg.brighton.ac.uk/home/Eric.Kow
PGP Key ID: 08AC04F9


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


Re: [Haskell-cafe] high probability of installation problems and quality of the glorious implementation

2009-04-05 Thread Brandon S. Allbery KF8NH

On 2009 Apr 5, at 19:47, Erik de Castro Lopo wrote:

Jason Dagit wrote:

I wonder when we'll get a good haskell virtual package on Debian?


What would this package do?



Install ghc + all the little pieces of libghc6-cruft needed to get a  
sane working environment?


--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
electrical and computer engineering, carnegie mellon universityKF8NH




PGP.sig
Description: This is a digitally signed message part
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Combining sequences

2009-04-05 Thread Henning Thielemann


On Sat, 4 Apr 2009, michael rice wrote:


Is there a simple way to combine two sequences that are in ascending order into 
a single
sequence that's also in ascending order? An example would be the squares 
[1,4,9,16,25..]
combined with the cubes [1,8,27,64,125..] to form [1,1,4,8,9,16,25,27..].


http://hackage.haskell.org/packages/archive/utility-ht/0.0.4/doc/html/Data-List-HT.html#v%3AmergeBy
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] haskelldb, how to escape table names

2009-04-05 Thread GüŸnther Schmidt

Hi,

how can I escape table and column names, from something

like: kh-internes-kennz

to this: [kh-internes-kennz] ?

Günther

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


Re: [Haskell-cafe] high probability of installation problems and quality of the glorious implementation

2009-04-05 Thread Richard O'Keefe


On 6 Apr 2009, at 1:05 pm, Brandon S. Allbery KF8NH wrote:


On 2009 Apr 5, at 19:47, Erik de Castro Lopo wrote:


What would this package do?



Install ghc + all the little pieces of libghc6-cruft needed to get a  
sane working environment?


I want the Zen package:  Make me one with everything.


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


Re: [Haskell-cafe] Combining sequences

2009-04-05 Thread michael rice
Thanks. It looks like mergeBy will do the job, but is it available in Hugs?

Michael


--- On Sun, 4/5/09, Henning Thielemann lemm...@henning-thielemann.de wrote:

From: Henning Thielemann lemm...@henning-thielemann.de
Subject: Re: [Haskell-cafe] Combining sequences
To: michael rice nowg...@yahoo.com
Cc: haskell-cafe@haskell.org
Date: Sunday, April 5, 2009, 9:09 PM


On Sat, 4 Apr 2009, michael rice wrote:

 Is there a simple way to combine two sequences that are in ascending order 
 into a single
 sequence that's also in ascending order? An example would be the squares 
 [1,4,9,16,25..]
 combined with the cubes [1,8,27,64,125..] to form [1,1,4,8,9,16,25,27..].

http://hackage.haskell.org/packages/archive/utility-ht/0.0.4/doc/html/Data-List-HT.html#v%3AmergeBy



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


Re: [Haskell-cafe] high probability of installation problems and quality of the glorious implementation

2009-04-05 Thread Jason Dagit
On Sun, Apr 5, 2009 at 4:47 PM, Erik de Castro Lopo
mle...@mega-nerd.com wrote:
 Jason Dagit wrote:

 In particular, I advise my friends not to install GHC from apt on
 Debian/Ubuntu because of the way the packages are fractured on those
 distros.

 Fractured?

In the sense that they split up the things GHC builds.  Specifically,
you need to install quite a few packages to get everything that GHC
would come with.

  Nothing but problems for casual Haskell hackers.  If you
 know your distro and Haskell well, then sure it's easy to install all
 the packages that constitute a normal ghc install.

 Well I admit that having done a lot of debian packaging in my day job
 I know the debian packaging system pretty well.

Nice!  Debian is my favorite distro by leaps and bounds.

 I chose to stick to the debian packages because I found cabal to be a
 pain in the neck in comparison :-).

Interesting.  I'm glad that Open Source provides enough diversity that
people can use the tools they enjoy working with.  I like cabal just
fine but I'm glad we can both choose different paths to meet a common
goal.

 I wonder when we'll get a good haskell virtual package on Debian?

 What would this package do?

At a minimum it will give you everything that the GHC HQ installer
gives you.  For the casual haskell hacker, it ideally also gives you
the profiled versions of everything thath GHC HQ installer gives you.
Perhaps this is the Debian equivalent of the 'batteries included'
haskell platform.

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


Re: [Haskell-cafe] Combining sequences

2009-04-05 Thread Thomas Hartman
It's not in hugs, nor in ghc.

It's just in hackage. However, by the looks of it, you should probably
be able to use it in hugs. I didn't actually check this, but the cabal
file didn't name any fancy extensions, so it looks pretty
cross-compiler.

You can just go to

http://hackage.haskell.org/cgi-bin/hackage-scripts/package/utility-ht-0.0.4

wget 
http://hackage.haskell.org/packages/archive/utility-ht/0.0.4/utility-ht-0.0.4.tar.gz

untar

and put them with the rest of the files your hugs compiler uses for
package import. (I don't actually know how package installation works
in hugs... isn't it just put the files into a dir?)

thomas.

2009/4/5 michael rice nowg...@yahoo.com:
 Thanks. It looks like mergeBy will do the job, but is it available in Hugs?

 Michael


 --- On Sun, 4/5/09, Henning Thielemann lemm...@henning-thielemann.de
 wrote:

 From: Henning Thielemann lemm...@henning-thielemann.de
 Subject: Re: [Haskell-cafe] Combining sequences
 To: michael rice nowg...@yahoo.com
 Cc: haskell-cafe@haskell.org
 Date: Sunday, April 5, 2009, 9:09 PM


 On Sat, 4 Apr 2009, michael rice wrote:

 Is there a simple way to combine two sequences that are in ascending order
 into a single
 sequence that's also in ascending order? An example would be the squares
 [1,4,9,16,25..]
 combined with the cubes [1,8,27,64,125..] to form [1,1,4,8,9,16,25,27..].

 http://hackage.haskell.org/packages/archive/utility-ht/0.0.4/doc/html/Data-List-HT.html#v%3AmergeBy


 ___
 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] Lazy vs correct IO [Was: A round of golf]

2009-04-05 Thread oleg

   It opens and closes each file in turn; but it would it be
   unwise to open and close each file as we'd read a chunk from
   it? This would allow arbitrary interleaving.

If I understand you correctly, you are proposing processing several
files in parallel, so to interleave IO. If the `files' in question are
communication pipes, or if KAIO (kernel asynchronous IO) is
available, it is indeed a good strategy. The last example in the file

http://okmij.org/ftp/Haskell/Iteratee/IterateeM.hs

(called test_driver_mux) demonstrates how to interleave IO with
Iteratees. Iteratees of course do not care how the source data have
been obtained, with or without interleaving.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] cabal build on mac os 10.5.6 , can't find gmp

2009-04-05 Thread brian

Hi,

Cabal won't build zlib because it can't find libgmp.

It's there, in /sw/lib (fink installation).

I've modified the bootstrap script and added -L/sw/lib to the ghc  
options.  This is a mystery in itself because ghc is itself a fink  
package and should know where gmp is, so that's already a bad sign.


I can get to the build step with the additional -L option but then ./ 
Setup fails again because it can't find gmp.


Help   ?

Thanks,

Brian

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


[Haskell-cafe] Linking hmatrix without LAPACK

2009-04-05 Thread Duane Johnson
I'm curious if there is a quick fix to this.  I installed GLS and  
hmatrix, and it runs wonderfully together in ghci.  When I run ghc -- 
make, however, I run into the following link dependency:


Linking SilkwormGame ...
Undefined symbols:
  _dgemm_, referenced from:
  _multiplyR in libHShmatrix-0.5.0.1.a(lapack-aux.o)
  _dgesv_, referenced from:
  _linearSolveR_l in libHShmatrix-0.5.0.1.a(lapack-aux.o)
... etc

Is there a way to tell ghc to not link these?  Or am I making a poor  
assumption that if my code runs in ghci, it does not need LAPACK?


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


[Haskell-cafe] Re: Linking hmatrix without LAPACK

2009-04-05 Thread Duane Johnson
On a related note, I've installed Atlas, and I get the following error  
when linking:



Linking SilkwormGame ...
ld: in /opt/local/lib/liblapack.a(), not a valid archive member
collect2: ld returned 1 exit status


How would I go about diagnosing this?  I've never seen an ld error  
like that.


Thanks again!
Duane Johnson


On Apr 5, 2009, at 11:02 PM, Duane Johnson wrote:

I'm curious if there is a quick fix to this.  I installed GLS and  
hmatrix, and it runs wonderfully together in ghci.  When I run ghc -- 
make, however, I run into the following link dependency:


Linking SilkwormGame ...
Undefined symbols:
 _dgemm_, referenced from:
 _multiplyR in libHShmatrix-0.5.0.1.a(lapack-aux.o)
 _dgesv_, referenced from:
 _linearSolveR_l in libHShmatrix-0.5.0.1.a(lapack-aux.o)
... etc

Is there a way to tell ghc to not link these?  Or am I making a poor  
assumption that if my code runs in ghci, it does not need LAPACK?


Thanks,
Duane Johnson


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