Re: [Haskell-cafe] hs-plugins and memory leaks

2010-10-20 Thread Don Stewart
qdunkan:
> However, there are some questions I've had about it for a long time.
> The 'yi' paper mentions both 'yi' and 'lambdabot' as users of
> hs-plugins.  However, both those projects have long since abandoned
> it.  I can't find any documentation on why, or even any documentation
> at all for Yi wrt its dynamic code execution system, but from looking
> at the source it looks like it uses hint for dynamic code execution
> and dyre for configuration.  Dyre in turn uses serialization to pass
> the old state to the reconfigured app.  So we have retreated from the
> idea of hotswapping the application state.

Once active development of hs-plugins stopped, along with the
portability issues, it behooved projects like e.g. xmonad or yi, to aim
for simpler reconfiguration strategies, other than native code hot
loading.

> I can think of one possible reason, and that's a memory leak.  In
> ghc/rts/Linker.c:unloadObj there's a commented out line '//
> stgFree(oc->image);'.  In a test program I wrote that behaves like
> 'plugs', every executed line increases the size of the program by
> 12-16k.  I have to remove the resolveObjs call from plugs for it to
> work, but once I do it displays the same leak.
  
> So my questions are:
> 
> Why did lambdabot and yi abandon plugins?

Because it was unmaintained for around 5 years, and was fundamentally
less portable than simpler state serialization solutions that offered
some of the same benefits as full code hot swapping.

> Is unloadObj a guaranteed memory leak?  As far as I can tell, it's
> never called within ghc itself.  If the choices are between a memory
> leak no matter how you use it and dangerous but correct if you use it
> right, shouldn't we at least have the latter available as an option?
> E.g. a reallyUnloadObj function that also frees the image.

GHC never unloads object code, so yes, it will "leak" old code.

> Long shot, but are there any more principled ways to guarantee no
> pointers to a chunk of code exist?  The only thing I can think of is
> to have the state be totally strict and consist only of types from the
> static core.  Would it be possible to hand responsibility for the
> memory off to the garbage collector?

It's really hard.
  
-- Don
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] A rant against the blurb on the Haskell front page

2010-10-15 Thread Don Stewart
Great! It's a Friday. Why not step in.

Just some context, since the current blurb was born from a critique at
CUFP 2007, prior to which the Haskell blurb was:

"Haskell is a general purpose, purely functional programming
language. Haskell compilers are freely available for almost any
computer."

while python.org said:

"Python is a programming language that lets you work more quickly
and integrate your systems more effectively. You can learn to use
Python and see almost immediate gains in productivity and lower
maintenance costs."

We tried to meet them mid-way, while emphasizing why you'd even consider 
Haskell.

ben.franksen:
> This is a critique of the current 'Haskell Blurb', the first paragraph on
> www.haskell.org.
> 
> This blurb should, IMO, give a concise description of what Haskell, the
> programming language, is, what makes it different from other languages, 
and
> why I should be interested in it.

Agreed!

> What it does, instead, is to make me scratch my head and ask myself: what
> marketing idiot has written this inclonclusive mumble-jumble of 
buzz-words?
> 
> Let me explain.
> 
> "Haskell is an advanced purely functional programming language."
> 
> Good start, if only the "advanced" were replaced with something more
> characteristic, like "lazy", or "statically typed". Which, BTW, both do 
not

"lazy" and "statically typed" don't mean much to other people. They are
buzz words that mean nothing to many people.

> appear in the whole blurb, even though they are *the* characteristics of
> Haskell, lazyness being even something that sets it apart from most other
> languages. I hear the marketeers crying "but the average visitor has no
> idea what lazyness means". So what? Give them a link to the wiki with an
> explanation. So, a better introductory sentence would be
> 
> -> "Haskell is a lazily evaluated, purely functional programming language
> with a very flexible and powerful static type system."

What are the benefits of laziness?

> Next sentence:
> 
> "An open source product of more than twenty years of cutting edge 
research,
> it allows rapid development of robust, concise, correct software."

It is open source, and was born open source. It is the product of
research.

> This really gets me every time I read it. How can anyone write such a
> nonsense? Haskell is not an "open source product"! It is no product at 
all.
> That most (maybe all) implementations are opens source is certainly an
> interesting fact, but IMO not something that should appear at the top of
> the page right under the header "The Haskell Programming Language". The
> second and third sentences deliberately conflate language and
> implementation(s). This is a well known falacy and I am ashamed that it

As Python, Ruby, C and every other language do.

> appears on the front page of my favourite programming language. The blurb
> talks about "robust, concise, correct software", but misses itself most of
> these goals: it is imprecise, incorrect, and not robust (because
> implementations vary), and therefore not a good advertisement, though 
quite
> possibly "rapidly developed".
>
> The blurb promises "rapid development of robust, concise, correct 
software"
> lest one think this were something akin to Perl which certainly allows
> rapid development, yet typically neither robust nor correct, especially if
> done rapidly. So, how does Haskell differ from that? Well, I'd say this is
> where lazyness and a static yet flexible type system come into play. But
> no, I forgot, we don't want to explain anything or even be logical, dear
> reader, we want to pound slogans into your head!

I don't think these are useful contributions.

> That cutting edge research is done for Haskell as well as for its
> implementations is of course good to know, but just stating it is not
> nearly enough: such a statement must be corroberated with evidence,
> otherwise it is just idle marketing. (Not that there wouldn't be evidence
> amass, it's just that none is given.)

You literally want evidence that research played a part in Haskell, in
its opening statement? Why??

> On we go:
> 
> "With strong support for integration with other languages, built-in
> concurrency and parallelism, debuggers, profilers, rich libraries and an
> active community, Haskell makes it easier to produce flexible, 
maintainable
> high-quality software."
> 
> Let us take that apart:
> 
> (1) Fact: Haskell has a good and very easy to use FFI. To the C language. 
I
> have never heard of integration with any other langauge being directly
> supported.

It is OK to contest these, but consider the FFI of our competition:
Python, Ruby, Erlang. Woeful FFIs. You are not at risk using Haskell, as

Re: [Haskell-cafe] downloading GHC

2010-10-15 Thread Don Stewart
ketil:
> 
> I needed GHC on a new machine, and went to download a binary tarball.
> 
> First, I go to http://haskell.org/ghc/download_ghc_6_12_3.html,
> which kindly suggests to get the Haskell Platform instead.  
> 
> Then, at http://hackage.haskell.org/platform/linux.html, I'm told that I
> first need GHC, and pointed back to the GHC download page.
> 
> I'll manage, of course - but I think this is a bit more confusing than
> it need be.

Linux users don't have easy binary installers, usually. What can we do
about this bootstrapping problem?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Data.Judy

2010-10-12 Thread Don Stewart
tomdoris:
> Hi,
> Are there any plans to extent the current Data.Judy package to include 
> bindings
> to JudySL and JudyHS? There's a standalone binding to JudySL by Andrew Choi
> that is usable but it would of course be better to have the functionality in
> the Data.Judy package proper.
> Thanks
> Tom

Patches will be accepted! I'm not currently working on this though.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Notes from "Haskell takes over the world" BoF at ICFP

2010-10-06 Thread Don Stewart
Here  are the notes transcribed from the Future of Haskell BoF held
after the Haskell Symposium last week.

-- Don




= Future of Haskell BoF Notes =

A "birds of a feather" meeting was held at ICFP, organized by Bryan and
Johan. We had 30 (?) people in a room, for 2 hours, discussing how to
ensure Haskell succeeds.

These are the transcribed notes.

== Libraries ==

 * Need to encourage special interest groups (SIGs) to form around
   particular domain areas in the libraries. AI, BioInf, Networking,
   etc.

 * Document the SIG process: what resources they have, how you get
   results.

 * Missing SIGs for certain platforms: Mac, CentOS etc.

 * More tutorials on use of Haskell in particular domains.

 * Keen for Hackage 2.0 quality review tools: embedded wikis, voting

 * Hackage analysis tools: reverse indexing of the code base.
  
 * There is no PVP tool.

 * Library fragmentation occuring due to type duplication (String, Text, ...)

 * Focus on intitiatives for common, core types. HP polish. 

 * What is the "Son of Containers" going  to be?

 * Build reports would help the community a lot. Integrated with
   Hackage. Haddock pages on hackage should be editable wikis
   (per-top-level function, dvcs backed? record history, captchas. roll
   back spam, by default assume good contributions)

 * Need to register patches to packages with lost maintainers. 

 * Belgium Hackathon coming up.

 * Improve libraries process: esp. for small contributions.

 * Hackage maintainance:
+ maintainer timeout.
+ hackage package clobbering.
+ tweaks. hackage-local .cabal fixes.

 * Unclear what the rules for contributing are. Document them!

 * In particular, document how to contribute to:
* ghc
* cabal
* core and HP
* hackage 
* dockathon

== IDEs ==

 * A new ghci.
+ scriptable, scion-server?
+ repls on top of ghc-api
+ ruby repl
+ .ghci
+ documentation
+ hpaste/ghci.

 *  IDE
+ scion. contributions. market places.
+ documentation.
+ EclipseFP, scion?
+ NetBeans.

 * Special Interest Groups
+ as the vehicle for domain projects.
+ formal process for forming a group.
+ a small amount of structure for groups
+ document process for forming a strike team.

 * haskell.org
+ polishing the wiki.
+ wikibooks.
+ call for sig.

 * haskell visual design group?
+ consistent color themes across haskell.org sites.
+ consistent haskell branding.

 * community server mailing lists in poor state

 * Move community more online ? Community services.
+ google groups
+ digests.
+ reply at the right point in the threads.
+ serious lists.
+ ghc users. libraries.
+ announces.
+ stackoverflow for new questions?
+ keep refering to SO.
+ reddit for news?

== GHC ==

 * ghc status
+ 50% split in room on moving ghc from darcs to git.
+ bug reports and interaction load with ghc
+ well documented workflow for lightweight changes
+ heavy weight process for major work.
+ bugs, tickets.
+ Simon Marlow "contributions are going up, and process is working well"
 
 * Release schedule.
+ RC at ICFP.
+ GHC release page.
+ HP/GHC release.
+ stage releases. 
+ more clearly announced that ghc will be a beta prior to GHC HP.

 * HP, uses GHC installers as is. GHC zip.

== Teaching / tutorials ==

 * Tutorials. Documentation.
+ Writing a blog post that is wrong is a pretty good way to get 
feedback.
+ Find a forum to ask the question, so the answer is findable.
+ Ask on SO.
+ Clojure and Scala communities have active blog spheres.
+ they love descriptions of data structures
+ e.g. high fanout trees.
+ Aggregating the ephemera.
+ Archives: Haskell Reddit has all the interesting blog posts.
-- Haskell Wikibook.

 * Cabal and integration with other languages.
+ Easier integration with C.
+ Higher barrier to entry on the Mac.
+ Playing well with other languages?


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


Re: [Haskell-cafe] EDSL for Makefile

2010-10-01 Thread Don Stewart
Neil's 

* slides http://www.galois.com/~dons/talks/hiw-2010/ndm-shake.pdf
* video  http://www.vimeo.com/15465133

ckkashyap:
> Hi Neil ... how did the talk go?
> 
> On Thu, Sep 30, 2010 at 10:23 PM, Neil Mitchell  wrote:
> >>> What great timing! I will be giving a talk at the Haskell Implementors
> >>> Workshop tomorrow about the Make system Shake. It will be video taped
> >>> and I can send you the slides after I've given the talk. So wait a
> >>> day, and I'll give you all the answers.
> >>
> >> Will you publish the tool too? ;-)
> >
> > No :-( [or at least not yet]
> >
> > Wait for the talk, and I'll explain more.
> >
> > Thanks, Neil
> > ___
> > Haskell-Cafe mailing list
> > Haskell-Cafe@haskell.org
> > http://www.haskell.org/mailman/listinfo/haskell-cafe
> >
> 
> 
> 
> -- 
> Regards,
> Kashyap
> ___
> 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] The Haskell Implementors Workshop

2010-10-01 Thread Don Stewart

Slides and videos from today's Haskell Implementors Workshop, in
Baltimore.

http://haskell.org/haskellwiki/HaskellImplementorsWorkshop/2010#Programme

Enjoy.

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


Re: [Haskell-cafe] Haskell list on Twitter?

2010-10-01 Thread Don Stewart
I have a list:

http://twitter.com/#/list/donsbot/haskellers

