Michael D. Adams | 13 Nov 19:16 2013
Picon

ANNOUNCE: Haskell Pdf Presenter (hpdfp) 0.2.2

ANNOUNCE: Haskell Pdf Presenter (hpdfp) 0.2.2

I'm pleased to announce the first public release of the Haskell Pdf
Presenter (hpdfp).

Project home page:
  http://michaeldadams.org/projects/haskell-pdf-presenter/

Project on Hackage:
  http://hackage.haskell.org/package/haskell-pdf-presenter/

Project repository:
  http://michaeldadams.org/repos-pub/hg/haskell-pdf-presenter/

What it is
==========
The Haskell Pdf Presenter (hpdfp) is a tool for presenting PDF-based
slide shows.  For example, as a presenter, I like to see the next slide
before it is shown to the audience as well as how much allotted time
remains.  I was never quite satisfied with the existing tools for this,
so I wrote my own and hpdfp is the result.

Though I originally wrote it for my own use, the tool has matured over
time, and I now wish to share it with others.  Aside from being a
useful tool, I think hpdfp is a good example of elegance and economy
in program design.  Despite being only a thousand lines long, this
program is full of features that may not be obvious at first glance so
please be sure to look at the available help.

Status
(Continue reading)

Niklas Hambüchen | 13 Nov 20:57 2013

Re: [Haskell-cafe] ANNOUNCE: Haskell Pdf Presenter (hpdfp) 0.2.2

That is great, I've been interested in that program since your POPL 
talk.

One problem I've had with it so far:
It takes 100% CPU time when idle, which makes my laptop go quite hot.
Any idea why that could be?

On Wed 13 Nov 2013 18:16:48 GMT, Michael D. Adams wrote:
> ANNOUNCE: Haskell Pdf Presenter (hpdfp) 0.2.2
>
> I'm pleased to announce the first public release of the Haskell Pdf
> Presenter (hpdfp).
>
> Project home page:
>   http://michaeldadams.org/projects/haskell-pdf-presenter/
>
> Project on Hackage:
>   http://hackage.haskell.org/package/haskell-pdf-presenter/
>
> Project repository:
>   http://michaeldadams.org/repos-pub/hg/haskell-pdf-presenter/
>
> What it is
> ==========
> The Haskell Pdf Presenter (hpdfp) is a tool for presenting PDF-based
> slide shows.  For example, as a presenter, I like to see the next slide
> before it is shown to the audience as well as how much allotted time
> remains.  I was never quite satisfied with the existing tools for this,
> so I wrote my own and hpdfp is the result.
>
(Continue reading)

Michael D. Adams | 14 Nov 09:14 2013
Picon

Re: ANNOUNCE: Haskell Pdf Presenter (hpdfp) 0.2.2

When the program is doing background rendering, it will go to 100% CPU
time, but once the background rendering completes, it should settle
down to almost no CPU usage at all (my task manager literally shows 0%
CPU once pre-rending completes).

Does this high CPU usage happen even when you don't load a PDF?

After loading a PDF, there will be a small progress bar that races
across the bottom of the presenter window.  This represents the
pre-rendering process.  Does the CPU usage lower after that process
completes?  (If you need to run the experiment a few times, note that
pressing Ctrl-R will flush the cache and re-trigger pre-rending.)

If what you are seeing isn't just the background rendering, then the
first place I would look is to see if the render thread is properly
switching from renderThreadSoon (which burns up CPU) to
renderThreadDelayed (which has a 100ms delay to avoid burning up CPU).
 You might also try changing the 100ms delay in renderThreadDelayed
(HaskellPdfPresenter.hs line 932) to something larger like 1000ms.

What operating system, compiler and package versions are you using?

If you have any other clues, figure out what is going on, or if there
is any way I can help you solve this, please let me know.

On Wed, Nov 13, 2013 at 1:57 PM, Niklas Hambüchen <mail <at> nh2.me> wrote:
> That is great, I've been interested in that program since your POPL
> talk.
>
> One problem I've had with it so far:
(Continue reading)

Niklas Hambüchen | 14 Nov 15:51 2013

Re: ANNOUNCE: Haskell Pdf Presenter (hpdfp) 0.2.2

On 14/11/13 08:14, Michael D. Adams wrote:
> When the program is doing background rendering, it will go to 100% CPU
> time, but once the background rendering completes, it should settle
> down to almost no CPU usage at all (my task manager literally shows 0%
> CPU once pre-rending completes).
> 
> Does this high CPU usage happen even when you don't load a PDF?
> 
> After loading a PDF, there will be a small progress bar that races
> across the bottom of the presenter window.  This represents the
> pre-rendering process.  Does the CPU usage lower after that process
> completes?  (If you need to run the experiment a few times, note that
> pressing Ctrl-R will flush the cache and re-trigger pre-rending.)

