I'll not address docstrings vs. pod at all. Users, especially, those
who are not nuts about programming, really like a notebook to work and
to document their workflow (not code they want to distribute).  My
best guess for why there is a python notebook and no PDL notebook is
that computational python has an enormous userbase and lots of money
and PDL has a relatively small userbase and no money (which pushes the
question back to a larger one.)  I think POD is great, but that it's a
red herring here.

I also guess, based on some interactions, is that something like 90%
percent of the people who might use these tools
(PDL/python/mathematica/matlab,...)  will not even consider it unless
there is a notebook. I almost always prefer to work with command line
tools within an emacs shell buffer because it offers uniformity, and
because I am one of the rare users of high-level scientific software
who is also a programmer-type. A pdl commint mode would be great-- I
don't think it exists, but I doubt I could get the Sloan foundation to
give me a million dollars to write one. Even so, sometime I might like
something that can include latex quality math and images in a demo,
especially if I want to reach a wide audience.

Also, by giving the masses what they want, you also increase the
general level of development and will get more complete coverage of
the things you do care about. Otherwise, you have something that can
only appeal to programmers, and eventually not even them, because
of the more complete coverage in the popular tool.

-John

> tim

 Apples, oranges, and bananas! POD is far more expressive than Python's doc
strings because it actually has typesetting capabilities and is not
chained
to specific functions or class definitions. In fact, I have used POD
in the
 exact way that you describe only works with notebooks! :-)

 But, let's stick with the fruit analogy. Perl programmers have really good
 apples. The PDL documentation subsystem provides us a way to get our
 bananas, too. It is not a huge surprise, then, that nobody has felt
compelled to plant orange trees, even though they're an excellent
source of
 vitamin C.

 David
 -------------- next part --------------
 An HTML attachment was scrubbed...
URL:
<http://mailman.jach.hawaii.edu/pipermail/perldl/attachments/20121218/108e2a95/attachment-0001.html>

 ------------------------------

 Message: 2
 Date: Tue, 18 Dec 2012 10:00:33 -0500
 From: "Zheng, Xin (NIH) [C]" <[email protected]>
 To: David Mertens <[email protected]>
 Cc: "[email protected]" <[email protected]>
 Subject: Re: [Perldl] PLplot histogram question
 Message-ID:
 <[email protected]>
 Content-Type: text/plain; charset="us-ascii"

Thank you for the links. I work on some huge data. So first the
Gnuplot seems not efficient enough since it relies on pipe to transfer data. The Prima looks not easy. I am going to use bargraph in plplot. PLplot is good. Looking forward to more functions in PDL::Graphics::PLplot.

 Xin

 From: David Mertens [mailto:[email protected]]
 Sent: Tuesday, December 18, 2012 1:17 AM
 To: Zheng, Xin (NIH) [C]
 Cc: [email protected]
 Subject: Re: [Perldl] PLplot histogram question

Check out the bargraph method. In case you haven't seen it yet,
PDL::Graphics::PLplot is documented in chapter 9 of the PDL Book: http://pdl.perl.org/content/pdl-book-toc.html
That having been said, there is quite a bit of active work these days
on PDL::Graphics::Gnuplot and PDL::Graphics::Prima. I'll be happy to expound at greater length, if you wish. :-)
 david

On Mon, Dec 17, 2012 at 4:24 PM, Zheng, Xin (NIH) [C]
<[email protected]<mailto:[email protected]>> wrote:
 Hi there,

I am wondering if there's a way to draw frequency in histogram, not
counts. Thanks a lot for any help.

 Best,

 Xin


 _______________________________________________
 Perldl mailing list
 [email protected]<mailto:[email protected]>
 http://mailman.jach.hawaii.edu/mailman/listinfo/perldl



 --
 "Debugging is twice as hard as writing the code in the first place.
 Therefore, if you write the code as cleverly as possible, you are,
 by definition, not smart enough to debug it." -- Brian Kernighan
 -------------- next part --------------
 An HTML attachment was scrubbed...
URL:
<http://mailman.jach.hawaii.edu/pipermail/perldl/attachments/20121218/5288cc1d/attachment-0001.html>

 ------------------------------

 Message: 3
 Date: Tue, 18 Dec 2012 10:19:00 -0500
 From: "Zheng, Xin (NIH) [C]" <[email protected]>
 To: David Mertens <[email protected]>, Pablo marin-garcia
 <[email protected]>
 Cc: perldl list <[email protected]>
 Subject: Re: [Perldl] Is there a perl tool like ipython notebook?
 would be very useful for scratching (and teaching) pdl scripts
 Message-ID:
 <[email protected]>
 Content-Type: text/plain; charset="us-ascii"

You are talking about something like "literate programming", or we can
say "literate analysis". Personally I would like to do that with noweb in Emacs. It sounds very nice to have mixed pod renderer + code editor. Just put my 2 cents, how about making a plugin of Padre?

 XZ

 From: David Mertens [mailto:[email protected]]
 Sent: Tuesday, December 18, 2012 1:07 AM
 To: Pablo marin-garcia
 Cc: perldl list
Subject: Re: [Perldl] Is there a perl tool like ipython notebook?
would be very useful for scratching (and teaching) pdl scripts

Wow, I'm sorry for not getting to this sooner. (And I'm sorry nobody
else beat me to it.)
For those who do not know, Sweave allows its users to embed their
calculation code directly into their LaTeX documents. This is very handy for many reasons. The author says that such documents "can be automatically updated if data or analysis change, which allows for truly reproducible research." ipython notebooks allow their users to intermingle rich text and Python code, with a similar sort of aim. That actually sounds more to me like a Mathematica notebook than Sweave, though perhaps Sweave users actually use it more like Mathematica than I realize.
The quick answer is "No, Perl and PDL do not have any near-clones of
such facilities." But there are reasons.

The chief reason is that Perl's documentation format, POD, is actually
really good, unlike Python's documentation format, for example. As such, Perl programmers have bent their expectations and mode of expression into using the tool at hand (POD) rather than creating the more expressive notebook style of documenting things.

Another reason why Perl and PDL has not evolved a notebook style of
documenting things is that it is not inherently better than POD documentation, or even simple scripts with comments. It's different, and it may work with your brain better than POD or well written code comments, but for many people a notebook facility would lead to terrible habits. The real issue at hand is that of preserving provenance, and I am not convinced that a notebook actually helps one to cleanly preserve the provenance of one's data any better than a collection of well written and documented scripts with a clear starting point. For example, I have found that writing a README.pod file that helps orient my potential colleague, together with well-written pod in each of my scripts, is a fantastic way for me to get my head around how my data gets transformed. Admittedly, it's easy to get behind on this sort of thing, so I eventually created a simple GUI program using Prima that displays a list of the scripts in a selection list on the left of the window, and the script's pod documentation on the right. This made me feel much more compelled to explain the workings of my scripts in detail, and to include references to the results from other scripts. (Adding a button at the bottom to "Edit Script" removed the barrier of finding and opening those scripts, making the whole process even better.) Still, I find that if I have anything worth publishing in a journal, it's worth creating a bona fide set of modules to handle all the calculations for me. Then the data analysis becomes a collection of simple scripts, and the provenance of my data is apparent just from reading those scripts.

I find the idea of creating some sort of integrated code +
documentation intriguing. I wrote App::Prima::REPL to provide a GUI shell instead of the command-line shell. I would be quite interested in taking your idea of notebooks and incorporating them, somehow, into App::Prima::REPL, if you have ideas and time to help. It already has the capability to open code in a tab. Perhaps we could develop some sort of mixed pod renderer + code editor?
 David

On Sat, Nov 17, 2012 at 10:41 AM, Pablo marin-garcia
<[email protected]<mailto:[email protected]>> wrote:
 I have just recently discovered ipython notebooks[1] and and like (R
 sweave[2]) they are essential for reproducible research.

 Being pdl a scientific tool these kind of utilities seems a perfect
 match. Do someone knows something similar in Perl to be use with pdl2
 shell?

 [1] http://blog.fperez.org/2012/09/blogging-with-ipython-notebook.html
 [3] http://www.stat.uni-muenchen.de/~leisch/Sweave/

 --
 - Pablo Marin-Garcia

 _______________________________________________
 Perldl mailing list
 [email protected]<mailto:[email protected]>
 http://mailman.jach.hawaii.edu/mailman/listinfo/perldl



 --
 "Debugging is twice as hard as writing the code in the first place.
 Therefore, if you write the code as cleverly as possible, you are,
 by definition, not smart enough to debug it." -- Brian Kernighan
 -------------- next part --------------
 An HTML attachment was scrubbed...
URL:
<http://mailman.jach.hawaii.edu/pipermail/perldl/attachments/20121218/a130cc68/attachment.html>

 ------------------------------

 _______________________________________________
 Perldl mailing list
 [email protected]
 http://mailman.jach.hawaii.edu/mailman/listinfo/perldl


 End of Perldl Digest, Vol 91, Issue 8
 *************************************

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to