4 ms·
“Why is this on HN?” comments are often a mark of an intellectually interesting story…but not always of course. As for quicksort in Drakon, if you need quickso
by brudgers 2y ago
“Why is this on HN?” comments are often a mark of an intellectually interesting story…but not always of course.
As for quicksort in Drakon, if you need quicksort you might have an impedance mismatch between the application and language…might be knee deep in the Turing Tarpit. For example if you are building a real-time system, sorting to the degree quicksort seems like a good idea might suggest a design error.
- troupo 2y agoDrakon cannot handle a trivial algorithm like quicksort, much less a real-time system
- mistercheph 2y agoIt is not being shared as a practical tool for people to quicksort their datasets in, it's an experimental tool made by a collapsed empire's defunct space program that seems to attract the interest of hobbyists.
- cyberax 2y ago> collapsed empire's defunct space program No, it was not.
- buescher 2y agoI've enjoyed your critique of Drakon and its proponents so far, but it's very typical for real-time safety-critical systems to have coding standards in place that prohibit recursion; one example is MISRA.
- troupo 2y ago1. There's no evidence that Drakon was used in aerospace industry beyond claims made by a single person: Drakon's author 2. Drakon is pushed as a generic programming tool despite: lacking generic programming facilities, lacking any tooling to actually produce working programs on any platform (except a single hobbyist implementation which is a UML editor with code concatenation: https://drakon-editor.sourceforge.net/drakon-erlang/silh.html https://drakon-editor.sourceforge.net/drakon-erlang/silh.htm...)
- ahoka 2y agoThis is such a straw man argument. The original comment claims that if a modelling tool cannot model something as simple as quick-sort, then it's useless in practice. BTW, there's nothing inherently "unsafe" about recursion, but that is completely not the point here.
- buescher 2y agoOf course, there are plenty of things that are useful in practice that cannot model quicksort, or that would require you to implement stacks and recursion in awkward Turing-tarpit ways. There's nothing inherently "unsafe" about a lot of things that guidelines for safety-critical firmware prohibit, either. More importantly, "safe" in the sense of "recursion is not inherently unsafe" is not the same thing at all as "appropriate for safety-critical applications". They can overlap, of course, or not. The point is that you might not need recursion or might even actually want to avoid recursion in the domain claimed for Drakon. Whether it's actually been used in these kinds of applications or not, I have no special knowledge beyond having looked over the Wikipedia articles.
- brudgers 2y agoIf it is safety critical, try to use a finite state machine. Same if you want fast.