You are right, it is the background rendering.

I accidentally re-triggered it multiple times by re-sizing the window.

Thanks for your explanation!
abau | 5 Sep 13:24 2010
Picon

Re: [Haskell-cafe] Announce: lhae

Serguey Zefirov <sergueyz <at> gmail.com> wrote:
> You had selected wxWidgets because of what?

Because of the neat grid class in wxWidgets. I did not find
anything comparable in gtk.

> Also, how long did it took (especially GUI part)?

Hard to say, because I work on that project on irregular times in my
spare time. But the GUI part was not the big deal, because wxhaskell
is such a handy library.

[1] http://docs.wxwidgets.org/stable/wx_wxgrid.html

_____________________________________________
HTWK Leipzig FIMN Webmail
 https://webmail.imn.htwk-leipzig.de/nocc/
abau | 5 Sep 13:37 2010
Picon

Re: [Haskell-cafe] Announce: lhae

> Seems cool, but I do not really get it : why write it in haskell ? I
> thought at first that your "formula language" was haskell, but it
> looks more like a php derivative.

This "formula language" is just a very simple language to insert formulas into cells. It has nothing to do
with haskell.

> Does it do more than the spreadsheet thing in openoffice ?

I don't know the spreadsheet in openoffice, but I don't think that lhae does anything more or better than openoffice.

> Also, maybe you could do the same with gnuplot, it would be really
> cool to be able to use a friendlier language for defining functions
> other than polynomials or the few standard floating point functions.

Sorry, but I don't understand this point. I thought gnuplot is just for plotting graphs. But lhae is a (low
level) spreadsheet application. But I may got something wrong on your question?

_____________________________________________
HTWK Leipzig FIMN Webmail
 https://webmail.imn.htwk-leipzig.de/nocc/
Chris Wong | 4 Jun 06:25 2012
Picon

Re: [Haskell-cafe] Announce: Haskell Platform 2012.2.0.0

On Mon, Jun 4, 2012 at 1:16 PM, Jens Petersen
<juhp@...> wrote:
> Congratulations on the release!
> Equally surprising to me is that the number of slashes
> also seems to affect the CSS presentation of the website
> in Chrome.
>
> // seems to give the Summer theme,
> whereas / gives the Winter one!
>
> Kind of weird.  Anyway I agree it would be better to avoid
> the superfluous slashes if possible.

Your browser might be caching the file. Try pressing Ctrl-F5 on the
winter page to force a reload.

> I am going build HP 2012.2 for Fedora 18 soon but
> the first proper build may be after ghc-7.4.2 is released.
>
> Jens
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe@...
> http://www.haskell.org/mailman/listinfo/haskell-cafe
Johannes Waldmann | 13 Nov 23:47 2013
Picon

Re: ANNOUNCE: Haskell Pdf Presenter (hpdfp) 0.2.2


> ANNOUNCE: Haskell Pdf Presenter (hpdfp) 0.2.2

could you explain how you compile this? 
(what compiler, what version of base, etc.)

For me, it does not work with ghc-7.6.3 (binary package)
because gtk2hs does not work
hackage version (0.12.4) does not work because of 
/tmp/gtk-0.12.4-7461/gtk-0.12.4/SetupWrapper.hs:94:45:
    Ambiguous occurrence `moreRecentFile'
and darcs version (0.12.4.1) breaks with
Graphics/UI/Gtk/Printing/PrintOperation.chs:409:6:
    Couldn't match expected type `Ptr ()' with actual type `Window'

