[HN Gopher] The Drakon Language ___________________________________________________________________ The Drakon Language Author : brudgers Score : 151 points Date : 2023-05-21 14:49 UTC (8 hours ago) (HTM) web link (drakonhub.com) (TXT) w3m dump (drakonhub.com) | eternityforest wrote: | DRAKON seems like almost the perfect embeddable visual scripting | language aside from one detail. | | I looked into some of their visual aspects when I was doing if | this then that rules embedding, but I ended up deciding left to | right was more appropriate for something likely to have many | short separate flows that fit on a screen. | | Other than that, it's just so many light hears beyond regular | flowcharts in terms of aesthetics and readability. | keyle wrote: | Neat. This looks a bit like the gofmt for flow charts. | | I've had to design flow charts in the past and this looks like a | rock solid way of designing some complex flows. It can easily | turn into a spaghetti fest. | junon wrote: | At least from what I can tell, this isn't so much as a language | as it is a drag-and-drop tool. I like how it looks but can't seem | to find the language spec (as it claims it's a language) or any | such examples through some cursory digging of the site. | | Does it mean more of a communicative "language" of shapes? I was | hoping more for a Graphviz .dot format that would be used to | generate such graphs. Mermaid seems to have become the defacto | standard in OSS and I _really_ dislike it (even though I 've also | contributed to it). A modern, sleek alternative like this would | be great. | anonzzzies wrote: | DRAKON is an actual language; | | https://en.wikipedia.org/wiki/DRAKON?wprov=sfti1 | beefman wrote: | I didn't know wikipedia had link tracking | | https://wikitech.wikimedia.org/wiki/Provenance | erk__ wrote: | A better source for the actual language would be this PDF file | [0] or the Wikipedia page [1]. | | It is a kind of strict flowchart language that only allows you | to do it in one way, which may be bad for some, but it helps | how fast you can grok it when you understand the simple rules. | | The same author have also recently made a JS widget that allows | you to embed these diagrams on websites [2]. | | [0]: https://drakon-editor.sourceforge.net/DRAKON.pdf | | [1]: https://en.wikipedia.org/wiki/DRAKON | | [2]: https://github.com/stepan-mitkin/drakonwidget | PaulHoule wrote: | No loops? What about a process with this kind of structure? | | https://en.wikipedia.org/wiki/OODA_loop | Jtsummers wrote: | > No loops? | | It has loops. Check out the examples here: | https://drakonhub.com/drakon-examples | m12k wrote: | Ah, ok, so the part that says time always flows downwards in | Drakon diagrams just means under normal circumstances, not | _always_. TBH it wouldn't be all that useful if was limited | to only layouting DAGs, so I'm glad that's the case. | im_down_w_otp wrote: | Seeing this gave me the idea that we should add flowchart-style | visualization of executable specifications written in our system- | level specification & query language, SpeQTr | (https://docs.auxon.io/speqtr/). | | We already do some things to extract flowchart/state-diagram like | topology information from collected system traces, but given how | much of our customer workflows center around requirements & | specifications, I think going the direction of communicating the | underlying detailed specification more abstractly would be a big | win. | erk__ wrote: | Oh this is one of my favourite topics. | | This site is like many of the other DRAKON tools written by | Stepan Mitkin and is released to the public domain on GitHub [0]. | | The tool I am most familiar with is the DRAKON editor [1] also | created by Mitkin and released to the public domain [2]. I feel | in love with DRAKON about 10 years ago and have used it on and | off for just writing out flows or some algorithms, I even wrote a | optimistic database in Erlang with it some years ago which I | found pretty interesting. More recently I have been looking at | adding Rust support to the tool, but many of the things I want to | do is blocked by various technical debt that have accumulated | over the years, and the fact that I have never used TCL before. | | [0]: https://github.com/stepan-mitkin/drakonhub | | [1]: https://drakon-editor.sourceforge.net/ | | [2]: https://github.com/stepan-mitkin/drakon_editor | kqr2 wrote: | Can anyone share any practical experience using Drakon for a non- | trivial project? | lugu wrote: | I used it to describe the behavior of an embedded device (like | the boot sequence or the failure modes), it worked great since | team mates would simply update the diagrams without wondering | about the format. Also people non familiar with Drakon could | make sense of it. My impression was: it is easy to model well | designed systems and hard to draw convoluted interactions. It | felt like a feature, a bit like LaTeX, where it is easy to | produce a beautiful doc and possible (with some effort) to make | an ugly one. That was just my impression: if the diagram is too | complex, you probably should simplify the design. | Onavo wrote: | The old Buran people have probably been recalled to rebuild | their defence industry given how badly the whole Ukraine thing | is going for them. | cyberax wrote: | There are no real applications written in Drakon. That's | because its authors spend most of the time pontificating about | how it's superior to all other programming languages. | | Drakon editor is probably the most complicated piece of | software written in it: https://github.com/stepan- | mitkin/drakon.tech | orbital-decay wrote: | No _public_ applications. Drakon and the CASE software based | on it have been used in certain Russian and Ukrainian | aerospace and energy industry projects. NPTsAP continued to | use it in all their projects after Buran (mostly control | systems for upper stages). | jawns wrote: | I have used it to produce diagrams that represent various | stages in the workflows of a content management system for | video and mobile assets. Just because the underlying systems | were complicated doesn't mean the diagrams needed to be, and I | find its design decisions to be helpful. It hits the sweet spot | between comprehensible to non-technical users and useful for | technical users. | jonahx wrote: | I've always thought the layouts and conventions of Drakon are | simple and clean, and a legitimate improvement on most other | systems. But I would prefer to use them as Graphviz renderer, or | via another textual interface, than via a custom GUI. I don't | think a text UI exists, though. | two_handfuls wrote: | Yes, ideally a markdown extension for Drakon, like we have one | for (a subset of) Graphviz. | tgv wrote: | I guess it would look very much like A | #if B #if D #if F | G #else H | #else E #else C | #end | User23 wrote: | Flowchart normal form. Neat really. Makes me want to play around | with a Smalltalk dialect. | | My least favorite thing about all the common programming | languages is that programs are represented as one dimensional | byte arrays. You can talk about ASTs and whatever else to your | heart's content, but at the end of the day you're editing a one | dimensional character/rune array. It's especially sad since | existential graphs[1] are well over a century old. | | Maybe one day I'll manage to invent a properly two dimensional | m-expression that works with any s-expressions. | | [1] https://en.m.wikipedia.org/wiki/Existential_graph | sterlind wrote: | Drakon could be a really useful decompilation target, or at least | an alternative to control flow graphs produced by tools like | Ghidra and IDA. Seems like its relative lack of hierarchical | structure would match the nature of assembly branching. | xavxav wrote: | Oh I love this project, its very interesting to think about its | relation to the family tree of soviet programming languages. | | From the start (ie: 1946-48) they conceptualized programming | through the notional of 'logical schemas' or 'logical operators' | which were a pseudo-textual notation for flow charts. They went | so far as to develop entire theories for the analysis, and | optimization of these logical schemas. | | Another fascinating language was Analitik which was a language | for CAS (like Matlab) developped by V. Glushkov in Ukraine. | | There exists a _fantastic_ website about programming languages in | the ussr: http://www.compiler.su/ekskurs-v-istoriyu-razrabotok- | yazykov... | | There are also entire journals worth of these papers on PL design | from the '50s which have been translated to english and sit | rotting in university shelves. | | edit: there's actually another post on the front page on my | project to recreate the first of those languages: | https://github.com/xldenis/besm, though unfortunately I have let | it fall aside in recent years. ___________________________________________________________________ (page generated 2023-05-21 23:00 UTC)