Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

chaoticset (2105)

  (email not shown publicly)
AOL IM: chaoticset23 (Add Buddy, Send Message)
Yahoo! ID: illuminatus_foil (Add User, Send Message)

JAPH. (That's right -- I'm not Really Inexperienced any more.)

I'm not just here, I'm here [], and here [] too, I ramble randomly in my philosophical blog [] and my other blog []. Soon I'll come in a convenient six-pack.

Journal of chaoticset (2105)

Wednesday July 30, 2003
02:41 PM

"Text Off!"

[ #13791 ]
Yeah, I'm something like crazy. That compiler tutorial? Oh, I looked at it.
  • Me: Y'know, this is pretty interesting.
  • Self: Well, if you slap it into place at the perlmonk space, you could access it anywhere for perusing.
  • Me: Yeah...but it'd be ugly as hell...maybe if I write something to clean up the style and breaking...
  • Self: ...yeah...that shouldn't be hard. Just not within your reach.

Anyway, I'm trying. This thing was formatted back in the days of justifying text, so there's plenty of bizarre spacing between single words. None of that fazes a browser, of course, so I'm not farting around with that stuff. No, pretty much just trying to figure out the patterns of what linebreaks I want turned into <BR> and which I don't, and turning that into regex.

Ideally, I'd like this thing to format headers, and I'm going to write something that locates the 'name' of the chapter and title the page that as well. Once that and the stylesheet are done, it'll look like it was written for the web in the first place. :)

By me.

Ah well, it can't look worse than it already does.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Are you talking about the Crenshaw tutorial [] that some user here wrote about in his journal? Well: "me too". I'm also converting it into something prettier, and the easiest to get quick and decent results, is HTML. Actually I already got quite far in a small amount of code, starting by simply treating sequences of empty lines as an indication to start a new paragraph.

    My main remaining problem now is to reliably recognize the code sections. They start and end with lines of Pascal comments containing nothing

    • Indeed, I am.

      I've been thinking about that. My first (hackish) solution was to add a <P> to any line that ended in a } or a ;, and then add a <BLOCKQUOTE> wrapper around every begin/end pair.

      The results are easy to read but not monospaced. I realize it's a crappy solution, but it works. (Realistically, I should be writing a really thin parser, and maybe I will someday, but this is a one-shot job, etc.)

      The results look like this:




      You are what you think.
  • I like your little conversations between self and me; it's effective for communicating in this medium. However, to an OO purist, shouldn't that be "self," and "this"? :)

    J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
  • "Screen on!"

    "Text off!"

    "How are you, gentlemen?"

    "Take off every text!"

    Please, somebody stop me, before I get hurt. I've never made an all your base are belong to us joke before...

    J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers