Re: [Haskell-cafe] Announce: Leksah 0.13.1 (a bit experimental)

2013-01-09 Thread Peter Simons
Hi Hamish,

  Features in process-leksah have been merged into process. For newer
  versions of GHC leksah-server just depends on process.

I trust this applies to the unreleased beta version that you just
announced, right? (The latest release versions still seem to depend on
process-leksah.) In that case, I'll try again building Leksah once the
new version is available from Hackage.

Thank you for the quick response!

Peter


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


Re: [Haskell-cafe] Example programs with ample use of deepseq?

2013-01-09 Thread Erik Hesselink
On Tue, Jan 8, 2013 at 10:54 PM, Joachim Breitner
m...@joachim-breitner.de wrote:
 Am Dienstag, den 08.01.2013, 13:01 -0800 schrieb Evan Laforge:
  surprisingly, deepseq is not used as much as I thought.
  http://packdeps.haskellers.com/reverse/deepseq lists a lot of packages,
  but (after grepping through some of the code) most just define NFData
  instances and/or use it in tests, but rarely in the „real“ code. For
  some reason I expected it to be in more widespread use.

 I've been using deepseq quite a bit lately, but for the purpose of
 debugging space leaks.  If, when I deepseq a big structure, the space
 leak goes away, I can then apply it to some subset.  After much
 trial-and-error I can find something which is insufficiently strict.
 Ideally I can then strictify that one thing and stop using the
 deepseq.  I wish there was a more efficient way to do this.

 this is also a possible application of my approach, by providing a „I
 want this data structure to be fully evaluated now, please tell me how
 it currently looks, i.e. where in the data structure still thunks lie
 hidden.“

 Do you have a nice, striking example where using your approach (using
 deepseq and comparing efficiency) you could make a difference, and where
 a tool as described above would make the analysis much easier?

We've also used this approach to debug space-leaks, and would have
loved such a tool. We used deepseq, and compared the heap profiles. We
finally found the leaks this way, and fixed them using strictness
annotations. Finally, we verified by running deepseq again at top
level and observing that it didn't change anything anymore.

Erik

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


Re: [Haskell-cafe] Example programs with ample use of deepseq?

2013-01-09 Thread Joachim Breitner
Hi Erik,

Am Mittwoch, den 09.01.2013, 14:23 +0100 schrieb Erik Hesselink:
 We've also used this approach to debug space-leaks, and would have
 loved such a tool. We used deepseq, and compared the heap profiles. We
 finally found the leaks this way, and fixed them using strictness
 annotations. Finally, we verified by running deepseq again at top
 level and observing that it didn't change anything anymore.

same question to you: Would you have a suitable test case that can be
used to test and demonstrate the usefulness of such tools?

Greetings,
Joachim

-- 
Joachim nomeata Breitner
  m...@joachim-breitner.de  |  nome...@debian.org  |  GPG: 0x4743206C
  xmpp: nome...@joachim-breitner.de | http://www.joachim-breitner.de/



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


[Haskell-cafe] HaskellDB-HDBC-PostgreSQL installation problem

2013-01-09 Thread Johannes . Reiher
Hello Community,

I have a problem installing the HaskellDB-HDBC-PostgreSQL package with cabal.
I'm using Haskell Platform in Windows and I tried to install this package, but 
there was the error could not find pq library. So I tried to install libpq 
wich includes pq but there was another error: this package needs a unix 
installation.
Is there any way to install pq on Windows or get the HaskellDB-HDBC-PostgreSQL 
in another way?

Thanks for your advice

Johannes Reiher

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


Re: [Haskell-cafe] HaskellDB-HDBC-PostgreSQL installation problem

2013-01-09 Thread Christopher Done
Tricky. For what it's worth, if you can't figure this out in the end,
you could perhaps use my pgsql-simple which is implemented in pure
haskell: https://github.com/chrisdone/pgsql-simple It's been in use on
hpaste.org for about 2 years.

On 9 January 2013 14:44, Johannes.Reiher johannes.rei...@fh-zwickau.de wrote:
 Hello Community,

 I have a problem installing the HaskellDB-HDBC-PostgreSQL package with cabal.
 I'm using Haskell Platform in Windows and I tried to install this package, 
 but there was the error could not find pq library. So I tried to install 
 libpq wich includes pq but there was another error: this package needs a 
 unix installation.
 Is there any way to install pq on Windows or get the 
 HaskellDB-HDBC-PostgreSQL in another way?

 Thanks for your advice

 Johannes Reiher

 ___
 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] Example programs with ample use of deepseq?

