News for hackers. Stuff that matters.
Re:I was asked to crack a program in a job interview by Swizec on Wednesday September 17, 2014 @03:09PM (#8331799)
As far as I know, punctuation association rules are the same in all indo-european languages. Most of them bind to the left and have a space to the right. Emdash, and ... have two spaces, and endash and apostrophe have no spaces.

But people struggle with this. I distinctly remembering practicing this in class when prepping for matura (Slovenian version of SATs) so I guess it isn't inherently obvious to everyone.

Re:I was asked to crack a program in a job interview by dragonwriter on Wednesday September 17, 2014 @03:23PM (#8331880)
> Emdash, and ... have two spaces, and endash and apostrophe have no spaces.

In English, Em-dashes have a couple of different uses, but in the most common use they are usually set closed (no spaces on either end), though some styles set them with a space on either end. En-dashes have one use (similar to that of em-dashes, which is used varies by house style) where they are usually set open, and a number where they are usually set closed.

Given that the rules for these marks aren't particularly consistent, or even fixed, in English, I think its safe to say they aren't consistent for the same piece of punctuation across all uses in all Indo-European languages.

Re:I was asked to crack a program in a job interview by Swizec on Wednesday September 17, 2014 @03:26PM (#8331901)
Your description leads me to believe I confused emdashes and endashes again. Happens every time.
Re:I was asked to crack a program in a job interview by morninj on Thursday September 18, 2014 @04:01PM (#8337286)
> En-dashes have one use

Actually, the en dash has more than one use: http://cddc.uchicago.edu/qanda/data/faq/topics/HyphensEnDash...

Re:I was asked to crack a program in a job interview by kamilafsar on Wednesday September 17, 2014 @05:11PM (#8332388)
FWIW, Turkish is not an Indo-European language. It's an Altaic language [1] like Mongolian, Japanese, Korean, etc. Though, it looks like one because Ataturk (founder of Turkey) converted the Turkish alphabet from Arabic script to Latin script when the new republic was found.

[1] http://en.wikipedia.org/wiki/Altaic_languages

Re:I was asked to crack a program in a job interview by ar7hur on Wednesday September 17, 2014 @03:14PM (#8331825)
Unfortunately I think it's not so simple

    ";" is surrounded by space left and right
    ":" has no space on the left in English, but it has one in French
Re:I was asked to crack a program in a job interview by Swizec on Wednesday September 17, 2014 @03:22PM (#8331875)
Nope, according to wikipedia on ";"

> Modern style guides recommend no space before them and one space after.

And that's really interesting about French. Personally I think a colon surrounded by spaces looks funny, but then again, I've never learned a language where that wasn't the correct way.

edit: my French girlfriend says French puts spaces on both sides of all punctuation except commas and periods. Like this !

Weirdos O.o

Re:I was asked to crack a program in a job interview by akx on Wednesday September 17, 2014 @04:32PM (#8332211)
The spaces-before-questionmarks-and-exclamation-marks is one of the "tells" I use to figure out a writer is French.

More often than not it's a dead giveaway...

Re:I was asked to crack a program in a job interview by mandlar on Wednesday September 17, 2014 @05:52PM (#8332585)
Funny story, I'm a native English speaker but I've been studying French for the past few years. I now constantly and subconsciously add spaces before punctuation like French grammar.
Re:I was asked to crack a program in a job interview by tomrod on Wednesday September 17, 2014 @08:57PM (#8333115)
Sounds like a half-way decent spam detection rule !
Re:I was asked to crack a program in a job interview by shakesbeard on Wednesday September 17, 2014 @03:36PM (#8331943)
Couldn't believe it myself, so I opened a French newspaper.

http://www.lemonde.fr/football/article/2014/09/17/ligue-des-...

Looks like it's indeed like she told you.

Re:I was asked to crack a program in a job interview by a3_nm on Wednesday September 17, 2014 @09:07PM (#8333137)
To be precise, the space before punctuation is of course non-breaking, and it is a narrow no-break space (i.e., thinner than a usual space) in careful typography (e.g., LaTeX with "\usepackage[francais]{babel}" does it).

(Another fun pedantic remark: French typography rules require that you apply the rules of a foreign language whenever you quote text in that language, so that the English rules should be respected for English quotations within a French text.)

And I agree with akx -- being French, I've seen my share of French people writing in English with the French rules, and I always thought that it could be used as an indicator by a careful reader.

(As an example, there used to be an ads campaign in the Parisian subway some years ago which advertised "I speak Wall Street English !" or something or the kind. As this was for an English class, I always found it funny that they couldn't get their English typography right.)