News for hackers. Stuff that matters.
Re:Why Markdown Is Not My Favourite Language (2012) by tptacek on Saturday November 29, 2014 @01:50PM (#8674655)
Part of the problem is that people don't really grok the point of Markdown. There's a reason it doesn't support tables, or a syntax for making the kind of language used in a code snippet. The point of Markdown is to mimic the conventions of ASCII-text email, both to make writing it as natural as possible, and to make Markdown pleasant to read in both ASCII and HTML.

If you want something more featureful than Markdown, the problem isn't Markdown; it's that you're using the wrong tool for the job.

Re:Why Markdown Is Not My Favourite Language (2012) by rtpg on Saturday November 29, 2014 @03:18PM (#8674930)
This feels like a post-facto explanation that gives way too much credit to Gruber as a language designer.

I find it hard to assume that Markdown is extremely well thought-through considering the fact that we didn't even get a grammar for the language, just an implementation that would be considered super broken in any other language.

Re:Why Markdown Is Not My Favourite Language (2012) by Bockit on Saturday November 29, 2014 @05:28PM (#8675318)
Actually the markdown page on his site mentions exactly that as markdown's intention.

> The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions. While Markdown’s syntax has been influenced by several existing text-to-HTML filters, the single biggest source of inspiration for Markdown’s syntax is the format of plain text email.

Re:Why Markdown Is Not My Favourite Language (2012) by tptacek on Saturday November 29, 2014 @05:32PM (#8675322)
Worth adding that it's said that since 2004, when archive.org first noticed the page.
Re:Why Markdown Is Not My Favourite Language (2012) by kasey_junk on Saturday November 29, 2014 @03:34PM (#8674982)
This implies that Markdown is designed as a language, which would have things like grammars and can be reasoned about with proofs and the lambda calculas etc.

Instead, Markdown should be thought of as a convention. A convention that allows for automated translation of ascii text into html. Further, instead of thinking of Markdown as designed think of it as evolved.

In the case of an evolved convention, we wouldn't expect formalism or even long term design. What we would expect and what Markdown is extremely good at is usefulness, high levels of adoption and ease of change. Which we do see. If your needs require formalism, or complex html features then Markdown is not the right tool for you.

Re:Why Markdown Is Not My Favourite Language (2012) by leoc on Saturday November 29, 2014 @07:02PM (#8675473)
If it's intended to be interpreted by computers, what's the point in avoiding precision? All a fuzzy specification does is make it probable that those interpretations will be mutually inconsistent and/or unintuitive and problematic and/or prone to crashes and security failures.
Re:Why Markdown Is Not My Favourite Language (2012) by johnchristopher on Saturday November 29, 2014 @07:58PM (#8675604)
> If it's intended to be interpreted by computers, what's the point in avoiding precision?

Because markdown is for humans first and foremost, not computers. It can't be clearer than that.

Re:Why Markdown Is Not My Favourite Language (2012) by rtpg on Sunday November 30, 2014 @04:56AM (#8676459)
that is disingenuous considering that Markdown the spec is offered alongside markdown.pl.

If it's intended for humans first and foremost, then why offer the transpiler? After all, it already looks like ASCII e-mail. The overriding directive is human-readability, not unparsability (which do not go hand in hand).

Re:Why Markdown Is Not My Favourite Language (2012) by leoc on Saturday November 29, 2014 @10:10PM (#8675846)
How could it be for humans any more or less than any other language which is designed primarily to be written by humans and then interpreted by computers?
Re:Why Markdown Is Not My Favourite Language (2012) by stouset on Saturday November 29, 2014 @11:55PM (#8676026)
Markdown is designed primarily for humans in both those tasks. Interpretability by computers is second to interpretability by people.
Re:Why Markdown Is Not My Favourite Language (2012) by sedev on Saturday November 29, 2014 @09:01PM (#8675701)
"Markdown is two things: (1) a plain text formatting syntax; and (2) a software tool… that converts the plain text formatting to HTML. […] The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions… the single biggest source of inspiration for Markdown’s syntax is the format of plain text email."

http://daringfireball.net/projects/markdown/

I don't think it's far-fetched to say what tptacek did since it's dang close to what Gruber has always said about Markdown. Note that phrasing: it's not a language, it's a "plain text formatting syntax."

Re:Why Markdown Is Not My Favourite Language (2012) by jotux on Saturday November 29, 2014 @02:00PM (#8674687)
>There's a reason it doesn't support tables

I don't see how the inclusion of tables violates the ascii-like readability of markdown. Github has implemented a table syntax that is natural to read/write and makes it easy to include tables in your document. Example: https://github.com/Defconbots/2015_target/blob/master/hw/boa...

Re:Why Markdown Is Not My Favourite Language (2012) by JetSpiegel on Saturday November 29, 2014 @07:36PM (#8675558)
Natural to write? This:

    |Name            |Quantity|Part Number         |Distributor|
    |:--------------:|:------:|:------------------:|:---------:|
    |BAT1, BAT2, BAT3|3       |534-082             |Mouser     |
is not "natural to write"
Re:Why Markdown Is Not My Favourite Language (2012) by sebastianavina on Sunday November 30, 2014 @12:46AM (#8676105)
of course is natural to write, given the proper emacs plugin.
Re:Why Markdown Is Not My Favourite Language (2012) by krick on Sunday November 30, 2014 @02:11AM (#8676252)
Yep, and there's also exists plugin like that for vim. Although it doesn't exactly comply to github's column alignment markup.

https://github.com/dhruvasagar/vim-table-mode

Re:Why Markdown Is Not My Favourite Language (2012) by mplewis on Saturday November 29, 2014 @02:44PM (#8674823)
I built a tool to convert your CSV tables to Markdown table format: https://github.com/mplewis/csvtomd
Re:Why Markdown Is Not My Favourite Language (2012) by pmoriarty on Saturday November 29, 2014 @01:58PM (#8674681)
org-mode in emacs supports tables, and it's ASCII-based.

Here's an example, displayed exactly how you would see it marked up in org-mode syntax in emacs:

  |-----+-------|
  | Key | Value |
  |-----+-------|
  |  00 | foo   |
  |  01 | bar   |
  |-----+-------|
org-mode can export to HTML, and many other formats.
Re:Why Markdown Is Not My Favourite Language (2012) by josteink on Saturday November 29, 2014 @02:15PM (#8674717)
Org-mode is a beast. A fantastic beast, much like Emacs itself. You dive in, but there's always more to learn. Some things may be for you and some things don't. Everyone should give it a try.

A little known fact, even among most org-users: Github can render org-mode files to HTML directly if checked into a repo, thus you can write your README files as org-files.

Shameless example: https://github.com/josteink/csharp-mode/blob/master/README.o...

This alone was enough to make me drop Markdown as my go-to format for semi-formatted text-files.

A subtle killer feature here is org-babel. You can embed proper code in your text-files and have your editor (at least Emacs) understand them as such. Which makes it excellent for writing technical documentation for projects where code is involved.

Re:Why Markdown Is Not My Favourite Language (2012) by TazeTSchnitzel on Saturday November 29, 2014 @04:24PM (#8675133)
>Github can render org-mode files to HTML directly if checked into a repo

They also support ASCIIDoc, ReST, MediaWiki markup, Creole, etc.

See: https://github.com/github/markup

Re:Why Markdown Is Not My Favourite Language (2012) by donniezazen on Sunday November 30, 2014 @03:59AM (#8676391)
I really wish that other services would be like this. You enter text in a few popular markup languages and not one specific language.
Re:Why Markdown Is Not My Favourite Language (2012) by pyre on Saturday November 29, 2014 @02:45PM (#8674826)
> A little known fact, even among most org-users: Github can render > org-mode files to HTML directly if checked into a repo, thus you can > write your README files as org-files.

I recently stumbled across the tidbit. The Ruby library Github uses to generate it though isn't 100% though. If you want to use org-mode properties for style customization of html output your SOL.

Original project:

https://github.com/bdewey/org-ruby

  Currently, you cannot do much to customize the conversion. The
  supplied textile conversion is optimized for extracting “content”
  from the orgfile as opposed to “metadata.”
It does say that developement has moved to:

https://github.com/wallyqs/org-ruby

Which has no such note, but doesn't say anything about supporting it.

Re:Why Markdown Is Not My Favourite Language (2012) by MarcScott on Saturday November 29, 2014 @04:23PM (#8675128)
I never create tables in HTML any more. If I ever want an HTML table, I create it in org-mode and export it. It's just so much faster to create what you want.
Re:Why Markdown Is Not My Favourite Language (2012) by baddox on Saturday November 29, 2014 @02:31PM (#8674777)
org-mode tables are great, but they're only easy to type because org-mode does the dynamic resizing and border drawing for you. Markdown is supposed to be simple to type in any plain text editor.
Re:Why Markdown Is Not My Favourite Language (2012) by breuleux on Saturday November 29, 2014 @03:38PM (#8674993)
You can still have simpler table syntax that's nice to read but easier to maintain. For my own markup language (http://breuleux.net/quaint_demo/) I implemented this syntax:

    + Name    + Occupation
    | Alice   | Accountant
    | Bob     | Baker
    | Charles | Car salesman
Headers are easier to make and the last column does not require a trailing marker. It's still some work to align columns other than the last, but that's not a requirement and I'd still much rather have a non-aligned ASCII table than nothing at all.
Re:Why Markdown Is Not My Favourite Language (2012) by baddox on Saturday November 29, 2014 @04:01PM (#8675059)
Yeah, the alignment of columns is a big issue. If you have 100 rows, and add another with a cell that is longer than any other cell in that column, you've got to either edit 100 rows or live with a much harder to read table.
Re:Why Markdown Is Not My Favourite Language (2012) by medgno on Saturday November 29, 2014 @07:08PM (#8675491)
Or use a text editor that supports region editing. I agree with you, but this isn't a complete failing of that syntax.
Re:Why Markdown Is Not My Favourite Language (2012) by tedunangst on Saturday November 29, 2014 @03:08PM (#8674897)
What happens when I add a new value that's "much longer"?
Re:Why Markdown Is Not My Favourite Language (2012) by pmoriarty on Saturday November 29, 2014 @03:21PM (#8674941)
At first,

  |-----+-------|
  | Key | Value |
  |-----+-------|
  |  00 | foo   |
  |  01 | bar   |
  |-----+-------|
becomes

  |-----+-------|
  | Key | Value |
  |-----+-------|
  |  00 | foo   |
  |  01 | bar   |
  |  02 | much longer |
  |-----+-------|
but as soon as I hit TAB, it turns in to:

  |-----+-------------|
  | Key | Value       |
  |-----+-------------|
  |  00 | foo         |
  |  01 | bar         |
  |  02 | much longer |
  |-----+-------------|
There's probably a way to make org-mode dynamically resize tables as you type, without requiring the use of TAB, but I'm not sure if that's always desirable.
Re:Why Markdown Is Not My Favourite Language (2012) by tedunangst on Saturday November 29, 2014 @06:01PM (#8675379)
OK. I think where I'm going is that for anyone who doesn't use emacs org-mode, ASCII tables are a major PITA to edit. I didn't know if emacs used a different underlying syntax (that markdown could borrow), but it doesn't.
Re:Why Markdown Is Not My Favourite Language (2012) by wtbob on Saturday November 29, 2014 @07:37PM (#8675563)
Well, anything is a major PITA for someone who doesn't use emacs…

More seriously, ASCII tables are always a major pain to edit, without the proper tools (like emacs—and I'd not be at all surprised if there's something for vim and/or Sublime Text too). That's no reason to avoid them; they are useful.

Re:Why Markdown Is Not My Favourite Language (2012) by LukeShu on Saturday November 29, 2014 @04:04PM (#8675077)
M-q also resizes the table; I mention this because M-q is universally "reflow whatever is under my cursor."
Re:Why Markdown Is Not My Favourite Language (2012) by 1wd on Saturday November 29, 2014 @04:15PM (#8675113)
What parts of Markdown are closer to conventions of ASCII-text email than the equivalent Creole? Two spaces at the end of a line? List renumbering?
Re:Why Markdown Is Not My Favourite Language (2012) by sitharus on Saturday November 29, 2014 @02:43PM (#8674817)
To add to that, Markdown was created to scratch one person's itch with no real desire to support a wider community. It was put online and other people liked it and modified it, but the original site doesn't have any of this.
Re:Why Markdown Is Not My Favourite Language (2012) by baddox on Saturday November 29, 2014 @04:04PM (#8675075)
Is that a correct history of Markdown? It certainly seems to have been designed to be easily readable and writable for laypeople.
Re:Why Markdown Is Not My Favourite Language (2012) by nine_k on Saturday November 29, 2014 @06:08PM (#8675389)
AFAICT Markdown codified a lot of best practices from ASCII emails and forums of years past (e.g. 20th century's). What looks like careful design may be as well a result of a long evolution.
Re:Why Markdown Is Not My Favourite Language (2012) by donniezazen on Sunday November 30, 2014 @03:56AM (#8676386)
I am in a position where I know a little of Markdown and a little of reStructuredText. Considering the little time I have and I have to learn a language I would want to learn something that is extensible. Isn't that a valid reasoning?