Re: [Haskell-cafe] Re: [Haskell] Google Summer of Code 2009

2009-02-11 Thread Wolfgang Jeltsch
Am Mittwoch, 11. Februar 2009 20:45 schrieb Gwern Branwen:
> Here are the projects I favor (in no particular order):

> […]

> * A GUI interface to Darcs
> (http://hackage.haskell.org/trac/summer-of-code/ticket/17); this could
> possibly be based on TortoiseDarcs http://tortoisedarcs.sourceforge.net/.
> Perhaps the specific project could be making TortoiseDarcs not Windows
> specific?

I plan to start writing a GUI interface to darcs together with some of our 
students. (However, we don’t want to base it on TortoiseDarcs.) So if you 
have ideas of what features such an interface should have, please write me 
quickly.

> […]

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


Re: [Haskell-cafe] Haddock Markup

2009-02-11 Thread Wolfgang Jeltsch
Am Mittwoch, 11. Februar 2009 22:38 schrieben Sie:
> On 12 Feb 2009, at 1:40 am, Wolfgang Jeltsch wrote:
> > Am Mittwoch, 11. Februar 2009 00:46 schrieben Sie:
> >> I suppose I should point out what seems obvious to me, which is
> >> that one
> >> could embed a substantial chunk of MathML (possibly all of it) in
> >> TeX. I
> >> mean, give it a TeX-parseable syntax.
> >
> > You can convert MathML into TeX but not the other way round. How
> > would you
> > translate $a \odot b \otimes c$? It depends on the precedence of the
> > operators.
>
> And the point of that is?  What I suggested is the way around that
> works.  And the point of my suggestion was that one could have
> something that could be embedded directly in a (La)TeX document
> *or* processed by Haddock: no changes when copying from one
> document to another means fewer new mistakes.

I don’t understand this. The way which works is conversion from MathML to TeX. 
So your suggestion would be to use MathML as the source language. But this is 
obviously not what you suggest. I’m confused.

If you want to use a subset of TeX in Haddock comments, how would you render 
them on a webpage?

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


Re: [Haskell-cafe] Looking for pointfree version

2009-02-11 Thread Kim-Ee Yeoh

On the same note, does anyone have ideas for the following snippet? Tried the
pointfree package but the output was useless.

pointwise op (x0,y0) (x1,y1) = (x0 `op` x1, y0 `op` y1)



Edsko de Vries wrote:
> 
> Perfect! Beautiful. I was hoping there'd be a simple solution like that.
> 
> Thanks!
> 
> On 9 Feb 2009, at 14:31, Wouter Swierstra wrote:
> 
>> How about using Data.Monoid:
>>
>> down = downPar `mappend` downNew `mappend` downTrans
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Looking-for-pointfree-version-tp21913653p21971304.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

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


[Haskell-cafe] Re: Can this be done?

2009-02-11 Thread Achim Schneider
Sebastian Sylvan  wrote:

> On Wed, Feb 11, 2009 at 5:41 PM, Achim Schneider 
> wrote:
> 
> > I got curious and made two pages point to each other, resulting in
> > as many stale continuations as your left mouse button would permit.
> > While the model certainly is cool, I'm not aware of any
> > implementation that even comes close to having production-safe
> > (that is, non-abusable) semantics.
> 
> 
> Shouldn't the following WASH function help?
> 
> once :: (Read a, Show a) => CGI a -> CGI a
> 
Possibly, I don't know. It was in my early days of Haskell, and I
quickly gave up on using anything and prototyped my own web server
instead.


-- 
(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
performance and/or quoting of this signature prohibited.


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


Re: Re[2]: [Haskell-cafe] Re[4]: [Haskell] Google Summer of Code

2009-02-11 Thread Ben Lippmeier


A: "X has some problems with runtime performance."
B: "My work solves all your problems. There is no problem."

"Beware of the Turing tar-pit in which everything is possible but  
nothing of interest is easy" - Alan Perlis.


can /= can be bothered.

:)

Ben.


On 12/02/2009, at 5:26 PM, Daniel Peebles wrote:


These seem to be good starting points:

http://donsbot.wordpress.com/2008/05/06/write-haskell-as-fast-as-c-exploiting-strictness-laziness-and-recursion/
http://donsbot.wordpress.com/2008/06/04/haskell-as-fast-as-c-working-at-a-high-altitude-for-low-level-performance/
http://haskell.org/haskellwiki/Wc


On Wed, Feb 11, 2009 at 8:15 PM, Bulat Ziganshin
 wrote:

Hello Don,

Thursday, February 12, 2009, 3:45:36 AM, you wrote:

You should do your own benchmarking!


well, when you say that ghc can generate code that is fast as gcc, i
expect that you can supply some arguments. is the your only argument
that ghc was improved in last years? :)



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


Re: Re[2]: [Haskell-cafe] Re[4]: [Haskell] Google Summer of Code

2009-02-11 Thread Daniel Peebles
These seem to be good starting points:

http://donsbot.wordpress.com/2008/05/06/write-haskell-as-fast-as-c-exploiting-strictness-laziness-and-recursion/
http://donsbot.wordpress.com/2008/06/04/haskell-as-fast-as-c-working-at-a-high-altitude-for-low-level-performance/
http://haskell.org/haskellwiki/Wc


On Wed, Feb 11, 2009 at 8:15 PM, Bulat Ziganshin
 wrote:
> Hello Don,
>
> Thursday, February 12, 2009, 3:45:36 AM, you wrote:
>> You should do your own benchmarking!
>
> well, when you say that ghc can generate code that is fast as gcc, i
> expect that you can supply some arguments. is the your only argument
> that ghc was improved in last years? :)
>
>
> --
> Best regards,
>  Bulatmailto:bulat.zigans...@gmail.com
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Can this be done?

2009-02-11 Thread Brandon S. Allbery KF8NH

On 2009 Feb 12, at 1:04, wren ng thornton wrote:
It's ugly, but one option is to just reify your continuations as an  
ADT, where there are constructors for each function and fields for  
each variable that needs closing over. Serializing that ADT should  
be simple (unless some of those functions are higher-order in which  
case you run into the same problem of how to serialize the function  
arguments). In GHC's STG machine this representation shouldn't have  
much overhead, though it does require the developer to do the  
compiler's job.



Hmmm... Template Haskell useful here?  Feed it the continuation,  
extract the AST and rewrite as an ADT?


--
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] Can this be done?

2009-02-11 Thread wren ng thornton

Cristiano Paris wrote:

Manlio Perillo wrote:
> Cristiano Paris ha scritto:
> > I'm interested in the possibility of
> > stopping/pickling/unpickling/resuming a computation.
>
> Not sure this is a good thing in a web application.

I'm thinking of complex workflows and inversion of control.

A computation may stop, return a response, wait for a new request to
be passed by the HTTP server and return back a new response, stopping
again. This goes on forever. All this can be achieved in Haskell but
the serialization path, which is crucial for swapping out idle
sessions (containing the stopped computation) or to get back to life
after server stopped (for maintenance for instance). I guess this
should be doable in Clean, which has mechanisms to do dynamic binding
and serialization of closures.


It's ugly, but one option is to just reify your continuations as an ADT, 
where there are constructors for each function and fields for each 
variable that needs closing over. Serializing that ADT should be simple 
(unless some of those functions are higher-order in which case you run 
into the same problem of how to serialize the function arguments). In 
GHC's STG machine this representation shouldn't have much overhead, 
though it does require the developer to do the compiler's job.


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


[Haskell-cafe] Haskell users in the Houston area??

2009-02-11 Thread Galchin, Vasili
Hello,

 Are there Haskell users in the Houston area?

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


Re: [Haskell-cafe] Changing version numbering schemes for HackageDB packages?

2009-02-11 Thread Antoine Latter
On Wed, Feb 11, 2009 at 10:20 PM, wren ng thornton  wrote:
>
> For projects which are released very frequently (i.e. on the order of daily)
> or very infrequently (e.g. semiannually, annually) then date-based releases
> can make sense. However, the releases do need to be quite regular on either
> of those time scales. This style is also appropriate for projects which
> exist in-time with our non-code world.
>
> Often though, projects see sporadic flurries of improvements and so
> something that's been languishing for months can quickly make a couple
> bugfix releases followed by a backwards-incompatible rewrite in the same
> week, only to languish for a while afterwards. With this sort of release
> pattern, date-based versions make no sense whatsoever since the calendar
> makes rather arbitrary cliffs in the topology.
>
> For most projects the Major.Minor.Bug style seems to work better, but I have
> seen projects where the .MM.DD style is more appropriate.
>

I went with the Major.Minor..MM.DD because I'm too lazy to
increment bug-fix version numbers, and the code I have building the
.cabal file already knows today's date.

I guess that approach doesn't work too well if you're not machine
generating your .cabal file, or if you expect more than one bug-fix
release per day.

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


Re: [Haskell-cafe] Changing version numbering schemes for HackageDB packages?

2009-02-11 Thread wren ng thornton

Corey O'Connor wrote:

Part of the reason they seem awkward to me is that I expect the
difference between version numbers to indicate something about what
has changed between the two versions. This only ends up being a
heuristic but a useful one. Date based version numbers don't
communicate much beyond, well, the date the release was built on
unless annotations are added in addition to the date. Still, they
don't read as nicely as X.Y.Z scheme version numbers.


Delimited date-based versions (.MM.DD[.X.Y.Z]) work better for 
specifying ranges. Though there is still the problem of correlating 
"version" into "feature set" or "api", which is true of any versioning 
scheme to varying degrees.


For projects which are released very frequently (i.e. on the order of 
daily) or very infrequently (e.g. semiannually, annually) then 
date-based releases can make sense. However, the releases do need to be 
quite regular on either of those time scales. This style is also 
appropriate for projects which exist in-time with our non-code world.


Often though, projects see sporadic flurries of improvements and so 
something that's been languishing for months can quickly make a couple 
bugfix releases followed by a backwards-incompatible rewrite in the same 
week, only to languish for a while afterwards. With this sort of release 
pattern, date-based versions make no sense whatsoever since the calendar 
makes rather arbitrary cliffs in the topology.


For most projects the Major.Minor.Bug style seems to work better, but I 
have seen projects where the .MM.DD style is more appropriate.


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


Re: [Haskell-cafe] Re: [Haskell] Google Summer of Code 2009

2009-02-11 Thread Conrad Parker
2009/2/12 Don Stewart :
> Thanks for the analysis, this clarifies things greatly.
> Feasibility and scope is a big part of how we determine what projects to
> work on.

I agree that it's beyond the scope of a SoC project.

Rather than H.263 or H.264 I was going to suggest implementation of
Theora or OMS, both of which avoid the patent issues and have publicly
available specs:

http://theora.org/doc/Theora.pdf
http://www.openmediacommons.org/collateral/OMS-video-v0.9.pdf

Scanning those documents should give anyone a fair idea of the amount
of work involved. My understanding is that OMS is of a similar
complexity to H.263, and H.264 is more complex than any of these.

For Theora playback we've found that the largest CPU load comes from
colorspace conversion, where the YUV output of the codec needs to be
converted to RGB for some targets (like Firefox). That is some fairly
straightforward array processing, and would be a good place to start
for anyone trying to implement video codecs in Haskell.

Conrad.

>
> gtener:
>> On Wed, Feb 11, 2009 at 21:00, Jamie  wrote:
>> > Hi Gwern,
>> >
>> > On Wed, 11 Feb 2009, Gwern Branwen wrote:
>> >
>> >>> I just checked H.263 and it looks like it does not require patent
>> >>> licensing
>> >>> at all (it is created by ITU-T Video Coding Experts Group (VCEG)) so one
>> >>> can
>> >>> write H.263 in Haskell and release freely without patent licensing
>> >>> issues.
>> >>>
>> >>> So writing H.263 in Haskell could be a good GSoC project.  One mentioned
>> >>> that GHC produce slow code, well H.263 could be a good test case to
>> >>> improve
>> >>> GHC optimization over time.  In The Computer Language Benchmarks Game,
>> >>> Haskell has some catching up to do. :)
>> >>
>> >> It does sound like a reasonably discrete task, and it sounds like you have
>> >> a use for it; but I wonder if it's doable in a single summer?
>> >
>> > I have no idea, I have not dig deeper into H.263 C source code but I guess
>> > it should be quite trivial as it is a black box with video frame input and
>> > output with several parameters for encoding and just frame in/out for
>> > decoding.
>>
>> I didn't dig into the source code either, but I've just skimmed
>> through Wikipedia page on that codec:
>> http://en.wikipedia.org/wiki/H.263
>> and in seems far from trivial. Anything that has 23 annexes is likely
>> to be quite complex :-)
>> Therefore I seriously doubt chances for success of such project. I did
>> some checks: in libavcodec at least following files consist of
>> implementation of H.263:
>>
>> h263.c h263data.h h263dec.c  h263.h
>> h263_parser.c  h263_parser.h
>>
>> How many lines are there?
>>
>> [te...@laptener libavcodec]$ wc h263*
>>   6295  19280 218932 h263.c
>>314   2117  10423 h263data.h
>>816   2171  26675 h263dec.c
>> 46217   2032 h263.h
>> 91282   2361 h263_parser.c
>> 29165   1047 h263_parser.h
>>   7591  24232 261470 razem
>>
>> In Haskell project one would also need to provide some additional
>> utility code which is part of libavcodec.
>> Fast grep shows the tip of an iceberg:
>>
>> [te...@laptener libavcodec]$ grep include h263* | grep -v "<"
>> h263.c:#include "dsputil.h"
>> h263.c:#include "avcodec.h"
>> h263.c:#include "mpegvideo.h"
>> h263.c:#include "h263data.h"
>> h263.c:#include "mpeg4data.h"
>> h263.c:#include "mathops.h"
>> h263data.h:#include "mpegvideo.h"
>> h263dec.c:#include "avcodec.h"
>> h263dec.c:#include "dsputil.h"
>> h263dec.c:#include "mpegvideo.h"
>> h263dec.c:#include "h263_parser.h"
>> h263dec.c:#include "mpeg4video_parser.h"
>> h263dec.c:#include "msmpeg4.h"
>> h263.h:#include "config.h"
>> h263.h:#include "msmpeg4.h"
>> h263_parser.c:#include "parser.h"
>> h263_parser.h:#include "parser.h"
>>
>>
>>
>> Bottom line: I don't think it is reasonable to assume anyone without
>> previous knowledge of H.263 is able to fit that project into one
>> summer. But! It's Haskell community, and people here see the
>> impossible happen from time to time ;-)
>>
>> All best
>>
>> Christopher Skrzętnicki
>> ___
>> Haskell-Cafe mailing list
>> Haskell-Cafe@haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] (Off-topic) CUDA

2009-02-11 Thread Manuel M T Chakravarty

Malcolm Wallace:
(Also... Haskell on the GPU. It's been talked about for years, but  
will

it ever actually happen?)


gpu is just set of simd-like instructions. so the reason why you will
never see haskell on gpu is the same as why you will never see it
implemented via simd instructions :D


Because SIMD/GPU deals only with numbers, not pointers, you will not  
see much _symbolic_ computation being offloaded to these arithmetic  
units.  But there are still great opportunities to improve Haskell's  
speed at numerics using them.  And some symbolic problems can be  
encoded using integers.


There are at least two current (but incomplete) projects in this  
area: Sean Lee at UNSW has targetted Data Parallel Haskell for an  
Nvidia GPGPU, and Joel Svensson at Chalmers is developing a Haskell- 
embedded language for GPU programming called Obsidian.


We have a paper about the UNSW project now.  It is rather high-level,  
but has some performance figures of preliminary benchmarks:


  http://www.cse.unsw.edu.au/~chak/papers/LCGK09.html

