Live data from Hacker News

Show HN: Jq-Like Tool for Markdown

github.com

31–40 of 79 posts

Re: Show HN: Jq-Like Tool for Markdown

#31
post #9
post #2

Ironically one of the reasons markdown (and other text based file formats) were popular because you could use regular find/grep to analyze it, and version control to manage it.

I don't think anyone ever really expected to see widespread use of regexes to alter the structure of a Markdown document. Honestly, while something like "look for numbers and surround them with double-asterisks to put them in boldface" is feasible enough (and might even work!), I can't imagine that a lot of people would do that sort of thing very often (or want to) anyway. If a document is supposed to have structure…

> (Keeping in mind that traditional regexes can't balance brackets; presumably they can't properly track indentation levels either.)

You're right: Regular expressions are equivalent to finite state machines[1], which lack the infinite memory needed to handle arbitrarily nested structures [2]. If there is a depth limit, however, it is possible (but painful) to craft a regex to describe the situation. For example, suppose you have a language where angle brackets serve as grouping symbols, like parentheses usually do elsewhere [3]. Ignoring other characters, you could verify balanced brackets up to one nesting level with

  /^()*$/
and two levels with

  /^(]*>|[^])*>)*$/
Don't do this when you have better options.

---

[1] https://reindeereffect.github.io/2018/06/24/index.html

[2] As do any machines I can afford, but my money can buy a pretty good illusion.

[3] are not among the typical regex metacharacters, so they make for an easier discussion.

Re: Show HN: Jq-Like Tool for Markdown

#32

> GitHub PRs are Markdown documents, and some organizations have specific templates with checklists for all reviewers to complete. Enforcing these often requires ugly regexes that are a pain to write and worse to debug This is because GitHub is not building the features we need, instead they are putting their energy towards the AI land grab. Bitbucket, by contrast, has a feature where you can block PRs using a checkb…

Not only is GitHub focused on AI, but they’re also making their UI slower and jankier by rewriting it in React. I feel like a “Linear for GitHub” is due.

https://pierre.co/

Re: Show HN: Jq-Like Tool for Markdown

#33
post #26

Earlier quoted context omitted.

Not only is GitHub focused on AI, but they’re also making their UI slower and jankier by rewriting it in React. I feel like a “Linear for GitHub” is due.

Is it true that it is React’s fault? Is there any other replacement for heavy user interaction, that is clearly more performative? You cannot do that on server side.

SolidJS

Re: Show HN: Jq-Like Tool for Markdown

#34

Earlier quoted context omitted.

Not only is GitHub focused on AI, but they’re also making their UI slower and jankier by rewriting it in React. I feel like a “Linear for GitHub” is due.

Linear? That website makes my laptop heat up like nuts.

If also hijacks standard browser shortcuts: I try to open the file menu with alt-f, but instead it (un-) marks the issue as "Favorite".

Re: Show HN: Jq-Like Tool for Markdown

#36
post #26

Earlier quoted context omitted.

Not only is GitHub focused on AI, but they’re also making their UI slower and jankier by rewriting it in React. I feel like a “Linear for GitHub” is due.

Is it true that it is React’s fault? Is there any other replacement for heavy user interaction, that is clearly more performative? You cannot do that on server side.

Yes, there are lots of better options. React is around the bottom 25th percentile of frameworks when comparing speed. https://krausest.github.io/js-framework-benchmark/2025/table...

Re: Show HN: Jq-Like Tool for Markdown

#38

I think you'd benefit of having some more real-world-ish examples in the README, as someone who doesn't intuit what I'd want to use this for.

That's a great idea, thanks! I'll do that tomorrow or so.

As a preview, two specific cases I've seen:

1) In PRs, some companies like to have semi-structured metadata, like a link to a related ticket under a heading "Ticket". In mdq, you could find that using `# Ticket | [](^https://issues.acme.com/)`

2) Many projects ask people who submit bugs to check off whether they've searched for existing bugs. `- [x] I've looked in the bug tracker for existing bugs`

Re: Show HN: Jq-Like Tool for Markdown

#40
post #7

Thanks for sharing this Yuval! Thanks as well for using permissive licenses so I can use this at work.

Curious, which license can't you use at work for a simple shell tool? Considering you're not linking against it, even GPL3 should be okay, right?

Most big employers consider GPL unusable and will only allow Apache, MIT, BSD, and other permissive patent-free licenses.
Post reply on HN