Live data from Hacker News

Show HN: Write.md – a shareable distraction-free Markdown editor

writemd.xyz

41–50 of 73 posts

Re: Show HN: Write.md – a shareable distraction-free Markdown editor

#41

Earlier quoted context omitted.

If it was a solved problem in the 90s, can't you just use a text editor from the 90s? No need to bash on this project just because it doesn't fulfill your use case.

Because there's contemporary Markdown editors that do work as expected. I didn't bash this one, I asked.

What editor did you end up with?

Modern editors are fairly complex. Splitting a bitbuffer and showing ascii line by line is simple. But modern editors have to deal with unicode, where some characters (surrogates) are two chars long, and can be followed by modifiers such as skin color of emojis. Then some characters are wider then others. So a modern editor must first parse the string encoding, then parse the language (markdown) for further formatting and coloring or building a WYSIWYG, usually on every key stroke. The expensive part is showing the text on the screen, generating the fonts, where old editors didnt have fonts.

Re: Show HN: Write.md – a shareable distraction-free Markdown editor

#42

Earlier quoted context omitted.

At 20 words per line, that is 20k lines... why are you editing everything in a single file?

Edited with the corrected math. It's ~3.5k lines, ~70k words, ~400k characters. Still, why wouldn't I want to edit it as a single file?

> why wouldn't I want to edit it as a single file?

> ...without slowing down to a crawl (i.e. a 5-10 second lag between a keypress and a change)?

I think you answered your own question. :P

Also, you can edit chapter 53 without having to scroll down to line 130,465. Basically, the same reasons bills are split up

Re: Show HN: Write.md – a shareable distraction-free Markdown editor

#45

Does it support a 400k* word text file without slowing down to a crawl (i.e. a 5-10 second lag between a keypress and a change)? I've tried many markdown editors for my novel, and sadly most editors fail this very basic test :( * Edit: I misread the output of wc. The novel is ~70k words, ~400k characters. Leaving the 400k figure above because of the discussion that follows, because it should still be a reasonable use…

Is a 400 thousand word text file "very basic"?

break the novel into chapters? Each chapter in a separate md file?

Re: Show HN: Write.md – a shareable distraction-free Markdown editor

#46

Earlier quoted context omitted.

Sure, I could edit chapters, or even "acts", separately, and I did for some time; but the novel is a single work, and searching text, replacing text, etc, is much simpler with a single file.

I can see both sides of this. In some ways, this is the old "seat of your pants" vs. "plot the book out" discussion. The important thing is whatever works for you.

Oh, I'm extremely on the plotting end of the spectrum :) I could have written the chapters individually and in a random order. More details: https://gabrielgambetta.com/tgl_swiss_trains.html

Re: Show HN: Write.md – a shareable distraction-free Markdown editor

#47

Earlier quoted context omitted.

I could, and I did for some time, but it's a PITA. The question should be "why should I?". I've since found a Markdown editor that works well for a file this size (Typora - I also had good experiences with Texts).

You could help future readers by mentioning the name of your discovered-editor. (Me? I'd use Emacs..)

Good point! Edited.

Re: Show HN: Write.md – a shareable distraction-free Markdown editor

#48
post #30

Earlier quoted context omitted.

I did for a long time. It doesn't do WYSIWYG markdown, so I've switched to something that does (Typora).

Did you spend ten seconds googling whether there was a vim plug in that could do that for you? I did and I found this: https://github.com/suan/vim-instant-markdown

Thanks. That's nice, but not exactly what I meant. By WYSIWYG editing I mean visual editing like Word or Google Docs, but saving Markdown; not typing Markdown and having a real-time preview separately.

Typora does this nicely; I type an asterisk, it looks like an asterisk, but when I close the asterisk, the text in between goes italic. The asterisks are hidden unless the cursor is within the italic part. I can double-click to select a word, press cmd-I, and the word goes italic (by adding the asterisks). Etc.

Re: Show HN: Write.md – a shareable distraction-free Markdown editor

#49

Earlier quoted context omitted.

Edited with the corrected math. It's ~3.5k lines, ~70k words, ~400k characters. Still, why wouldn't I want to edit it as a single file?

> why wouldn't I want to edit it as a single file? > ...without slowing down to a crawl (i.e. a 5-10 second lag between a keypress and a change)? I think you answered your own question. :P Also, you can edit chapter 53 without having to scroll down to line 130,465. Basically, the same reasons bills are split up

> I think you answered your own question. :P

I disagree! We're having the following conversation:

Me: "I want to edit this as a single file, but I can't, because it's slow due to inefficient data structures"

You: "Why would you want to edit it as a single file?"

Me: "Why wouldn't I?"

You: "Because it's slow due to inefficient data structures!"

My point is, I want to edit it as a single text file for creative / process reasons, and there are algorithms and data structures that make this possible, as evidenced by the editors that do let me do it in real time, so there's no real reason not to.

Re: Show HN: Write.md – a shareable distraction-free Markdown editor

#50
post #41

Earlier quoted context omitted.

Because there's contemporary Markdown editors that do work as expected. I didn't bash this one, I asked.

What editor did you end up with? Modern editors are fairly complex. Splitting a bitbuffer and showing ascii line by line is simple. But modern editors have to deal with unicode, where some characters (surrogates) are two chars long, and can be followed by modifiers such as skin color of emojis. Then some characters are wider then others. So a modern editor must first parse the string encoding, then parse the language…

I'm using Typora, which works pretty well for this use case. Open source, cross-platform, very nice. I'm in no way affiliated with it, I just like it :)

I get the parsing difficulties. Generally, at least for markdown, pressing a character should affect only the line (paragraph) that contains it, so worst case scenario, you need to parse the entire paragraph. Worst case scenario, you need to re-render whatever fits on the screen. I refuse to believe it's not possible to do this efficiently with 2020 hardware, and I have proof, in the form of editors that work.

If it's 2020, I try to append a character to a 400k file I have open, and this takes multiple seconds, it's because someone implemented Schlemiel the Painter's Algorithm, not because the hardware is slow or the file is too big.

Post reply on HN