[personal profile] learnedax
I'm not the only one who's written perl* just to construct an LJ comment, right?

... right?

*or some similar lightweight script

Date: 2006-09-20 09:49 pm (UTC)

Date: 2006-09-20 09:50 pm (UTC)
From: [identity profile] rufinia.livejournal.com
::raises eyebrow::

Probably not.

Date: 2006-09-20 10:11 pm (UTC)
From: [identity profile] page-of-swords.livejournal.com
Not in the least, SSI's back to my box :)

Date: 2006-09-20 10:30 pm (UTC)
From: [identity profile] metahacker.livejournal.com
print("I've written perl in comments for demonstration purposes, but that's about it.");

Date: 2006-09-21 12:55 am (UTC)
From: [identity profile] londo.livejournal.com
I'm not sure how I feel about Perl being described as a "lightweight" language.

Date: 2006-09-21 01:33 am (UTC)
dsrtao: dsr as a LEGO minifig (Default)
From: [personal profile] dsrtao
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.

Date: 2006-09-21 01:38 am (UTC)
From: [identity profile] dglenn.livejournal.com
Er ... I presume csh/tcsh counts; what about sed?

You can guess my answer based on my questions.

Date: 2006-09-21 02:16 pm (UTC)
From: [identity profile] katkt.livejournal.com
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.

Date: 2006-09-21 02:21 pm (UTC)
From: [identity profile] learnedax.livejournal.com
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>

Date: 2006-09-21 04:47 pm (UTC)
From: [identity profile] hakamadare.livejournal.com

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

Date: 2006-09-21 06:24 pm (UTC)
From: [identity profile] learnedax.livejournal.com
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.

Date: 2006-09-25 05:41 pm (UTC)
jducoeur: (Default)
From: [personal profile] jducoeur
<ObLangSnobbery>I haven't, but probably would. But in Ruby, of course, rather than Perl...</ObLangSnobbery>

Date: 2006-09-25 07:15 pm (UTC)
From: [identity profile] learnedax.livejournal.com
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.

Profile

learnedax

November 2011

S M T W T F S
  12345
6789101112
13141516171819
20 212223242526
27282930   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Oct. 2nd, 2025 03:38 pm
Powered by Dreamwidth Studios