BTW, this is currently independent of Data Parallel Haskell.  It is a  
flat data-parallel array language embedded in Haskell.  The language  
is restricted in a manner that we can generate GPU code (CUDA to be  
precise) from it.  In the longer run, we want to turn this into a  
backend of Data Parallel Haskell, but that will require quite a bit  
more work.


Manuel

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


Re: [Haskell-cafe] Re: [Haskell] Google Summer of Code 2009

2009-02-11 Thread Johan Tibell
On Thu, Feb 12, 2009 at 2:12 AM, Felipe Lessa  wrote:
> Do we already have enough information to turn
> http://okmij.org/ftp/Haskell/Iteratee/ into a nice, generic, cabalized
> package? I think Iteratees may prove themselves as useful as
> ByteStrings.

I still haven't figured out what the "correct" definition of Iteratee
would look like. The Iteratee code that Oleg wrote seems to have the
structure of some kind of "two level" monad. I think that's the reason
for the frequent occurrences of >>== and liftI in the code. There
seems to be some things we yet have to discover about Iteratees.

Cheers,

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


Re[2]: [Haskell-cafe] Re[4]: [Haskell] Google Summer of Code

2009-02-11 Thread Bulat Ziganshin
Hello Don,

Thursday, February 12, 2009, 3:45:36 AM, you wrote:
> You should do your own benchmarking!

well, when you say that ghc can generate code that is fast as gcc, i
expect that you can supply some arguments. is the your only argument
that ghc was improved in last years? :)


-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

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


Re: [Haskell-cafe] Re: [Haskell] Google Summer of Code 2009

2009-02-11 Thread Felipe Lessa
Do we already have enough information to turn
http://okmij.org/ftp/Haskell/Iteratee/ into a nice, generic, cabalized
package? I think Iteratees may prove themselves as useful as
ByteStrings.

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


[Haskell-cafe] Re: [Haskell] Google Summer of Code 2009

2009-02-11 Thread Benja Fallenstein
Hi all,

On Tue, Feb 10, 2009 at 3:26 PM, Malcolm Wallace
 wrote:
> If you have ideas for student projects that you think would benefit the
> Haskell community, now is the time to start discussing them on mailing
> lists of your choice.  We especially encourage students to communicate
> with the wider community (...)

I have a project that I've tinkered with doing for a while, but have
never actually gotten around to, and I'm wondering whether there would
be interest from the community in using it. Actually, two related
projects:

(1) A library for working with hashable data structures, including a
hashable finger tree with sequence, map and set types based on it.
Surprisingly, there does not seem to be much library support for
working with hashes in Haskell beyond the bare-bones, imperative
Data.HashTable, even though pure functional programming and hashes Go
Well Together. I'm pulling these bounds out of my intuition, but
hashable collections should give amortized O(1) comparison for
equality and amortized O(log n) comparison for order, and you could
use them as set values and map keys without efficiency blowing up in
your face. The library should probably also include support for
hashtables based on the various kinds of pure and monad-encapsulated
arrays we have in Haskell, and maybe include support for interning
values; unsafePerformIO, weak references and friends were originally
introduced with the intention to support interned values in a way that
programmers can tailor to their own needs, but it would be nice to
have some default library support.

(2) Based on this, a serialization library that would recognize if it
has already written a particular value from memory to the same file,
and write a pointer to the first occurrence of that value instead of
serializing the actual value again, making it efficient to serialize
versioned data structures. The idea is to make something similar to
HAppS' MACID, but where MACID serializes the different kinds of
updates that you can do for your data, this library would simply do
the update in memory, then serialize the whole updated value to disk,
but actually *writing* only the *new* parts of the data structure. (I
think this could be simpler to use, and would be in a sense more
elegant and 'haskelly' than the MACID approach. On the other hand, we
already *have* MACID.)

So, anybody out there who looks at these things and thinks "this could
be useful"? :-)

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


Re: [Haskell-cafe] Re[4]: [Haskell] Google Summer of Code

2009-02-11 Thread Don Stewart
bulat.ziganshin:
> Hello Don,
> 
> Thursday, February 12, 2009, 12:23:16 AM, you wrote:
> 
> > Check out what GHC is doing these days, and come back with an analysis
> > of what still needs to be improved.  We can't wait to hear!
> 
> can you point me to any haskell code that is as fast as it's C
> equivalent?

You should do your own benchmarking!

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


Re[2]: [Haskell-cafe] Re[4]: [Haskell] Google Summer of Code

2009-02-11 Thread Bulat Ziganshin
Hello Don,

Thursday, February 12, 2009, 12:23:16 AM, you wrote:

> Check out what GHC is doing these days, and come back with an analysis
> of what still needs to be improved.  We can't wait to hear!

can you point me to any haskell code that is as fast as it's C
equivalent?


-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

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


Re: [Haskell-cafe] Gtk2HS 0.10.0 Released

2009-02-11 Thread Duncan Coutts
On Wed, 2009-02-11 at 15:49 +0100, Lennart Augustsson wrote:
> Does this version work from ghci?
> 
>   -- Lennart

Specifically I believe Lennart is asking about Windows. It's worked in
ghci in Linux for ages and it worked in ghci in Windows prior to the
0.9.13 release.

In the 0.9.13 release on Windows there was something funky with linking
(possibly due to using a newer mingw) and ghci's linker could not
understand was was going on and could not load the packages.

Duncan

> On Wed, Feb 11, 2009 at 5:40 AM, Peter Gavin  wrote:
> > Hi everyone,
> >
> > Oh, dear... it seems I've forgotten how to spell "cafe", and sent this
> > message to haskell-c...@haskell.org the first time around.  I resent it to
> > all the lists again (just to make sure everyone interested receives it), so
> > I apologize for any duplicated messages you might have received.  In any
> > case...
> >
> > I'd like to release the announcement of Gtk2HS 0.10.0.  A lot of new stuff
> > has gone into this release, including:
> >
> > - Support for GHC 6.10
> > - Bindings to GIO and GtkSourceView-2.0
> > - Full switch to the new model-view implementation using a Haskell model
> > - Support for many more model-based widgets such as IconView and an updated
> > binding for ComboBox
> > - Full Drag-and-Drop support
> > - Better support for Attributes in Pango
> > - Replaced Event for EventM monad, thereby improving efficiency and
> > convenience
> > - Functions for interaction between Cairo and Pixbuf drawing
> > - Lots of bug fixes, code cleanups, and portability improvements
> >
> > With this release, the bindings to GnomeVFS and GtkSourceView-1.0 have been
> > deprecated.  The TreeList modules have been deprecated from the Gtk+
> > bindings.
> >
> > Source and Win32 binaries are available at:
> >
> >
> > https://sourceforge.net/project/showfiles.php?group_id=49207package_id=42440&release_id=659598
> >
> > Thanks to everyone who submitted bug fixes and features this time around!
> >
> > Thanks,
> > Peter Gavin
> > Gtk2HS Release Manager
> >
> > ___
> > Haskell-Cafe mailing list
> > Haskell-Cafe@haskell.org
> > http://www.haskell.org/mailman/listinfo/haskell-cafe
> >
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

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


Re: [Haskell-cafe] Re: [Haskell] Google Summer of Code 2009

2009-02-11 Thread Don Stewart
Thanks for the analysis, this clarifies things greatly.
Feasibility and scope is a big part of how we determine what projects to
work on.

gtener:
> On Wed, Feb 11, 2009 at 21:00, Jamie  wrote:
> > Hi Gwern,
> >
> > On Wed, 11 Feb 2009, Gwern Branwen wrote:
> >
> >>> I just checked H.263 and it looks like it does not require patent
> >>> licensing
> >>> at all (it is created by ITU-T Video Coding Experts Group (VCEG)) so one
> >>> can
> >>> write H.263 in Haskell and release freely without patent licensing
> >>> issues.
> >>>
> >>> So writing H.263 in Haskell could be a good GSoC project.  One mentioned
> >>> that GHC produce slow code, well H.263 could be a good test case to
> >>> improve
> >>> GHC optimization over time.  In The Computer Language Benchmarks Game,
> >>> Haskell has some catching up to do. :)
> >>
> >> It does sound like a reasonably discrete task, and it sounds like you have
> >> a use for it; but I wonder if it's doable in a single summer?
> >
> > I have no idea, I have not dig deeper into H.263 C source code but I guess
> > it should be quite trivial as it is a black box with video frame input and
> > output with several parameters for encoding and just frame in/out for
> > decoding.
> 
> I didn't dig into the source code either, but I've just skimmed
> through Wikipedia page on that codec:
> http://en.wikipedia.org/wiki/H.263
> and in seems far from trivial. Anything that has 23 annexes is likely
> to be quite complex :-)
> Therefore I seriously doubt chances for success of such project. I did
> some checks: in libavcodec at least following files consist of
> implementation of H.263:
> 
> h263.c h263data.h h263dec.c  h263.h
> h263_parser.c  h263_parser.h
> 
> How many lines are there?
> 
> [te...@laptener libavcodec]$ wc h263*
>   6295  19280 218932 h263.c
>314   2117  10423 h263data.h
>816   2171  26675 h263dec.c
> 46217   2032 h263.h
> 91282   2361 h263_parser.c
> 29165   1047 h263_parser.h
>   7591  24232 261470 razem
> 
> In Haskell project one would also need to provide some additional
> utility code which is part of libavcodec.
> Fast grep shows the tip of an iceberg:
> 
> [te...@laptener libavcodec]$ grep include h263* | grep -v "<"
> h263.c:#include "dsputil.h"
> h263.c:#include "avcodec.h"
> h263.c:#include "mpegvideo.h"
> h263.c:#include "h263data.h"
> h263.c:#include "mpeg4data.h"
> h263.c:#include "mathops.h"
> h263data.h:#include "mpegvideo.h"
> h263dec.c:#include "avcodec.h"
> h263dec.c:#include "dsputil.h"
> h263dec.c:#include "mpegvideo.h"
> h263dec.c:#include "h263_parser.h"
> h263dec.c:#include "mpeg4video_parser.h"
> h263dec.c:#include "msmpeg4.h"
> h263.h:#include "config.h"
> h263.h:#include "msmpeg4.h"
> h263_parser.c:#include "parser.h"
> h263_parser.h:#include "parser.h"
> 
> 
> 
> Bottom line: I don't think it is reasonable to assume anyone without
> previous knowledge of H.263 is able to fit that project into one
> summer. But! It's Haskell community, and people here see the
> impossible happen from time to time ;-)
> 
> All best
> 
> Christopher Skrzętnicki
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
> 
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: [Haskell] Google Summer of Code 2009

2009-02-11 Thread Krzysztof Skrzętnicki
On Wed, Feb 11, 2009 at 21:00, Jamie  wrote:
> Hi Gwern,
>
> On Wed, 11 Feb 2009, Gwern Branwen wrote:
>
>>> I just checked H.263 and it looks like it does not require patent
>>> licensing
>>> at all (it is created by ITU-T Video Coding Experts Group (VCEG)) so one
>>> can
>>> write H.263 in Haskell and release freely without patent licensing
>>> issues.
>>>
>>> So writing H.263 in Haskell could be a good GSoC project.  One mentioned
>>> that GHC produce slow code, well H.263 could be a good test case to
>>> improve
>>> GHC optimization over time.  In The Computer Language Benchmarks Game,
>>> Haskell has some catching up to do. :)
>>
>> It does sound like a reasonably discrete task, and it sounds like you have
>> a use for it; but I wonder if it's doable in a single summer?
>
> I have no idea, I have not dig deeper into H.263 C source code but I guess
> it should be quite trivial as it is a black box with video frame input and
> output with several parameters for encoding and just frame in/out for
> decoding.

I didn't dig into the source code either, but I've just skimmed
through Wikipedia page on that codec:
http://en.wikipedia.org/wiki/H.263
and in seems far from trivial. Anything that has 23 annexes is likely
to be quite complex :-)
Therefore I seriously doubt chances for success of such project. I did
some checks: in libavcodec at least following files consist of
implementation of H.263:

h263.c h263data.h h263dec.c  h263.h
h263_parser.c  h263_parser.h

How many lines are there?

[te...@laptener libavcodec]$ wc h263*
  6295  19280 218932 h263.c
   314   2117  10423 h263data.h
   816   2171  26675 h263dec.c
46217   2032 h263.h
91282   2361 h263_parser.c
29165   1047 h263_parser.h
  7591  24232 261470 razem

In Haskell project one would also need to provide some additional
utility code which is part of libavcodec.
Fast grep shows the tip of an iceberg:

[te...@laptener libavcodec]$ grep include h263* | grep -v "<"
h263.c:#include "dsputil.h"
h263.c:#include "avcodec.h"
h263.c:#include "mpegvideo.h"
h263.c:#include "h263data.h"
h263.c:#include "mpeg4data.h"
h263.c:#include "mathops.h"
h263data.h:#include "mpegvideo.h"
h263dec.c:#include "avcodec.h"
h263dec.c:#include "dsputil.h"
h263dec.c:#include "mpegvideo.h"
h263dec.c:#include "h263_parser.h"
h263dec.c:#include "mpeg4video_parser.h"
h263dec.c:#include "msmpeg4.h"
h263.h:#include "config.h"
h263.h:#include "msmpeg4.h"
h263_parser.c:#include "parser.h"
h263_parser.h:#include "parser.h"



Bottom line: I don't think it is reasonable to assume anyone without
previous knowledge of H.263 is able to fit that project into one
summer. But! It's Haskell community, and people here see the
impossible happen from time to time ;-)

All best

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


[Haskell-cafe] Writing a generic event handler

2009-02-11 Thread John Ky
Hi Haskell Cafe,

I'm interested in writing some events and event handlers in Haskell.  I
already have a Loop data structure, and I intend to use it for this purpose:

-- Create event
tEvent <- newLoop (return ())

-- Register event handlers
tHandler1 <- newLoop (putStrLn "Handler1")
tHandler2 <- newLoop (putStrLn "Handler2")
splice tEvent tHandler1
splice tEvent tHandler2

-- Fire event
action <- doLoop tEvent
action

doLoop :: Monad m => TVar (Loop (m ())) -> STM (m ())
doLoop tLoop = do
   aLoop <- readAsList tLoop
   return $ sequence_ aLoop

My question is: Is it possible to write a generic doLoop that works over
arbitrary functions?

For instance the following code wouldn't work because the event provides one
argument and the handler takes one argument:

-- Create event
tEvent <- newLoop (\x -> return ())

-- Register event handlers
tHandler1 <- newLoop (\x -> putStrLn ("Handler1" ++ show x))
tHandler2 <- newLoop (\x -> putStrLn ("Handler2" ++ show x))
splice tEvent tHandler1
splice tEvent tHandler2

-- Fire event
action <- doLoop tEvent
action 123


Thanks,

-John

Full source code for Loop type:

module Fx.STM.Loop where

import Control.Monad
import Fx.STM.Util
import GHC.Conc
import System.IO.Unsafe

-- Transactional loop.  A loop is a circular link list.
data Loop a
   = ItemLink
  { item :: a
  , prev :: TVar (Loop a)
  , next :: TVar (Loop a)
  }

-- Create a new empty transactional loop.
newLoop :: a -> STM (TVar (Loop a))
newLoop item = do
   tLoop <- newTVar undefined
   writeTVar tLoop (ItemLink item tLoop tLoop)
   return tLoop