pumpkingod:
> Also, it is possible to add yourself to your own twitter list :)
> 
> On Fri, Oct 1, 2010 at 12:03 PM, Magnus Therning  wrote:
> 
> Now that there are lists/groups on Twitter
> (http://mashable.com/2009/11/02/twitter-lists-guide/) maybe one should
> be created one for Haskellers?
> 
> I would do it, but it seems I can't be on my own list :-)  So unless
> I've missed something I'd have to create a dummy user just for this
> purpose.  Hence I'm asking first :-)
> 
> Cheers,
> M
> 
> --
> Magnus Therning                        (OpenPGP: 0xAB4DFBA4)
> magnus@therning.org          Jabber: magnus@therning.org
> http://therning.org/magnus         identi.ca|twitter: magthe
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
> 
> 

> ___
> 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 Platform, Hackage and Cabal : The 2nd Year : Status Report

2010-10-01 Thread Don Stewart
The Haskell Implementors Workshop was held in Baltimore, today.
Duncan Coutts from Well-Typed and I presented a status report on the
Haskell distribution infrastructure: Hackage , Haskell Platform and
Cabal.

The slides are here:


http://donsbot.wordpress.com/2010/10/01/hackage-cabal-and-the-haskell-platform-the-second-year/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Retargeting Haskell compiler to embedded/hardware

2010-09-28 Thread Don Stewart
tomahawkins:
> A few years ago I attempted to build a Haskell hardware compiler
> (Haskell -> Verilog) based on the Yhc frontent.  At the time I was
> trying to overcome several problems [1] with implementing a hardware
> description language as a light eDSL, which convinced me a proper
> compiler may be a better approach.  Yhc was recommended as a good
> starting point since it had a simpler IR compared with GHC -- at least
> at the time.
> 
> I am considering restarting this effort, but this time to target hard
> realtime embedded code.  What is the recommended compiler to start
> from?  I need an IR that is post type checking with as much desugaring
> as possible, and a code base that is relatively easy to splice and
> build.
> 
> My other requirement is not to be bound to IO () for 'main'.  The top
> level will be a monad, but with different semantics than IO.  I would
> also like to reuse the standard library, with exception to the values
> related to IO.
> 
> What are my options?


Have you looked at Clash, the GHC to VHDL compiler?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANNOUNCE: plugins 1.5.1. a framework for dynamic extension of Haskell programs

2010-09-22 Thread Don Stewart
No, xmonad uses a different dynamic extension model based on the OS
process. To dynamically upgrade an xmonad process, you,

 * modify the source (i.e. the config file)
 * hit mod-q, which triggers:

 + linking of the config file into the application library, creating
   a new xmonad binary on disk.

 + the application state is serialized to a string representation

 + the new xmonad is then (double) forked with the old state as
   input

  * the new version of the app is running with the state of the old app.

You can do similar things at a finer grain of control via plugins.

dstcruz:
> Most awesome!
> 
> Does xmonad make use of this library?
> 
> Daniel

> ___
> 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] ANNOUNCE: plugins 1.5.1. a framework for dynamic extension of Haskell programs

2010-09-22 Thread Don Stewart
I'm pleased to announce the release 1.5.1 of the Haskell "plugins" library,

$ cabal install plugins

The "plugins" library provides a comprehensive API for:

* dynamic loading and linking native Haskell modules
* runtime compilation and meta-programming in Haskell
* runtime hotswapping of Haskell code

In short, it provides a framework for dynamic extension of Haskell
programs [1].

This release is due to great work by Manuel Chakravarty, who cleaned up
much of the code and helped migrate it from GHC 6.8 to 6.12.

-- Don


1.  The approach to dynamic extension developed in the library is described in:

  * Plugging Haskell In. André Pang, Don Stewart, Sean Seefried, and
Manuel M. T. Chakravarty. In Proceedings of the ACM SIGPLAN Workshop
on Haskell, pages 10-21. ACM Press, 2004

  * Dynamic Applications From the Ground Up. Don Stewart and Manuel M.
T. Chakravarty. In Proceedings of the ACM SIGPLAN Workshop on
Haskell, pages 27-38. ACM Press, 2005

  * Dynamic Extension of Typed Functional Languages, Don Stewart.
University of New South Wales, Sydney, Australia. 2010

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


Re: [Haskell-cafe] Web development work

2010-09-16 Thread Don Stewart
michael:
> On Thu, Sep 16, 2010 at 10:26 AM, Andrew Coppin
>  wrote:
> >  On 16/09/2010 08:52 AM, Michael Snoyman wrote:
> >>
> >> future it would be beneficial to the community to have this
> >> information centralized on a website. I think it would be useful to
> >> have some basic skills and experience information, including system
> >> administration abilities.
> >
> > [..]
> >
> > (And yes, given the frequency with which this gets asked, we should probably
> > write this info down somewhere!)
> >
> 
> OK, I'll bite on this one. I just registered the domain name
> haskellers.com (I was surprised it was available). So let me ask the
> community what information they would want out there. Here's the ideas
> I had:
> 
> * Users can create their own profiles. Profiles have the following 
> information:
> * Basic name, contact, website, photo, etc.
> * Brief bio
> * Skills. We'll probably have a list of skills to choose from.
> * Notable projects worked on, with strong focus on Hackage packages.
> * Some kind of "web of trust" feature, where users can confirm that
> someone else's profile is accurate. Open to suggestions on this.
> * A public message board for posting job information. I think this
> would not require login to post, but we would have spam protection
> (recaptcha).
> 
> And then of course the basic what is Haskell, links to haskell.org,
> etc. I'll probably be able to get started on this early next week.
> 

Does http://cufp.org/jobs solve the same problem? user profiles/job
listings etc.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Fwd: Announcement: Pearls of Functional Algorithm Design

2010-09-11 Thread Don Stewart
- Forwarded message from Richard  -

To: hask...@haskell.org
Subject: [Haskell] Announcement

My book "Pearls of Functional Algorithm Design" will
be published by CUP this month. See

 http://www.comlab.ox.ac.uk/news/237-full.html

Richard Bird

- End forwarded message -




For those not familiar with the functional pearl series, I list some of
Richard Bird's here. 


http://www.reddit.com/r/programming/comments/dcimd/prof_richard_birds_pearls_of_functional_algorithm/c0z67l8

The essence of elegant functional programming.

-- Don


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


Re: [Haskell-cafe] CAL experience

2010-09-09 Thread Don Stewart
karel.gardas:
> Hello,
> 
> as this is really friendly forum, I'd like to ask to perhaps solve my
> wonder. From time to time I'm seeing people here recommending Scala as a
> kind of replacement for non-existent Haskell on Java/JVM platform. My
> wonder is: why the people here do not recommend CAL, which at least to
> me, looks much more closer to Haskell than Scala is. Are there any bad
> experiences with this language and OpenQuark platform? I'm asking since
> I'm currently playing with it and plan to use it for java objects data
> processing.

Since Business Objects was aquired by SAP, development has slowed. 

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


Re: [Haskell-cafe] installing GHC/Haskell Platform in Linux without root permission

2010-09-09 Thread Don Stewart
ali.razavi:
> Is it possible to install either of these (preferably the latter) somewhere in
> my home directory without having root permission? I tried the unknown linux
> package with configure --prefix set to a subdir in my home, to no avail. The
> problem seems to be due to some library registration which fails.

Assuming you have GHC installed, the Haskell Platform Linux generic
source installer will install without root privledges.

If that doesn't work for you, file a bug with a log of what failed on
the HP bug tracker.

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


Re: [Haskell-cafe] Hackage package download count

2010-09-09 Thread Don Stewart
tonyhannan2:
> Is there anywhere we can see the number of download for a particular package,
> especially ones you maintain yourself?

Nothing terribly automated, but the status for the last quarter:


http://donsbot.wordpress.com/2010/06/30/popular-haskell-packages-q2-2010-report/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] help me evangelize haskell.

2010-09-07 Thread Don Stewart
That's a separate module, based on System.Process -- 

http://code.haskell.org/~dons/code/cpuperf/Process.hs

ckkashyap:
> Hi Dan,
> This presentation is really nice.
> I went over it a couple of times and I think this ppt will help me try
> to use Haskell for things that I usually use Perl for :)
> 
> A quick question - import Process bombs on my GHCI(The Glorious
> Glasgow Haskell Compilation System, version 6.12.3) -what do I need to
> do for that?
> 
> 
> On Sun, Sep 5, 2010 at 11:12 PM, Don Stewart  wrote:
> > Gaius:
> >> My usual rhetoric is that one-off, throwaway scripts never are, and
> >> not only do they tend to stay around but they take on a life of their
> >> own. Today's 10-line file munger is tomorrow's thousand-line ETL batch
> >> job on which the business depends for some crucial data - yet the
> >> original author is long gone and no-one dares modify in case it
> >> breaks. So it is just good sense to use sound practices from the very
> >> beginning.
> >
> > I gave a tech talk recently on using Haskell for scripting -- and it is
> > built on the idea that today's throw away script is tomorrow's key piece
> > of infrastructure -- so you better get the maintainance and safety story
> > right:
> >
> >    http://donsbot.wordpress.com/2010/08/17/practical-haskell/
> > ___
> > Haskell-Cafe mailing list
> > Haskell-Cafe@haskell.org
> > http://www.haskell.org/mailman/listinfo/haskell-cafe
> >
> 
> 
> 
> -- 
> Regards,
> Kashyap
> 
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Paralelism and Distribution in Haskell

2010-09-06 Thread Don Stewart
waldmann:
> > > functional/declarative code "automatically" parallelizes, 
> 
> > Well, that's not really a good thing to say.
> 
> Sure, sure, and I expand on the details in my lectures.
> 
> But in advertising (the elevator sales pitch), we simplify.
> Cf. "well-typed programs don't go wrong". 
> 

Good! I think we could all agree on a slogan based on the point that
Haskell approaches take parallelism from difficult tasks to easy tasks.

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


Re: [Haskell-cafe] Re: Paralelism and Distribution in Haskell

2010-09-06 Thread Don Stewart
waldmann:
> Don Stewart  galois.com> writes:
> 
> > Note that DPH is a programming model, but the implementation currently
> > targets shared memory multicores (and to some extent GPUs), not
> > distributed systems.
> 
> Yes. I understand that's only part of what the original poster wanted,
> but I'd sure want to use ghc-generated code on a (non-distributed) GPU.
> 
> I keep telling students and colleagues that functional/declarative code
> "automatically" parallelizes, with basically "no extra effort" 
> from the programmer (because it's all in the compiler) - but I would
> feel better with some real code and benchmarks to back that up.

Well, that's not really a good thing to say. Some subsets of Haskell
automatically parallelize (like the array combinator libraries), others
require simple annotations (like parallel strategies). Others are more
explicit, like concurrent collections. There are many programming
models, with varying degrees of power/usability.

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


Re: [Haskell-cafe] Re: Paralelism and Distribution in Haskell

2010-09-06 Thread Don Stewart
waldmann:
> http://book.realworldhaskell.org/read/concurrent-and-multicore-programming.html
> 
> http://www.haskell.org/haskellwiki/GHC/Data_Parallel_Haskell
> Although the last two edits on that page are from 2010 and 2009.
> So what *is* the current status of DPH?
> 

Note that DPH is a programming model, but the implementation currently
targets shared memory multicores (and to some extent GPUs), not
distributed systems.

Since GHC 6.10 DPH was in "technology preview" mode (alpha), since 6.12
it is more stable, and more reliable, though significant work is still
happening with the vectorizer in GHC HEAD (so expect even more
reliable performance in GHC 6.14)

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


Re: [Haskell-cafe] Paralelism and Distribution in Haskell

2010-09-06 Thread Don Stewart
ivansichfreitas:
> Hi fellow haskellers,
> 
> I'm interested in the performance of parallel and/or distributed
> implementations in haskell language. For example, supose I want to
> develop an application that distributes a computation between many
> multicore computers, what are the advantages I can take from haskell
> in that?
> Anyone who has experience doing distributed computing with haskell,
> and could point some diferences between haskell and other languages?
> 
> Any feedback is very much apreciated. Thanks.

The primary work in this area has been GUM/GPH and GDH, these days being
led from St Andrews, http://www-fp.cs.st-andrews.ac.uk/wordpress/

 * GUM, a parallel execution layer to allow GHC 'par' strategies and
friends to run transparently across nodes, on top of an underlying
message passing layer.

 http://www.macs.hw.ac.uk/~dsg/gph/

GHC implements the same abstractions for shared memory multicores.

 * Glasgow Distributed Haskell, an extension of the Parallel Haskell
   language to support distribution and fault tolerance,

http://www.macs.hw.ac.uk/~dsg/gdh/

These systems run on a fork of GHC's runtime. Recent work is underway to
merge some of the facilities back into mainline GHC.

http://hackage.haskell.org/trac/ghc/wiki/HackPar

There is also the Eden project, which I think is another implementation
of a parallel Haskell model, with features to support distribution.

The key players to talk to are Kevin Hammond, Jost Berthold,
Hans-Wolfgang Loidl, Philip Trinder et al.

Besides "traditional" language research projects, there are also various
open source libraries on Hackage to support distributed computation in
Haskell to some degree or another. For example:

A framework for distributed STM, 
http://hackage.haskell.org/package/DSTM

Holumbus-Distribution, distributed data structures like Chan, MVar or 
functions
http://hackage.haskell.org/package/Holumbus-Distribution

Holumbus map-reduce skeleton
http://hackage.haskell.org/package/Holumbus-MapReduce

net-concurrent is a simple haskell library for doing parallel
computation on several computers using the network 
http://hackage.haskell.org/package/net-concurrent

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


Re: [Haskell-cafe] Graphics.Drawing

2010-09-06 Thread Don Stewart
creswick:
> On Mon, Sep 6, 2010 at 5:29 AM, Ivan Lazar Miljenovic
>  wrote:
> > On 6 September 2010 21:57, han  wrote:
> >> So the question is: Do you agree that "Graphics.Rendering.OpenGL" actually
> >> should have been "Graphics.OpenGL" (or just OpenGL) for wieldiness?
> >
> > I think Graphics.OpenGL would have sufficed, unless there was
> > sufficient reason to want to group it with other rendering-specific
> > modules.
> 
> I'm relatively new to the Haskell community, and one thing that's
> bugged me a bit is that there doesn't seem to be a convention (aside
> from common sense) for segmenting the module namespace as there is
> with Java (my other primary language).
  
