Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Argdown: A simple syntax for complex argumentation (github.com/christianvoigt)
120 points by stareatgoats on Jan 18, 2023 | hide | past | favorite | 37 comments



Am I the only one that thought this was a universal format for describing CLI arguments?


I've long wished I could "declare" my CLI arguments in a Markdown-like syntax (e.g. using `[]` and `<>` to denote optional vs. required arguments) and have some library figure it all out for me.


You're in for a treat: that library already exists and has been ported to multiple programming languages:

http://docopt.org


Doesn't look like it's maintained anymore, sadly. All of the major language repos have long threads trying to figure out who can pick up maintenance of the project.


Wow thanks, that does look interesting!


https://docopt.org/ may be of interest.


I go the other way: use optparse-applicative[1] to generate argument parsers for the configs, and generate help commands for each (sub)commands from each parser.

[1]: https://hackage.haskell.org/package/optparse-applicative


I had a go at this a while ago, uses the markdown AST to build a program descriptor:

https://github.com/mkdoc/mkcli

I think docopt is a better choice as it has more traction but this experiment showed me a pure markdown implementation is feasible.


Neat!

> I think docopt is a better choice as it has more traction

Is docopt still being maintained/developed? As another comment indirectly mentions: the original python repo seems abandoned. The other language ports still have more recent updates though.


PowerShell does exactly that for its scripts.

And then uses those definitions for autocomplete, validation, etc.


Consider protobufs, you have to do a bit more work but if you're going to schematize an API (which a CLI is when you get down to it) it's a good universal option.


How would that work exactly? So args resolve into a protobuf struct? But how are human readable args parsed into a protobuf?


I’ve never seen “argumentation” used in that context.


No, but the "arg" in "argdown" is close enough to the typical abbreviation of CLI arguments that it isn't that much of a stretch to imagine someone being primed that way to misread that word.


No, I clicked through and got confused, came here for enlightenment. Thanks!


I certainly thought that.


I figured the same.


No


For anybody wondering, argumentation here is this: https://en.m.wikipedia.org/wiki/Argumentation_framework I found the idea quite interesting within my master's program during AI class. My prof. research group was trying to use this to detect fake news.


Interesting. I've been working on a side project that combines argument mapping with actual syntax checking - meaning that if an argument's conclusion is purported to be "proven" via the sufficiency of its premises and sub premises, then a counterpoint further down in the graph will notify the conclusion that its truth value is now in doubt. I wonder if it could use argdown as an input method.


Are you working on this out in the open? I'd be very interested to see what it looks like and where you're planning to go with it.


Yeah, maybe I should. I've thought about doing a stream on it for a while. It's a fun mix of actors, react, graph viz, and philosophy.


Do you stream at all currently? I'll keep an eye on your Twitch etc. if you're planning on streaming this stuff. I'm also very interested.


Well if there's any way to find out if you do reveal anything I'd love to know because this sounds very interesting and novel.


That sounds interesting; the weakness of the examples provided with Argdown is that they come to a conclusion, but they don't indicate why that conclusion was chosen over the other option, and it's not clear that the conclusions actually address everything.


Another cool site I found recently (via the replit guy) is https://www.rootclaim.com/

Very cool way to present arguments.

I'm thinking of taking that, as well as argdown, and building some easy to use keywords in scroll https://scroll.pub/


This is dying for some sort of example on the front page. I clicked around trying to figure out what it was, assuming it was some sort of argument syntax for CLI tools.


Did you try clicking on examples/, docs, or on the online sandbox?


Can’t say I find the examples motivating. Just tells me more about the author’s tastes and proclivities than the utility of all this markup.


Yes, and I eventually figured it out. That's why I am saying it would be nice if it were on the front page, so people don't have to click around.


Same here, I read the Readme twice and was still puzzled what this is for.


I haven't gone beyond reading the page, but the intent matches my intuition that we need tools for better following (and agreeing upon?) good "geometries" for arguments.


When corporate email threads start getting lengthy, I like to flow* them. Too often it's not even a question of premises and conclusions, but rather I find technical threads get hung up on quibbling minor issues, while failing to engage ("arguing past each other") wrt fairly major points.

* eg https://www.speechanddebate.org/wp-content/uploads/Big-Quest...


Same here. I call it “structured reasoning” in my mind.

I have been eyeballing https://www.kialo.com/ but I’m very hesitant to use it for company decisions.


As a sample, I just glanced at the UBI discussion there. Each claim pro and con, when clicked upon, seems to break into another level of claims pro and con. And apparently crowdsourced as well. Looks like a fantastic resource. Very much what I was hoping for.


I've been scouring the web for things like this for a while; open source tools that can represent an argument process in a visual manner reminiscent of a workflow. There is obviously kialo.com, but it doesn't quite tick all the boxes IMO. Interest in this kind of thing additionally seems to have died out a few years back. Are we waiting for an AI solution perhaps?

In the meantime Argdown perhaps is the closest thing available.


There's Hypernomicon on Mac and Rationale for online/PC maybe




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: