Perl can be written lightweight. Perl can be written heavyweight. You can write BASIC in Perl, C in Perl, and Lisp in Perl, only with some squiggly brackets as well as parens.
This makes me curious what it is you wanted to say in an lj comment that required a programming language to construct. I don't usually find that the things I was to put in a comment are subject to simplification through coding.
This comment, for example, would just be much more complicated if I were to create it using perl. I suppose I might be able to do some sort of compression algorithm on it so that the code was shorter than the comment, but it would still take much longer to generate, because I'd have to figure out the algorithm, and I'd probably still have to type out this whole comment and feed it it.
I could see if you were giving some sort of formatted list or if you had some data you wanted to massage and then give to someone, but ... those aren't the sorts of things I frequently end up putting in LJ comments.
I had a list of N questions, which I wanted to quote interleaved with N unquoted responses, so I passed the initial list through a script to wrap every line in <em>XYZ</em>
i write all my comments (and my posts, when i do post) in Markdown, and then use a Cocoa TextService to do the conversion right in my browser’s input field.
for trivial comments (one that do not strictly require any HTML markup) the process takes only a few seconds longer than it would take to just let LJ autoformat; for any comment that requires markup (emphasis, links, lists) the process is much quicker and less prone to error than writing the HTML by hand would be for me.
You know, that looks like a really useful set of tools, and I think I may start using them (at least when at home). In this one-off instance I would have used a script to pre-mark the stuff I was quoting anyway, but there are a lot of things Markdown would make easier.
ObRetort: in superlightweight scripting, as in so many areas, Ruby remains the bastard stepchild of perl. But at least you can be glad that oneliners like
cat <file> | ruby -ne 'printf("%-6s%s", $., $_)'
(which as you can plainly see adds line numbers to a file) demonstrate the inherent cleanliness that Ruby lords over perl.
no subject
no subject
Probably not.
no subject
no subject
no subject
no subject
no subject
You can guess my answer based on my questions.
no subject
This comment, for example, would just be much more complicated if I were to create it using perl. I suppose I might be able to do some sort of compression algorithm on it so that the code was shorter than the comment, but it would still take much longer to generate, because I'd have to figure out the algorithm, and I'd probably still have to type out this whole comment and feed it it.
I could see if you were giving some sort of formatted list or if you had some data you wanted to massage and then give to someone, but ... those aren't the sorts of things I frequently end up putting in LJ comments.
no subject
no subject
i write all my comments (and my posts, when i do post) in Markdown, and then use a Cocoa TextService to do the conversion right in my browser’s input field.
for trivial comments (one that do not strictly require any HTML markup) the process takes only a few seconds longer than it would take to just let LJ autoformat; for any comment that requires markup (emphasis, links, lists) the process is much quicker and less prone to error than writing the HTML by hand would be for me.
-steve
no subject
no subject
no subject