> Anyway, I'm curious how module namespace collisions/pollution will be
> handled in Haskell over the next 5-10 years.  Package hiding works in
> some cases, but it seems like that will fail if you ever need to use
> capabilities from packages that conflict within the same project.

Well, we have a single global namespace for some 30k modules on Hackage.
People are encouraged to partition their packages via top level names,
such as Control.* or System.*

An tree structure that is roughly followed,

http://haskell.org/haskellwiki/Hierarchical_module_names

However, when this was planned, I don't think we expected to go from 100
modules to 30k modules in 4 years, and there's been little work on
thinking about how to structure the module system at this scale, other
than work on explicit package naming and versioning.

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


Re: [Haskell-cafe] How to catch exception within the Get monad (theBinary package)

2010-09-05 Thread Don Stewart
donn:
> Quoth Dimitry Golubovsky ,
> 
> > Is there any way to catch/detect failures inside the Get monad? It is
> > not an instance of MonadError, so catchError does not work.
> >
> > Ideally, the function would keep decoding as long as it is possible,
> > and upon the first failure of the parser, return whatever has been
> > decoded.
> 
> I believe it can't be done.  (I've seen three responses that seemed
> to be proposing some course of action, but ... correct me if I'm wrong,
> nothing that would allow you to use Get in Data.Binary this way.)
> 
> The key point is the use of `throw', via `error', in Get's `fail'.
> `throw' raises an exception that can be caught only in IO, so you
> can't catch it inside Get.  So ... while `fail' is a Monad function,
> it isn't implemented here in a way you could use, like it is in Maybe
> for example.  Nor could it be, I think, which is kind of unfortunate.

For strict, checked binary parsing, use the cereal package. For lazy
binary parsing with async errors, use binary.

They're the main two points in the design space. The other is to tag the
lazy stream, and insert failure tags in the structure.

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


Re: [Haskell-cafe] help me evangelize haskell.

2010-09-05 Thread Don Stewart
Gaius:
> My usual rhetoric is that one-off, throwaway scripts never are, and
> not only do they tend to stay around but they take on a life of their
> own. Today's 10-line file munger is tomorrow's thousand-line ETL batch
> job on which the business depends for some crucial data - yet the
> original author is long gone and no-one dares modify in case it
> breaks. So it is just good sense to use sound practices from the very
> beginning. 

I gave a tech talk recently on using Haskell for scripting -- and it is
built on the idea that today's throw away script is tomorrow's key piece
of infrastructure -- so you better get the maintainance and safety story
right:

http://donsbot.wordpress.com/2010/08/17/practical-haskell/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] base-3 -> base-4

2010-09-03 Thread Don Stewart
ganesh.sittampalam:
> Johannes Waldmann wrote:
> > Is there a "conversion guide" for switching from base-3 to base-4?
> > 
> > I noticed that ghc-HEAD (6.13) comes with base-4.3 (and no base-3).
> > This will break an awful lot of packages (?), in fact the breakage
> > starts with cabal-install (since it depends on HTTP which depends on
> > base-3).  
> 
> HTTP can build and seems to work with base 4 if you bump the dependency.
> I contacted Sigbjorn about making a new release a while ago, but nothing
> has happened yet.

I don't know if Sigbjorn is still the maintainer. We need to set
maintainer timeouts somewhere.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Missing documentation in Haskell Platform on Windows

2010-09-02 Thread Don Stewart
andrewcoppin:
> Arnaud Bailly wrote:
>> Hello,
>> I installed (succesfully) HAskell Platform 2010.2 on windows and have  
>> a small but annoying issue: Some links in HTML documentation lead to  
>> broken links. I did not investigate all the links, but I have seen  
>> that all doc under Control.Monad.XXX is missing. What am I doing wrong 
>> ?
>
> Almost every release of GHC that I can remember has had the links for  
> the "mtl" package broken. (The Control.Monad.XXX modules are mostly from  
> mtl. But, for example, Control.Monad.Fix is from base. I bet you'll find  
> it works just fine.)

Well spotted, Andrew!

The way to get things like this fixed is to report a bug to the relevant
project. Click on the 'bug report' button:

http://trac.haskell.org/haskell-platform/

You installed the Haskell Platform on Windows, so please mention this in
the bug ticket. The problem will likely be in the Windows installer
script, and what docs were bundled with that specific installer.

Be as detailed in the report as you can, to make sure we can reproduce
what trouble you have.

In the meantime, you can always read the 'mtl' documentation on its
package page:

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

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


Re: [Haskell-cafe] Contibution to Haskell world

2010-08-30 Thread Don Stewart
crazy.fizruk:
> Hi all,
> 
> I am very interested in haskell and most of related things and as I know there
> are a lot of things to do for haskell world. I have rather small, as I think,
> expirience with haskell: I've worked with Language.C, alex, happy, parsec and
> some other stuff that I haven't looked though attentively. Most of haskell 
> code
> I've seen was highly readable and most of code I wrote was very easy to write.
> So I liked to write in haskell and I want to make some contribution to its
> world. As I am rather new to haskell world I ask you for a problem that can be
> interesting for me and useful for haskell world. Today I am student at Moscow
> State University and have at least 2 years for some kind of scientific work.
> 
> P.S. Some interesting topics for me are transparent parallelization, parallel
> and distibuted computing and computational models. However, many other topics
> are also interesting for me =)
> 

Thanks for helping!

We have a list of problems on the proposals reddit:

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

Perhaps something there is interesting to you?

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


[Haskell-cafe] Announce: Significant performance improvements for Data.Map

2010-08-29 Thread Don Stewart

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

Proposal: Significant performance improvements for Data.Map

Description

   Milan Straka's recent [52] Haskell Symposium paper (PDF) shed light on
   the containers:Data.Map library, indicating there were both algorithmic
   and stylistic performance improvements to be made.

  52. http://research.microsoft.com/~simonpj/papers/containers/containers.pdf

   This proposal provides a patch that [53] dramatically improves
   performance across the API. Three standard techniques are applied to
   the code:

 * [54] Worker/Wrapper transformations of recursive functions with
   constant arguments (aka. the [55] static argument transformation).

 * Explicit inlining of wrapper functions.

 * Explicit strictness of keys to functions.

  53. http://is.gd/eJHIE
  54. http://www.workerwrapper.com/
  55. http://hackage.haskell.org/trac/ghc/ticket/888


   Three complementary, but orthogonal patches are provided.

1. Add a testsuite, [56] with coverage data (currently 91% of top
   level functions, and all core functions).

2. Add a micro-benchmark suite based on [57] Criterion, for empirical
   evidence of improvements to each function.

3. The optimization patch itself.

   All 3 patches should be applied, under this proposal.

  56. http://code.haskell.org/~dons/tests/containers/hpc_index.html
  57. http://hackage.haskell.org/package/criterion

   The [58] benchmark results are very strong:

 * An average speedup across the core api of 47% (on intel i7 / linux
   64 bit), and;

 * 36% on Mac / intel core 2 duo 32 bit).

   http://i.imgur.com/05BWe.png

  58. http://is.gd/eJHIE

   No bugs were identified in the development of the comprehensive
   testsuite, which includes a large set of unit tests from [60] Kazu
   Yamamoto

  60. http://twitter.com/kazu_yamamoto/status/22351727559

   A fork of the containers package, with the 3 patches (and a version
   bump to make it easier to test out) is available:

 darcs get http://code.haskell.org/~dons/code/containers/

   Separately, the patches are attached to this ticket.

   The consideration period is 3 weeks (before ICFP).

   __

   Work carried out over 28/29th August, 2010 in Utrecht, NL, by Johan
   Tibell and Don Stewart.

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


Re: [Haskell-cafe] Unicode pretty-printing

2010-08-28 Thread Don Stewart
gromopetr:
> Hi all,
> 
> I've been considering using Haskell for my natural language processing
> project. Due to its nature, it has much to do with Unicode.
> Unfortunately, Haskell escapes UTF8 characters. I've been able to
> output these strings via System.IO.UTF8.putStrLn (though I wish it was
> less painful), but still there are two problems.
> 
> First, I want to pretty-print not only strings, but any structures
> made of lists and algebraic data types. Their 'show' calls string's
> 'show' which escapes all UTF8 symbols.

How about a "Pretty" class for unicode text:
http://hackage.haskell.org/package/text

That might be easy to write.
  
> displays the expected versus actual data, which is fine. But, of
> course, it doesn't know anything about Unicode, and I can't read
> escaped strings very well to understand what exactly has failed. I
> really don't want to write yet another unit test framework only for
> the sake of UTF8. Is there any way to make Haskell display values
> containing Unicode strings in a readable way?

Via a new pretty class, similar to Show, but rendering Text values.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Hackage on Linux

2010-08-26 Thread Don Stewart
marlowsd:
> If you look at the original Cabal design document[1], you'll see that  
> one of the goals of Cabal was to be the glue that lets you convert an  
> arbitrary Haskell library into a native package for a variety of systems 
> - including MSIs on Windows.  Indeed, I must admit when we were  
> designing Cabal I thought that native packages would be the most common  
> way that people would install Cabal packages, specifically because many  
> systems already have a good package manager, and trying to bypass the  
> system package manager would be a fundamental mistake.  It turned out  
> that cabal-install would be a lot more useful than I imagined, but the  
> two systems are complementary: native packages are for installing  
> globally, and cabal-install is for installing packages in your home  
> directory.
>

We also didn't know that Hackage would get so big, so quickly. So
there's three levels of packages now:

1. absolutely vital: HP (now on every system)
2. native packaging of useful Haskell apps and libs (many on Debian, Arch, 
Gentoo, few elsewhere)
3. cabal-install: everything else, works everywhere.

And it looks like many distros are learning towards just providing 1.
natively. Those with more automation (Debian, Arch) do 2. as well,
though it is less useful than we thought now that cabal-install is
relatively stable.

A new trend are tools like 'bauerbill' on Arch, which has a --hackage
flag, that converts hackage to native packages on the fly. That's like
teaching apt to grok hackage.

It's interesting how its all sorting out.

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


Re: [Haskell-cafe] Hackage on Linux

2010-08-24 Thread Don Stewart
deteego:
> 
> If people just wanted an auto udpate version of cabal that works through 
> arch's
> package management, then there should have just been a pacman wrapper which
> when you install/update haskell libraries/packages, it creates a local package
> through cabal2arch instead of using AUR.
> 

bauerbill --hackage supports this (its a good tool). However, one
benefit of AUR + Hackage is that cabal2arch was developed and maintained
-- which solves the problem of resolving C libraries for the distro --
something cabal-install can't do.

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


Re: [Haskell-cafe] feasability of implementing an awk interpreter.

2010-08-20 Thread Don Stewart
There's a lot of examples of languages implemented in Haskell to choose
from, too


http://haskell.org/haskellwiki/Applications_and_libraries/Compilers_and_interpreters#Large_languages

michael:
> Thank you all for your encouragement. I need to think about the core
> functionality, and do some reading.
> 
> On Fri, Aug 20, 2010 at 2:33 AM, Josef Svenningsson
>  wrote:
> > On Fri, Aug 20, 2010 at 6:05 AM, Jason Dagit  wrote:
> >>
> >>
> >> On Thu, Aug 19, 2010 at 8:05 PM, Michael Litchard 
> >> wrote:
> >>>
> >>> I'd like the community to give me feedback on the difficulty level of
> >>> implementing an awk interpreter. What language features would be
> >>> required? Specifically I'm hoping that TH is not necessary because I'm
> >>> nowhere near that skill level.
> >>
> > Implementing an awk interpreter in Haskell can be a fun project. I have a
> > half finished implementation lying around on the hard drive. It's perfectly
> > possible to implement it without using any super fancy language features.
> > But as other people have pointed out, monads are helpful for dealing with a
> > lot of the plumbing in the interpreter.
> >>>
> >>> An outline of a possible approach would be appreciated. I am using
> >>> http://www.math.utah.edu/docs/info/gawk_toc.html
> >>> as a guide to the language description.
> >>
> >> You might also focus on the 'core' of awk.  Think about, what is the
> >> minimal language and start from there.  Grow your implementation adding
> >> features bit by bit.  It's also a good opportunity to do testing.  You have
> >> a reference implementation and so you can write lots of tests for each
> >> feature as you add them.
> >
> > When I wrote my awk interpreter I decided to go for the whole language from
> > start. I had reasons for doing this as there were certain aspects of this
> > that I wanted to capture but it is not they way I would recommend going
> > about it. I definitely second Jason's advice at trying to capture the core
> > functionality first.
> > Have fun,
> > Josef
> ___
> 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] regex-compat on latest Haskell Platform