-- Splice two transactional loops.  This will join two loops if they were
-- originally separate, or split a single loop if the links were originally
-- part of the same loop.  No change occurs if the two links are identical.
splice :: TVar (Loop a) -> TVar (Loop a) -> STM ()
splice tLink0 tLink1 = do
   aLink0 <- readTVar tLink0
   aLink1 <- readTVar tLink1
   let tLink0Prev = prev aLink0
   let tLink1Prev = prev aLink1
   writeTVar tLink0 aLink0 { prev = tLink1Prev }
   writeTVar tLink1 aLink1 { prev = tLink0Prev }
   aLink0Prev <- readTVar tLink0Prev
   aLink1Prev <- readTVar tLink1Prev
   writeTVar tLink0Prev aLink0Prev { next = tLink1 }
   writeTVar tLink1Prev aLink1Prev { next = tLink0 }
   return ()

-- Unlink a single link from a transactional loop.
unlink :: TVar (Loop a) -> STM ()
unlink tLink = do
   (ItemLink item tLinkPrev tLinkNext) <- readTVar tLink
   aLinkPrev <- readTVar tLinkPrev
   writeTVar tLinkPrev aLinkPrev { next = tLinkNext }
   aLinkNext <- readTVar tLinkNext
   writeTVar tLinkNext aLinkNext { prev = tLinkPrev }
   writeTVar tLink (ItemLink item tLink tLink)
   return ()

-- Read the length of the loop.
readLength :: TVar (Loop a) -> STM Int
readLength tLink = do
   list <- readAsList tLink
   return $ length list

readLinks :: TVar (Loop a) -> STM [TVar (Loop a)]
readLinks tLink = readLinksUntil tLink tLink

readLinksUntil :: TVar (Loop a) -> TVar (Loop a) -> STM [TVar (Loop a)]
readLinksUntil tLink tLinkEnd = do
   (ItemLink _ tLinkPrev tLinkNext) <- readTVar tLink
   return []
   if tLinkNext == tLinkEnd
  then return [tLink]
  else do
 tail <- readLinksUntil tLinkNext tLinkEnd
 return $ tLink:tail

-- Read the elements of the loop as a list starting from tLink.
readAsList :: TVar (Loop a) -> STM [a]
readAsList tLink = readAsListUntil tLink tLink

-- Read the elements of the loop as a list starting from tLink
-- and terminating non-inclusively at tLinkEnd.
readAsListUntil :: TVar (Loop a) -> TVar (Loop a) -> STM [a]
readAsListUntil tLink tLinkEnd = do
   (ItemLink item tLinkPrev tLinkNext) <- readTVar tLink
   if tLinkNext == tLinkEnd
  then return [item]
  else do
 tail <- readAsListUntil tLinkNext tLinkEnd
 return $ item:tail

-- Create a new loop from a list.
newFromList :: [a] -> STM (TVar (Loop a))
newFromList [item] = newLoop item
newFromList (item:items) = do
   tLink <- newLoop item
   tLinkRest <- newFromList items
   splice tLink tLinkRest
   return tLink

doLoop :: Monad m => TVar (Loop (m ())) -> STM (m ())
doLoop tLoop = do
   aLoop <- readAsList tLoop
   return $ sequence_ aLoop
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re[4]: [Haskell] Google Summer of Code

2009-02-11 Thread Toby Hutton
On Thu, Feb 12, 2009 at 8:11 AM, Bulat Ziganshin
 wrote:
> Wednesday, February 11, 2009, 11:55:47 PM, you wrote:
>
>> And ghc is still making large improvements with
>> each release, whereas gcc isn't likely to get significantly better.
>
> yes, it's close to perfect

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


Re: [Haskell-cafe] Gtk2HS 0.10.0 Released

2009-02-11 Thread Krzysztof Skrzętnicki
2009/2/11 Gwern Branwen :
> touch tools/c2hs/c2hsLocal.deps;  /home/gwern/bin/bin/ghc -M -dep-makefile
> -optdeptools/c2hs/c2hsLocal.deps -fglasgow-exts -O
>  
> -itools/c2hs/base/admin:tools/c2hs/base/errors:tools/c2hs/base/general:tools/c2hs/base/state:tools/c2hs/base/syms:tools/c2hs/base/syntax:tools/c2hs/c:tools/c2hs/chs:tools/c2hs/gen:tools/c2hs/state:tools/c2hs/toplevel
> -package-conf package.conf.inplace -hide-all-packages  -package base-4.0.0.0
> -package haskell98-1.0.1.0 -package pretty-1.0.1.0 -package
> containers-0.2.0.0 -package array-0.2.0.0
>  tools/c2hs/base/admin/BaseVersion.hs tools/c2hs/base/admin/Config.hs
> tools/c2hs/base/errors/Errors.hs tools/c2hs/base/general/DLists.hs
> tools/c2hs/base/general/FileOps.hs tools/c2hs/base/general/FNameOps.hs
> tools/c2hs/base/general/Map.hs tools/c2hs/base/general/Position.hs
> tools/c2hs/base/general/Set.hs tools/c2hs/base/general/UNames.hs
> tools/c2hs/base/general/Binary.hs tools/c2hs/base/general/FastMutInt.hs
> tools/c2hs/base/state/CIO.hs tools/c2hs/base/state/StateBase.hs
> tools/c2hs/base/state/State.hs tools/c2hs/base/state/StateTrans.hs
> tools/c2hs/base/syms/Attributes.hs tools/c2hs/base/syms/Idents.hs
> tools/c2hs/base/syms/NameSpaces.hs tools/c2hs/base/syntax/Lexers.hs
> tools/c2hs/c/CAST.hs tools/c2hs/c/CAttrs.hs tools/c2hs/c/CBuiltin.hs
> tools/c2hs/c/C.hs tools/c2hs/c/CLexer.hs tools/c2hs/c/CNames.hs
> tools/c2hs/c/CParser.hs tools/c2hs/c/CParserMonad.hs tools/c2hs/c/CPretty.hs
> tools/c2hs/c/CTokens.hs tools/c2hs/c/CTrav.hs tools/c2hs/chs/CHS.hs
> tools/c2hs/chs/CHSLexer.hs tools/c2hs/gen/CInfo.hs tools/c2hs/gen/GBMonad.hs
> tools/c2hs/gen/GenBind.hs tools/c2hs/gen/GenHeader.hs
> tools/c2hs/state/C2HSState.hs tools/c2hs/state/Switches.hs
> tools/c2hs/toplevel/Main.hs tools/c2hs/toplevel/Version.hs
> tools/c2hs/toplevel/C2HSConfig.hs;
> gcc -E -x c -traditional-cpp -I/usr/include/glib-2.0
> -I/usr/lib/glib-2.0/include -DGTK2HS_HS_PREPROC -include gtk2hs-config.h
> glib/System/Glib/GObject.chs.pp -o glib/System/Glib/GObject.chs
> glib/System/Glib/GObject.chs.pp:38: error: missing expression between '('
> and ')'
> glib/System/Glib/GObject.chs.pp:91: error: missing expression between '('
> and ')'
> make: *** [glib/System/Glib/GObject.chs] Error 1
>

Ah, It feels familiar. I'm didn't get this error, but I do recall a
recent thread with similar error. However AFAIR that thread was about
building on Windows, not Ubuntu. It turned out that configure script
was somewhat broken and specific symbols needed for CPP where declared
to be empty strings. This might be happening in your case too. I
think.

All best

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


Re: [Haskell-cafe] Changing version numbering schemes for HackageDB packages?

2009-02-11 Thread Corey O'Connor
On Wed, Feb 11, 2009 at 2:48 AM, Duncan Coutts
 wrote:
> On Tue, 2009-02-10 at 10:21 -0800, Corey O'Connor wrote:
>> I released a new version of data-spacepart that resolved some of the
>> issues with the previous release. One issue I had was the previous
>> release used the version numbering scheme I use at work:
>> [date].[release] Which does not appear to work as well as the
>> traditional X.Y.Z release numbering scheme with Cabal.
>
> I'm not sure I understand. Is there something in Cabal or Hackage that
> makes date-based numbering schemes not work well?

I think version number schemes of the X.Y.Z form are easier to work
with when defining cabal depends constraints. A user of the library
can use the constrain "data-spacepart == 0.1.*" to specifying a
dependency on any 0.1 release. For date-based version numbers what
would the constraint be? "data-spacepart == 20090211.*" maybe? Or
constrain to a range of dates? Both seem awkward to me.

Part of the reason they seem awkward to me is that I expect the
difference between version numbers to indicate something about what
has changed between the two versions. This only ends up being a
heuristic but a useful one. Date based version numbers don't
communicate much beyond, well, the date the release was built on
unless annotations are added in addition to the date. Still, they
don't read as nicely as X.Y.Z scheme version numbers.

The way I read changes in version numbers for a scheme using the
format X.Y.Z is:
 * A change in Z indicates bug fixes only
 * A change in Y indicates the interface has changed but not in an
incompatible way. For instance, maybe a new method was added.
 * A change in X indicates the interface has changed in a way that
could be incompatible with software that depended on a previous
version of the library.

I don't know of a mapping that can be applied to date based version
numbers that is as rigorous.

> Yeah, there's not a lot you can do except make the number higher. The
> problem is not just hackage, it's all the previous releases in the wild.
> All the tools assume the normal ordering on version numbers. Not just
> the Cabal/Hackage tools but the native distro tools too.

Hm aye. I guess this explains all the packages with 3000.X (and so on)
version numbers.

Cheers,
Corey O'Connor
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haddock Markup

2009-02-11 Thread Richard O'Keefe


On 12 Feb 2009, at 1:40 am, Wolfgang Jeltsch wrote:


Am Mittwoch, 11. Februar 2009 00:46 schrieben Sie:
I suppose I should point out what seems obvious to me, which is  
that one
could embed a substantial chunk of MathML (possibly all of it) in  
TeX. I

mean, give it a TeX-parseable syntax.


You can convert MathML into TeX but not the other way round. How  
would you

translate $a \odot b \otimes c$? It depends on the precedence of the
operators.


And the point of that is?  What I suggested is the way around that
works.  And the point of my suggestion was that one could have
something that could be embedded directly in a (La)TeX document
*or* processed by Haddock: no changes when copying from one
document to another means fewer new mistakes.

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


Re: [Haskell-cafe] ANN : happs-tutorial 0.7

2009-02-11 Thread Ross Mellgren

This is a known issue:

http://hackage.haskell.org/trac/ghc/ticket/1993

Try:

cabal install --ghc-options="-fregs-graph" Crypto

and then try installing happs-tutorial again.

-Ross

On Feb 11, 2009, at 4:31 PM, Daryoush Mehrtash wrote:


When i try to  cabal install happs-tutorial I get the following error:

ghc: panic! (the 'impossible' happened)
  (GHC version 6.10.1 for i386-unknown-linux):
RegAllocLinear.getStackSlotFor: out of stack slots, try -fregs- 
graph


Please report this as a GHC bug:  http://www.haskell.org/ghc/ 
reportabug


cabal: Error: some packages failed to install:
Crypto-4.1.0 failed during the building phase. The exception was:
exit: ExitFailure 1
PBKDF2-0.3 depends on Crypto-4.1.0 which failed to install.
happs-tutorial-0.7.1 depends on Crypto-4.1.0 which failed to install.
happstack-helpers-0.11 depends on Crypto-4.1.0 which failed to  
install.


Did I do anything wrong?

Daryoush

On Sat, Feb 7, 2009 at 4:36 PM, Creighton Hogg   
wrote:

Hello,

I'm pleased to announce the release of happs-tutorial 0.7 on Hackage.
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/happs-tutorial

This is the first release of happs-tutorial built against the new
Happstack project.  Not much has changed in content since the last
release except a few minor cleanups & a little bit of reorganization.
The 0.8 release will consist of more extensive additions, with the
primary focus being a walk through of multimaster.

I've taken over the development of the tutorial from Thomas Hartman,
who has already put a rather massive effort into making
HAppS/Happstack more accessible.  Please feel free to e-mail me with
any comments, errata, or threats of bodily harm.

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



--
Daryoush

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


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


Fwd: [Haskell-cafe] ANN : happs-tutorial 0.7

2009-02-11 Thread Daryoush Mehrtash
When i try to  cabal install happs-tutorial I get the following error:

ghc: panic! (the 'impossible' happened)
  (GHC version 6.10.1 for i386-unknown-linux):
RegAllocLinear.getStackSlotFor: out of stack slots, try -fregs-graph

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

cabal: Error: some packages failed to install:
Crypto-4.1.0 failed during the building phase. The exception was:
exit: ExitFailure 1
PBKDF2-0.3 depends on Crypto-4.1.0 which failed to install.
happs-tutorial-0.7.1 depends on Crypto-4.1.0 which failed to install.
happstack-helpers-0.11 depends on Crypto-4.1.0 which failed to install.

Did I do anything wrong?

Daryoush

On Sat, Feb 7, 2009 at 4:36 PM, Creighton Hogg  wrote:

> Hello,
>
> I'm pleased to announce the release of happs-tutorial 0.7 on Hackage.
> http://hackage.haskell.org/cgi-bin/hackage-scripts/package/happs-tutorial
>
> This is the first release of happs-tutorial built against the new
> Happstack project.  Not much has changed in content since the last
> release except a few minor cleanups & a little bit of reorganization.
> The 0.8 release will consist of more extensive additions, with the
> primary focus being a walk through of multimaster.
>
> I've taken over the development of the tutorial from Thomas Hartman,
> who has already put a rather massive effort into making
> HAppS/Happstack more accessible.  Please feel free to e-mail me with
> any comments, errata, or threats of bodily harm.
>
> Cheers,
> Creighton Hogg
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
Daryoush

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


Re: [Haskell-cafe] Can this be done?

2009-02-11 Thread Mark Wotton
On Thu, Feb 12, 2009 at 12:41 AM, Cristiano Paris
 wrote:
> On Wed, Feb 11, 2009 at 2:30 PM, Peter Verswyvelen  wrote:
>> I haven't looked at the details, but I think this is what a library like
>> Reactive from Conal Elliott could do, but as far as I understand it, it is
>> still work in progress.
>
> I'm interested in the possibility of
> stopping/pickling/unpickling/resuming a computation.

I've been looking into something similar... currently, my best option
is looking like deliberately causing a core dump and editing the core
file to run as a binary (or even more hackishly, just using gdb.) If
there's a less filthy way to do it, I'd love to hear about it. (I know
about Data.Binary, but it seems inelegant to have to write out
instances for something that exists already in memory - you should be
able to just blat it back in.)

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


Re: [Haskell-cafe] Re[4]: [Haskell] Google Summer of Code

2009-02-11 Thread Don Stewart
bulat.ziganshin:
> Hello John,
> 
> Wednesday, February 11, 2009, 11:55:47 PM, you wrote:
> 
> >> it's exactly example of tight loop. and let's compare HP code written
> >> for this task with analogous code written in C. i expect that haskell
> >> code is much more complex
> 
> > I think it's fair to point out that tight loops are nearly always the
> > biggest bottlenecks of code, so generating good code for tight loops
> > is pretty important.
> 
> it's important, but doesnt't make whole game. and while i said that
> ghc improved tight loops compilation, this doesn't mean that it
> becomes the same as in gcc. it just started to put loop variables into
> register
> 
> > And ghc is still making large improvements with
> > each release, whereas gcc isn't likely to get significantly better.
> 
> yes, it's close to perfect
> 
> >> afaiu, it's 20-line equivalent of 2-line C code:
> >>
> >> for (i=...)
> >>  a[i] = b[i]
> >>
> >> does this need any more comments?
> 
> > I think you've misunderstood my code.  Look at Oleg's IterateeM and
> > see if you think that's really all it's doing.
> 
> what else does the code that you've citated? you are wrote that it
> just copies 16-bit words into doubles
> 
> > Use libsndfile for comparison.  http://www.mega-nerd.com/libsndfile/.
> 
> it's one method of miscomparing haskell to C - compare hand-tuned
> haskell code with some C code which may be just not optimal. ig you
> want to make fair comparison, you should write best code in both
> languages
> 
> > I actually haven't looked at the code, although it's very highly
> > regarded in the audio community (and I've seen the author post on this
> > list on occasion).  Using libsndfile-1.0.18:
> >  wc wav.c
> > 17867833   57922 wav.c
> 
> > compared to my source:
> > wc Wave.hs
> >  4122215   15472 Wave.hs
> 
> > And there you are.  I will admit that I have implemented the entire
> > wave spec, but only because of lack of time.
> 
> when you don't need speed, you may write more compact code in haskell
> than in C. so the best way is to split your task into
> speed-critical part and the rest and use C++ for the first and Haskell
> for the second


