Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I hadn't reviewed GFM's table extension previously, thanks for sharing.

At first sight, I think GFM's table extension and Sheet Markup have different goals. While the table extension is intended for displaying a single table of data, Sheet Markup for defining an interactive spreadsheet, including things like formulas. Such a spreadsheet might not really be a single "table" as such, it might be multiple separate logical tables. Also, I suspect that we will in future want to extend Sheet Markup with additional features which would be "even further" from what GFM's table extension supports.

But thanks, certainly food for thought!



I'm working on internal DSLs for markdown. I think it's a pretty powerful language and often it can be used in a different way rather than changed. For instance, a badge with a link could. A nice thing about a true internal DSL is that they are supported because it's the same language, being an internal DSL rather than an external DSL.

External DSLs of course give you full flexibility, as you are no longer constrained by the language. https://javieracero.com/blog/internal-vs-external-dsl/

My past work and this gave me the idea to do something that sits between an internal DSL of markdown and an external DSL - to allow tables without row dividers, but put them in fenced code blocks with a different language name so they don't get displayed wrongly by existing markdown tools, instead displayed as code. And because this is the only difference, to make it display as a table using existing gfm tools, an empty header could be added, since normally it's not desirable to have the whole thing as a header.

Here's an empty header that at least on https://loilo.github.io/gfm-preview/ shows up shorter than a normal line:

    []()|||
    -|
    Rent | $1500 | paid
    Utilities | $200 | unpaid
Though it isn't md I think I will have md in the name of the extension, much like jsonl has l in the name but a jsonl file with two or more lines of data isn't a single valid JSON document.

Edit: here's one that displays on GitHub:

    []()|[]()|[]()
    -|-|-
    Rent | $1500 | paid
    Utilities | $200 | unpaid


I see. I'm a big fan of DSLs, but the internal vs. external distinction is not something I've seen articulated before.

For now, I'm treating Sheet Markup as an external DSL, which can be embedded in a Markdown document using a fenced code block. But there are certainly benefits (and costs) to developing an internal DSL for spreadsheets along the lines of what you're suggesting.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: