Live data from Hacker News

The Plain Text Project

plaintextproject.online

151–160 of 208 posts

Re: The Plain Text Project

#151

Great collection of tools and articles. Plain text is also a great (and the best) choice for datasets. Do NOT use JSON, YAML and friends, for example, as your input format but use plain text with a custom parser to import into any SQL database and than you can easily export to JSON, YAML and friends. See the football.db and the Premier League or World Cup match schedule as living examples [1]. [1]: https://github.com…

The football data looks easy for a human to read but a pain in the arse for a program to consume. Personally I think it's terrible, and the fact that they have had to develop a custom 'sportsdb' tool to manage it rather than using something generic like 'jq' is telling.

https://github.com/openfootball/england/blob/master/2019-20/...

To properly parse this file you need to write a parser that cut fixed-width fields (wait, are the team names padded to fixed-width or is the '-', which doubles as part of the result, a delimiter?), trim strings, knows that "Aug/24" is August 24th, deals with wrapping of the months over the two years, is sensitive to indentation, and understands that "Matchday [0-9]+" and the [] bracketed dates are section delimiters. And what about that first line beginning with '=', comments? Where is the formal grammar for this format?

CSV of "matchday,fulldate,team1,team2,result" would be just as easy to read, much easier to parse, and probably smaller in size

Re: The Plain Text Project

#153

I use this plain text planner / calendar every day and I love it, if I can say so myself, since I made it too. I've been using it for a few years now and I can say that it has definitely made me more productive. https://crushentropy.com/ You can plan and log your day in plain text and it visualizes your schedule. Markdown for planning, if you will.

Looks really good! Any chance for the code?

Re: The Plain Text Project

#154
post #2

Except it's html. They didn't serve text/plain. I do get that thinking as words helps but isn't org mode or markdown plaintext?

That would be text/markdown :) Although serving markdown as text/plain should be totally fine if the client is a web browser. It would be incredibly useful if web browsers rendered text/markdown natively, though - mine renders PDFs, so I think the precedant's there.

I too would welcome this and text/org-mode

Re: The Plain Text Project

#155

I use this plain text planner / calendar every day and I love it, if I can say so myself, since I made it too. I've been using it for a few years now and I can say that it has definitely made me more productive. https://crushentropy.com/ You can plan and log your day in plain text and it visualizes your schedule. Markdown for planning, if you will.

This is awesome, have been looking for something like this for a while, wondering if there's a way to export it to and from my ical

Re: The Plain Text Project

#156
Assume "plain text" means something like traditional printed text. This has three features which don't seem to be implemented on computers in a sensible standardised way:

* Spaces. In traditional printed text there is space between words but there are no leading spaces, double spaces or trailing spaces, so the ASCII space character is not an adequate representation.

* Paragraphs. In traditional printed text you can start a new paragraph but you can't have an empty paragraph so '\n' is not an adequate representation. Then there's the problem that some systems use '\r' or "\r\n" instead of '\n'. Then there's the problem that Emacs's "long lines" mode and Git's --word-diff don't work properly. (Almost certainly patch tools and "git rebase" don't work either.)

* Emphasis. In traditional printed text words and phrases can be printed in italics for emphasis. There are several ways this can be indicated in a computer file, but do editors and diff tools handle them nicely? I think not. Also, it's not completely clear how this should work. For example, I don't think should be allowed, but are ab and ab the same thing, or different things? You wouldn't be able to tell them apart in traditional printed text, but in traditional printed text you can't tell whether a space, a full stop or a dash is printed in italics, or not, either, so it's clear, I think, that we need to somewhat extend the concept of emphasis from what's available in print, but how far do you extend it? (What about nested emphasis?)

Re: The Plain Text Project

#157

Earlier quoted context omitted.

This only works depending on how diligently you formatted those TODOs. Before you know it your regex explodes. I use IntelliJ as well, so I don't have to think about these problems.

I mean, how often do you place the four characters "TODO" in your code when you don't mean to mark a TODO? The only common English word I know of that contains that substring is "mastodon", and it'd have to be all-caps.

You could also include word boundaries if you cared enough.

    ag '\bTODO\b'

Re: The Plain Text Project

#158
post #33

Recently I decided that I was going to solve the problem of: I easily write inline TODO comments while I work on code, but then have difficulty keeping track of them and getting my head back into the state of things later. While there is IDE support for such things, it's usually not exactly the right interface I want. So I made a tiny CLI app that scans the source for TODO and FIXME lines and presents a menu of files…

You reminded me of the time one cool guy and a respectable troll ran a script to create tons of issues on github for TODO comments in the code. He quickly got banned and the issues removed, but I for one was thankful to him. I think I asked the staff to get them back for my repo, but no :)

This could be a Great GitHub Actions though.

So user can enable/disable it per account/repo as they wish.

I think it exists, I've had it enabled in some repo when figuring out new gh actions

Re: The Plain Text Project

#159
post #156

Assume "plain text" means something like traditional printed text. This has three features which don't seem to be implemented on computers in a sensible standardised way: * Spaces. In traditional printed text there is space between words but there are no leading spaces, double spaces or trailing spaces, so the ASCII space character is not an adequate representation. * Paragraphs. In traditional printed text you can s…

That I believe in stuff like markdown. You usually need like 3 or 4 options

Re: The Plain Text Project

#160
post #134
post #33

Recently I decided that I was going to solve the problem of: I easily write inline TODO comments while I work on code, but then have difficulty keeping track of them and getting my head back into the state of things later. While there is IDE support for such things, it's usually not exactly the right interface I want. So I made a tiny CLI app that scans the source for TODO and FIXME lines and presents a menu of files…

Just be careful about Microsoft's Patent US6748582B1; it doesn't expire for another few months. ;) From the patent (edited down a bit): > According to various example implementations of the invention, a task list facilitates code development by assisting developers in keeping track of and managing a variety of tasks, such as errors to be corrected, opportunities for optimization, and other user-defined tasks. As the…

How is it you are aware of this? Affiliation with MS or a project that ran into it?

Wouldn't the key part:

"and in response to completion of a task, modifying the task list during the interactive code development session to indicate that the task has been completed."

mean it doesn't apply?

Worst case, just put a US exclusionary clause in the release so US copyright law doesn't apply. At least Europe is ahead of the US in this and doesn't allow such trivial patents and considers them invalid by definition.

Post reply on HN