Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Hacking a source filter into the #! line

by dcmertens (Scribe)
on Jul 24, 2014 at 15:52 UTC ( [id://1094932]=note: print w/replies, xml ) Need Help??


in reply to Re: Hacking a source filter into the #! line
in thread Hacking a source filter into the #! line

Heh, I'm actually being serious about this. I have found it astoundingly helpful to embed my code among the thoughts, figures, and equations that clarify the code itself. So far, my usual process has been to create a single document with many different, but related ideas, accessible via different commands. By framing the commands in different packages and using inheritance, I can explore evolving concepts for how to solve whatever problem I am working on. For the moment I've rolled my own command system, but I'm considering switching to MooX::Cmd.
  • Comment on Re^2: Hacking a source filter into the #! line

Replies are listed 'Best First'.
Re^3: Hacking a source filter into the #! line
by tobyink (Canon) on Jul 24, 2014 at 15:56 UTC

    Certainly. I'm going to be doing quite a bit of writing code and thoughts related to the code over the next few months. However, my solution will be to keep the code and thoughts in separate files, and scatter "include" tags in the thoughts, so that they can be "compiled" into a single document.

      One of the really nice things about my source filter is that it converts math inset strings into Perl-acceptable barewords. This means I can use subscripts, superscripts, decorations, and other general math symbols in my variable and function names. LyX renders these using standard TeXish math typography, so my variable and function names are visually concise and descriptive.

      In the end, this means that you and I have slightly different use situation. I plan on simply reading my ideas and code within the LyX editor itself. It can produce a PDF for me, but I don't plan to use that to review my code. I use that to read through the results, with small references to the code. (I often place the bulk of the code in non-rendered Note blocks within LyX.)

      This whole idea sprang from a back-and-forth experiment in which I would write up my ideas in a LyX document, then hack an implementation of the idea in Perl, then return to the document and write up my analysis and next ideas, then hack away. I found this to be rather disjointed.

Re^3: Hacking a source filter into the #! line
by RonW (Parson) on Jul 24, 2014 at 16:16 UTC

    A few years ago, we started using Doxygen at work. I rather like it, though I still haven't found a POD to Doxygen filter that works how I would prefer. (Have started yet another, but that ended up morphing into a "Doxy-ish to POD filter".)

Re^3: Hacking a source filter into the #! line
by Anonymous Monk on Jul 26, 2014 at 00:03 UTC

      Hey, nice links! I remember looking (briefly) for Perl-based literate programming tools a few years ago and not finding them. Thanks for these links.

      My ideas for using LyX are quite similar to the basic notions behind literate programming. However, I do not wish to expound upon an algorithm. My interests are more focused on interleaving code into my research notebook. It's like, "Here's a thought" followed by the code to test that thought and produce a figure or two, which are embedded into the research notebook. Then, "Hmm, I expected X instead of Y..." followed by more code, and figures, etc. The exposition shows the flow of ideas from beginning to end, providing a context for the code. In this respect, it's close to iPython notebooks than literate programming.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1094932]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-19 20:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found