and it also does not work with ghc/fedora (distro package) 7.4.2
HaskellPdfPresenter.hs:901:10:
    Ambiguous occurrence `catch'
    It could refer to either `Prelude.catch',
                             imported from `Prelude' at
HaskellPdfPresenter.hs:1:1
                             (and originally defined in `System.IO.Error')
                          or `Control.Exception.catch',

- J.W.
Michael D. Adams | 14 Nov 09:29 2013
Picon

Re: ANNOUNCE: Haskell Pdf Presenter (hpdfp) 0.2.2

I am compiling with GHC 7.6.1 (Ubuntu), Base 4.6.0.0, Cabal 1.16, glib
0.12.4, poppler 0.12.2.2, gtk 0.12.4, cairo 0.12.4 (all from Hackage).

The Hackage version of glib, etc. do not work with Cabal 1.18 due it
adding 'moreRecentFile' to the API.  However, it does seem to work if
you downgrade the Cabal package to 1.16.  It is any easy fix to rename
the function to avoid the conflict, so I'm not sure why the package
maintainers for glib, etc. haven't already done that.

If you make the following change does hpdfp build with ghc/fedora
(distro package) 7.4.2?  (If so, I'll upload a new version of the
package with the patch.)

--- a/HaskellPdfPresenter.hs Wed Nov 13 12:11:26 2013 -0600
+++ b/HaskellPdfPresenter.hs Thu Nov 14 02:22:57 2013 -0600
 <at>  <at>  -898,7 +898,7  <at>  <at> 

 -- Load a new PDF document
 openDoc state uri = do
-  doc <- catch (documentNewFromFile uri Nothing)
+  doc <- Control.Exception.catch (documentNewFromFile uri Nothing) --
Explicit modules to avoid ambiguity in GHC 7.4
            (\x -> errorDialog ("Error opening \"" ++ uri ++ "\": " ++
show (x :: GError)) >> return Nothing)
   case doc of
     Nothing -> errorDialog ("Unknown error opening \"" ++ uri ++
"\"") >> return True

On Wed, Nov 13, 2013 at 4:47 PM, Johannes Waldmann
<waldmann <at> imn.htwk-leipzig.de> wrote:
(Continue reading)

Michael D. Adams | 15 Nov 09:21 2013
Picon

Re: ANNOUNCE: Haskell Pdf Presenter (hpdfp) 0.2.2

I have published a new version (0.2.3) to Hackage that should fix this
build error.

On Thu, Nov 14, 2013 at 2:29 AM, Michael D. Adams <mdmkolbe <at> gmail.com> wrote:
> I am compiling with GHC 7.6.1 (Ubuntu), Base 4.6.0.0, Cabal 1.16, glib
> 0.12.4, poppler 0.12.2.2, gtk 0.12.4, cairo 0.12.4 (all from Hackage).
>
> The Hackage version of glib, etc. do not work with Cabal 1.18 due it
> adding 'moreRecentFile' to the API.  However, it does seem to work if
> you downgrade the Cabal package to 1.16.  It is any easy fix to rename
> the function to avoid the conflict, so I'm not sure why the package
> maintainers for glib, etc. haven't already done that.
>
> If you make the following change does hpdfp build with ghc/fedora
> (distro package) 7.4.2?  (If so, I'll upload a new version of the
> package with the patch.)
>
> --- a/HaskellPdfPresenter.hs Wed Nov 13 12:11:26 2013 -0600
> +++ b/HaskellPdfPresenter.hs Thu Nov 14 02:22:57 2013 -0600
>  <at>  <at>  -898,7 +898,7  <at>  <at> 
>
>  -- Load a new PDF document
>  openDoc state uri = do
> -  doc <- catch (documentNewFromFile uri Nothing)
> +  doc <- Control.Exception.catch (documentNewFromFile uri Nothing) --
> Explicit modules to avoid ambiguity in GHC 7.4
>             (\x -> errorDialog ("Error opening \"" ++ uri ++ "\": " ++
> show (x :: GError)) >> return Nothing)
>    case doc of
>      Nothing -> errorDialog ("Unknown error opening \"" ++ uri ++
(Continue reading)

Niklas Hambüchen | 14 Nov 15:52 2013

Re: ANNOUNCE: Haskell Pdf Presenter (hpdfp) 0.2.2

On 13/11/13 22:47, Johannes Waldmann wrote:
> 
>> ANNOUNCE: Haskell Pdf Presenter (hpdfp) 0.2.2
> 
> could you explain how you compile this? 
> (what compiler, what version of base, etc.)

I managed to install it with a plain `cabal install`.
I used the GHC binaries from the web site and no Haskell Platform installed.
Michael D. Adams | 15 Nov 08:59 2013
Picon

Re: ANNOUNCE: Haskell Pdf Presenter (hpdfp) 0.2.2

Apparently the following command gets around these build problems
(provided of course that you have Cabal 1.16 installed).

cabal install --cabal-lib-version=1.16.0 poppler

I haven't tested it personally, but thought I'd pass it on.

On Thu, Nov 14, 2013 at 8:52 AM, Niklas Hambüchen <mail <at> nh2.me> wrote:
> On 13/11/13 22:47, Johannes Waldmann wrote:
>>
>>> ANNOUNCE: Haskell Pdf Presenter (hpdfp) 0.2.2
>>
>> could you explain how you compile this?
>> (what compiler, what version of base, etc.)
>
> I managed to install it with a plain `cabal install`.
> I used the GHC binaries from the web site and no Haskell Platform installed.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe <at> haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

Gmane