2010-08-17 Thread Don Stewart
kevinjardine:
> I'm running Haskel Platform 2010.2.0.0 and attempting to compile with
> regex-compat under Windows XP.
> 
> The link stage fails with a number of lines of the form:
> 
> D:\Program Files\Haskell Platform\2010.2.0.0\lib\extralibs\regex-
> posix-0.94.2\ghc-6.12.3/libHSregex-posix-0.94.2.a(Wrap.o):fake:(.text
> +0x493): undefined reference to `regerror'
> 
> I have googled for a solution but cannot see a fix anywhere.

Looks like possibly missing regex.h header files (from the regex C library)
On Windows?

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


Re: [Haskell-cafe] Re: A cabal odyssey

2010-08-16 Thread Don Stewart
> On Aug 16, 9:27 pm, Andrew Coppin  wrote:
> > And so today, just for giggles, I tried to get Sifflet to work. Along
> > the way, I encountered a number of... "glitches", if you will.
> >
> > First of all, I tried to get it to work on Windows. I fired up a new
> > Windows VM and installed Haskell Platform 2010.1.0.0. It seems that
> > (finally) this includes the cabal-install tool, which is nice.

Can I ask why you chose 2010.1.0.0 ?

http://haskell.org/platform

The download page clearly says "Current stable release: 2010.2.0.0"

Clicking on the windows button links to a page with "The Windows installer for
the 2010.2.0.0 Haskell Platform"

I hope the download site for the HP isn't leading people astray.

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


[Haskell-cafe] Sifflet dependencies

2010-08-16 Thread Don Stewart
$ cabal update
Downloading the latest package list from hackage.haskell.org

$ cabal install sifflet
Resolving dependencies...
cabal: cannot configure pango-0.11.1. It requires cairo >=0.11.1 && <0.12 
and glib >=0.11.1 && <0.12
For the dependency on cairo >=0.11.1 && <0.12 there are these packages:

cairo-0.11.1. However none of them are available.
cairo-0.11.1 was excluded because sifflet-lib-1.0 requires cairo ==0.11.0
cairo-0.11.1 was excluded because cairo-0.11.0 was selected instead
cairo-0.11.1 was excluded because sifflet-1.0 requires cairo ==0.11.0

For the dependency on glib >=0.11.1 && <0.12 there are these packages:
glib-0.11.1. However none of them are available.
glib-0.11.1 was excluded because sifflet-lib-1.0 requires glib ==0.11.0
glib-0.11.1 was excluded because glib-0.11.0 was selected instead
glib-0.11.1 was excluded because sifflet-1.0 requires glib ==0.11.0


So that's pretty simple. 'sifflet' requires cairo ==0.11.0 and pango. But since
pango doesn't work with cairo 0.11.0, the package can't be built. The solution
is to ask the sifflet author to adjust the dependencies to be more flexible.

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

Those specific versions of packages are overly constrained. They should follow 
the PVP, and be thus, 

0.11.*

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


Re: [Haskell-cafe] Re: String vs ByteString

2010-08-15 Thread Don Stewart
wren:
> Bryan O'Sullivan wrote:
>> As a case in point, I took the string search benchmark that Daniel shared
>> on Friday, and boiled it down to a simple test case: how long does it take
>> to read a 31MB file?
>>
>> GNU wc -m:
>>
>>- en_US.UTF-8: 0.701s
>>
>> text 0.7.1.0:
>>
>>- lazy text: 1.959s
>>- strict text: 3.527s
>>
>> darcs HEAD:
>>
>>- lazy text: 0.749s
>>- strict text: 0.927s
>
> When should we expect to see the HEAD stamped and numbered? After some  
> of the recent benchmark dueling re web frameworks, I know Text got a bad  
> rap compared to ByteString. It'd be good to stop the FUD early.  
> Repeating the above in the announcement should help a lot.

For what its worth, for several bytestring announcements I published
comprehensive function-by-function comparisions of performance on
enormous data sets, until there was unambiguous evidence bytestring was
faster than List.

E.g http://www.mail-archive.com/hask...@haskell.org/msg18596.html

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


Re: [Haskell-cafe] Re: String vs ByteString

2010-08-14 Thread Don Stewart
andrewcoppin:
> Interesting. I've never even heard of Data.Text. When did that come into  
> existence?
>
> More importantly: How does the average random Haskeller discover that a  
> package has become available that might be relevant to their work?

In this case, Data.Text has been announced on this very list several
times:

   Text 0.7 announcement
http://www.haskell.org/pipermail/haskell-cafe/2009-December/070866.html

   Text 0.5 announcement
http://www.haskell.org/pipermail/haskell-cafe/2009-October/067517.html

   Text 0.2 announcement
http://www.haskell.org/pipermail/haskell-cafe/2009-May/061800.html

   Text 0.1 annoucnement
http://www.haskell.org/pipermail/haskell-cafe/2009-February/056723.html

As well as on Planet Haskell several times:

   Finally! Fast Unicode support for Haskell
 
http://www.serpentine.com/blog/2009/02/27/finally-fast-unicode-support-for-haskell/

   Streaming Unicode support for Haskell: text 0.2
 
http://www.serpentine.com/blog/2009/05/22/streaming-unicode-support-for-haskell-text-02/

   Case conversion and text 0.3
 http://www.serpentine.com/blog/2009/06/07/case-conversion-and-text-03/

As well as being presented at Anglo Haskell

http://www.wellquite.org/non-blog/AngloHaskell2008/tom%20harper.pdf

It is mentioned repeatedly in the quarterly Hackage status posts:

"vector and text are quickly rising as the preferred arrays and unicode 
libraries" 
  
http://donsbot.wordpress.com/2010/04/03/the-haskell-platform-q1-2010-report/

"text has made it into the top 30 libraries"
  
http://donsbot.wordpress.com/2010/06/30/popular-haskell-packages-q2-2010-report/

Ranked 31st most popular package by June 2010.
  http://code.haskell.org/~dons/hackage/Jun-2010/popular.txt

Ranked 41st most popular package by April 2010.
  http://www.galois.com/~dons/hackage/april-2010/popularity.csv

Ranked 345th by August 2009
  
http://www.galois.com/~dons/hackage/august-2009/popularity-august-2009.html

And discussed on Reddit Haskell many times:


http://www.reddit.com/r/haskell/comments/8qfvw/doing_unicode_case_conversion_and_error_recovery/


http://www.reddit.com/r/haskell/comments/80smp/datatext_fast_unicode_bytestrings_with_stream/


http://www.reddit.com/r/haskell/comments/80smp/datatext_fast_unicode_bytestrings_with_stream/

http://www.reddit.com/r/haskell/comments/ade08/the_performance_of_datatext/

So, to stay up to date, but without drowning in data. Do one of:

* Pay attention to Haskell Cafe announcements
* Follow the Reddit Haskell news.
* Read the quarterly reports on Hackage
* Follow Planet Haskell

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


Re: [Haskell-cafe] Re: String vs ByteString

2010-08-13 Thread Don Stewart
There are many libraries for many purposes.

How to pick your string library in Haskell
http://blog.ezyang.com/2010/08/strings-in-haskell/

kevinjardine:
> I find it disturbing that a modern programming language like Haskell
> still apparently forces you to choose between a representation for
> "mostly ASCII text" and Unicode.
> 
> Surely efficient Unicode text should always be the default? And if the
> Unicode format used by the Text library is not efficient enough then
> can't that be fixed?
> 
> Cheers,
> Kevin
> 
> On Aug 13, 10:28 pm, Ketil Malde  wrote:
> > Johan Tibell  writes:
> > > Here's a rule of thumb: If you have binary data, use Data.ByteString. If 
> > > you
> > > have text, use Data.Text.
> >
> > If you have a large amount of mostly ASCII text, use ByteString, since
> > Data.Text uses twice the storage.  Also, ByteString might make more
> > sense if the data is in a byte-oriented encoding, and the cost of
> > encoding and decoding utf-16 would be significant.
> >
> > -k
> > --
> > If I haven't seen further, it is by standing in the footprints of giants
> > ___
> > Haskell-Cafe mailing list
> > haskell-c...@haskell.orghttp://www.haskell.org/mailman/listinfo/haskell-cafe
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
> 
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] hackage.haskell.org cannot be accessed?

2010-08-12 Thread Don Stewart
ivan.miljenovic:
> On 12 August 2010 16:45, Magicloud Magiclouds
>  wrote:
> > Hi,
> >  Today I found out that I cannot access hackage.haskell.org. I have
> > tried vpn/proxy to see if my network has something wrong. No luck.
> 
> http://downforeveryoneorjustme.com/http://hackage.haskell.org agrees.
> 
> Wait a few hours, it might be back up then (it was up a few hours ago...).

Turns out the physical line into the building in which the hackage
server resides was cut by a contractor around 5pm PST last night. Repair
workers splice the line back together around 2am, and everything is
working now.

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


Re: [Haskell-cafe] StablePtr overhead?

2010-08-10 Thread Don Stewart
greg:
> Hi all,
> 
> Can anyone explain what the overhead of using StablePtrs is?
> Specifically I am interested in knowing the time/space complexity of the
> various Foreign.StablePtr operations and how many memory indirections
> are involved when using deRefStablePtr.

There's a hashtable in the runtime that maps pointers to stable
pointers. So you have that overhead. Create N StablePtrs, and get a
correspondingly large hashtable.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Odd parallel haskell observations (some more numbers)

2010-08-09 Thread Don Stewart
sacha:
> Hi.
> 
> > On Mon, 9 Aug 2010 09:44:00 +0200
> > "JG" == Jean-Marie Gaillourdet  wrote:
> JG> 
> JG> I am no expert in web server tuning, but I will share my thoughts
> JG> about your approach and expectations nevertheless.
> 
> I would better think about ghc than about web server. I believe, that
> numbers I already provided (especially their deviation) illustrate that
> sometimes ghc runtime perform quite bad. 
> 
> I also found out that it can do better than it does by default, I can
> accept that runtime might be not capable to adjust itself to any taks
> the best way, but then it will be nice to know, for instance, why for
> such I/O that GC settings change performance in times.

I'd consider boiling this down into a small test case and asking Simon
Marlow -- runtime hacker uber-guru -- to help.

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


Re: [Haskell-cafe] iPhone/Android and Haskell [Was: Embedded funcional programming?]

2010-08-07 Thread Don Stewart

Only problem is rewriting the GHC runtime in Java... :-)

-- Don

scooter.phd:
> Whatever happened to the JVM backend for GHC? That might actually be a
> relatively straightforward solution to the whole "interface to Java" problem.
> 
> On Sun, Apr 18, 2010 at 11:42 PM, Don Stewart  wrote:
> 
> liamoc:
>     > On 19 April 2010 05:29, Don Stewart  wrote:
> > > That's great info -- we do have an unregisterised ARM port of GHC in
> > > Debian, iirc. (And the LLVM backend can generate ARM code too)
> >
> >
> > Sounds good. With regards to LLVM, what dependencies does LLVM ARM
> > code have? Android has gnu libraries not llvm, i don't know if that is
> > okay.
> >
> > A superior approach would be to compile haskell to Java or Dalvik
> > bytecode (or even JVM bytecode if it doesn't use any JIT features;
> > then we can compile that to dalvik bytecode), but this is obviously
> > more work if we already have an ARM port.
> 
> More work also in that you need to port the runtime system to Java...
> ___
> 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] lambdacats

2010-08-05 Thread Don Stewart
ivan.miljenovic:
> On 6 August 2010 14:12, Tony Morris  wrote:
> > Hello, does anyone happen to have the lambdacats page cached? The domain
> > (arcanux.org) and server have disappeared and the wayback machine doesn't
> > have the images.
> 

Plenty of stuff shows up on google:

http://images.google.com/images?q=lambdacats
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell Platform OPENGL dependencies

2010-08-05 Thread Don Stewart
aditya.siram:
> Hi folks,
> I just installed the latest Haskell Platform on a fresh Ubuntu Lucid machine
> and I had to install the following packages to satisfy Open GL:
> libgmp3-dev,libgl1-mesa-dev, libglu1-mesa-dev, freeglut3-dev
> 
> Just thought you might want to document that on the Haskell Platform page.
> -deech

Thanks.

The best way to install the Haskell Platform is via a distro package,
e.g. the "haskell-platform" on Debian. Ubuntu will import this soonish.

Until then, you will need to manually install the dependencies, as
listed on the Debian package page:

http://packages.debian.org/squeeze/haskell-platform

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


Re: [Haskell-cafe] real-time audio processing [Was: can Haskell do everyting as we want?]

2010-08-04 Thread Don Stewart
job.vranish:
> + 1
> 
> 
> This is probably the biggest obstacle to using Haskell where I work. (Aviation
> industry, software for flight management systems for airplanes)
> 
> We often need to perform some computations with hard deadlines, say every 
> 20ms,
> with very little jitter.
> Major GC's spoil the fun; It's quite easy to have a major GC take longer than
> 20ms, and currently they are not "pauseable" (nor is it trivial to make them
> so).
> 
> It would be very nice to have some annotation/DSL/compiler-flag that would let
> me run a small block of mostly regular haskell code under hard, real-time
> constraints.
> 
> Hmm, it looks like the HASP project is working on some of this, though I'm not
> sure how portable their work is back to GHC: http://hasp.cs.pdx.edu/
> 

Or look at EDSLs, like Atom:

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


Re: [Haskell-cafe] can Haskell do everyting as we want?

2010-08-03 Thread Don Stewart
qiqi789:
> 
> As more I learn haskell, I am more interested in this function
> programming language. I am intended to more focus on haskell than other
> languages like python, Java, or C++. But I am still wonder whether haskell 
> can do everyting
> as other languages do, such as python, perl, Java and C++.
> 
> Is there anyone happen to come into any tasks that haskell is not able
> to achieve?

Well, Haskell is a general purpose language, so it should be able to do
pretty much anything.

Here's a graphical representation of what Haskell is used for, based on
the number of packages on Hackage in that category:

http://donsbot.wordpress.com/2009/01/24/what-is-haskell-good-for/

Most endeavors in computer programming are available in some form or
another on Hackage, so I'd say we have lived up to the goal of providing
a general purpose language.

One thing that is not well covered, due to the nature of the runtime, is
hard real time computing.

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


Re: [Haskell-cafe] Installation problem with latest version of haskell platform

2010-08-03 Thread Don Stewart
pieter:
> Hi,
> 
> When I try to install haskell platform 64 bit on a x86_64 debian etch I get 
> the
> following error after :
> 
> "make install":
> 
> /usr/bin/install -c -m 755 -d "/usr/local/lib/ghc-6.12.3/package.conf.d"
> "/usr/local/lib/ghc-6.12.3/ghc-pkg" --force --global-conf "/usr/local/lib/
> ghc-6.12.3/package.conf.d" update libffi/package.conf.install
> /usr/local/lib/ghc-6.12.3/ghc-pkg: error while loading shared libraries:
> libtinfo.so.5: cannot open shared object file: No such file or directory
> make[1]: *** [install_packages] Error 127
> make: *** [install] Error 2
> 
> I have no good strategy to locate the needed library.  A quick google search
> yielded ncurses, but I have already installed it, and it doesn't contain that
> binary.
> Furthermore configure doesn't yield any errors. And a dependency on ncurses
> does seem quite strange doesn't it ?

I think you're using the wrong pre-installed GHC. There are two
provided, one for ncurses and one for libtinfo.

Alternatively, you can 

 ln -s libncurses.so.5 /usr/lib/libtinfo.so.5 

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


Re: [Haskell-cafe] ANNOUNCE: Takusen 0.8.6

2010-08-01 Thread Don Stewart
I think it is just the ODBC backend that didn't generate


http://hackage.haskell.org/packages/archive/Takusen/0.8.6/doc/html/Database-Enumerator.html

Likely because the required C libs are not on
Hackage, so that backend wasn't built.

aditya.siram:
> I meant the links to the API docs.
> -deech
> 
> [1] http://hackage.haskell.org/packages/archive/Takusen/0.8.6/doc/html/
> Database-ODBC-Enumerator.html
> 
> On Sun, Aug 1, 2010 at 1:46 PM, Don Stewart  wrote:
> 
> 
> aditya.siram:
> > Why are the Takusen module links on Hackage dead?
> 
> Hmm.  The links look fine:
> 
>http://hackage.haskell.org/package/Takusen-0.8.6
> 
> > this opportunity to request a Takusen tutorial and to thank you for this
> 
> 
> 
> 
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANNOUNCE: Takusen 0.8.6

2010-08-01 Thread Don Stewart

aditya.siram:
> Why are the Takusen module links on Hackage dead?

Hmm.  The links look fine:

http://hackage.haskell.org/package/Takusen-0.8.6

> this opportunity to request a Takusen tutorial and to thank you for this


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


Re: [Haskell-cafe] Int and ByteStrings

2010-07-27 Thread Don Stewart
wren:
> Hey all,
>
> Is there a library function (f :: [Int] -> ByteString) such that it's  
> prefix-preserving, and platform independent? GHC-only is fine for now.  
> There are a bunch of functions of that type, but I need those guarantees  
> and I'm hoping someone else has already done it.

should be possible to write using Data.Binary.

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


Re: [Haskell-cafe] ANNOUNCE: Haskell Platform 2010.2.0.0

2010-07-23 Thread Don Stewart
andrewcoppin:
> Don Stewart wrote:
>> Download the Haskell Platform 2010.2.0.0:
>>
>> http://hackage.haskell.org.nyud.net/platform/
>>
>> (Caching server).
>>   
>
> Anybody have any theroes why Trend Micro Antivirus is reporting this as  
> a "confirmed fraud/attack site"?


We're using the Coral Cache caching server, which I guess confuses silly
software.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANNOUNCE: Haskell Platform 2010.2.0.0

2010-07-23 Thread Don Stewart
Applied, thanks!

leon:
> Some nits, if I may pick (http://hackage.haskell.org/platform/contents.html):
> 
> Under GHC: s/optimzing/optimizing
> Under Alex: Sentence should end with a period.
> Under hsc2hs: There shouldn't be a comma.
> Under haskell code coverage: Testsuite should probably be two words:
> "test suite".
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] ANNOUNCE: Haskell Platform 2010.2.0.0

2010-07-22 Thread Don Stewart
We're pleased to announce the fifth release of the Haskell Platform: a
single, standard Haskell distribution for everyone.

Download the Haskell Platform 2010.2.0.0:

http://hackage.haskell.org.nyud.net/platform/

(Caching server).

The specification, along with installers (including Windows, Apple and
Unix installers for a full Haskell environment) are available.

The Haskell Platform is a single, standard Haskell distribution for
every system, in the form of a blessed library and tool suite for
Haskell distilled from the thousands of libraries on Hackage, along with
installers for a wide variety of systems. It saves developers work
picking and choosing the best Haskell libraries and tools to use for a
task.

When you install the Haskell Platform, you get the latest stable
compiler, an expanded set of core libraries, additional development
tools, and cabal-install – so you can download anything else you need
from Hackage.

What you get is specified here:

http://hackage.haskell.org/platform/contents.html

Thanks!

-- The Platform Infrastructure Team

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


Re: [Haskell-cafe] Design for 2010.2.x series Haskell Platform site

2010-07-18 Thread Don Stewart
dave:
> >
> > Actually, it just got trivial:
> >
> >    $ diffcabal old-platform.cabal haskell-platform.cabal
> >    Cabal 1.8.0.2 -> 1.8.0.6
> >    QuickCheck 2.1.0.3 -> 2.1.1.1
> [etc.]
> 
> Okay, so where do I go to find out the difference between, say,
> QuickCheck 2.1.0.3 and 2.1.1.1?
> 
> -- 

Currently, the way to do this is:

* Visit:
http://hackage.haskell.org/package/QuickCheck-2.1.1.1

* Visit:
http://hackage.haskell.org/package/QuickCheck-2.1.0.3

And note any differences in the documentation.

Hackage doesn't yet provide support for changelogs. However, it does
provide support for repository links, from which we can construct a
changelog. That's right: you have to read each repo to get the full
changelog, unless the author has been nice to add it to the .cabal file.

I think what we need is: 

* Every HP package has to have a .cabal file with the source
  repository type and link.

If we have the source repo and type, I can write a tool to extract the
changelogs between each release automatically.

-- Don

E.g.
* darcs
* http://code.haskell.org/QuickCheck/

>From here we can:

$ darcs get http://code.haskell.org/QuickCheck/

And running darcs changes:

Thu Jun 17 07:52:28 PDT 2010
* Bump version number

Thu Jun 17 06:53:22 PDT 2010
* Change of plan: look at GHC's version number instead of the
* version of base when deciding whether to depend on the ghc
* library

Thu Jun 17 06:40:22 PDT 2010
* Added README to the source distribution

Thu Jun 17 06:33:38 PDT 2010
* Updated the README

Thu Jun 17 06:33:27 PDT 2010
* GHC 6.8 support

Thu Jun 17 06:13:54 PDT 2010
* Added support for the new base library (I hope!)

Thu Jun 17 02:59:14 PDT 2010
* Remove the pointless last field of the version number

Thu Jun 17 02:32:46 PDT 2010
* Fix homepage link

Wed Apr 28 08:04:02 PDT 2010
* Added my file of weird examples

Thu Apr 22 08:37:11 PDT 2010
* Bump the version number

Thu Apr 22 08:27:39 PDT 2010
* Don't force the shrink list too early

Fri Jan 22 10:25:20 PST 2010
* Added an Arbitrary instance for complex numbers

Tue Jan 12 07:34:00 PST 2010
* Changed the way that size increases

Tue Jan 12 07:33:52 PST 2010
* Changed the cabal version number

Tue Jan 12 06:47:25 PST 2010
* Skip shrinking on interrupt

Tue Jan 12 06:47:04 PST 2010
* Added isInterrupt to Test.QuickCheck.Exception



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


Re: [Haskell-cafe] RE: Design for 2010.2.x series Haskell Platform site (Don Stewart)

2010-07-17 Thread Don Stewart
wren:
> Niemeijer, R.A. wrote:
>> Here's my take on the new design:
>>
>> Screenshot: http://imgur.com/9LHvk.jpg
>> Live version: 
>> http://dl.dropbox.com/u/623671/haskell_platform_redesign/index.htm
>
> Is it just me, or does aligning [OSX,Win,Linux] `zip` [Comprehensive,  
> Robust, CuttingEdge] send the wrong message...

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


[Haskell-cafe] Best links for Haskell Platform distro packages?

2010-07-17 Thread Don Stewart
Can distro maintainers confirm these are the best links for
each distro package?

Debian
http://packages.debian.org/squeeze/haskell-platform

(or should it be sid?)

Fedora:
https://admin.fedoraproject.org/pkgdb/acls/name/haskell-platform

Gentoo:
http://www.haskell.org/haskellwiki/Gentoo/HaskellPlatform

NixOS:

http://hydra.nixos.org/job/nixpkgs/trunk/haskellPackages_ghc6121.haskellPlatform2010100

OpenSUSE:
https://build.opensuse.org/project/show?project=devel:languages:haskell 
??


For Ubuntu, I find a few confusing things:

Ubuntu:
https://launchpad.net/ubuntu/+source/haskell-platform

But nothing at:

http://packages.ubuntu.com/lucid/haskell-platform

But there's instructions for the src build:

http://davidsiegel.org/haskell-platform-in-karmic-koala/

-- Don

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


Re: [Haskell-cafe] Design for 2010.2.x series Haskell Platform site

2010-07-17 Thread Don Stewart
andrewcoppin:
> Don Stewart wrote:
>> allbery:
>>   
>>>> like to repeat one request: Please, please, please make it easier to
>>>> - Download older versions of HP.
>>>> - Find out which HP release contains what.
>>>> - Figure out what the difference between release X and release Y is.
>>>>   
>>> +1
>>> I'd consider this mandatory.  It's amazing how many projects apparently 
>>> *don't*.
>>> 
>>
>> We can certainly continue to link to old versions, to the old
>> contents.html and the changelogs, as is currently planned.
>>   
>
> And unlike previous releases, this one seems to have a changelog. (It's  
> nontrivial comparing two Cabal files trying to figure out what changed!)

Actually, it just got trivial:

$ diffcabal old-platform.cabal haskell-platform.cabal
Cabal 1.8.0.2 -> 1.8.0.6
QuickCheck 2.1.0.3 -> 2.1.1.1
alex 2.3.2 -> 2.3.3
array 0.3.0.0 -> 0.3.0.1
base 4.2.0.0 -> 4.2.0.2
bytestring 0.9.1.5 -> 0.9.1.7
cabal-install 0.8.0 -> 0.8.2
cgi 3001.1.7.2 -> 3001.1.7.3
directory 1.0.1.0 -> 1.0.1.1
extensible-exceptions Added:  0.1.1.1
fgl 5.4.2.2 -> 5.4.2.3
filepath 1.1.0.3 -> 1.1.0.4
ghc 6.12.1 -> 6.12.3
happy 1.18.4 -> 1.18.5
hpc 0.5.0.4 -> 0.5.0.5
old-time 1.0.0.3 -> 1.0.0.5
process 1.0.1.2 -> 1.0.1.3
regex-base 0.93.1 -> 0.93.2
regex-compat 0.92 -> 0.93.1
regex-posix 0.94.1 -> 0.94.2
stm 2.1.1.2 -> 2.1.2.1
template-haskell 2.4.0.0 -> 2.4.0.1
unix 2.4.0.0 -> 2.4.0.2

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


Re: [Haskell-cafe] Design for 2010.2.x series Haskell Platform site

2010-07-17 Thread Don Stewart
markl:
> I like the content. The layout has some flaws when rendered on my
> environment (Safari 4, but with perhaps narrower than most peoples
> windows):
> 
> * The background image tiled looks pretty bad - since I see repeats
> and it doesn't really tile.

Yes, noted.

> * The three columns at the bottom overlap! Perhaps this is a valid
> case for a  rather than three s and CSS layout.

Agreed and implemented. That was easier!

> * The word "Download" isn't actually part of the download link. Many
> people might think to click on the Download text itself. Can we make
> that a link that auto-detects your OS and redirects appropriately?

If someone has code for this?
  
> As for CSS wrangling, I've got a fair bit of experience at that. I've
> even done it in the context of MediaWiki themes(*). If anyone needs
> some help on that aspect, I'm volunteering. I'm pretty sure I could
> reproduce Christopher's image in XHTML/CSS if desired.

Well, perhaps poke around here:

http://code.haskell.org/haskell-platform/download-website/index.html
http://code.haskell.org/haskell-platform/download-website/style.css

It's a darcs repo, so darcs get http://code.haskell.org/haskell-platform/
will work.

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


Re: [Haskell-cafe] Design for 2010.2.x series Haskell Platform site

2010-07-17 Thread Don Stewart
allbery:
> > like to repeat one request: Please, please, please make it easier to
> > - Download older versions of HP.
> > - Find out which HP release contains what.
> > - Figure out what the difference between release X and release Y is.
> 
> +1
> I'd consider this mandatory.  It's amazing how many projects apparently 
> *don't*.

We can certainly continue to link to old versions, to the old
contents.html and the changelogs, as is currently planned.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Design for 2010.2.x series Haskell Platform site

2010-07-16 Thread Don Stewart
chrisdone:
> On 16 July 2010 20:37, Don Stewart  wrote:
> > chrisdone:
> >> Regarding the Haskell Platform, maybe a summer theme is in order?
> >> Sunrise, here's a whole platform upgrade. Get it while it's hot, etc.
> >
> >    That's a great idea! :-)
> 
> Maybe you could work on a theme like this. Probably OTT.
> 
> http://imgur.com/NjiVh
> 
> Just an idea. My Inkscape-fu is weak.
> 
> Here's one for a laugh: http://imgur.com/PQAgC
> 
> I have ideas, I'm just not very good at executing them, haha. Probably
> a blue summer sky thing would fit better with the Haskell theme. Can
> someone with Photoshop make a shiny Haskell logo? I mean, literally
> shiny. Like the OS X logo.
> 

Here's a first cut in the repo with the new design converted to CSS

http://code.haskell.org/haskell-platform/download-website/

If anyone would like to clean it up further, please send me patches to
the style.css file or index.html.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Design for 2010.2.x series Haskell Platform site

2010-07-16 Thread Don Stewart
chrisdone:
> On 16 July 2010 20:37, Don Stewart  wrote:
> > chrisdone:
> >> Regarding the Haskell Platform, maybe a summer theme is in order?
> >> Sunrise, here's a whole platform upgrade. Get it while it's hot, etc.
> >
> >    That's a great idea! :-)
> 
> Maybe you could work on a theme like this. Probably OTT.
> 
> http://imgur.com/NjiVh
> 

That is really nice, and clearly "themed"!

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


Re: [Haskell-cafe] Design for 2010.2.x series Haskell Platform site

2010-07-16 Thread Don Stewart
chrisdone:
> Hi Don,
> 
> What's the ETA on getting the site wiki upgraded and to what version
> will it be? If we're looking at another couple of weeks I'll come up
> with a new wiki template this weekend to replace the current one.

For haskell.org? Thomas Schilling and Ian Lynagh are working on that
(CC'd).

> Regarding the Haskell Platform, maybe a summer theme is in order?
> Sunrise, here's a whole platform upgrade. Get it while it's hot, etc.

That's a great idea! :-)
  
> Regarding the home page, I think we should involve more piccies of
> people active in the community at conferences and hackathons, etc.
> Seeing pictures of Haskellers is great. It tells everyone this
> language is busy and active, it motivates existing or budding
> Haskellers to contribute and get active, and it's easy to slap a
> picture up on the home page.

http://cufp.org is a bit like that now.
  
-- Don
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Hot-Swap with Haskell

2010-07-16 Thread Don Stewart
Generally, in Erlang or Haskell, the semantics we use is to keep 
all the old code in memory, for  the case of closures and thunks that
point back into that code.

You can imagine a fine-grained semantics where as each top level
function is no longer referenced, the *code* for that is swapped. I
believe there have been versions of Erlang bytecode hotswapping that
supported that.

In GHC Haskell, we have component-level hotswapping -- only
whole-modules may be swapped out at the moment. As we can't unload code
based on the GC dropping references, we just keep it all in memory,
migrating to new code as *new* (dynamic) bindings are introduced.

The type migration issue is yet another problem. There are several
approaches to migrating state types, including serialization (as xmonad
et al do), or using open data types.

-- Don

nominolo:
> What would be the semantics of hot-swapping?  For, example, somewhere
> in memory you have a thunk of expression e.  Now the user wants to
> upgrade e to e'.  Would you require all thunks to be modified?  A
> similar problem occurs with stack frames.
> 
> You'd also have to make sure that e and e' have the same (or
> compatible types).  e' most likely has different free variables than
> e, how can you translate thunk one to the other?
> 
> Now assuming you don't try to do this, how would you handle the case
> when something goes wrong?
> 
> On 16 July 2010 04:05, Andy Stewart  wrote:
> > Hi all,
> >
> > I'm research to build a hot-swap Haskell program to developing itself in
> > Runtime, like Emacs.
> >
> > Essentially, Yi/Xmonad/dyre solution is "replace currently executing"
> > technology:
> >
> >   re-compile new code with new binary entry
> >
> >   when re-compile success
> >      $ do
> >          save state before re-launch new entry
> >          replace current entry with new binary entry (executeFile)
> >          store state after re-launch new entry
> >
> > There are some problems with re-compile solution:
> >
> > 1) You can't save *all* state with some FFI code, such as gtk2hs, you
> > can't save state of GTK+ widget. You will lost some state after
> > re-launch new entry.
> >
> > 2) Sometimes re-execute is un-acceptable, example, you running some command
> > in temrinal before you re-compile, you need re-execute command to
> > restore state after re-launch, in this situation re-execute command is 
> > un-acceptable.
> >
> > I wonder have a better way that hot-swapping new code without
> > re-compile/reboot.
> >
> > Thanks,
> >
> >  -- Andy
> >
> > ___
> > Haskell-Cafe mailing list
> > Haskell-Cafe@haskell.org
> > http://www.haskell.org/mailman/listinfo/haskell-cafe
> >
> 
> 
> 
> -- 
> If it looks like a duck, and quacks like a duck, we have at least to
> consider the possibility that we have a small aquatic bird of the
> family Anatidae on our hands.
> ___
> 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] Design for 2010.2.x series Haskell Platform site

2010-07-16 Thread Don Stewart
Hey all,

As you might know, the next major release of the Haskell Platform is
coming up next week. We've had the current download site design for a
while now:

http://haskell.org/platform/

However, I'm thinking it would be nice to have themed release designs. 
Examples:

http://www.gnome.org/
GNOME 2.30

Ubuntu, http://www.ubuntu.com/ and so on.

If anyone is interested in a 2010.2 series design for the HP site, the
repository containing the stylesheet is here:

http://code.haskell.org/haskell-platform/

And you can find the index.html and style.css in the download-website/
directory.

We worked faily hard on the content, but feel free to play with the
style. 

-- Don


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


Re: [Haskell-cafe] Hot-Swap with Haskell

2010-07-15 Thread Don Stewart
lazycat.manatee:
> Hi all,
> 
> I'm research to build a hot-swap Haskell program to developing itself in
> Runtime, like Emacs.
> 
> Essentially, Yi/Xmonad/dyre solution is "replace currently executing"
> technology:
> 
>re-compile new code with new binary entry
>
>when re-compile success 
>   $ do
>   save state before re-launch new entry
>   replace current entry with new binary entry (executeFile)
>   store state after re-launch new entry
>   
> There are some problems with re-compile solution:
> 
> 1) You can't save *all* state with some FFI code, such as gtk2hs, you
> can't save state of GTK+ widget. You will lost some state after 
> re-launch new entry.
> 
> 2) Sometimes re-execute is un-acceptable, example, you running some command
> in temrinal before you re-compile, you need re-execute command to
> restore state after re-launch, in this situation re-execute command is 
> un-acceptable.
> 
> I wonder have a better way that hot-swapping new code without
> re-compile/reboot.
> 

Well, the other approach to reloadable modules, using either object code
plugins, or bytecode plugins, giving you module-level granularity.

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


[Haskell-cafe] IFL 2010: 3rd CFP and 1st Call for Participation

2010-07-14 Thread Don Stewart
 LANDIN PRIZE

The Peter Landin Prize is awarded to the best paper presented at the
symposium every year.  The honored article is selected by the program
committee based on the submissions received for the formal review
process. The prize carries a cash award equivalent to 150 Euros.

IMPORTANT DATES

Draft proceedings submission deadline   July 25, 2010
Registration deadline   August 1, 2010
IFL 2010 Symposium  September 1-3, 2010
Submission for review process deadline  October 25, 2010
Notification Accept/Reject  December 22, 2010
Camera ready versionFebruary 17, 2011


PROGRAM COMMITTEE

Jost Berthold   University of Copenhagen (DIKU), Denmark
Olaf Chitil University of Kent, UK
John Clements   California Polytechnic State University, USA
Matthew Fluet   Rochester Institute of Technology, USA
Andy Gill   Kansas University, USA
Jurriaan Hage (Chair)   University of Utrecht, Netherlands
Bastiaan Heeren Open University, Netherlands
Ralf Hinze  University of Oxford, UK
John Hughes Chalmers University of Technology, Sweden
Yukiyoshi Kameyama  University of Tsukuba, Japan
Gabriele Keller University of New South Wales, Australia
Pieter Koopman  Radboud University Nijmegen, Netherlands
Luc MarangetINRIA, France
Simon MarlowMicrosoft Research, UK
Marco T. MorazánSeton Hall University, USA
Rex PageUniversity of Oklahoma, USA
Ricardo PeñaUniversidad Complutense de Madrid, Spain
Sven-Bodo ScholzUniversity of Hertfordshire, UK
Tom Schrijvers  Catholic University of Leuven, Belgium
Don Stewart Galois, USA
Wouter SwierstraVector Fabrics, Netherlands
Don SymeMicrosoft, UK
Peter Thiemann  University of Freiburg, Germany
Phil TrinderHeriott-Watt University, Scotland
Janis Voigtländer   University of Bonn, Germany
Viktória Zsók   Eötvös Loránd University, Hungary 

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


Re: [Haskell-cafe] Re: The site has been exploited (again)

2010-07-13 Thread Don Stewart
gwern0:
> 
> Ashley has made me admin; I've spent the last 1.5 hours deleting all
> the vandalism and indef blocking the accounts. I have Recent Changes
> in my RSS reader, so hopefully in the future there will be no greater
> than 24 hours delay before vandalism is dealt with. A MW upgrade will
> also help (eg. currently checkuser* seems to be unavailable).
> 
> * http://www.mediawiki.org/wiki/Extension:CheckUser

Thank you so much, Gwern!
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] HaskellWiki spam

2010-07-11 Thread Don Stewart
markl:
> 
> On Jul 11, 2010, at 3:17 PM, Henk-Jan van Tuyl wrote:
> > There are hundreds of HaskellWiki users created, their names all start with 
> > "Buy" and their user pages contain spam. I suppose the antispam measures 
> > were reverted when a backup of the site was loaded. (B.T.W. the site still 
> > displays the old logo.)
> 
> Yikes!
> 
> I see that the Haskell wiki is running Media Wiki 1.5.4 from 2005.
> Current version is 1.15.2 from 2010. That five year period seems to
> include many significant anti-spam fixes and numerous patches for all
> sorts of vulnerabilities. Migrating through that many revisions might
> be painful, but should be doable.
> 

Precisely.

The back story:

* Yale has hosted haskell.org for the past decade or more
* The machine is old and hasn't been upgraded in a long time
* The last MediaWiki update on the machine failed when the db
  couldn't migrated, due to old versions of Debian
* We needed a new machine
* haskell.org now has a new machine aquired with GSoC funds
* This will run a modern MediaWiki
* Work is now being done to migrate to the new home, and the new
  MediaWiki

Ian Lynagh is coordinating the work.

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


Re: [Haskell-cafe] The site has been exploited (again)

2010-07-11 Thread Don Stewart
chrisdone:
> http://haskell.org/
> 
> It says "TO BUY Cilamox ONLINE", etc.
> 
> Whoever has power please fix this and upgrade the bloody wiki. This is
> ridiculous. Point the domain at tryhaskell.org or something. I'll put
> a holder page up. Anything.
> 

It looks like after the Yale machine was repaved, and the mediawiki
instance restored, some plugins (and templates) went missing, including
those that previously prevented such spam accounts.

A new machine has been purchased this week that will become the primary
home for haskell.org, and work is just started to migrate everything to
the new machine -- at which point we'll have a *current* MediaWiki for
the first time in a long time, new templates etc.

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


Re: [Haskell-cafe] Code Example and Haskell Patterns

2010-07-08 Thread Don Stewart
ali.razavi:
> Hi,
> 
> Hackage is a sizable repository of Haskell code; makes me wonder if there is a
> way to use it more effectively for pedagogical purposes. For example, I really
> would like to study State monad, monad transformers, applicative, arrows etc.
> in action--i.e., in the context of a real application rather than small toy
> examples commonly found in tutorials. If there isn't such a source, can 
> someone
> point me to an application whose implementation you would consider being a
> paragon for said concepts?

xmonad uses monad transformers in a canonical fashion, IMO.

For applicatives, some of the parser combinator libraries, like cereal,
provide good use.

You can follow the reverse dependencies to find packages that use things
you're interested in:


http://bifunctor.homelinux.net/~roel/cgi-bin/hackage-scripts/revdeps/arrows-0.4.2.0#direct

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


Re: [Haskell-cafe] Merge hsql and HDBC -- there can only be one!

2010-07-07 Thread Don Stewart
joerg.rudnick:
> Hi Chris,
>
>
> these are good questions -- actually, you might have mentioned Takusen, too.
>
> Clearly, HDBC is the largest of these projects, and there are lots of  
> things well done there.
>
> Takusen has an interesting approach, and I would like to see a  
> discussion here about the practical outcomes, as I have done no testing 
> yet.

It has been used in production at a number of places, including Galois.

 
> I myself quite a time ago had an opportunity to do a Haskell job with a  
> PostgreSQL backend for a client, where I tried out all three and got  
> hsql running easiest. A maintainer was vacant, so I stepped in happily  
> -- doing refactorings, fixing problems at request, giving advice to 
> people.
>
> I can say that I am quite a little PostgreSQL centric and that I have a  
> GIS project in sight, for which I want to try to adapt hsql.

And you have to be wary about the license of HDBC (LGPL) if you want to
use the package in software you redistribute (though this is rarely the
case for database apps, I'm guessing). Satisfying the linking
requirements with GHC -O2 are non-trivial, even with -dynamic.

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


Re: [Haskell-cafe] ANNOUNCE: ghc-gc-tune: a tool for analyzing the impact of GC flags

2010-07-06 Thread Don Stewart
warren.henning:
> On Mon, Jul 5, 2010 at 5:46 PM, Don Stewart  wrote:
> > Feedback and patches welcome!
> 
> Interesting.
> 
> Could this be combined with the ACOVEA compiler flag thing you did a
> while back to produce a tool that would automatically improve
> performance of programs on a fixed architecture/environment just by
> recompiling and running it?

A bit longer term, but yes. So far I've got individual approaches for
improving performance by finding:

* inlining points
* strictness flags
* `par` points
* LLVM flags
* RTS GC flags

They just need to be integrated into a coherent set of tools and written
up :-)

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


[Haskell-cafe] ANNOUNCE: ghc-gc-tune: a tool for analyzing the impact of GC flags

2010-07-05 Thread Don Stewart

Inspired by a comment by Simon Marlow on Stack Overflow, about the time
and space tradeoffs we make with garbage collection, particularly with a
generational GCs, I wrote a small program, ghc-gc-tune, to traverse the
garbage collector variable space, to see the relationship between
settings and program performance. Given a program, it will show you an
(optionally interactive) graph of how -A and -H flags to the garbage
collector affect performance.

http://donsbot.wordpress.com/2010/07/05/ghc-gc-tune-tuning-haskell-gc-settings-for-fun-and-profit/

Feedback and patches welcome!

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


Re: [Haskell-cafe] cereal vs. binary

2010-07-03 Thread Don Stewart
deliverable:
> I dump results of a computation as a Data.Trie of [(Int,Float)].  It
> contains about 5 million entries, with the lists of 35 or less pairs
> each.  It takes 8 minutes to load with Data.Binary and lookup a single
> key.  What can take so long?  If I change from compressed to
> uncompressed (and then decode), it's the same time...  It's not IO,
> CPU is loaded 100%.
> 
> I'm now thinking of using cereal.  Given I have Data.Binary in place,
> what needs to be changed to work with cereal?  Is it binary-
> compatible?  How can one construct a cereal instance for Data.Trie?

cereal and binary are almost identical, one will load from a single
strict bytestring, one will load from a chunk of strict bytestrings. 

I'd imagine that constructing your list is the problem, not the parsing
part. Do some profiling, since I'm doubtful switching to cereal will
make much of a difference.

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


Re: [Haskell-cafe] How easy is it to hire Haskell programmers

2010-07-02 Thread Don Stewart
ivan.miljenovic:
> >> Hmm, interesting. Applicative and Traversable are two classes I've never  
> >> used and don't really understand the purpose of. I have no idea what  
> >> hsc2hs is. I keep hearing finger trees mentioned, but only in connection  
> >> to papers that I can't access. So I guess that means that I don't count  
> >> as a "knowledgable" Haskell programmer. :-(
> >
> > RWH is free and online, and covers many useful things. There's no
> > excuse :-)
> 
> Knowing about something /= knowing how to use it.  I own and have read
> RWH, but I've never had to use hsc2hs, or Applicative, etc.
> 

Writing libraries that bind to C is a great way to have to use a lot of
hsc2hs (or c2hs), so clearly you need to contribute more libraries :-)

But in this case, the OP didn't even know *about* the something.

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


Re: [Haskell-cafe] How easy is it to hire Haskell programmers

2010-07-02 Thread Don Stewart
andrewcoppin:
> Edward Kmett wrote:
>> "Knowledge of Haskell" means very different things to different  
>> people. I'd be somewhat leery of blindly hiring someone based on their  
>> ability to answer a couple of pop Haskell quiz questions.
>>
>> A better test might be if they really understood Applicative and  
>> Traversable, or if they knew how to use hsc2hs; Talk about unboxing  
>> and when to apply strictness annotations, finger trees, stream fusion,  
>> purely functional data structures or ways to implement memoization in  
>> a purely functional setting, or how to abuse side effects to do so in  
>> a less pure way. Those are the kinds of things you get exposed to  
>> through actually using Haskell, rather than through reading a monad  
>> tutorial.
>
> Hmm, interesting. Applicative and Traversable are two classes I've never  
> used and don't really understand the purpose of. I have no idea what  
> hsc2hs is. I keep hearing finger trees mentioned, but only in connection  
> to papers that I can't access. So I guess that means that I don't count  
> as a "knowledgable" Haskell programmer. :-(

RWH is free and online, and covers many useful things. There's no excuse :-)

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


Re: [Haskell-cafe] How easy is it to hire Haskell programmers

2010-07-01 Thread Don Stewart
That's not really true. We train people at Galois in Haskell, on the job.
Often they have prior FP experience, but not always.

aditya.siram:
> > And learning (fun) should be an important aspect of the position.
> Whatever FP you're coming from, I don't think you can pick up Haskell
> on the job. Haskell seems to require you to disappear into a cave for
> a while, then again I haven't had the pleasure of working with
> experienced Haskell programmers.
> 
> -deech
> 
> >
> > Regards,
> > Zura
> >
> >
> > Paul Johnson-2 wrote:
> >>
> >> I'm starting to see job adverts mentioning Haskell as a "nice to have",
> >> and even in some cases as a technology to work with.
> >>
> >> However right now I'm looking at it from the other side.  Suppose
> >> someone wants to hire a Haskell developer or three.  How easy is this?
> >> I'd appreciate replies from people who have actually done this.
> >>
> >> * How many applications did you get?
> >>
> >> * How many of those applicants knew what a monad is, or how to write
> >> FizzBuzz in Haskell?
> >>
> >> Thanks,
> >>
> >> Paul.
> >> ___
> >> Haskell-Cafe mailing list
> >> Haskell-Cafe@haskell.org
> >> http://www.haskell.org/mailman/listinfo/haskell-cafe
> >>
> >>
> >
> > --
> > View this message in context: 
> > http://old.nabble.com/How-easy-is-it-to-hire-Haskell-programmers-tp29038634p29048310.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 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] State of the Hackage: Q1, Q2 2010

2010-07-01 Thread Don Stewart
I think we need to standardise the presentation of this data, and
provide a lib to access it.  I'll think some more about it. Should be
possible to automate it all now (that's mostly done), publish in a known
location, and provide an API for queries.

inforichland:
> If anyone wants to see the popularity of their particular package(s), dons has
> kindly left a .txt file with the information
> at the following URL: http://code.haskell.org/~dons/hackage/Jun-2010/
> popular.txt .
> 
> Of course, this being Haskell, I had to whip up a little script to get the
> information for you.
> 
> It may not be the most elegant, but it only took a few minutes and it does the
> job.  You'll find it attached :)
> 
> Cheers,
>  - Tim
> 
> On Wed, Jun 30, 2010 at 5:08 PM, Don Stewart  wrote:
> 
> 
> Downloads and popular packages on Hackage for Q1 and Q2 this year.
> 
>http://donsbot.wordpress.com/2010/06/30/
> popular-haskell-packages-q2-2010-report/
> 
> -- Don
> ___
> 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] State of the Hackage: Q1, Q2 2010

2010-06-30 Thread Don Stewart

Downloads and popular packages on Hackage for Q1 and Q2 this year.


http://donsbot.wordpress.com/2010/06/30/popular-haskell-packages-q2-2010-report/

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


Re: [Haskell-cafe] How easy is it to hire Haskell programmers

2010-06-30 Thread Don Stewart
paul:
> I'm starting to see job adverts mentioning Haskell as a "nice to have",  
> and even in some cases as a technology to work with.
>
> However right now I'm looking at it from the other side.  Suppose  
> someone wants to hire a Haskell developer or three.  How easy is this?   
> I'd appreciate replies from people who have actually done this.
>
> * How many applications did you get?
>
> * How many of those applicants knew what a monad is, or how to write  
> FizzBuzz in Haskell?

Galois has had no trouble hiring Haskell programmers for a few years
now. Generally, if we advertise a position, we'll have 20-50 applicants
within a few weeks, with often extremely high skill sets.

I've heard anecdotes from other commercial users, with similar
experiences.

The open source training people are getting in Haskell seems to really
be paying off.

For those interested in getting hired, I'd encourage you to distinguish
yourselves in the market as much as you can: write libraries and get
them used by others, blog about what you're doing, be visible in the
community.

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


Re: [Haskell-cafe] Re: Mining Twitter data in Haskell and Clojure

2010-06-28 Thread Don Stewart
claus.reinke:
>
> To binary package users/authors: is there a typed version of binary (that 
> is, one that records and checks a representation of the serialized type 
> before actual (de-)serialization)? It
> would be nice to have such a type check, even though it
> wouldn't protect against missing bytes or strictness changes. 
>

There is a wrapper, that wraps all encodes in a typeOf (iirC), I think
by Edward Kmett, but I couldn't find e.g. binary-typed on Hackage.

-- Don


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


Re: [Haskell-cafe] Re: Mining Twitter data in Haskell and Clojure

2010-06-24 Thread Don Stewart
deliverable:
> Simon -- so how can I get me a new ghc now?  From git, I suppose?  (It
> used to live in darcs...)

It still lives in darcs. 

Nightly builds are here: http://www.haskell.org/ghc/dist/stable/dist/

You'll  want to check with Simon that the patch got pushed, though,
first.

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


Re: [Haskell-cafe] Re: Mining Twitter data in Haskell and Clojure

2010-06-24 Thread Don Stewart
marlowsd:
>> I'll work with Simon to investigate the runtime, but would welcome any
>> ideas on further speeding up cafe4.
>
> An update on this: with the help of Alex I tracked down the problem (an  
> integer overflow bug in GHC's memory allocator), and his program now  
> runs to completion.
>
> This is the largest program (in terms of memory requirements) I've ever  
> seen anyone run using GHC.  In fact there was no machine in our building  
> capable of running it, I had to fire up the largest Amazon EC2 instance  
> available (68GB) to debug it - this bug cost me $26.  Here are the stats  
> from the working program:
>
>  392,908,177,040 bytes allocated in the heap
>  174,455,211,920 bytes copied during GC
>   24,151,940,568 bytes maximum residency (6 sample(s))
>   36,857,590,520 bytes maximum slop
>64029 MB total memory in use (1000 MB lost due to fragmentation)
>
>   Generation 0:62 collections, 0 parallel, 352.35s, 357.13s elapsed
>   Generation 1: 6 collections, 0 parallel, 180.63s, 209.19s elapsed
>
>   INIT  time0.00s  (  0.11s elapsed)
>   MUT   time  1201.47s  (1294.29s elapsed)
>   GCtime  532.98s  (566.33s elapsed)
>   EXIT  time0.00s  (  5.34s elapsed)
>   Total time  1734.46s  (1860.74s elapsed)
>
>   %GC time  30.7%  (30.4% elapsed)
>
>   Alloc rate327,020,156 bytes per MUT second
>
>   Productivity  69.3% of total user, 64.6% of total elapsed

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


[Haskell-cafe] Fwd: signficant improvements to the containers package

2010-06-23 Thread Don Stewart
Some people might be quite excited by Milan's work on significant
performance improvements to the containers package...

- Forwarded message from Milan Straka  -

Date: Thu, 24 Jun 2010 07:45:50 +0200
From: Milan Straka 
To: Don Stewart 
Cc: Claus Reinke , librar...@haskell.org
Subject: Re: Map folds in containers: why no worker/wrapper split?

> 
> Data.Map is the way it is for historical reasons.  It needs a dedicated
> performance maintainer to do detailed benchmarking and static analysis.

I did quite a lot of benchmarking, strictness analysis and performance
improvements to the containers package recently, see the draft of my
paper http://fox.ucw.cz/papers/containers/containers.pdf.

Next week I will start finalizing the patches and submit them. The 'not
generating a worker/wrapper' issue is one of several on my radar, so
this should be resolved.

Cheers,
Milan

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


Re: [Haskell-cafe] CnC Haskell

2010-06-23 Thread Don Stewart
vigalchin:
> Hello,
> 
>  I have been reading work done at Rice University:  http://
> habanero.rice.edu/cnc. Some work has been done by http://www.cs.rice.edu/
> ~dmp4866/ on CnC for .Net. One component that David wrote a CnC translator 
> that
> translates CnC textual form to the underlying language, e.g. F#. Is anybody
> working on a CnC textual form translator for Haskell so a Haskell user of CnC
> Haskell can write in a higher level??

Ah, so a translator from high level CnC form to this:


http://hackage.haskell.org/packages/archive/haskell-cnc/latest/doc/html/Intel-Cnc.html

? Do you have a reference for the "CnC textual form"?

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


Re: [Haskell-cafe] Relating generated asm to Core

2010-06-22 Thread Don Stewart
Rami.Mukhtar:
> Hi,
> 
> Can anyone tell me a way to identify the generated assembly (as found in the
> intermediate files produced by GHC) corresponding to a particular fragment of
> Core code.  

Hey Rami,

I use the ghc-core tool:

http://hackage.haskell.org/package/ghc-core

Which displays both the core and assembly in a pager, with syntax
highlighting. 

In general, if you see "foo" in the Core, you're looking for "foo_entry"
or similar in the assembly.

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


Re: [Haskell-cafe] Huffman Codes in Haskell

2010-06-22 Thread Don Stewart
john:
> On Tue, Jun 22, 2010 at 06:24:22PM +0100, Andrew Coppin wrote:
> > John Meacham wrote:
> >> In particular, a Huffman coding:
> >> http://en.wikipedia.org/wiki/Huffman_coding
> >> is ideal for this (assuming you just are taking advantage of frequency
> >> analysis). A dynamic Huffman Tree will even adapt as it is being used to
> >> whatever the current language is. Huffman Trees are easy and fun to
> >> implement too.
> >>   
> >
> > Interestingly, Huffman coding is one of those problems with a trivially  
> > simple mathematical expression, which none the less turns out to be  
> > difficult to express succinctly in Haskell. Oh, you can *do* it. It just  
> > seems to take a surprising amount of typing...
> 
> Hmmm Do I hear a challenge? :)
> 
> Actually, I can't find my huffman code at the moment, I would be
> curious what others take on the problem was.
> 

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

A simple and pure Haskell implementation of the Huffman encoding algorithm.

Google turns up a lot of results.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Mapping a list of functions

2010-06-17 Thread Don Stewart
Martin.Drautzburg:
> Hello all
> 
> The standard map function applies a single function to a list of arguments. 
> But what if I want to apply a list of functions to a single argument. I can 
> of course write such a function, but I wonder if there is a standard way of 
> doing this,

map ($ 2) [(*2), (+1), (^7)]


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


Re: [Haskell-cafe] Re: What is Haskell unsuitable for?

2010-06-17 Thread Don Stewart
deliverable:
> At this very moment I'm struggling with fitting a huge graph of
> Twitter communications into a Haskell program.  Apparently it gets
> into a loop freeing memory.  As I suspected, JVM garbage collector got
> more testing than Haskell at this scale; since not many people load it
> up as much, it may be less tested.  

Did you talk to Simon Marlow yet? Unlike the JVM, we provide direct
access to the GC developers when you run into trouble. :)

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


Re: [Haskell-cafe] Re: Mining Twitter data in Haskell and Clojure

2010-06-15 Thread Don Stewart
deliverable:
> Wren -- thanks for the clarification!  Someone said that Foldable on
> Trie may not be very efficient -- is that true?
> 
> I use ByteString as a node type for the graph; these are Twitter user
> names.  Surely it's useful to replace them with Int, which I'll try,
> but Clojure works with Java String fine and it simplifies all kinds of
> exploratory data mining and debugging to keep it as a String, so I'll
> try to get the most mileage from other things before interning.

bytestring seems appropriate.

> What's the exact relationship between Trie and Map and their
> respective performance?

Tries specialized to bytestring keys should outperform the generic Map.

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


Re: [Haskell-cafe] Re: Mining Twitter data in Haskell and Clojure

2010-06-15 Thread Don Stewart
deliverable:
> > If you just want to optimize it and not compare exactly equal idiomatic 
> > code,
> > you should stop using functional data structures and use a structure that 
> > fits
> > your problem (the ST monad has been designed for that in Haskell), because
> > compilers do not detect single-threaded usage and rewrite all your code to
> > something mutable and thereby avoid O(log n) costs.
> >
> > In practice it is probably easier to write the whole thing against the 
> > parallel
> > Boost Graph Library (a C++ library), since that library provides the
> > abstractions that you would want. If you go this path, it will probably end 
> > up
> > being 10-100 times faster.
> 
> Surely I can rewrite it in C++ or just C and gain speedup, but not
> maintainability and ease of prototyping algorithms -- the main reasons
> I switched to FP, with added reliability, conciseness, reasonable
> syntax bonuses.  It turned out Clojure is quite capable of doing it
> well, but has Null Pointer Exceptions and "debug data shape by
> running" annoying to an ML programmer; trying Haskell for speedup is
> worth it!  It proves less predictable than expected -- e.g. with OCaml
> if it typechecks and runs, it usually runs fast.  The point of this
> exercise is to identify typical performance bottlenecks in the domain
> and see how they can be avoided.  The jury's still out on this one.

Following the algorithm for performance tuning in the previous email
should be enough. Have you obtained heap profiles yet?

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


Re: [Haskell-cafe] Re: Mining Twitter data in Haskell and Clojure

2010-06-14 Thread Don Stewart
deliverable:
> I've supplied a profile report there.  Since I load the graphs in
> memory and then walk them a lot, the time seems expected.  It
> allocates a lot, though.  The main graph type is
> 
> 
> type Graph = M.Map User AdjList
> type AdjList = M.Map Day Reps
> type User = B.ByteString
> type Day = Int
> type Reps = M.Map User Int
> 
> and I walk it with M.foldWithKey.  Folks said it's not strict enough,
> hence I tried to seq the step function, but to no avail so far.

Oh, you'll want insertWith'.

You might also consider bytestring-trie for the Graph, and IntMap for
the AdJList ?

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


Re: [Haskell-cafe] Mining Twitter data in Haskell and Clojure

2010-06-13 Thread Don Stewart
deliverable:
> I'm computing a communication graph from Twitter data and then scan it
> daily to allocate social capital to nodes behaving  in a good karmic
> manner.  The graph is culled from 100 million tweets and has about 3
> million nodes. First I wrote the simulation of the 35 days of data in
> Clojure and then translated it into Haskell with great help from the
> glorious #haskell folks.  I had to add -A5G -K5G to make it work.  It
> does 10 days OK hovering at 57 GB of RAM; I include profiling of that
> in sc10days.prof.
> 
> At first the Haskell executable goes faster than Clojure, not by an
> order of magnitude, but by 2-3 times per day simulated.  (Clojure also
> fits well in its 32 GB JVM with compressed references.)  However,
> Haskell gets stuck after a while, and for good.  Clearly I'm not doing
> Haskell optimally here, and would appreciate optimization advice.
> Here's the code:
> 
> http://github.com/alexy/husky
> 
> The data and problem description is in
> 
> http://github.com/alexy/husky/blob/master/Haskell-vs-Clojure-Twitter.md
> 
> -- also referred from the main README.md.
> 
> The main is in sc.hs, and the algorithm is in SocRun.hs.  The original
> Clojure is in socrun.clj.  This is a continuation of active Twitter
> research and the results will be published, and I'd really like to
> make Haskell work at this scale and beyond!  The seq's sprinkled
> already did no good.  I ran under ghc 6.10 with -O2 with or without -
> fvia-C, with no difference in stallling, and am working to bring 6.12
> to bear now.

Hey. Very cool!

When you run it with +RTS -s what amount of time is being spent in
garbage collection?

What are you main data types?

When you compile with -prof -auto-all and do some heap profiling, what
do you see?

There's an introduction to profiling with GHC's heap and time tools here:


http://book.realworldhaskell.org/read/profiling-and-optimization.html#id677729

Either way:

* step one: do time profiling
* step two: do space/heap profiling
* look at the main data types being allocated and improve their
  representation.
* look at  the main functions using time, and improve their
  complexity.
* iterate until happy.


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


Re: [Haskell-cafe] Problems with threading?

2010-06-11 Thread Don Stewart
igouy2:
> 
> parallel, regex-posix, regex-pcre are now installed and the current
> compile errors are caused by the programs not the absence of required
> libraries -
> 
> http://shootout.alioth.debian.org/u64q/program.php?test=binarytrees&lang=ghc&id=2#log
> 
> http://shootout.alioth.debian.org/u64q/program.php?test=binarytrees&lang=ghc&id=3#log
> 
> http://shootout.alioth.debian.org/u64q/program.php?test=regexdna&lang=ghc&id=4#log
> 
> http://shootout.alioth.debian.org/u64q/program.php?test=regexdna&lang=ghc&id=1#log

Great work!

For those keen to help out the Haskell programs, both compile failures
in regexdna and binarytrees are related to the change in how parallel
strategies work, as described here.


http://hackage.haskell.org/packages/archive/parallel/2.2.0.1/doc/html/Control-Parallel-Strategies.html

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


Re: [Haskell-cafe] Problems with threading?

2010-06-10 Thread Don Stewart
igouy2:
> > Simon Marlow described how best to parallelize this problem
> > extensively
> > in:
> > 
> >     http://www.haskell.org/~simonmar/bib/multicore-ghc-09_abstract.html
> > 
> > So I'd suggest doing what he says.
> > 
> > In particular, use thread pinning to improve locality.
> 
> -qw -qm ?
> 
> How's that going to work out when applied to the other Haskell programs?
> 

I'm sure it does bad things to them. 

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


Re: [Haskell-cafe] Problems with threading?

2010-06-10 Thread Don Stewart
igouy2:
> > > > In particular, use thread pinning to improve
> > locality.
> > > 
> > > -qw -qm ?
> > > 
> > > How's that going to work out when applied to the other
> > Haskell programs?
> > > 
> > 
> > I'm sure it does bad things to them. 
> 
> 
> Yep, earlier in the week I measured the programs using +RTS -N4 -qw
> -qm which is why I wonder how you would approach programs that have a
> mix of performance characteristics? Maybe there aren't large Haskell
> programs like that?

Partioning different parallel components of the application has been
studied in large scale systems. I'm not aware of work done on this in
Haskell yet.

If different phases of a algorithm need to use more or less parallelism,
that's certainly a lot easier (mixtures of forkOnIO and (forkIO or
par)). 

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


Re: [Haskell-cafe] Problems with threading?

2010-06-10 Thread Don Stewart
wasserman.louis:
> 
> There are 4 sets of "rankings" so -
> 
> 
> http://shootout.alioth.debian.org/u64/program.php?test=threadring&lang=ghc&;
> id=3
> 
> 
> Yes, but Haskell used to be doing much better specifically on the u64q, which
> was why I was surprised.

Oh, indeed,

http://shootout.alioth.debian.org/u64q/performance.php?test=threadring

Something broke.

Simon Marlow described how best to parallelize this problem extensively
in:

http://www.haskell.org/~simonmar/bib/multicore-ghc-09_abstract.html

So I'd suggest doing what he says.

In particular, use thread pinning to improve locality.

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


Re: [Haskell-cafe] Problems with threading?

2010-06-09 Thread Don Stewart
igouy2:
> 
> Now how do we get those regex-dna and binary-trees programs to compile?
> 
> http://shootout.alioth.debian.org/u32/measurements.php?lang=ghc
> 

binary-trees:
Could not find module `Control.Parallel.Strategies':

--> cabal install parallel

regex-dna:

" cannot satisfy -package regex-posix"

--> cabal install regex-posix


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


Re: [Haskell-cafe] Strange discrepancy between Emacs interpreter and command-line on windows

2010-06-09 Thread Don Stewart
arnaud.oqube:
> Hello,
> I have a strange issue which sprang today out of nowhere. When I load
> a certain file using bytestring package in Ghci using emacs, I got the
> following error:
> 
> Couldn't match expected type `Data.ByteString.Internal.ByteString'
>against inferred type
> `bytestring-0.9.1.4:Data.ByteString.Internal.ByteString'
> In the second argument of `hPutStrLn', namely `(fromString msgs)'
> In a stmt of a 'do' expression: hPutStrLn cnx (fromString msgs)
> 
> The same file compiles fine on the command-line. I have a single
> installation of haskell platform, using ghc 6.10.4, on windows XP.
> 

Looks like you might have two versions of bytestring installed (ghc-pkg
list bytestring) and are attempting to combine them. The diamond
dependency problem.

* delete the old version (ghc-pkg unregister)
* recompile any libs that depend on it.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


<    1   2   3   4   5   6   7   8   9   10   >