2013-01-09 Thread Erik Hesselink
On Wed, Jan 9, 2013 at 2:40 PM, Joachim Breitner
m...@joachim-breitner.de wrote:
 Hi Erik,

 Am Mittwoch, den 09.01.2013, 14:23 +0100 schrieb Erik Hesselink:
 We've also used this approach to debug space-leaks, and would have
 loved such a tool. We used deepseq, and compared the heap profiles. We
 finally found the leaks this way, and fixed them using strictness
 annotations. Finally, we verified by running deepseq again at top
 level and observing that it didn't change anything anymore.

 same question to you: Would you have a suitable test case that can be
 used to test and demonstrate the usefulness of such tools?

Sadly, no. This is a private, core part of our application that I
cannot share. I can describe what we did, and also the structure of
the data in broad terms: we have several Maps, where the keys are
usually Text, and the values are custom data types. These contain keys
into these maps again. The whole thing defines a graph with several
indexes into it. We finally solved the problems by completely moving
to strict map operations, strict MVar/TVar operations, and strict data
types.

If you have more questions, or tools you want to test, I'd be happy to
help, though.

Regards,

Erik

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


Re: [Haskell-cafe] HaskellDB-HDBC-PostgreSQL installation problem

2013-01-09 Thread Alexander Alexeev
Try Persistent package. It doesn't depends on libpq and has many useful 
features (see http://www.yesodweb.com/book/persistent for details)


On 01/09/2013 05:50 PM, Christopher Done wrote:

Tricky. For what it's worth, if you can't figure this out in the end,
you could perhaps use my pgsql-simple which is implemented in pure
haskell: https://github.com/chrisdone/pgsql-simple It's been in use on
hpaste.org for about 2 years.

On 9 January 2013 14:44, Johannes.Reiher johannes.rei...@fh-zwickau.de wrote:

Hello Community,

I have a problem installing the HaskellDB-HDBC-PostgreSQL package with cabal.
I'm using Haskell Platform in Windows and I tried to install this package, but there was the error 
could not find pq library. So I tried to install libpq wich includes pq but there was 
another error: this package needs a unix installation.
Is there any way to install pq on Windows or get the HaskellDB-HDBC-PostgreSQL 
in another way?

Thanks for your advice

Johannes Reiher

___
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



--
Best regards,
Alexander Alexeev
http://eax.me/

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


Re: [Haskell-cafe] Seeking feedback for a tutorial paper draft about GADTs

2013-01-09 Thread Alexander Batischev
On Tue, Jan 08, 2013 at 11:22:39PM +0400, Anton Dergunov wrote:
 I have written a draft of an introductory-level tutorial paper about
 GADTs in Haskell (for submittion to proceedings of the recent LASER
 summer school) and I would like to seek initial feedback about its
 content: what information is probably missing? are there any subtle
 mistakes?

Not exactly the feedback you asked for, but I hope it still can be of
some use.

As a person with no prior knowledge about GADTs, I found your paper a
good introduction. Following proof of correctness of red-black tree
insertions turned out to be a little bit of a challenge as type
annotations quickly become tangled (made me wondering how one should
prove correctness of the proof).

I particularly liked how you handle things that are not central to
tutorial, like phantom and existential types: you give single-sentence
explanation that provides good enough intuition to follow you further.

Talking of quick explanations, I would love to see kinds and singleton
types explained in the same manner. You tried to explain singleton types
at page 13, but I find explanation provided by GHC documentation[1] to
be much more clear. As for kinds, it just puzzles me why you use the
term but don't explain it.

  1. http://hackage.haskell.org/trac/ghc/wiki/TypeNats/Basics

The same goes for type families - while I was able to quickly look up
definition of singleton types, I failed to comprehend basics of type
families by reading Haskell Wiki. I ended up pretending that type
families are just type-level functions.

I would love to see Yampa optimizations section expanded with more
interesting examples. Are there any?

Last but not least, a few minor typos and errors I spotted:

* at page 8, Than we need to declare type instances... should be Then
  we need...;

* probably due to excessive editing, parameters to repeatElem at page 13
  are in the different order than before;

* at page 14, you state:

   As in all binary search trees, for a particular node N c l x r
   values greater than x are stored in left sub-tree (in l) and values
   less than x are stored in right sub-tree (in r).

  But later on, your code contradict that statement by recursing to left
  sub-tree when x we look for is less than value in the node, and to
  right sub-tree when x is greater than value in the node.

Thank you once again for a nice introduction to GADTs!

-- 
Regards,
Alexander Batischev

PGP key 356961A20C8BFD03
Fingerprint: CE6C 4307 9348 58E3 FD94  A00F 3569 61A2 0C8B FD03



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


Re: [Haskell-cafe] HaskellDB-HDBC-PostgreSQL installation problem

2013-01-09 Thread Felipe Almeida Lessa
AFAIK, persistent's PostgreSQL support does depend on libpq via
postgresql-libpq.

On Wed, Jan 9, 2013 at 12:39 PM, Alexander Alexeev m...@eax.me wrote:
 Try Persistent package. It doesn't depends on libpq and has many useful
 features (see http://www.yesodweb.com/book/persistent for details)


 On 01/09/2013 05:50 PM, Christopher Done wrote:

 Tricky. For what it's worth, if you can't figure this out in the end,
 you could perhaps use my pgsql-simple which is implemented in pure
 haskell: https://github.com/chrisdone/pgsql-simple It's been in use on
 hpaste.org for about 2 years.

 On 9 January 2013 14:44, Johannes.Reiher johannes.rei...@fh-zwickau.de
 wrote:

 Hello Community,

 I have a problem installing the HaskellDB-HDBC-PostgreSQL package with
 cabal.
 I'm using Haskell Platform in Windows and I tried to install this package,
 but there was the error could not find pq library. So I tried to install
 libpq wich includes pq but there was another error: this package needs a
 unix installation.
 Is there any way to install pq on Windows or get the
 HaskellDB-HDBC-PostgreSQL in another way?

 Thanks for your advice

 Johannes Reiher

 ___
 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



 --
 Best regards,
 Alexander Alexeev
 http://eax.me/


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




-- 
Felipe.

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


[Haskell-cafe] Is http://hackage.haskell.org/packages/hackage.html having a challenging serving up archive.tar?

2013-01-09 Thread KC
:)

-- 
--
Regards,
KC

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


Re: [Haskell-cafe] Undo records

2013-01-09 Thread Ben Doyle
I think acid-state (http://hackage.haskell.org/package/acid-state) might do
what you want, at least in broad strokes. It uses a durable transaction log
to store query and update events.

As far as I know, the interface to the library doesn't expose an
undo/rollback function, so you'd have a bit of work to do to extend it to
your use case. But the core functionality to make it possible should be
there.

Can you use ghc extensions aside from Template Haskell? Template Haskell
you can do without with acid-state, but without GADTs and so on you'll have
problems.

On Sun, Jan 6, 2013 at 12:01 PM, Casey Basichis caseybasic...@gmail.comwrote:

 Hi,

 I am still getting a hang of Haskell.  Sorry if the answer is obvious.

 What sorts of packages and approaches should I be looking at if I was
 looking to store something like an Undo stack into a database.

 Each table would refer to a function.
 Each records input and outputs would specify both a table ID and record
 ID.
 The records would also have a data and a Process ID to associate all
 functions to a specific process and give them an order.

 No records are ever deleted.  Rolling something back is instead a process
 of recreating a new, modified graph by taking the old graph from the
 database.

 I should note that while I can generate some of the boiler parts from
 template haskell in advance I'm ultimately using a stage 1 compiler with no
 GHCI o template haskell.

 Thanks,
 Casey

 --
 Casey James Basichis
 Composer - Cartoon Network
 http://www.caseyjamesbasichis.com
 caseybasic...@gmail.com
 310.387.7540

 ___
 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] Undo records

2013-01-09 Thread Casey Basichis
Hi Ben,

Thanks for the reply.

I am planning on using Persistent which can work without template haskell,
though I am planning on using the TH on my workstation to create the boiler
code parts of the database setup.

The part that I'm having trouble with is collecting the composed functions.
It may be a very typical problem but I'm just lost.

Let me just describe a simple example;

A message comes through the FFI to:

Haskell chooses criteria to select a sequence of data from the database
--- many functions exist to do this, some may take a random number as a
parameter, the seed needs to be stored
Haskell similarly chooses a process to apply to the data
--- A random number or other deterministic chain of functions
The results from the processing are loaded into memory - (these are not the
focus here)
The minimal chain of functions, parameters and seeds is stored to allow for
a deterministic recall/modification
--- The input parameters and output parameters are Table and Row ID's

So Haskell isn't reacting to many input events, just a trigger that may
come with a few initialization parameters.

If a function is composed of other functions which do not depend on
external state they should not need to be stored in the database as they
are implicit.

I imagine this is a monad problem, but kind and what other things spring to
mind that might help in approaching this kind of problem?

Thanks,
Casey



On Wed, Jan 9, 2013 at 11:40 AM, Ben Doyle
benjamin.peter.do...@gmail.comwrote:

 I think acid-state (http://hackage.haskell.org/package/acid-state) might
 do what you want, at least in broad strokes. It uses a durable transaction
 log to store query and update events.

 As far as I know, the interface to the library doesn't expose an
 undo/rollback function, so you'd have a bit of work to do to extend it to
 your use case. But the core functionality to make it possible should be
 there.

 Can you use ghc extensions aside from Template Haskell? Template Haskell
 you can do without with acid-state, but without GADTs and so on you'll have
 problems.

 On Sun, Jan 6, 2013 at 12:01 PM, Casey Basichis 
 caseybasic...@gmail.comwrote:

 Hi,

 I am still getting a hang of Haskell.  Sorry if the answer is obvious.

 What sorts of packages and approaches should I be looking at if I was
 looking to store something like an Undo stack into a database.

 Each table would refer to a function.
 Each records input and outputs would specify both a table ID and record
 ID.
 The records would also have a data and a Process ID to associate all
 functions to a specific process and give them an order.

 No records are ever deleted.  Rolling something back is instead a process
 of recreating a new, modified graph by taking the old graph from the
 database.

 I should note that while I can generate some of the boiler parts from
 template haskell in advance I'm ultimately using a stage 1 compiler with no
 GHCI o template haskell.

 Thanks,
 Casey

 --
 Casey James Basichis
 Composer - Cartoon Network
 http://www.caseyjamesbasichis.com
 caseybasic...@gmail.com
 310.387.7540

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





-- 
Casey James Basichis
Composer - Cartoon Network
http://www.caseyjamesbasichis.com
caseybasic...@gmail.com
310.387.7540
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Example programs with ample use of deepseq?

2013-01-09 Thread Joachim Breitner
Hi,

Am Mittwoch, den 09.01.2013, 15:11 +0100 schrieb Erik Hesselink:
 We finally solved the problems by completely moving
 to strict map operations, strict MVar/TVar operations, and strict data
 types.

do you mean strict by policy (i.e. before storing something in a
[MT]Var, you ensure it is evaluated) or by construction (by `seq` or
`deepseq`’ing everything before it is stored)? In the latter case: Seq
or deeqseq? Again in the latter case: Do you worry about the performance
of repeatedly deepseq’ing an already deepseq’ed and possibly large
value?

You are not the first user of Haskell who ends up with that approach to
lazy evaluation. I’m not sure what that means for Haskell, though.

Greetings,
Joachim


-- 
Joachim nomeata Breitner
  m...@joachim-breitner.de  |  nome...@debian.org  |  GPG: 0x4743206C
  xmpp: nome...@joachim-breitner.de | http://www.joachim-breitner.de/



signature.asc
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] HaskellDB-HDBC-PostgreSQL installation problem

2013-01-09 Thread erik flister
 there was another error: this package needs a
 unix installation.

you need to use MinGW, but it still fails because of a GHC bug
http://hackage.haskell.org/trac/ghc/ticket/7103
https://github.com/lpsmith/postgresql-libpq/issues/7
-e

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


[Haskell-cafe] haskell.cs.yale.edu error

2013-01-09 Thread Greg Fitzgerald
I was hoping to check on the status of Yampa, but:

http://haskell.cs.yale.edu/

[an error occurred while processing this directive]
You don't have permission to access the requested directory. There is
either no index document or the directory is read-protected.
[an error occurred while processing this directive]

Do you know who maintains this website?

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


[Haskell-cafe] Haskell Weekly News: Issue 254

2013-01-09 Thread Daniel Santa Cruz
Welcome to issue 254 of the HWN, an issue covering crowd-sourced bits
of information about Haskell from around the web. This issue covers the
week of December 02, 2012 to January 05, 2013.

As some of you might have noticed, there has been an interruption in
the scheduled transmission of the newsletter. I have, over the past few
weeks, completed a move to NYC! It has been wonderful to meet many in
the community at the Haskell NYC meetups. Here is to a great year for
our cherised community.

Let's get things started out the right way, with a litte Lambda
Style :-)
[1] http://goo.gl/nQYdp