I think what's frustrating about this continued dialogue with Bulat re.
performance is that ,

a) the experience he bases his remarks upon was several year ago
b) he's making blanket generic statements, using that old data
d) a lot of people have written a lot of fast code without trouble
c) he's not acknowledging the great improvements over this time

So its very difficult to have these conversations. They're stuck in the
same old pattern.

Meanwhile, GHC keeps getting smarter and smarter. 

Bulat: time to update your results! 

Check out what GHC is doing these days, and come back with an analysis
of what still needs to be improved.  We can't wait to hear!

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


Re[2]: [Haskell-cafe] Re: [Haskell] Google Summer of Code 2009

2009-02-11 Thread Bulat Ziganshin
Hello Don,

Wednesday, February 11, 2009, 11:58:13 PM, you wrote:

>> fast as possible, but i don't know anyone using haskell to write
>> high-performance code. so you ask for non-existing specialists

> We're doing it at Galois regularly. Check out the blog.

i scanned through http://www.galois.com/blog/category/haskell/
and don't found anything about this. probably we mean different things
- i'm saying about implementation of cpu-intensive algorithms like
deflate, md5 or mpeg

for crypto-algos we have haskell library and afair it was 3-10 times
slower than C equivalents and probably harder to write too?


-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

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


[Haskell-cafe] Re[4]: [Haskell] Google Summer of Code

2009-02-11 Thread Bulat Ziganshin
Hello John,

Wednesday, February 11, 2009, 11:55:47 PM, you wrote:

>> it's exactly example of tight loop. and let's compare HP code written
>> for this task with analogous code written in C. i expect that haskell
>> code is much more complex

> I think it's fair to point out that tight loops are nearly always the
> biggest bottlenecks of code, so generating good code for tight loops
> is pretty important.

it's important, but doesnt't make whole game. and while i said that
ghc improved tight loops compilation, this doesn't mean that it
becomes the same as in gcc. it just started to put loop variables into
register

> And ghc is still making large improvements with
> each release, whereas gcc isn't likely to get significantly better.

yes, it's close to perfect

>> afaiu, it's 20-line equivalent of 2-line C code:
>>
>> for (i=...)
>>  a[i] = b[i]
>>
>> does this need any more comments?

> I think you've misunderstood my code.  Look at Oleg's IterateeM and
> see if you think that's really all it's doing.

what else does the code that you've citated? you are wrote that it
just copies 16-bit words into doubles

> Use libsndfile for comparison.  http://www.mega-nerd.com/libsndfile/.

it's one method of miscomparing haskell to C - compare hand-tuned
haskell code with some C code which may be just not optimal. ig you
want to make fair comparison, you should write best code in both
languages

> I actually haven't looked at the code, although it's very highly
> regarded in the audio community (and I've seen the author post on this
> list on occasion).  Using libsndfile-1.0.18:
>  wc wav.c
> 17867833   57922 wav.c

> compared to my source:
> wc Wave.hs
>  4122215   15472 Wave.hs

> And there you are.  I will admit that I have implemented the entire
> wave spec, but only because of lack of time.

when you don't need speed, you may write more compact code in haskell
than in C. so the best way is to split your task into
speed-critical part and the rest and use C++ for the first and Haskell
for the second


-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

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


Re: [Haskell-cafe] Re: [Haskell] Google Summer of Code 2009

2009-02-11 Thread Don Stewart
bulat.ziganshin:
> Hello Don,
> 
> Wednesday, February 11, 2009, 8:28:33 PM, you wrote:
> 
> >> anyway it's impossible due to slow code generated by ghc
> 
> > Been a long time since you did high perf code -- we routinely now write
> > code that previously was considered not feasible.
> 
> which is still slower than C and need more time to write
> 
> > However, I would say it needs an optimisation expert, yes, in any
> > language.
> 
> there are experts, includingyou, in making haskell specific code as
> fast as possible, but i don't know anyone using haskell to write
> high-performance code. so you ask for non-existing specialists

We're doing it at Galois regularly. Check out the blog.

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


[Haskell-cafe] Re: Re[2]: [Haskell] Google Summer of Code

2009-02-11 Thread John Lato
On Wed, Feb 11, 2009 at 8:05 PM, Bulat Ziganshin
 wrote:
> Hello John,
>
> Wednesday, February 11, 2009, 8:54:35 PM, you wrote:
>
>> I know you've talked about performance in the past, and I don't want
>> to start a huge argument, but do you have recent data to back this up?
>>  IIRC you're using ghc 6.6, yes?
>
> i don't seen examples of high-performance code written by anyone else
> which would be as simple and as fast as C analogue. afaik ghc now can
> generate good code for tight loops, but gcc optimizations goes far
> beyond this. if you know specialists writing HP code in haskell and
> results of their work - please point us to these code
>
>> I haven't looked at H.264 (and I realize it's compressed, so the
>> situation is different from my work), however ghc can generate very
>> fast code for binary I/O
>
> it's exactly example of tight loop. and let's compare HP code written
> for this task with analogous code written in C. i expect that haskell
> code is much more complex

I think it's fair to point out that tight loops are nearly always the
biggest bottlenecks of code, so generating good code for tight loops
is pretty important.  And ghc is still making large improvements with
each release, whereas gcc isn't likely to get significantly better.

>
>> .Check out (shameless self-promotion)
>> http://johnlato.blogspot.com for my recent writeup on creating a
>> high-performance, pure-Haskell, Iteratee-based WAVE file reader.
>
> afaiu, it's 20-line equivalent of 2-line C code:
>
> for (i=...)
>  a[i] = b[i]
>
> does this need any more comments?

I think you've misunderstood my code.  Look at Oleg's IterateeM and
see if you think that's really all it's doing.

>
> unfortunately, your post doesn't contain equivalent C code and its
> performance measurements, so i can't consider this as argument for
> ghc/gcc comparison. all that i see there is large complex code that
> proves that HP haskell programming is much more complex than C one

Use libsndfile for comparison.  http://www.mega-nerd.com/libsndfile/.

I actually haven't looked at the code, although it's very highly
regarded in the audio community (and I've seen the author post on this
list on occasion).  Using libsndfile-1.0.18:
 wc wav.c
17867833   57922 wav.c

compared to my source:
wc Wave.hs
 4122215   15472 Wave.hs

And there you are.  I will admit that I have implemented the entire
wave spec, but only because of lack of time.

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


Re: [Haskell-cafe] GMP on Mac OS X linked statically by default

2009-02-11 Thread David Leimbach
Thanks Don!

On Tue, Feb 10, 2009 at 10:29 PM, Don Stewart  wrote:

> leimy2k:
> > Was there a reason for this?  If so, it'd be nice if the package that was
> build
> > explained why... otherwise it feels kind of arbitrary, and would be nice
> if
> > there was documentation available to make it link dynamically in case
> someone
> > didn't want to LGPL their program.
> >
> > Anyone know the steps to make it link dynamically?
> >
>
> Here's how we do it on Windows. The Mac should be far easier,
>
>http://haskell.forkio.com/gmpwindows
>
> -- Don
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] can't figure out a type

2009-02-11 Thread Job Vranish
I think what you probably want is something like this:

class Chunckable c where
  cLength :: c el -> Int
  cHead :: c el -> Maybe el
  cMap :: (a -> b) -> c a -> c b

instance Chunckable [] where
  cLength [] = 0
  cLength (x:xs) = 1 + cLength xs

  cHead [] = Nothing
  cHead (x:xs) = Just x

  cMap = map

a = [4, 7, 3, 8]
test1 = cLength a
test2 = cHead a
test3 = cMap (Just) a


The class does not actually need the second type parameter.
You can actually use all sorts of extra type variables in the type
signatures in class declarations as long as all your instances are
polymorphic across those types (not sure if that's the precise
terminology). Basically, as long as cLength, cHead and cMap do the
same thing regardless of what el is, then you don't need to have el as
a type parameter to the class.

Now if you _do_ want to have cLength, etc do something else depending
el, then things get more complicated. Maybe something like this:

class Chunckable2 c el where
  cLength2 :: c el -> Int
  cHead2 :: c el -> Maybe el
  cMap2 :: (Chunckable2 c el') => (el -> el') -> c el -> c el'

instance Chunckable2 [] Int where
  cLength2 [] = 0
  cLength2 (x:xs) = 1 + cLength xs

  cHead2 [] = Nothing
  cHead2 (x:xs) = Just x

  cMap2 = map

instance Chunckable2 [] Float where
  cLength2 [] = 0
  cLength2 (x:xs) = 1 + cLength xs

  cHead2 [] = Nothing
  cHead2 (x:xs) = Just x

  cMap2 f xs = []

test4 = cMap2 (fromIntegral) (a::[Int]) :: [Float]
test5 = cMap2 (id) ([3.0, 4.0, 1.0]::[Float])  :: [Float]

