You're looking at Less Wrong's discussion board. This includes all posts, including those that haven't been promoted to the front page yet. For more information, see About Less Wrong.

Viliam_Bur comments on Call for volunteers: Publishing the Sequences - Less Wrong Discussion

13 Post author: wedrifid 28 June 2012 03:08PM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (42)

You are viewing a single comment's thread. Show more comments above.

Comment author: [deleted] 29 June 2012 01:15:23AM 3 points [-]

Oh dear. Attempting to parse LaTeX with regexes is only slightly more insane than attempting to parse HTML with regexes.

Comment author: Viliam_Bur 29 June 2012 07:19:52AM *  0 points [-]

Well, I volunteer to try.

if ($text =~ m/\s+-\s+/) print "Hyphen in place of a dash.\n";

If this line could find dozen bugs, it's worth using. Even if it won't find all instances.

Comment author: [deleted] 29 June 2012 11:34:27AM 0 points [-]

Congratulations. You've just triggered a false positive on almost every minus sign in existence. (e.g., $1 - 1 = 0$.)

I would love it if what you suggest were possible, but it just isn't. Not when packages feel free to roll their own DSLs for anything.

Comment author: wedrifid 29 June 2012 02:19:59PM 1 point [-]

Congratulations. You've just triggered a false positive on almost every minus sign in existence. (e.g., $1 - 1 = 0$.)

Yes, but in each false positive all it does is print a message. Since there are rather few instances of minus signs compared to intended em dashes this doesn't seem like much a problem. Ignoring the irrelevant messages also doesn't introduce more than a trivial amount of work. Given that all equations need to be converted to the math environment (probably manually) and the time it takes a human to do the conversion (even when it just means adding $ around them) is orders of magnitude greater than the time taken to not do anything while reading that particular message we can merrily ignore the false positive issue as not worthy of optimisation.

I would love it if what you suggest were possible, but it just isn't.

It's almost exactly what I will do. It would be difficult to make a utility that got everything perfectly right every time without human intervention---that requires implementing comprehension skills and common sense. However, it is trivial to get something that does it well enough for our purposes with only minimal human intervention required.

Comment author: [deleted] 29 June 2012 02:22:43PM *  0 points [-]
Comment author: Kindly 29 June 2012 12:27:37PM 0 points [-]

Congratulations. You've just triggered a false positive on almost every minus sign in existence.

Every minus sign in the Sequences? What, all three of them?