Quotes of the Week

   * GuySteele: Some people prefer not to commingle the functional,
 lambda-calculus part of a language with the parts that do side
 effects. It seems they believe in the separation of Church and
 state.

   * edwardk: type level ieee floats are a crime against nature. i had
 to implement them in c++ for template meta programming once. never
 ever again

   * acowley: (regarding Proxy) Haven't you ever wanted to put something
 in a box and never think about it?
 elliott: children

   * merijn: xenocons: I spend the entire week grading FP homework, I
think it's impossible for you to surprise me :p
 merijn: That's confusing :

   * andr00: Today's software engineering word is farpotshket. This is
 a Yiddish word meaning, broken, because someone tried to fix it.

   * dmwit: I know, I know. 0, 1, many. But then I also write most of
 my programs in a language whose type system has 4 levels. Four! Is
 that even a number??

   * aristid: a dubious motivation IMHO
 edwardk: i've had worse =P

   * ziarkaen: I'm thinking I can kill two birds with one stone by
 learning Haskell while producing a website, but all the birds are
 still alive at the moment.

   * ion:
 monad.bind = function (func, args) {
 return func.apply(undefined,
[value].concat(Array.prototype.slice.apply(args || [])));
 };
 is idiomatic JavaScript?

   * beaky: if stacks are recursion, what are queues?
 Hafydd: Procrastination.

   * elliott: I think lens is the first library I've seen that promises
 letting you write abstract totally-inefficient-looking
 compositional code and getting reliably good compilation which has
 actually delivered on that promise.

   * elliott: I didn't say half the things I said.

   * shachaf: The two-letter and three-letter identifiers are for
  edwardk's libraries. The one-letter identifiers are for his actual
  code.
 elliott: edwardk has non-library code?

   * neutrino: in many ways, Haskell is like this primodial soup out of
 which other languages end up springing

   * mm_freak: bruce schneier is an endofunctor that turns all
 automorphisms into identities

   * roconnor: where are all the category theoriest? why don't they
  already have all the answers for us?
 edwardk: roconnor: this is the point in your career where you look
   around for the cavalry and realize that you're it ;)

   * cmccann: multi-letter type variables is an experimental new
 extension

   * elliott: I can't remember the last time I wrote any Haskell without
 an evil grin.

   * neutrino: when you're told you have to use javascript, the viable
 alternative always remains in seppuku. and it's much more
 honorable.

   * shachaf: chrisdone: Please make Author not mandatory. [on hpaste]
 donri: shachaf: just write not shachaf and no one will ever know
 it's you

   * tac: If you're not part of the solution, you're part of the
 precipitate

   * cmccann: some people blame themselves, some people blame the
 language, but the people who really know what they're doing blame
 shachaf.