Note that if you want things to work like this, functional
dependencies wont help you out (as they don't make sense in this case)



On Wed, Feb 11, 2009 at 12:34 PM, John Lato  wrote:
> Hi Job,
>
> Thanks for answering.  What I'm trying to do is probably very simple,
> and I think the biggest problem is that I don't fully understand kinds
> yet.
>
> Here's an example instance:
>
> instance Chunkable [a] a where
>  cmap = map
>  --etc.
>
> In the class I wrote, c has kind * (e.g. [a]), but then I don't see
> how to write a suitable map function.  For that, I would want c to
> have kind * -> *.  Unfortunately then I don't know to write the
> others.
>
> Would I have to do something with c having kind (* -> *) ?
>
> class Chunkable2 c el where
>   cLength :: c el -> Int
>   cHead :: c el -> Maybe el
>   cMap :: (el -> el') -> c el -> c el'
>
> Sincerely,
> John
>
> On Wed, Feb 11, 2009 at 5:12 PM, Job Vranish  wrote:
>> What do you mean by parameterized over a different type?
>> will c have a kind of * -> * ? I don't think it has to be for what you
>> want to work, but the idea of "same instance" will go out the window.
>>
>> Do you have a small usage example?
>>
>>
>> On Wed, Feb 11, 2009 at 11:52 AM, John Lato  wrote:
>>> Hello,
>>>
>>> I'm working on some code like the following:
>>>
 class Chunkable c el | c -> el where
   cLength :: c -> Int
   cHead :: c -> Maybe el
>>>
>>> I want to be able to map over this type, like this:
>>>
  cMap :: Chunkable c' el' => (el -> el') -> c -> c'
>>>
>>> but this isn't quite right.  c' shouldn't be any instance of
>>> Chunkable, it should be the same instance except parameterized over a
>>> different type.  Another approach would be something like:
>>>
>>> class (Functor c) => Chunkable c el
>>> ...
>>>
>>> except that's not right either.  I think c has the wrong kind to be a
>>> Functor instance.
>>>
>>> I expect there's something very basic I'm missing.  Could anyone point
>>> in the proper direction of how to do this?  Can this be expressed with
>>> associated types, perhaps?
>>>
>>> Thanks,
>>>
>>> John Lato
>>> ___
>>> 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: can't figure out a type

2009-02-11 Thread Brian Bloniarz

Hi John,



> In the class I wrote, c has kind * (e.g. [a]), but then I don't see
> how to write a suitable map function.  For that, I would want c to
> have kind * -> *.  Unfortunately then I don't know to write the
> others.
> 
> Would I have to do something with c having kind (* -> *) ?
> 
> class Chunkable2 c el where
>cLength :: c el -> Int
>cHead :: c el -> Maybe el
>cMap :: (el -> el') -> c el -> c el'

When c is (* -> *), why do you need el to be a parameter of the

typeclass at all? I.e., would this work for your purposes:



> class Chunkable3 c where

>   cLength :: c el -> Int

>   cHead :: c el -> Maybe el

>   cMap :: (a -> b) -> c a -> c b



> instance Chunkable3 [] where

> cLength = length

> cMap = map
> cHead = ...

Using Functor as a superclass of Chunkable3 works too.



Thanks,

-Brian
_
More than messages–check out the rest of the Windows Live™.
http://www.microsoft.com/windows/windowslive/___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] can't figure out a type

2009-02-11 Thread Ryan Ingram
You can do this with another type class.

class (Chunkable c1 el1, Chunkable c2 el2) => ChunkMap c1 el1 c2 el2 where
cMap :: (el1 -> el2) -> c1 -> c2

instance ChunkMap [a] a [b] b where cMap = map

If you want to assert that c1 and c2 are really related, you can add
functional dependencies to specify the relation:

class ... | c1 el2 -> c2, c2 el1 -> c1 where ...

Combined with the dependencies in the superclass, this says that if we
have c1 and el2 we can determine c2 and el1, and vice versa.

Also, if "chunkable" has a notion of "cons", "empty", and "fold", you
can write a generic map between any two chunkable instances:

genericCMap :: (Chunkable c1 el1, Chunkable c2 el2) => (el1 -> el2) -> c1 -> c2
genericCMap f = cFold (\x xs -> cCons (f x) xs) cEmpty

  -- ryan

P.S. Check out Data.Traversable.

On Wed, Feb 11, 2009 at 8:52 AM, John Lato  wrote:
> Hello,
>
> I'm working on some code like the following:
>
>> class Chunkable c el | c -> el where
>>   cLength :: c -> Int
>>   cHead :: c -> Maybe el
>
> I want to be able to map over this type, like this:
>
>>  cMap :: Chunkable c' el' => (el -> el') -> c -> c'
>
> but this isn't quite right.  c' shouldn't be any instance of
> Chunkable, it should be the same instance except parameterized over a
> different type.  Another approach would be something like:
>
> class (Functor c) => Chunkable c el
> ...
>
> except that's not right either.  I think c has the wrong kind to be a
> Functor instance.
>
> I expect there's something very basic I'm missing.  Could anyone point
> in the proper direction of how to do this?  Can this be expressed with
> associated types, perhaps?
>
> Thanks,
>
> John Lato
> ___
> 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[2]: [Haskell] Google Summer of Code

2009-02-11 Thread Bulat Ziganshin
Hello John,

Wednesday, February 11, 2009, 8:54:35 PM, you wrote:

> I know you've talked about performance in the past, and I don't want
> to start a huge argument, but do you have recent data to back this up?
>  IIRC you're using ghc 6.6, yes?

i don't seen examples of high-performance code written by anyone else
which would be as simple and as fast as C analogue. afaik ghc now can
generate good code for tight loops, but gcc optimizations goes far
beyond this. if you know specialists writing HP code in haskell and
results of their work - please point us to these code

> I haven't looked at H.264 (and I realize it's compressed, so the
> situation is different from my work), however ghc can generate very
> fast code for binary I/O

it's exactly example of tight loop. and let's compare HP code written
for this task with analogous code written in C. i expect that haskell
code is much more complex

> .Check out (shameless self-promotion)
> http://johnlato.blogspot.com for my recent writeup on creating a
> high-performance, pure-Haskell, Iteratee-based WAVE file reader.

afaiu, it's 20-line equivalent of 2-line C code:

for (i=...)
  a[i] = b[i]

does this need any more comments?

unfortunately, your post doesn't contain equivalent C code and its
performance measurements, so i can't consider this as argument for
ghc/gcc comparison. all that i see there is large complex code that
proves that HP haskell programming is much more complex than C one

> Sincerely,
> John Lato

>>
>> anyway it's impossible due to slow code generated by ghc
>>
>>
>> --
>> Best regards,
>>  Bulatmailto:bulat.zigans...@gmail.com
>>


-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

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


[Haskell-cafe] More DPH Questions

2009-02-11 Thread James Swaine
I apologize - I forgot to include this in my previous posting.

I also couldn't seem to find an implementation of the foldP function, which
is included in several of Roman's papers on DPH and ndp in general.  Is this
not implemented yet?


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


Re[2]: [Haskell-cafe] Re: [Haskell] Google Summer of Code 2009

2009-02-11 Thread Bulat Ziganshin
Hello Don,

Wednesday, February 11, 2009, 8:28:33 PM, you wrote:

>> anyway it's impossible due to slow code generated by ghc

> Been a long time since you did high perf code -- we routinely now write
> code that previously was considered not feasible.

which is still slower than C and need more time to write

> However, I would say it needs an optimisation expert, yes, in any
> language.

there are experts, includingyou, in making haskell specific code as
fast as possible, but i don't know anyone using haskell to write
high-performance code. so you ask for non-existing specialists


-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

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


Re: [Haskell-cafe] Re: [Haskell] Google Summer of Code 2009

2009-02-11 Thread Jamie

Hi Gwern,

On Wed, 11 Feb 2009, Gwern Branwen wrote:


I just checked H.263 and it looks like it does not require patent licensing
at all (it is created by ITU-T Video Coding Experts Group (VCEG)) so one can
write H.263 in Haskell and release freely without patent licensing issues.

So writing H.263 in Haskell could be a good GSoC project.  One mentioned
that GHC produce slow code, well H.263 could be a good test case to improve
GHC optimization over time.  In The Computer Language Benchmarks Game,
Haskell has some catching up to do. :)


It does sound like a reasonably discrete task, and it sounds like you 
have a use for it; but I wonder if it's doable in a single summer?


I have no idea, I have not dig deeper into H.263 C source code but I guess 
it should be quite trivial as it is a black box with video frame input and 
output with several parameters for encoding and just frame in/out for 
decoding.


That could be a seed to create Haskell library of video/audio codecs.

One mentioned that C based ffmpeg library is buggy with memory leaks left 
and center (and probably right too :)  Ouch!



gwern


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


Re: [Haskell-cafe] Haskell Users in the West Michigan Area?

2009-02-11 Thread John Van Enk
D:
Tragedy!
/jve


On Wed, Feb 11, 2009 at 2:46 PM, Tim Wawrzynczak wrote:

> You should have mentioned this a year ago!  I must moved out of that area
> middle of last year...
>
> 2009/2/11 John Van Enk 
>
>> I'm wondering if there are people in the West Michigan, USA area who'd be
>> interested in forming WMHUG (West Michigan Haskell Users Group).
>> Any one on here from that area?
>>
>> /jve
>>
>> ___
>> Haskell-Cafe mailing list
>> Haskell-Cafe@haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>
>>
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell Users in the West Michigan Area?

2009-02-11 Thread Tim Wawrzynczak
You should have mentioned this a year ago!  I must moved out of that area
middle of last year...

2009/2/11 John Van Enk 

> I'm wondering if there are people in the West Michigan, USA area who'd be
> interested in forming WMHUG (West Michigan Haskell Users Group).
> Any one on here from that area?
>
> /jve
>
> ___
> 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] DPH Prelude

2009-02-11 Thread James Swaine
I was wondering if anyone could point me to a more in-depth explanation of
why we are (currently) restricted to using a special-purpose standard
Prelude when writing vectorised code with DPH.  We're prototyping using
several data-parallel languages for a research project here at Northwestern
University, and wanted to get a better idea how we might go about adding
vectorisation support for addtional types/operations.

There are certain simple operations which don't appear to be supported for
primitive types yet (e.g. the ^ and ** operators for an Int type).  These
are the kinds of things we'd like to look into as a first step.

Much thanks,
James Swaine
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: [Haskell] Google Summer of Code 2009

2009-02-11 Thread Gwern Branwen
2009/2/10 John Van Enk :
> I'd like to see some good libgcrypt[1] bindings to complement our existing
> cryptography packages.
> /jve

Here are the projects I favor (in no particular order):

* I'd like to see the X-saiga parser library finished:
http://hackage.haskell.org/trac/summer-of-code/ticket/1558

* A GUI interface to Darcs
(http://hackage.haskell.org/trac/summer-of-code/ticket/17); this could
possibly be based on TortoiseDarcs
http://tortoisedarcs.sourceforge.net/. Perhaps the specific project
could be making TortoiseDarcs not Windows specific?

* Graphical reduction
http://hackage.haskell.org/trac/summer-of-code/ticket/83 We already
have some of it done in Lambdabot, but a full implementation would be
very nice.

* Optimization of containers
(http://hackage.haskell.org/trac/summer-of-code/ticket/1549). Would
benefit every Haskell user very quickly.

* XMonad compositing support
(http://hackage.haskell.org/trac/summer-of-code/ticket/1548). XMonad
is one of the flagship applications of Haskell, and there are quite a
few would-be users of compositing support who either go without or
limp by with xcompmgr.

* Haddock in general could use work
(http://hackage.haskell.org/trac/summer-of-code/ticket/45). Everyone
uses Haddock, sooner or later...

* Sandboxed Haskell
(http://hackage.haskell.org/trac/summer-of-code/ticket/1114). This is
a personal wish of mine; safe code would certainly let me simplify
mueval!

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


[Haskell-cafe] Haskell Users in the West Michigan Area?

2009-02-11 Thread John Van Enk
I'm wondering if there are people in the West Michigan, USA area who'd be
interested in forming WMHUG (West Michigan Haskell Users Group).
Any one on here from that area?

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


Re: [Haskell-cafe] Re: Can this be done?

2009-02-11 Thread Sebastian Sylvan
On Wed, Feb 11, 2009 at 5:41 PM, Achim Schneider  wrote:

> Evan Laforge  wrote:
>
> > On Wed, Feb 11, 2009 at 9:34 PM, Alistair Bayley
> >  wrote:
> > > 2009/2/11 Cristiano Paris :
> > >> I wonder whether this can be done in Haskell (see muleherd's
> > >> comment):
> > >>
> > >>
> http://www.reddit.com/r/programming/comments/7wi7s/how_continuationbased_web_frameworks_work/
> > >
> > > WASH did/does something similar. You can certainly write
> > > applications in a similar, workflow-ish style (rather than like a
> > > state machine).
> >
> > To hijack the subject, what happened to WASH?  The paper seemed like
> > it was full of interesting ideas, but the implementation seems to have
> > failed to capture many hearts.  Now it seems like a stagnant project.
> > What were the fatal flaws?
> >
> I got curious and made two pages point to each other, resulting in as
> many stale continuations as your left mouse button would permit. While
> the model certainly is cool, I'm not aware of any implementation that
> even comes close to having production-safe (that is, non-abusable)
> semantics.


Shouldn't the following WASH function help?

once :: (Read a, Show a) => CGI a -> CGI a


-- 
Sebastian Sylvan
+44(0)7857-300802
UIN: 44640862
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] GHC development

2009-02-11 Thread Don Stewart
andrewcoppin:
> OK, so I have a small question.
>
> I was just wondering what the current state of development with GHC is.  
> So, I had a look at the developer wiki. Unfortunately, as best as I can  
> tell, most of the status pages haven't been updated in many months.  
> (Most of them still talk about what will or won't be in 6.10.1, which  
> has been *released* for a while now.) What's the best way to find out  
> what the "real" state of affairs is? What are the developers really  
> working on? What's on hold? How far have people got with things? Etc.
>
> (Yes, I know. I'm nosey...)
>

GHC questions should go to glasgow-haskell-users,


http://www.haskell.org/pipermail/glasgow-haskell-users/2009-February/thread.html

To really see what is going on, look at the commit list and the bug
tracker,

http://www.haskell.org/pipermail/cvs-ghc/2009-February/thread.html

Bug tracker,


http://hackage.haskell.org/trac/ghc/query?status=new&status=assigned&status=reopened&group=priority&type=bug&order=id&desc=1

These links are trivial to find from the GHC home page. 

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


[Haskell-cafe] GHC development

2009-02-11 Thread Andrew Coppin

OK, so I have a small question.

I was just wondering what the current state of development with GHC is. 
So, I had a look at the developer wiki. Unfortunately, as best as I can 
tell, most of the status pages haven't been updated in many months. 
(Most of them still talk about what will or won't be in 6.10.1, which 
has been *released* for a while now.) What's the best way to find out 
what the "real" state of affairs is? What are the developers really 
working on? What's on hold? How far have people got with things? Etc.


(Yes, I know. I'm nosey...)

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


Re: [Haskell-cafe] (Off-topic) CUDA

2009-02-11 Thread Andrew Coppin

Bulat Ziganshin wrote:

Hello Andrew,

Thursday, February 5, 2009, 11:10:42 AM, you wrote:

  

Does anybody know how to make this stuff actually work?



nvidia has cuda site where you can download sdk. afair, dr dobbs
journal has (online) series of arcticles which describes how to
program it step-by-step
  


OK. It's just that I downloaded a CUDA-enabled program, and it's not 
using CUDA, and I can't figure out why. :-(



(Also... Haskell on the GPU. It's been talked about for years, but will
it ever actually happen?)



gpu is just set of simd-like instructions. so the reason why you will
never see haskell on gpu is the same as why you will never see it
implemented via simd instructions :D
  


Heh, fair enough.

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


[Haskell-cafe] Re: [Haskell] Google Summer of Code 2009

2009-02-11 Thread Achim Schneider
Bulat Ziganshin  wrote:

> impossible
> 
impossible, adj:
1) admittance of loosing an argument
2) tease to make someone do something

-- 
(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
performance and/or quoting of this signature prohibited.


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


Re: [Haskell-cafe] Can this be done?

2009-02-11 Thread Manlio Perillo

Manlio Perillo ha scritto:


The only thing I miss is a "little" higher level of abstraction.
Right now I operate on "request bodies" (in a text format, usually 


"request body" should be replaced with "response body"


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


[Haskell-cafe] Re: [Haskell] Google Summer of Code

2009-02-11 Thread John Lato
Hi Bulat,

I know you've talked about performance in the past, and I don't want
to start a huge argument, but do you have recent data to back this up?
 IIRC you're using ghc 6.6, yes?

I haven't looked at H.264 (and I realize it's compressed, so the
situation is different from my work), however ghc can generate very
fast code for binary I/O.Check out (shameless self-promotion)
http://johnlato.blogspot.com for my recent writeup on creating a
high-performance, pure-Haskell, Iteratee-based WAVE file reader.

Sincerely,
John Lato

>
> anyway it's impossible due to slow code generated by ghc
>
>
> --
> Best regards,
>  Bulatmailto:bulat.zigans...@gmail.com
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell.org GSoC

2009-02-11 Thread Don Stewart
d:
> Hi,
>
> I noticed last year Haskell.org was a mentoring organization for  
> Google's Summer of Code, and I barely noticed some discussion about it  
> applying again this year :)
>
> I participated for GCC in 2008 and would like to try again this year;  
> while I'm still active for GCC and will surely stay so, I'd like to see  
> something new at least for GSoC.  And Haskell.org would surely be a  
> very, very nice organization.
>
> Since I discovered there's more than just a lot of imperative languages  
> that are nearly all the same, I love to do some programming in Prolog,  
> Scheme and of course Haskell.  However, so far this was only some toy  
> programs and nothing "really useful"; I'd like to change this (as well  
> as learning more about Haskell during the projects).
>
> Here are some ideas for developing Haskell packages (that would  
> hopefully be of general use to the community) as possible projects:
>
> - Numerics, like basic linear algebra routines, numeric integration and  
> other basic algorithms of numeric mathematics.

I think a lot of the numerics stuff is now covered by libraries (see
e.g. haskell-blas, haskell-lapack, haskell-fftw)
 
> - A basic symbolic maths package; I've no idea how far one could do this  
> as a single GSoC project, but it would surely be a very interesting  
> task.  Alternatively or in combination, one could try to use an existing  
> free CAS package as engine.

Interesting, but niche, imo.
 
> - Graphs.
>
> - Some simulation routines from physics, though I've not really an idea  
> what exactly one should implement here best.

True graphs (the data structure) are still a weak point! There's no
canonical graph library for Haskell. 
 

> - A logic programming framework.  I know there's something like that for  
> Scheme; in my experience, there are some problems best expressed  
> logically with Prolog-style backtracking/predicates and unification.  
> This could help use such formulations from inside a Haskell program.  
> This is surely also a very interesting project.

Interesting, lots of related work, hard to state the benefits to the
community though.
 
> What do you think about these ideas?  I'm pretty sure there are already  
> some of those implemented, but I also hope some would be new and really  
> of some use to the community.  Do you think something would be  
> especially nice to have and is currently missing?

Think about how many people would benefit.

For example, if all the haddocks on hackage.org were a wiki, and
interlinked, every single package author would benefit, as would all
users. 

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


Re: [Haskell-cafe] Re: [Haskell] Google Summer of Code 2009

2009-02-11 Thread Gwern Branwen
On Wed, Feb 11, 2009 at 12:27 PM, Don Stewart  wrote:
> gwern0:
>> (The following is a quasi essay/list of past Summer of Code projects;
>> my hope is to guide thinking about what Summer of Code projects would
>> be good to pick, and more specifically what should be avoided.
>> If you're in a hurry, my conclusions are at the bottom.
>> The whole thing is written in Markdown; for best results pass it
>> through Pandoc or view it via your friendly local Gitit wiki.)
>>
>
> Thanks for the write up!
>
> We explicitly pushed harder in 2008 to clarify and simplify the goals of
> the projects, ensure adequate *prior Haskell experience* and to
> focus on libraries and tools that directly benefit the communtity.

Oh, I didn't know that about prior experience. (I was tired enough
when I finished it that I decided to not look at the students involved
- how much prior experience they had, and how involved they were in
the Haskell community afterwards.)

> And our success rate was much higher.

That certainly does seem to be true. Looking over the 2008 projects, I
see 0 outright failures (compared to 2 in 2006),  and only 1 or 2
which might turn out to be unsuccessful (the physics engine, and
perhaps GMap or the GHC API improvements).

> So: look for things that benefit the largest number of Haskell
> developers and users, and from students with proven Haskell development
> experience. You can't learn Haskell from zero on the job, during SoC.
>
> -- Don

Inexperience is a good criterion to add to the 3 I had in my
conclusion, certainly.

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


[Haskell-cafe] Re: Can this be done?

2009-02-11 Thread Achim Schneider
Evan Laforge  wrote:

> On Wed, Feb 11, 2009 at 9:34 PM, Alistair Bayley
>  wrote:
> > 2009/2/11 Cristiano Paris :
> >> I wonder whether this can be done in Haskell (see muleherd's
> >> comment):
> >>
> >> http://www.reddit.com/r/programming/comments/7wi7s/how_continuationbased_web_frameworks_work/
> >
> > WASH did/does something similar. You can certainly write
> > applications in a similar, workflow-ish style (rather than like a
> > state machine).
> 
> To hijack the subject, what happened to WASH?  The paper seemed like
> it was full of interesting ideas, but the implementation seems to have
> failed to capture many hearts.  Now it seems like a stagnant project.
> What were the fatal flaws?
> 
I got curious and made two pages point to each other, resulting in as
many stale continuations as your left mouse button would permit. While
the model certainly is cool, I'm not aware of any implementation that
even comes close to having production-safe (that is, non-abusable)
semantics.

Continuations might also be overkill: For things like server-side
checked[1] POST hurdle races, specifying a list of form/predicate/action
triples seems to be the nicer way to go. Generalising, fgl should be
able to take care of any control flow imaginable.


[1] Am I the only one who can't stand those buggy js-forms, especially
if the client side has a different notion of valid input than the
server?

-- 
(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
performance and/or quoting of this signature prohibited.


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


Re: [Haskell-cafe] can't figure out a type

2009-02-11 Thread John Lato
Hi Job,

Thanks for answering.  What I'm trying to do is probably very simple,
and I think the biggest problem is that I don't fully understand kinds
yet.

Here's an example instance:

instance Chunkable [a] a where
  cmap = map
  --etc.

In the class I wrote, c has kind * (e.g. [a]), but then I don't see
how to write a suitable map function.  For that, I would want c to
have kind * -> *.  Unfortunately then I don't know to write the
others.

Would I have to do something with c having kind (* -> *) ?

class Chunkable2 c el where
   cLength :: c el -> Int
   cHead :: c el -> Maybe el
   cMap :: (el -> el') -> c el -> c el'

Sincerely,
John

On Wed, Feb 11, 2009 at 5:12 PM, Job Vranish  wrote:
> What do you mean by parameterized over a different type?
> will c have a kind of * -> * ? I don't think it has to be for what you
> want to work, but the idea of "same instance" will go out the window.
>
> Do you have a small usage example?
>
>
> On Wed, Feb 11, 2009 at 11:52 AM, John Lato  wrote:
>> Hello,
>>
>> I'm working on some code like the following:
>>
>>> class Chunkable c el | c -> el where
>>>   cLength :: c -> Int
>>>   cHead :: c -> Maybe el
>>
>> I want to be able to map over this type, like this:
>>
>>>  cMap :: Chunkable c' el' => (el -> el') -> c -> c'
>>
>> but this isn't quite right.  c' shouldn't be any instance of
>> Chunkable, it should be the same instance except parameterized over a
>> different type.  Another approach would be something like:
>>
>> class (Functor c) => Chunkable c el
>> ...
>>
>> except that's not right either.  I think c has the wrong kind to be a
>> Functor instance.
>>
>> I expect there's something very basic I'm missing.  Could anyone point
>> in the proper direction of how to do this?  Can this be expressed with
>> associated types, perhaps?
>>
>> Thanks,
>>
>> John Lato
>> ___
>> Haskell-Cafe mailing list
>> Haskell-Cafe@haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: [Haskell] Google Summer of Code 2009

2009-02-11 Thread Don Stewart
bulat.ziganshin:
> Hello Jamie,
> 
> Wednesday, February 11, 2009, 5:54:09 AM, you wrote:
> 
> > Seems like it is ok to write H.264 in Haskell and released via GPL
> > license?
> 
> anyway it's impossible due to slow code generated by ghc
> 

Been a long time since you did high perf code -- we routinely now write
code that previously was considered not feasible.

However, I would say it needs an optimisation expert, yes, in any
language.

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


Re: [Haskell-cafe] Re: [Haskell] Google Summer of Code 2009

2009-02-11 Thread Don Stewart
gwern0:
> (The following is a quasi essay/list of past Summer of Code projects;
> my hope is to guide thinking about what Summer of Code projects would
> be good to pick, and more specifically what should be avoided.
> If you're in a hurry, my conclusions are at the bottom.
> The whole thing is written in Markdown; for best results pass it
> through Pandoc or view it via your friendly local Gitit wiki.)
> 

Thanks for the write up!

We explicitly pushed harder in 2008 to clarify and simplify the goals of
the projects, ensure adequate *prior Haskell experience* and to 
focus on libraries and tools that directly benefit the communtity.

And our success rate was much higher.

So: look for things that benefit the largest number of Haskell
developers and users, and from students with proven Haskell development
experience. You can't learn Haskell from zero on the job, during SoC.

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


Re: [Haskell-cafe] can't figure out a type

2009-02-11 Thread Job Vranish
What do you mean by parameterized over a different type?
will c have a kind of * -> * ? I don't think it has to be for what you
want to work, but the idea of "same instance" will go out the window.

Do you have a small usage example?


On Wed, Feb 11, 2009 at 11:52 AM, John Lato  wrote:
> Hello,
>
> I'm working on some code like the following:
>
>> class Chunkable c el | c -> el where
>>   cLength :: c -> Int
>>   cHead :: c -> Maybe el
>
> I want to be able to map over this type, like this:
>
>>  cMap :: Chunkable c' el' => (el -> el') -> c -> c'
>
> but this isn't quite right.  c' shouldn't be any instance of
> Chunkable, it should be the same instance except parameterized over a
> different type.  Another approach would be something like:
>
> class (Functor c) => Chunkable c el
> ...
>
> except that's not right either.  I think c has the wrong kind to be a
> Functor instance.
>
> I expect there's something very basic I'm missing.  Could anyone point
> in the proper direction of how to do this?  Can this be expressed with
> associated types, perhaps?
>
> Thanks,
>
> John Lato
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] can't figure out a type

2009-02-11 Thread John Lato
Hello,

I'm working on some code like the following:

> class Chunkable c el | c -> el where
>   cLength :: c -> Int
>   cHead :: c -> Maybe el

I want to be able to map over this type, like this:

>  cMap :: Chunkable c' el' => (el -> el') -> c -> c'

but this isn't quite right.  c' shouldn't be any instance of
Chunkable, it should be the same instance except parameterized over a
different type.  Another approach would be something like:

class (Functor c) => Chunkable c el
...

except that's not right either.  I think c has the wrong kind to be a
Functor instance.

I expect there's something very basic I'm missing.  Could anyone point
in the proper direction of how to do this?  Can this be expressed with
associated types, perhaps?

Thanks,

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


[Haskell-cafe] Re: space leak with 'concat' ?

2009-02-11 Thread Jake McArthur

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Simon Marlow wrote:
| FUD!  CAFs are definitely garbage collected, in fact we have a big lump
| of code generator and runtime complexity (Static Reference Tables, SRTs)
| to ensure that they do.
|
| However, GHCi doesn't always GC CAFs, perhaps that's what you meant.

The FUD is probably due to my own misunderstanding. Perhaps I did get
that impression from GHCi. Sorry about that.

- - Jake
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmS/2YACgkQye5hVyvIUKkcEwCgtAfixwQL69lILm1lHFOk8Dj3
55kAnjBV8ZkkMSwRWZOCwKbPaH8VTHdq
=DKgU
-END PGP SIGNATURE-
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: space leak with 'concat' ?

2009-02-11 Thread Peter Verswyvelen
Yes, I was really surprised that this was the case. I while ago I did a
little FRP experiment. I made a top level binding to a list of timer event
occurrences. The list was generated on another thread. To my surprise, I did
not have space leak, which is amazingly cool, but it felt odd :) Is it
documented when GHC will garbage collect CAFs?

> FUD!  CAFs are definitely garbage collected, in fact we have a big lump of
> code generator and runtime complexity (Static Reference Tables, SRTs) to
> ensure that they do.
>
> However, GHCi doesn't always GC CAFs, perhaps that's what you meant.
>
> Cheers,
>Simon
>
>
> ___
> 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] Can this be done?

2009-02-11 Thread Manlio Perillo

John Goerzen ha scritto:

[...]
There were also issues with people using the back button.

It reminded me a fair bit of the issues I ran into when using Python's
Twisted framework, actually.



Same experience, with Twisted Web + Nevow.
All solved after switching to WSGI and a simple WSGI framework (wrote by 
myself).


Configuration and behaviour (middlewares) are all composable.

The only thing I miss is a "little" higher level of abstraction.
Right now I operate on "request bodies" (in a text format, usually 
text/html) but I would like to operate on generic "response entities", 
where an entity is a generic object/data that can be serialized to a 
request body.


This will allow an even greater degree of composability, where each web 
"view" returns a generic entity, that can be later transformed to 
another object/data (filtered) or serialized (to JSON or HTML).


I think that Haskell is one of the most suitable languages for this 
idea, but there is the need for the equivalent of WSGI.



-- John



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


[Haskell-cafe] Re: space leak with 'concat' ?

2009-02-11 Thread Simon Marlow

Jake McArthur wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Henning Thielemann wrote:
| in that module I defined the text to be printed as top-level
| variable which might have been the problem. But this can't be the
| problem of the compiled version of the program, where I encountered the
| leak. So I have to keep on searching that leak.

You have created a constant applicative form (commonly abbreviated CAF).
GHC assumes that all top level declarations are constants, and simply
does not garbage collect them.


FUD!  CAFs are definitely garbage collected, in fact we have a big lump of 
code generator and runtime complexity (Static Reference Tables, SRTs) to 
ensure that they do.


However, GHCi doesn't always GC CAFs, perhaps that's what you meant.

Cheers,
Simon

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


Re: [Haskell-cafe] Can this be done?

2009-02-11 Thread Cristiano Paris
On Wed, Feb 11, 2009 at 4:08 PM, Manlio Perillo
 wrote:
> Cristiano Paris ha scritto:
>>
>> On Wed, Feb 11, 2009 at 2:30 PM, Peter Verswyvelen 
>> wrote:
>>>
>>> I haven't looked at the details, but I think this is what a library like
>>> Reactive from Conal Elliott could do, but as far as I understand it, it
>>> is
>>> still work in progress.
>>
>> I'm interested in the possibility of
>> stopping/pickling/unpickling/resuming a computation.
>>
>
> Not sure this is a good thing in a web application.

I'm thinking of complex workflows and inversion of control.

A computation may stop, return a response, wait for a new request to
be passed by the HTTP server and return back a new response, stopping
again. This goes on forever. All this can be achieved in Haskell but
the serialization path, which is crucial for swapping out idle
sessions (containing the stopped computation) or to get back to life
after server stopped (for maintenance for instance). I guess this
should be doable in Clean, which has mechanisms to do dynamic binding
and serialization of closures.

I once did something close to this using Stackless Python, which
sports serializable iterators. I did funny things like moving all the
sessions to a different server transparently. Nevertheless, the use of
yield, specially in sub-computation, is tricky to handle.

Notice that this is not a main concern in my daily work but the
possibility fascinates me and it turns out to be not a simple problem
to solve. During my explorations, I considered continuations,
delimited continuations and zippers, and I learned a lot even if I
can't still catch delimited continuations.

Recently, I stumbled upon Factor and realized that most of the
complications are simply cut out in that language as it is purely
concatenative (no symbol bindings to mess around).

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


Re[2]: [Haskell-cafe] Re: [Haskell] Google Summer of Code 2009

2009-02-11 Thread C.M.Brown
Hi Jamie,

As a side note - I'd be very interested to see a Haskell implementation of
H264 decoding. I'm currently having to use the ffmpeg library in C, and
it's notoriously buggy with memory leaks left right and centre. A
haskell solution would be very much welcome!

Regards,
Chris.


On Wed, 11 Feb 2009, Jamie wrote:

> Hi Bulat,
>
> On Wed, 11 Feb 2009, Bulat Ziganshin wrote:
>
> > Hello Jamie,
> >
> > Wednesday, February 11, 2009, 5:54:09 AM, you wrote:
> >
> >> Seems like it is ok to write H.264 in Haskell and released via GPL
> >> license?
> >
> > anyway it's impossible due to slow code generated by ghc
>
> I see, I guess I'll have to stuck with C version of H.264 in my Haskell
> programs.  Maybe in future when ghc have better optimizations.
>
> At least one can write various subset of H.323 standard in Haskell as the
> only part of H.323 subset that is CPU intensive is video/audio codecs, the
> rest is just mainly network I/O code.  http://www.h323plus.org/standards/
>
> > Best regards,
> > Bulatmailto:bulat.zigans...@gmail.com
>
>   Jamie
> ___
> 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: How outdated is Hugs?

2009-02-11 Thread Simon Marlow

Conrad Meyer wrote:

On Tuesday 10 February 2009 06:41:54 am Simon Marlow wrote:

John Goerzen wrote:

Just to close -- I will point out that ghci doesn't work on many
platforms that Hugs does (though ghc does).  Hugs is the only
interpreter on some of these platforms.

I didn't see anyone follow up to this so I'll just mention that nowadays
GHCi works wherever GHC works, since 6.10.1.  Actually I think most
platforms worked with 6.8.1, but 6.10.1 added libffi which meant that GHCi
also gets working FFI support on any platform supported by libffi, which is
most of them.

Cheers,
Simon


Counterexample: GHC 6.10.1 works on linux/ppc, GHCi 6.10.1 does not. (6.8.3 
worked, though.)


I presume you're referring to this bug:

  http://hackage.haskell.org/trac/ghc/ticket/2972

So I should really say that /in theory/ there's no reason why GHCi 
shouldn't work if GHC works, platform-specific bugs notwithstanding.  As 
Ian said in a comment on that bug, I expect that an unregisterised build 
would work fine.


We could do with a Linux/PPC expert to help improve GHC support on that 
platform.


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


Re: [Haskell-cafe] Re: [Haskell] Google Summer of Code 2009

2009-02-11 Thread Gwern Branwen
On Wed, Feb 11, 2009 at 10:00 AM, Jamie  wrote:
>
>>> Seems like it is ok to write H.264 in Haskell and released via GPL
>>> license?
>>>
>>> There is theora.org but H.264 would be ideal.  Ditto for H.263.
>>
>> Software patent issues are entirely orthogonal to the copyright issues of
>> who wrote what under which license. That's why software patents suck so very
>> hard.
>>
>> See
>> https://secure.wikimedia.org/wikipedia/en/wiki/Software_patent#Free_and_open_source_software
>> &
>> https://secure.wikimedia.org/wikipedia/en/wiki/Software_patents_and_free_software
>>
>> gwern
>
> Thanks for the links.  What I understand is some standard body create the
> specs, the role, the purpose, the protocols (i.e. H.323 by ITU
> Telecommunication Standardization Sector) then one can create programs that
> follow those protocols and don't have to concern about patent license at
> all, is that correct?

In general, you can't say that just because it was generated by some
standards body it will be usable. Standards bodies often only have to
make their work available under 'reasonable and non discriminatory'
terms, which should be read 'not ruinously high license fees' (see
https://secure.wikimedia.org/wikipedia/en/wiki/Reasonable_and_Non_Discriminatory_Licensing
). RAND terms are, of course, hopelessly strict for any FLOSS
purposes.

> I just checked H.264 and yes JVT (the creator of H.264/MPEG 4/AVC
> specs/protocol) require patent licensing.  Oh well...  I guess JVT does not
> do something with x264/ffmpeg cause they are totally free, but let say if I
> include the H.264 code from x264/ffmpeg in my application and sell for some
> $$$ then JVT's lawyers could run after me, is that correct?

If JVT has patented any of the techniques in the x264/ffmpeg codebase,
then they can come after you if you distribute in *any* manner. An
example: the RIAA is still allowed to sue file-sharers even though the
sharers aren't seeing a penny in any way.

> I just checked H.263 and it looks like it does not require patent licensing
> at all (it is created by ITU-T Video Coding Experts Group (VCEG)) so one can
> write H.263 in Haskell and release freely without patent licensing issues.
>
> So writing H.263 in Haskell could be a good GSoC project.  One mentioned
> that GHC produce slow code, well H.263 could be a good test case to improve
> GHC optimization over time.  In The Computer Language Benchmarks Game,
> Haskell has some catching up to do. :)
>
>Jamie

It does sound like a reasonably discrete task, and it sounds like you
have a use for it; but I wonder if it's doable in a single summer?

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


Re: [Haskell-cafe] Can this be done?

2009-02-11 Thread Manlio Perillo

Cristiano Paris ha scritto:

On Wed, Feb 11, 2009 at 2:30 PM, Peter Verswyvelen  wrote:

I haven't looked at the details, but I think this is what a library like
Reactive from Conal Elliott could do, but as far as I understand it, it is
still work in progress.


I'm interested in the possibility of
stopping/pickling/unpickling/resuming a computation.



Not sure this is a good thing in a web application.


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


Re: Re[2]: [Haskell-cafe] Re: [Haskell] Google Summer of Code 2009

2009-02-11 Thread Sebastian Sylvan
On Wed, Feb 11, 2009 at 9:40 AM, Bulat Ziganshin
wrote:

> Hello Jamie,
>
> Wednesday, February 11, 2009, 5:54:09 AM, you wrote:
>
> > Seems like it is ok to write H.264 in Haskell and released via GPL
> > license?
>
> anyway it's impossible due to slow code generated by ghc
>

Impossible? Really? How does performance relate to it being possible to
write? I would be surprised if it was indeed impossible to get something
that runs fine one *some* machine.
It may be difficult to beat C, but that doesn't mean it's impossible to
write something useful.

-- 
Sebastian Sylvan
+44(0)7857-300802
UIN: 44640862
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Can this be done?

2009-02-11 Thread John Goerzen
On Wed, Feb 11, 2009 at 09:43:34PM +0800, Evan Laforge wrote:
> On Wed, Feb 11, 2009 at 9:34 PM, Alistair Bayley  wrote:
> > 2009/2/11 Cristiano Paris :
> >> I wonder whether this can be done in Haskell (see muleherd's comment):
> >>
> >> http://www.reddit.com/r/programming/comments/7wi7s/how_continuationbased_web_frameworks_work/
> >
> > WASH did/does something similar. You can certainly write applications
> > in a similar, workflow-ish style (rather than like a state machine).
> 
> To hijack the subject, what happened to WASH?  The paper seemed like
> it was full of interesting ideas, but the implementation seems to have
> failed to capture many hearts.  Now it seems like a stagnant project.
> What were the fatal flaws?

I actually used it in production for some time, and abandoned it in
favor of a FastCGI-based app about 6 months ago.

There were several issues.  The biggest was maintainability.  CPS was
difficult to work with, especially when different paths through a web
app branch and may later reunite.  There was not enough control over
how things worked, and the HTML and JavaScript generated did not
always fit our needs.  Field names were essentially random, and IIRC,
so were page names, making integration with other web sites
difficult.  You can't just link from an external static HTML to a
particular page or to the submission of a particular form.

There were also issues with people using the back button.

It reminded me a fair bit of the issues I ran into when using Python's
Twisted framework, actually.

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


Re: [Haskell-cafe] Re: [Haskell] Google Summer of Code 2009

2009-02-11 Thread Jamie



Seems like it is ok to write H.264 in Haskell and released via GPL license?

There is theora.org but H.264 would be ideal.  Ditto for H.263.


Software patent issues are entirely orthogonal to the copyright issues of who 
wrote what under which license. That's why software patents suck so very 
hard.


See 
https://secure.wikimedia.org/wikipedia/en/wiki/Software_patent#Free_and_open_source_software 
& 
https://secure.wikimedia.org/wikipedia/en/wiki/Software_patents_and_free_software


gwern


Thanks for the links.  What I understand is some standard body create the 
specs, the role, the purpose, the protocols (i.e. H.323 by ITU 
Telecommunication Standardization Sector) then one can create programs 
that follow those protocols and don't have to concern about patent license 
at all, is that correct?


I just checked H.264 and yes JVT (the creator of H.264/MPEG 4/AVC 
specs/protocol) require patent licensing.  Oh well...  I guess JVT does 
not do something with x264/ffmpeg cause they are totally free, but let say 
if I include the H.264 code from x264/ffmpeg in my application and sell 
for some $$$ then JVT's lawyers could run after me, is that correct?


I just checked H.263 and it looks like it does not require patent 
licensing at all (it is created by ITU-T Video Coding Experts Group 
(VCEG)) so one can write H.263 in Haskell and release freely without 
patent licensing issues.


So writing H.263 in Haskell could be a good GSoC project.  One mentioned 
that GHC produce slow code, well H.263 could be a good test case to 
improve GHC optimization over time.  In The Computer Language Benchmarks 
Game, Haskell has some catching up to do. :)


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


Re: [Haskell-cafe] Gtk2HS 0.10.0 Released

2009-02-11 Thread Lennart Augustsson
Does this version work from ghci?

  -- Lennart

On Wed, Feb 11, 2009 at 5:40 AM, Peter Gavin  wrote:
> Hi everyone,
>
> Oh, dear... it seems I've forgotten how to spell "cafe", and sent this
> message to haskell-c...@haskell.org the first time around.  I resent it to
> all the lists again (just to make sure everyone interested receives it), so
> I apologize for any duplicated messages you might have received.  In any
> case...
>
> I'd like to release the announcement of Gtk2HS 0.10.0.  A lot of new stuff
> has gone into this release, including:
>
> - Support for GHC 6.10
> - Bindings to GIO and GtkSourceView-2.0
> - Full switch to the new model-view implementation using a Haskell model
> - Support for many more model-based widgets such as IconView and an updated
> binding for ComboBox
> - Full Drag-and-Drop support
> - Better support for Attributes in Pango
> - Replaced Event for EventM monad, thereby improving efficiency and
> convenience
> - Functions for interaction between Cairo and Pixbuf drawing
> - Lots of bug fixes, code cleanups, and portability improvements
>
> With this release, the bindings to GnomeVFS and GtkSourceView-1.0 have been
> deprecated.  The TreeList modules have been deprecated from the Gtk+
> bindings.
>
> Source and Win32 binaries are available at:
>
>
> https://sourceforge.net/project/showfiles.php?group_id=49207package_id=42440&release_id=659598
>
> Thanks to everyone who submitted bug fixes and features this time around!
>
> Thanks,
> Peter Gavin
> Gtk2HS Release Manager
>
> ___
> 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] Gtk2HS 0.10.0 Released

2009-02-11 Thread Gwern Branwen

On Tue, Feb 10, 2009 at 11:40 PM, Peter Gavin  wrote:

Hi everyone,

Oh, dear... it seems I've forgotten how to spell "cafe", and sent this
message to haskell-c...@haskell.org the first time around.  I resent it to
all the lists again (just to make sure everyone interested receives it), so
I apologize for any duplicated messages you might have received.  In any
case...

I'd like to release the announcement of Gtk2HS 0.10.0.  A lot of new stuff
has gone into this release, including:

- Support for GHC 6.10
- Bindings to GIO and GtkSourceView-2.0
- Full switch to the new model-view implementation using a Haskell model
- Support for many more model-based widgets such as IconView and an updated
binding for ComboBox
- Full Drag-and-Drop support
- Better support for Attributes in Pango
- Replaced Event for EventM monad, thereby improving efficiency and
convenience
- Functions for interaction between Cairo and Pixbuf drawing
- Lots of bug fixes, code cleanups, and portability improvements

With this release, the bindings to GnomeVFS and GtkSourceView-1.0 have been
deprecated.  The TreeList modules have been deprecated from the Gtk+
bindings.

Source and Win32 binaries are available at:


https://sourceforge.net/project/showfiles.php?group_id=49207package_id=42440&release_id=659598

Thanks to everyone who submitted bug fixes and features this time around!

Thanks,
Peter Gavin
Gtk2HS Release Manager


Out of curiosity, has anyone run into an error like the following? (i386 
Ubuntu, GHC 6.10)

touch tools/c2hs/c2hsLocal.deps;  /home/gwern/bin/bin/ghc -M -dep-makefile 
-optdeptools/c2hs/c2hsLocal.deps -fglasgow-exts -O  
-itools/c2hs/base/admin:tools/c2hs/base/errors:tools/c2hs/base/general:tools/c2hs/base/state:tools/c2hs/base/syms:tools/c2hs/base/syntax:tools/c2hs/c:tools/c2hs/chs:tools/c2hs/gen:tools/c2hs/state:tools/c2hs/toplevel
 -package-conf package.conf.inplace -hide-all-packages  -package base-4.0.0.0 
-package haskell98-1.0.1.0 -package pretty-1.0.1.0 -package containers-0.2.0.0 
-package array-0.2.0.0tools/c2hs/base/admin/BaseVersion.hs 
tools/c2hs/base/admin/Config.hs tools/c2hs/base/errors/Errors.hs 
tools/c2hs/base/general/DLists.hs tools/c2hs/base/general/FileOps.hs 
tools/c2hs/base/general/FNameOps.hs tools/c2hs/base/general/Map.hs 
tools/c2hs/base/general/Position.hs tools/c2hs/base/general/Set.hs 
tools/c2hs/base/general/UNames.hs tools/c2hs/base/general/Binary.hs 
tools/c2hs/base/general/FastMutInt.hs tools/c2hs/base/state/CIO.hs 
tools/c2hs/base/state/StateBase.hs tools/c2hs/base/state/State.hs 
tools/c2hs/base/state/StateTrans.hs tools/c2hs/base/syms/Attributes.hs 
tools/c2hs/base/syms/Idents.hs tools/c2hs/base/syms/NameSpaces.hs 
tools/c2hs/base/syntax/Lexers.hs tools/c2hs/c/CAST.hs tools/c2hs/c/CAttrs.hs 
tools/c2hs/c/CBuiltin.hs tools/c2hs/c/C.hs tools/c2hs/c/CLexer.hs 
tools/c2hs/c/CNames.hs tools/c2hs/c/CParser.hs tools/c2hs/c/CParserMonad.hs 
tools/c2hs/c/CPretty.hs tools/c2hs/c/CTokens.hs tools/c2hs/c/CTrav.hs 
tools/c2hs/chs/CHS.hs tools/c2hs/chs/CHSLexer.hs tools/c2hs/gen/CInfo.hs 
tools/c2hs/gen/GBMonad.hs tools/c2hs/gen/GenBind.hs tools/c2hs/gen/GenHeader.hs 
tools/c2hs/state/C2HSState.hs tools/c2hs/state/Switches.hs 
tools/c2hs/toplevel/Main.hs tools/c2hs/toplevel/Version.hs 
tools/c2hs/toplevel/C2HSConfig.hs;
gcc -E -x c -traditional-cpp -I/usr/include/glib-2.0 
-I/usr/lib/glib-2.0/include -DGTK2HS_HS_PREPROC -include gtk2hs-config.h 
glib/System/Glib/GObject.chs.pp -o glib/System/Glib/GObject.chs
glib/System/Glib/GObject.chs.pp:38: error: missing expression between '(' and 
')'
glib/System/Glib/GObject.chs.pp:91: error: missing expression between '(' and 
')'
make: *** [glib/System/Glib/GObject.chs] Error 1

--
gwern

signature.asc
Description: OpenPGP digital signature
gw...@craft:40742~/gtk2hs-0.10.0>./configure && make [ 9:39AM]
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... none
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for ar... /usr/bin/ar
checking for ld... /usr/bin/ld
checking for basename... /usr/bin/basename
checking for grep that handles long lines and -e... /bin/grep
checking for gzip... /bin/gzip
ch

Re: [Haskell-cafe] Can this be done?

2009-02-11 Thread Cristiano Paris
On Wed, Feb 11, 2009 at 2:53 PM, Sebastian Sylvan
 wrote:

> I think that would be difficult. You could probably store the continuation
> in a server-side cache if you aren't doing CGI but have a persistent server
> process, but eventually you'll need to discard unused continuations to avoid
> running out of memory. You may be able to use a WASH style continuation
> model in conjunction with this. So you store the session logs on disk, and
> if the continuation does not exist in memory you'd fetch the session log
> from disk, replay the whole session from that, and reproduce the
> continuation that way. That way most sessions would just work directly off
> of the cache and never touch disk, but if someone waits too long (or, say,
> bookmarks a page in the middle of the session!) there's still a fallback
> stored on disk.

I thought about something like that. In this regards, I narrowed the
problem to a computation's internal binding to symbol names. With this
respect, a point-free approach, like the one found in the factor
language, would be simpler to handle as you'd have to serialize the
state of stacks and those of any other monads used.

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


Re[2]: [Haskell-cafe] Re: [Haskell] Google Summer of Code 2009

2009-02-11 Thread Jamie

Hi Bulat,

On Wed, 11 Feb 2009, Bulat Ziganshin wrote:


Hello Jamie,

Wednesday, February 11, 2009, 5:54:09 AM, you wrote:


Seems like it is ok to write H.264 in Haskell and released via GPL
license?


anyway it's impossible due to slow code generated by ghc


I see, I guess I'll have to stuck with C version of H.264 in my Haskell 
programs.  Maybe in future when ghc have better optimizations.


At least one can write various subset of H.323 standard in Haskell as the 
only part of H.323 subset that is CPU intensive is video/audio codecs, the 
rest is just mainly network I/O code.  http://www.h323plus.org/standards/



Best regards,
Bulatmailto:bulat.zigans...@gmail.com


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


Re: [Haskell-cafe] Can this be done?

2009-02-11 Thread Sebastian Sylvan
On Wed, Feb 11, 2009 at 1:41 PM, Cristiano Paris
wrote:

> On Wed, Feb 11, 2009 at 2:30 PM, Peter Verswyvelen 
> wrote:
> > I haven't looked at the details, but I think this is what a library like
> > Reactive from Conal Elliott could do, but as far as I understand it, it
> is
> > still work in progress.
>
> I'm interested in the possibility of
> stopping/pickling/unpickling/resuming a computation.
>

I think that would be difficult. You could probably store the continuation
in a server-side cache if you aren't doing CGI but have a persistent server
process, but eventually you'll need to discard unused continuations to avoid
running out of memory. You may be able to use a WASH style continuation
model in conjunction with this. So you store the session logs on disk, and
if the continuation does not exist in memory you'd fetch the session log
from disk, replay the whole session from that, and reproduce the
continuation that way. That way most sessions would just work directly off
of the cache and never touch disk, but if someone waits too long (or, say,
bookmarks a page in the middle of the session!) there's still a fallback
stored on disk.

-- 
Sebastian Sylvan
+44(0)7857-300802
UIN: 44640862
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Can this be done?

2009-02-11 Thread Evan Laforge
On Wed, Feb 11, 2009 at 9:34 PM, Alistair Bayley  wrote:
> 2009/2/11 Cristiano Paris :
>> I wonder whether this can be done in Haskell (see muleherd's comment):
>>
>> http://www.reddit.com/r/programming/comments/7wi7s/how_continuationbased_web_frameworks_work/
>
> WASH did/does something similar. You can certainly write applications
> in a similar, workflow-ish style (rather than like a state machine).

To hijack the subject, what happened to WASH?  The paper seemed like
it was full of interesting ideas, but the implementation seems to have
failed to capture many hearts.  Now it seems like a stagnant project.
What were the fatal flaws?

[ paris ]
> I'm interested in the possibility of
> stopping/pickling/unpickling/resuming a computation.

>From what I recall, WASH stores the continuation in the URL, at least
if you turn on that setting...
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Can this be done?

2009-02-11 Thread Cristiano Paris
On Wed, Feb 11, 2009 at 2:30 PM, Peter Verswyvelen  wrote:
> I haven't looked at the details, but I think this is what a library like
> Reactive from Conal Elliott could do, but as far as I understand it, it is
> still work in progress.

I'm interested in the possibility of
stopping/pickling/unpickling/resuming a computation.

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


Re: [Haskell-cafe] Can this be done?

2009-02-11 Thread Alistair Bayley
2009/2/11 Cristiano Paris :
> I wonder whether this can be done in Haskell (see muleherd's comment):
>
> http://www.reddit.com/r/programming/comments/7wi7s/how_continuationbased_web_frameworks_work/

WASH did/does something similar. You can certainly write applications
in a similar, workflow-ish style (rather than like a state machine).

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


Re: [Haskell-cafe] Can this be done?

2009-02-11 Thread Peter Verswyvelen
I haven't looked at the details, but I think this is what a library like
Reactive from Conal Elliott could do, but as far as I understand it, it is
still work in progress.

On Wed, Feb 11, 2009 at 2:22 PM, Cristiano Paris
wrote:

> I wonder whether this can be done in Haskell (see muleherd's comment):
>
>
> http://www.reddit.com/r/programming/comments/7wi7s/how_continuationbased_web_frameworks_work/
>
> Cristiano
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Can this be done?

2009-02-11 Thread Cristiano Paris
I wonder whether this can be done in Haskell (see muleherd's comment):

http://www.reddit.com/r/programming/comments/7wi7s/how_continuationbased_web_frameworks_work/

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


[Haskell-cafe] Re: [Gtk2hs-users] Gtk2HS 0.10.0 Released

2009-02-11 Thread Peter Verswyvelen
Nice. The demos are now included only in the source distri right?
On Wed, Feb 11, 2009 at 1:40 PM, Axel Simon  wrote:

> On Wed, 2009-02-11 at 13:36 +0100, Peter Verswyvelen wrote:
> > Great job! I have been using the RC1 version for a while and it works
> > well.
> >
> >
> > - Full switch to the new model-view implementation using a Haskell
> > model
> >
> >
> > This is very interesting. Do demos exist to show this?
> >
>
> Yes, all the demos under demo/treeList have been converted to use the
> new ModelView (the directory name is stale, it should probably be
> renamed to modelView since TreeList was the old interface).
>
> There's also a combo box demo in demo/menu.
>
> Cheers,
> Axel.
>
> > On Wed, Feb 11, 2009 at 5:32 AM, Peter Gavin  wrote:
> > Hi everyone,
> >
> > I'd like to release the announcement of Gtk2HS 0.10.0.  A lot
> > of new
> > stuff has gone into this release, including:
> >
> > - Support for GHC 6.10
> > - Bindings to GIO and GtkSourceView-2.0
> > - Full switch to the new model-view implementation using a
> > Haskell model
> > - Support for many more model-based widgets such as IconView
> > and an
> > updated binding for ComboBox
> > - Full Drag-and-Drop support
> > - Better support for Attributes in Pango
> > - Replaced Event for EventM monad, thereby improving
> > efficiency and
> > convenience
> > - Functions for interaction between Cairo and Pixbuf drawing
> > - Lots of bug fixes, code cleanups, and portability
> > improvements
> >
> > With this release, the bindings to GnomeVFS and
> > GtkSourceView-1.0 have
> > been deprecated.  The TreeList modules have been deprecated
> > from the
> > Gtk+ bindings.
> >
> > Source and Win32 binaries are available at:
> >
> >
> >
> https://sourceforge.net/project/showfiles.php?group_id=49207&package_id=42440&release_id=659598
> >
> > Thanks to everyone who submitted bug fixes and features this
> > time around!
> >
> > Thanks,
> > Peter Gavin
> > Gtk2HS Release Manager
> >
> >
> >
> --
> > Create and Deploy Rich Internet Apps outside the browser with
> > Adobe(R)AIR(TM)
> > software. With Adobe AIR, Ajax developers can use existing
> > skills and code to
> > build responsive, highly engaging applications that combine
> > the power of local
> > resources and data with the reach of the web. Download the
> > Adobe AIR SDK and
> > Ajax docs to start building applications
> > today-http://p.sf.net/sfu/adobe-com
> > ___
> > Gtk2hs-users mailing list
> > gtk2hs-us...@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gtk2hs-users
> >
> >
> >
> --
> > Create and Deploy Rich Internet Apps outside the browser with
> Adobe(R)AIR(TM)
> > software. With Adobe AIR, Ajax developers can use existing skills and
> code to
> > build responsive, highly engaging applications that combine the power of
> local
> > resources and data with the reach of the web. Download the Adobe AIR SDK
> and
> > Ajax docs to start building applications today-
> http://p.sf.net/sfu/adobe-com
> > ___ Gtk2hs-users mailing list
> gtk2hs-us...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gtk2hs-users
>
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haddock Markup

2009-02-11 Thread Wolfgang Jeltsch
Am Mittwoch, 11. Februar 2009 00:46 schrieben Sie:
> I suppose I should point out what seems obvious to me, which is that one
> could embed a substantial chunk of MathML (possibly all of it) in TeX. I
> mean, give it a TeX-parseable syntax. 

You can convert MathML into TeX but not the other way round. How would you 
translate $a \odot b \otimes c$? It depends on the precedence of the 
operators.

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


[Haskell-cafe] Re: [Gtk2hs-users] Gtk2HS 0.10.0 Released

2009-02-11 Thread Peter Verswyvelen
Great job! I have been using the RC1 version for a while and it works well.

- Full switch to the new model-view implementation using a Haskell model
This is very interesting. Do demos exist to show this?

On Wed, Feb 11, 2009 at 5:32 AM, Peter Gavin  wrote:

> Hi everyone,
>
> I'd like to release the announcement of Gtk2HS 0.10.0.  A lot of new
> stuff has gone into this release, including:
>
> - Support for GHC 6.10
> - Bindings to GIO and GtkSourceView-2.0
> - Full switch to the new model-view implementation using a Haskell model
> - Support for many more model-based widgets such as IconView and an
> updated binding for ComboBox
> - Full Drag-and-Drop support
> - Better support for Attributes in Pango
> - Replaced Event for EventM monad, thereby improving efficiency and
> convenience
> - Functions for interaction between Cairo and Pixbuf drawing
> - Lots of bug fixes, code cleanups, and portability improvements
>
> With this release, the bindings to GnomeVFS and GtkSourceView-1.0 have
> been deprecated.  The TreeList modules have been deprecated from the
> Gtk+ bindings.
>
> Source and Win32 binaries are available at:
>
>
>
> https://sourceforge.net/project/showfiles.php?group_id=49207&package_id=42440&release_id=659598
>
> Thanks to everyone who submitted bug fixes and features this time around!
>
> Thanks,
> Peter Gavin
> Gtk2HS Release Manager
>
>
>
> --
> Create and Deploy Rich Internet Apps outside the browser with
> Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code
> to
> build responsive, highly engaging applications that combine the power of
> local
> resources and data with the reach of the web. Download the Adobe AIR SDK
> and
> Ajax docs to start building applications today-
> http://p.sf.net/sfu/adobe-com
> ___
> Gtk2hs-users mailing list
> gtk2hs-us...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gtk2hs-users
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] ANN: Data.Stream 0.3

2009-02-11 Thread Wouter Swierstra
I've released a new version of the Data.Stream package, a modest  
library for manipulating infinite lists.


Changes include:

 * Support for lazy SmallCheck;
 * Improved Show instance;
 * Stricter scans;
 * Various documentation fixes;
 * Several new functions from Data.List.

Many of these features were based on patches by Bas van Dijk - thank  
you Bas!


Haddock:http://www.cs.nott.ac.uk/~wss/repos/Stream/dist/doc/html/Stream/
Hackage:http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Stream/
darcs:  darcs get http://www.cs.nott.ac.uk/~wss/repos/Stream

All the best,

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


[Haskell-cafe] Re: Gtk2HS 0.10.0 Released

2009-02-11 Thread Christian Maeder
Peter Gavin wrote:
>  
> https://sourceforge.net/project/showfiles.php?group_id=49207package_id=42440&release_id=659598

Maybe you could update your central page http://www.haskell.org/gtk2hs/
at least with a link to a new central page. You also did not care much
about bug tracking via http://hackage.haskell.org/trac/gtk2hs/. Isn't
this the recommend way to report bugs any longer?

Cheers Christian

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


Re: [Haskell-cafe] Changing version numbering schemes for HackageDB packages?

2009-02-11 Thread Duncan Coutts
On Tue, 2009-02-10 at 10:21 -0800, Corey O'Connor wrote:
> I released a new version of data-spacepart that resolved some of the
> issues with the previous release. One issue I had was the previous
> release used the version numbering scheme I use at work:
> [date].[release] Which does not appear to work as well as the
> traditional X.Y.Z release numbering scheme with Cabal.

I'm not sure I understand. Is there something in Cabal or Hackage that
makes date-based numbering schemes not work well?

> As part of the new release I changed the version numbering scheme. An
> *obviously* bad idea if I thought it through. Any [date].[release]
> style version number is greater than a X.Y.Z version number until X
> gets rather large.
> 
> So what to do? Continue using the [date].[release] version numbering
> scheme? Or is there a way to coax HackageDB to ignore the old release?

Yeah, there's not a lot you can do except make the number higher. The
problem is not just hackage, it's all the previous releases in the wild.
All the tools assume the normal ordering on version numbers. Not just
the Cabal/Hackage tools but the native distro tools too.

People have suggested "epochs", but it turns out this doesn't make the
situation any better, as one can never get rid of having to specify the
epoch (eg 1:0.1.1).

Duncan

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


Re: [Haskell-cafe] Re: [Haskell] Google Summer of Code 2009

2009-02-11 Thread David Waern
2009/2/11 Gwern Branwen :
> [^complaints]: I can hear the wankers in the peanut gallery - "Yeah,
> and it's been buggy ever since!" Hush you.

Those (aforementioned) people should keep in mind we tried to keep the
scope of the project down to just making the new Haddock support the
features of the old Haddock (no type inference, docs for GHC
extensions, etc). Most of the bugs concerning the pre-GHC subset of
Haddock have now been fixed (although there are a few left).

Most other problems we're currently seeing is with GHC extensions,
like for instance Template Haskell.You should not blame the SoC
project so much for this (although it could have handled extensions
more gracefully).

The project was also run in a time when the GHC API was not so evolved
and had a bug or two.

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


Re: [Haskell-cafe] evaluation semantics of bind

2009-02-11 Thread Alberto G. Corona
Yes,  Just must be executed because by the very definition of bind for the
Maybe mondad,

 (>>=) Nothing f = Nothing
 (>>=) (Just x) f = f x

He need to know if the value injected is Just or   Nothing, but anyway, my
point is : it is just plain lazy functional code!. No magic inside.
everything depend on the definition of bind.


2009/2/11 wren ng thornton 
>
> Alberto G. Corona wrote:
>>
>> forwarded:
>>
>> Yes!  if no state is passed, the optimization makes sense and the term is
>> not executed, like any lazy evaluation. For example, I used the debugger
>> (that is, without optimizations) to verify it with the Maybe monad:
>> op x= x+x
>>
>> print $ Just (op 1) >>= \y-> return (Just 2)
>>
>> does not evaluate  op 1
>
> Presumably you mean?: print $ Just (op 1) >>= \y-> return 2
>
>
>> but
>>
>> print $ Just (op 1) >>= \y-> return y
>>
>> does execute it.
>
>
> Dashing off towards the White Knight, we should be careful what is said
here. If we take only the expression "Just (op 1) >>= \y-> return y" then
evaluating it yields "Just (op 1)". That is, it only evaluates to WHNF and
does not evaluate what's inside. It is only once this value is subsequently
handed off to print or some other function, that it may become evaluated.
>
> Similarly with the first example as originally written. It so happens that
bind is non-strict for the field in Just, so we can discard the "op 1".
However, according to the semantics we do not evaluate "Just 2" either; we
only need to evaluate the return which will produce Just and pass the
operand down. (Regardless of the fact that the value yielded by applying
Just to 2 is Just 2. Expressions and their denotations are different.)
>
> --
> Live well,
> ~wren
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Haskell.org GSoC

2009-02-11 Thread Daniel Kraft

Hi,

I noticed last year Haskell.org was a mentoring organization for 
Google's Summer of Code, and I barely noticed some discussion about it 
applying again this year :)


I participated for GCC in 2008 and would like to try again this year; 
while I'm still active for GCC and will surely stay so, I'd like to see 
something new at least for GSoC.  And Haskell.org would surely be a 
very, very nice organization.


Since I discovered there's more than just a lot of imperative languages 
that are nearly all the same, I love to do some programming in Prolog, 
Scheme and of course Haskell.  However, so far this was only some toy 
programs and nothing "really useful"; I'd like to change this (as well 
as learning more about Haskell during the projects).


Here are some ideas for developing Haskell packages (that would 
hopefully be of general use to the community) as possible projects:


- Numerics, like basic linear algebra routines, numeric integration and 
other basic algorithms of numeric mathematics.


- A basic symbolic maths package; I've no idea how far one could do this 
as a single GSoC project, but it would surely be a very interesting 
task.  Alternatively or in combination, one could try to use an existing 
free CAS package as engine.


- Graphs.

- Some simulation routines from physics, though I've not really an idea 
what exactly one should implement here best.


- A logic programming framework.  I know there's something like that for 
Scheme; in my experience, there are some problems best expressed 
logically with Prolog-style backtracking/predicates and unification. 
This could help use such formulations from inside a Haskell program. 
This is surely also a very interesting project.


What do you think about these ideas?  I'm pretty sure there are already 
some of those implemented, but I also hope some would be new and really 
of some use to the community.  Do you think something would be 
especially nice to have and is currently missing?


Thanks for your comments,
Daniel

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


Re[2]: [Haskell-cafe] Re: [Haskell] Google Summer of Code 2009

2009-02-11 Thread Bulat Ziganshin
Hello Jamie,

Wednesday, February 11, 2009, 5:54:09 AM, you wrote:

> Seems like it is ok to write H.264 in Haskell and released via GPL
> license?

anyway it's impossible due to slow code generated by ghc


-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

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


Re: [Haskell-cafe] Why does sleep not work?

2009-02-11 Thread George Pollard
On Wed, 2009-02-11 at 01:50 +0100, Manlio Perillo wrote:
> George Pollard ha scritto:
> > [...]
> >
> >> So, it seems nanosleep get interruped by a signal.
> > 
> > This works:
> > 
> >> import System.Posix
> >>
> >> main = do
> >>putStrLn "Waiting for 5 seconds."
> >>blockSignals $ addSignal sigVTALRM emptySignalSet
> >>sleep 5
> >>putStrLn "Done."
> >>
> > So (see my earlier email) `sleep` is lying about what interrupts it :)
> > 
> > - George
> 
> 
> A possibly better solution is:
> 
> sleep' :: Int -> IO Int
> sleep' n = do
>n' <- sleep n
>if n' == 0 then return 0 else sleep' n'
> 
> 
>  From the trace, I see that nanosleep is being called 17 times here.
> 
> Another solution is to set RTS flag:
> ./bug_sleep +RTS -V0 -RTS
> 
> 
> What strange is that the timer is created in non threaded RTS, too, but 
> sleep is interrupted only with the threaded RTS.
> 
> This may be caused by an "incorrect" execution of a foreign function 
> marked safe.

I just realized that  for some reason I thought that `sleep` reported
the signal that interrupted it... contrary to the documentation... as
such, several of my replies to this thread may read as non-sequiturs :P


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