News for hackers. Stuff that matters.
Re:The Future of Markdown by bitcartel on Friday October 26, 2012 @02:44AM (#4701139)
Why are people still interested in Markdown - what problem is it solving and for whom?

It's 2012 and we have HTML 5 compliant WYSIWYG text editors. We no longer have to write plain text littered with special codes, for the purpose of running through a parser, to produce HTML which looks nice on a web page. Maybe it made sense a decade ago when web forms had terrible editors, but not anymore. I think Joe Internet writing blog posts and forum replies would agree with me.

For developers, a README file in plain text looks great everywhere, and avoids any Github vs Bitbucket vs Assembla display issues. If you need to write structured documentation for a system, there's probably already a designated markup language you're supposed to use, so Markdown doesn't help there.

Re:The Future of Markdown by ChiperSoft on Friday October 26, 2012 @03:15AM (#4701203)
I think you are grossly overestimating the quality of current rich text editors... None of them produce reliable clean code. Some produce less shitty code than others, but they do so through tremendous amounts of post-processing.

Markdown just works and always produces clean, easy to style code.

Re:The Future of Markdown by jdbernard on Friday October 26, 2012 @05:15AM (#4701469)
I am in love with plain-text files. I edit them easily no matter what device I am on, whether it is my desktop, my phone, over SSH, in a browser. I can use my more powerful text-editing software instead of being stuck in a weak WYSIWYG editor.

My blog is just a directory of Markdown files that get compiled into HTML files. No cumbersome WordPress or other blog software installation I need to maintain, just copy the HTML to the server. Simple.

Same thing with documentation. Write once, from anywhere, output clean code to multiple formats: HTML, LaTeX (and PDF, DVI, etc. from there). No need to worry about making sure complex documentation toolchains are installed, just a Markdown compiler. A huge advantage of Markdown is that the source is as readable as the output. JavaDoc, for example, sucks in this regard if you try to do any formatting (lists, tables, etc.). If I am reading the source code--and I prefer to read the source if I can--then the javadoc is often useless for complex functions where it is most needed, because the HTML formatting is unreadable. I am actually building my own documentation system because of this (see https://github.com/jdbernard/jlp if you are interested).

Re:The Future of Markdown by keithpeter on Friday October 26, 2012 @03:05AM (#4701185)
"Why are people still interested in Markdown - what problem is it solving and for whom?"

I understand the question and wonder why it attracted down-votes. The executive summary of my answer: light markup is used in places other than text areas on Web sites.

Many of us use Markdown to keep formatted text in, and, ultimately, to generate valid html markup from. Markdown is not just for textareas in Web pages. Whole books have been marked up in markdown.

Markdown files are just text files with 'explicit' markup within them and so will always be accessible/editable/processable in the future. Markdown is 'flexible' in the sense that it allows alternative markup for the same output, and is 'light' in the sense that a limited range of styling and block formats are available. Compare that with LaTeX which shifts with each tex-live release, and which means that markup written some years ago may not format without hand editing on a modern LaTeX release.

There is the reference implementation available from Gruber's site, and, as others have mentioned, pandoc implements markdown in a way that can be extended. I'm dubious of the need for an 'official' specification; I rather like the scrappy streetwise nature of Markdown.

Re:The Future of Markdown by JadeNB on Friday October 26, 2012 @02:26PM (#4703514)
> Compare that with LaTeX which shifts with each tex-live release, and which means that markup written some years ago may not format without hand editing on a modern LaTeX release.

What? Certainly details of individual packages may change, including addition or removal of functionality, over time, but I don't even know what it means to say that "LaTeX shifts". The underlying markup language for LaTeX, which is the same as that for TeX, is very flexible, but has had the same flexibility since at least 1982, if not 1978.

I understand the idea that built-in extensibility leaves a platform, to some extent, to blame for its plug-ins; but many people in this discussion have proposed building some sort of plug-in architecture for Markdown, too.

Re:The Future of Markdown by bitcartel on Friday October 26, 2012 @03:15PM (#4703754)
Sure, but why are we using the lowest common denominator, plain text, and then adding formatting?

Why don't we start with something like a visual HTML or DocBook editor, and then apply parsers to generate plain text, PDFs, etc?

Is it because we as programmers live in a plain text environment and are happy with the status quo, or is it because the tools aren't good enough?

Re:The Future of Markdown by dspillett on Friday October 26, 2012 @05:14AM (#4701467)
> Why are people still interested in Markdown - what problem is it solving and for whom?

For techie types it is familiarity: as a programmer I've used mark-down style syntax in code comments (and emails back when plain text was the norm) for years so it feels natural. I can type and edit text with mark-down faster then with full WYSIWYG control (even if the editor has good keyboard shortcuts). Also I can use the same text+markdown in code, emails and documentation that is desired to look a little fancier - I don't need to reformat for a second audience. Markdown isn't perfect, but for me it is a better solution for some things than WYSIWYG.

Simplicity and resulting cleanliness of mark-up can be an issue sometimes. I've seen WYSIWYG editors get tied in knots over bad HTML that they generated themselves.

Simplicity is another bonus for sites taking in user content, particularly sites like the StackExchange family. By effectively having a while-list of formatting options you can keep a consistent look on your site more easily. If you aren't sure what problem this solves, think Geocities.

It makes security a little easier to: you don't have to worry so much about potential injection attacks that are very possible if trying to generate/accept full HTML and filter it for the bad stuff afterwards (you still have to be careful to think about these issues of course, but your available attack surface is much smaller and therefore easier to manage).

> Github vs Bitbucket vs Assembla display issues

This is the very problem that people are actually discussing - competing interpretations make mark-down less useful then it could otherwise be, and a global standard might help that issue if it gets widely adopted. Of course many incompatible interpretations already exist and any new standard will face adoption friction, so we may end up in a situation like parodied in http://xkcd.com/927/ (it worked well enough for Javascript in the long run, but I think there were fewer common and slightly incompatible implementations of that at the time than there are of markdown now).

Re:The Future of Markdown by silvestrov on Friday October 26, 2012 @07:17AM (#4701697)
Markdown is fantastic because it restricts the formatting.

When users copy/paste from MS Word into HTML editors the paste often keeps the font from the Word document which is not the proper font for the html page. That results in a messy page layout.

In my experience it's easier for users to understand Markdown syntax than to understand the "hidden codes" in HTML editors when they want to fix the layout.

Re:The Future of Markdown by bitcartel on Friday October 26, 2012 @02:56PM (#4703669)
Sure, but if we could paste HTML between editors and browsers without any rendering or layout issues, there would be no reason for users to look beneath the surface. I do agree that we're not quite there yet.
Re:The Future of Markdown by dspillett on Monday October 29, 2012 @06:47AM (#4711733)
There is still the need for destination system to fully validate the input to catch badly formed content which may cause unpredictable issues and (more importantly) to screen out injection attacks, which may not be a trivial task. Relative to validating markdown decorated content it is far from trivial.
Re:The Future of Markdown by Gravityloss on Saturday October 27, 2012 @06:18AM (#4705868)
You can use markdown as source for formatting, but the source is very readable by itself.

This is extremely important for writing and also for fall back purposes. Any time there is any kind of a problem in writing or reading or interpreting, just fall back to source.

People can say html is human readable but the difference is huge. I didn't even know that markdown is parsed on hacker news, I just used stars as underscores as natural formatting.

There's also potentially much much less overhead. Ultimately, browsers and your cell phone apps etc should just format markdown natively, meaning huge performance boosts, as html, css, js etc has just become so complex for many tasks as a consequence of do-everything.

My phone's email client struggles browsing back and forth of what should be just a few small text files and file attachments. It uses way too many cycles since it's also a jpeg and css and js renderer with scaling and everything. As someone who's used text email and news groups, lightweight formatting is very natural and informative. Those services would not have been possible in the past if they had been bogged down with large amounts of excess complexity.

I guess reducing overhead is not sexy because it doesn't involve new features. In the future everybody will just create their typed static oneliner email as 10000x10000x10000 pixel 100 fps 3D movies of 2 minute length (you see, that's the time it takes to read it), and if some supposedly slightly technically literate person asks that perhaps they should use a word 2020 .doc instead for reduced file size, the answer is "but you can't do a space station flythrough in it".

Re:The Future of Markdown by thenomad on Friday October 26, 2012 @05:29AM (#4701498)
The sheer popularity of Markdown implies that there are some use cases for it. For example, Reddit uses Markdown exclusively, and I don't believe ALL their users are highly tech-savvy.

Personally, I don't trust or use (if I can avoid it) any on-the-web WYSIWYG text editor, because a) they tend to be slow and clunky and b) it's difficult to predict what HTML they will turn out a lot of the time, and I will often end up needing to edit that HTML.

Also, for common blogging / commenting tasks, Markdown is as fast or faster to use than WYSIWYG editors. I've been faffing around with a forum that won't let me use Markdown recently, and forces me to use its clunky WYSIWYG editor to add lists into my posts. It didn't take long for me to start yearning for the simplicity of linebreak - asterisk - item rather than a multiple-click WYSIWYG process.

Re:The Future of Markdown by bitcartel on Friday October 26, 2012 @03:04PM (#4703711)
If we assume WYSIWYG editors keep on improving, at some point, they'll become good enough. What then for Markdown?
Re:The Future of Markdown by falcolas on Friday October 26, 2012 @06:06PM (#4704492)
Personally? I would still prefer to write plain text with a bit of simplistic markup.

YMMV, but I've never been fond of WYSIWYG editors. I'd rather say what I mean, instead of say what this other guy thinks I mean.

Re:The Future of Markdown by vidarh on Friday October 26, 2012 @04:34AM (#4701361)
I find it more comfortable to write Markdown than to use a WYSIWYG text editor. That the WYSIWYG editors tends to produce really shitty output doesn't make things better.

Markdown and similar formats can also easily be used to produce other output than HTML.

And Markdown is plain text, and that's another appealing factor: Even if you read it somewhere that won't render the Markdown, it is still readable. The same can't be said about HTML.

Re:The Future of Markdown by fudged71 on Friday October 26, 2012 @03:25AM (#4701222)
For some people and some uses, plain text is just more comfortable.

I love the ability to scratch something down in Markdown really quickly, and being able to convert it to LaTeX if I want to, without any hassle.

I'd love to write blog posts in Markdown. Google+ uses the italic and _bold_ syntax in their own posts, which is very useful.

I don't exactly know why it's better, to be honest. Maybe WYSIWYG editors are inherently dependant on their own implementations and rely on people learning the interface.

Text-As-An-Interface is beautiful in it's simplicity. Markdown is the perfect mix of simple markup without the insanity of BBCode.

Re:The Future of Markdown by sopooneo on Friday October 26, 2012 @10:34AM (#4702285)
But is it plain text? If it is, then we can make an argument that html documents are as well.
Re:The Future of Markdown by fudged71 on Friday October 26, 2012 @03:29PM (#4703823)
I think that's the difference, though. You can read it easily without being compiled. HTML is very markup-intensive.
Re:The Future of Markdown by omaranto on Friday October 26, 2012 @07:15AM (#4701693)
1. Could you recommend some of these good WYSIWYG editors you claim exist? The ones I've seen are all slow or awkward (basically not having enough keyboard shortcuts) or get confused when I delete part of the text (and usually have all of these problems).

2. It sounds like you are only concerned in producing HTML. I like using markdown for everything. Using the excellent Pandoc I produce both HTML and pretty PDFs from markdown text, with nice looking formulas too. (PDFs are produce through LaTeX, for HTML Pandoc offers several options, I use MathJax).

Re:The Future of Markdown by bitcartel on Friday October 26, 2012 @03:24PM (#4703802)
As an end-user I find the Wordpress editor to be pretty good, and Google Docs ok. The Aloha editor looks great: http://aloha-editor.org/index.php

Pandoc looks great. So why not write in HTML or Docbook and then convert to plain text / RTF / PDF etc?

Re:The Future of Markdown by tripzilch on Friday October 26, 2012 @11:40AM (#4702655)
It's not just for comments and blog posts.

I often find myself writing short plain text files, usually quick personal notes. Occasionally they grow larger than what I'd call a "short" plain text file, and at this point two extra requirements pop up:

1) they are going to need some structure.

2) odds are, that I'm going to want to show this document to someone else at some later point in time[1].

Markdown offers (to me) by far the easiest transition from "basic plain text note" to "slightly longer formatted document", because most times, all I have to do is continue writing the way I was doing already.

[1] corollary: as programmers know, when reading their own code, "someone else" also includes you in three months time.

Re:The Future of Markdown by Adrock on Friday October 26, 2012 @05:12AM (#4701460)
In addition to all the other great answers here:

1. You can pry my {Emacs,vim} from my cold, dead hands.

2. Version controlled markdown is much easier to deal with.

Re:The Future of Markdown by gordonguthrie on Friday October 26, 2012 @11:54AM (#4702749)
Yeah, but whereas git and other version control systems are great with lines of code - and diff works well on that - for text we need a diff that works on lexical units within a (much longer) line or structure.

I know git can be configured to use an arbritary programme for diff - just not sure where to find one...

Re:The Future of Markdown by chokma on Friday October 26, 2012 @04:38AM (#4701372)
Many users like their WYSIWYG text editors (even though they are often problematic between older browser versions or with "paste-from-word" or conflicts with other JS-includes). And the expectations are rising - one customer of ours would like a WYSIWYG-editor "with Apple style interface" in the browser, with all the bell's and whistles of a full blown publishing solution including complete layout control, input validation, CMS support and so on. The old TinyMCE fields of his legacy app will no longer cut it.

Meanwhile, I write the documentation for my software in Markdown, because it is the fastest way for me to get structured text from my mind to my machine. And with the help of pandoc, it's convertible into all other text formats, from HTML to PDF and LaTeX etc. (Although the html-with-images to PDF support of wkhtmltopdf is even better, so it's Markdown => pandoc[for HTML] + wkthmltopdf [for HTML to PDF]).

Re:The Future of Markdown by krsunny on Friday October 26, 2012 @02:48AM (#4701145)
Because in 2012 there are still lots of plain textareas, like the one I'm writing this reply in.
Re:The Future of Markdown by sweetdreamerit on Friday October 26, 2012 @04:32AM (#4701357)
using Markdown you can: - track versions with tools like git - using pandoc, you can transform it in html, pdf, latex, beamer, rtf, slidy - you are sure you are separating style from content - it can be used everywhere: using console editors like vim (or the simple nano, that I love), text editors like notepad+, gedit. I found out a very nice android app, Epstile, that uses markdown and syncs the data using dropbox. - just this morning, in the office where I'm working, there was a discussion like "this doc was saved using office 2010 or office 2007?". Using markdown, you can avoid such a mess.
Re:The Future of Markdown by city41 on Friday October 26, 2012 @11:53PM (#4705291)
Most tech-type people don't like WYSIWYG. I know I don't. The product that my company makes has a very nice WYSIWYG editor built into it. For a hackathon I replaced it with a Markdown editor and all the other developers went nuts (sadly, for various reasons, it never made it into the real product).

The main appeal is Markdown lets us write formatted text without ever having to use the mouse or figure out what the current WYSIWYG editor's key commands are. Often times -- like making nested bulleted lists -- there just plain aren't any key commands. I'd much rather type a few square brackets and create a nice hyperlink on the fly than invoke some silly menu, paste in my link in the window that pops up, create the display text, etc etc.

Re:The Future of Markdown by alexchamberlain on Friday October 26, 2012 @04:34AM (#4701362)
Safety.

If you exclude HTML tags, Markdown is safe. People can't inject code.

I know this can be done for HTML as well, but it's harder.

Re:The Future of Markdown by blasdel on Friday October 26, 2012 @07:12AM (#4701681)
Unfortunately, that is absolutely not true in any implementation derived from the original Markdown.pl without a whole lot of bugfixes

Because of the chickenshit way he attempted to escape things by replacing them with their MD5 hashes and then switching them back, you can encode anything you want to be output by the markdown processor. Reddit was owned by a viral XSS comment because of this in 2009, it's been exploited a few other times since.

Re:The Future of Markdown by bitcartel on Friday October 26, 2012 @03:39PM (#4703872)
Found the info, interesting. Easy to think plain text is safe and forget about the parser.

http://www.f-secure.com/weblog/archives/00001777.html

http://blog.reddit.com/2009/09/we-had-some-bugs-and-it-hurt-...

Re:The Future of Markdown by Too on Friday October 26, 2012 @12:43PM (#4703005)
WYSIWYG always means either 1. proprietary file format and/or 2. Shitty code generation.

Neither works very well with version control or scenarios where you need compatibility between different system.

Plain text ALWAYS works.

Re:The Future of Markdown by tomp on Friday October 26, 2012 @01:02PM (#4703103)
Most WYSIWYG require the use of a mouse.
Re:The Future of Markdown by peteretep on Friday October 26, 2012 @04:46AM (#4701398)
I can't be bothered to learn LaTeX to mark up my Haskell assignments, so I've been using Markdown + LHS