Top Reddit Stories

   * The end of an era, and the dawn of a new one
 Domain: haskell.org, Score: 148, Comments: 32
 On Reddit: [2] http://goo.gl/fiyVt
 Original: [3] http://goo.gl/dlxsF

   * Simon Peyton-Jones invests in FP Complete
 Domain: fpcomplete.com, Score: 92, Comments: 15
 On Reddit: [4] http://goo.gl/nPTk1
 Original: [5] http://goo.gl/wzfpP

   * 24 Days of Hackage - Thank YOU!
 Domain: ocharles.org.uk, Score: 88, Comments: 12
 On Reddit: [6] http://goo.gl/2yodj
 Original: [7] http://goo.gl/hSsH6

   * Heist 0.10...now with a 3000x performance improvement
 Domain: snapframework.com, Score: 81, Comments: 38
 On Reddit: [8] http://goo.gl/p7R7u
 Original: [9] http://goo.gl/znugn

   * 24 Days of Hackage: EKG
 Domain: ocharles.org.uk, Score: 68, Comments: 15
 On Reddit: [10] http://goo.gl/ltPb1
 Original: [11] http://goo.gl/UeYOA

   * pipes-3.0: Simpler, unified API
 Domain: haskellforall.com, Score: 64, Comments: 71
 On Reddit: [12] http://goo.gl/ZSVtT
 Original: [13] http://goo.gl/6Yt01

   * Hoodle : Pen note-taking program written in haskell
 Domain: youtube.com, Score: 64, Comments: 21
 On