10 comments

  • eggy11 minutes ago
    I've been on this horse for a while now. I've settled on learning Ada/SPARK. Ada 2022 will start feeding a new SPARK 2014 update. Yes, they are both verbose, if you don't like that sort of thing, and don't like Pascal-like syntax. Believe me, I like APL/J/k/uiua/BQN and Forth and ASM. I am usually syntax agnostic as long as the PL and the ecosystem (more important than most think), meet your needs. I tried Rust back in 2018, and then again in 2023, but found it very complex and Ok, not a fan of the syntax. I would have preferred more ML or Haskell-like syntax. Zig seemed nice, but different use case, and too new. After all, Ada/SPARK have been on huge, high-assurance, high-safety applications for decades. Rust is getting some of their love, and vice versa. AdaCore had created a verified Rust compiler, but with a real world product (Blacktail hoist) in the works, we need a toolset and guarantees and ease of auditing and acceptance to achieve high safety and standards certifications. Think aerospace, defense, railway, and automotive. I started programming in 1977, so there's always a place in my heart for ASM/C. I played with F#, F*, and LOW from MS, and they are good, but they and Rust simply don't have the real world legacy of Ada/SPARK. I have been using Shen to write some formally verified models of less safety-critical areas of our software and I find it refreshing, however, my day job is to stay focused on Ada/SPARK until Rust matures more with a formally verifed proven toolset. There are certainly efforts and crates available in that direction, so hopefully others will bring it to where it needs to be. Lean is another one I have been playing with for some of the more overall logic proof of the system we are building.
  • gavinray2 hours ago
    I really think that verification aware languages are going to become a necessity<p>Wrote a bit about this recently<p><a href="https:&#x2F;&#x2F;gavinray97.github.io&#x2F;blog&#x2F;design-by-contract-and-effects-for-llms" rel="nofollow">https:&#x2F;&#x2F;gavinray97.github.io&#x2F;blog&#x2F;design-by-contract-and-eff...</a>
    • rramadass1 hour ago
      The first thing people need to study is the &quot;Correct by Construction&quot; approach to programming as espoused by Edsger Dijkstra. Only then will the mathematical concepts used in verification aware languages start making sense and one can better understand what and how to use it.<p>One of the best books to learn this from is <i>The Correctness-by-Construction Approach to Programming by Derrick Kourie and Bruce Watson</i> - <a href="https:&#x2F;&#x2F;link.springer.com&#x2F;book&#x2F;10.1007&#x2F;978-3-642-27919-5" rel="nofollow">https:&#x2F;&#x2F;link.springer.com&#x2F;book&#x2F;10.1007&#x2F;978-3-642-27919-5</a><p>The book actually uses Dijkstra&#x27;s <i>GCL language and wp-calculus</i> along with Carroll Morgan&#x27;s <i>Refinement Calculus</i> to demonstrate step-wise derivation of programs from specifications using a lot of examples.
  • gdwatson1 hour ago
    Names for C successor languages are pretty well exhausted by this point, so I sympathize, but I strongly associate the name C* with a decade-old rant about C compilers’ aggressive exploitation of undefined behavior: <a href="https:&#x2F;&#x2F;www.complang.tuwien.ac.at&#x2F;kps2015&#x2F;proceedings&#x2F;KPS_2015_submission_29.pdf" rel="nofollow">https:&#x2F;&#x2F;www.complang.tuwien.ac.at&#x2F;kps2015&#x2F;proceedings&#x2F;KPS_20...</a> . (In calling it a rant I don’t mean that it’s altogether unpersuasive. Its style is just a bit spicier than I am used to seeing typeset in Computer Modern.)
  • Taikonerd2 hours ago
    The authors cite this, but just to mention it: this sounds like F*, another proof-oriented language. (<a href="https:&#x2F;&#x2F;fstar-lang.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;fstar-lang.org&#x2F;</a>)<p>F* is in the ML family of languages, so it looks pretty different from C*.
  • jensgk1 hour ago
    There already is a C* : <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;C*" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;C*</a>
    • mrkeen47 minutes ago
      Found another one:<p><a href="https:&#x2F;&#x2F;www.cs.columbia.edu&#x2F;~sedwards&#x2F;classes&#x2F;2021&#x2F;4115-fall&#x2F;lrms&#x2F;cstar.pdf" rel="nofollow">https:&#x2F;&#x2F;www.cs.columbia.edu&#x2F;~sedwards&#x2F;classes&#x2F;2021&#x2F;4115-fall...</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;kkysen&#x2F;cstar" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;kkysen&#x2F;cstar</a><p>And to sibling comments: <i>I</i> care. Non-mainstream languages are talking points. I don&#x27;t want to get 15 minutes into a &quot;you should have effects like Koka&quot; argument and then find out the other person is talking about a different Koka.
    • dymk1 hour ago
      That C* uses .cs, but nobody is complaining about C# using that extension<p>That C* was released in 1993<p>Who actually cares about the name collision?
    • applfanboysbgon1 hour ago
      Does it matter? Is the global namespace permanently depleted because of an obscure language that nobody has used in 30 years?
      • stbenjam19 minutes ago
        By that logic, I think I&#x27;ll create a new language called Pascal, or maybe Ada...
  • rramadass2 hours ago
    The &quot;C*&quot; language website - <a href="https:&#x2F;&#x2F;cstarlang.org&#x2F;en&#x2F;intro.html" rel="nofollow">https:&#x2F;&#x2F;cstarlang.org&#x2F;en&#x2F;intro.html</a><p>See in particular, usage benefits with LLMs (last para of <a href="https:&#x2F;&#x2F;cstarlang.org&#x2F;en&#x2F;intro.html" rel="nofollow">https:&#x2F;&#x2F;cstarlang.org&#x2F;en&#x2F;intro.html</a>) and how to use it with LLMs (<a href="https:&#x2F;&#x2F;cstarlang.org&#x2F;en&#x2F;tutorial&#x2F;cstar-mcp.html" rel="nofollow">https:&#x2F;&#x2F;cstarlang.org&#x2F;en&#x2F;tutorial&#x2F;cstar-mcp.html</a>).<p>Note that the paper&#x2F;language are from 2025 and so pretty recent.
  • glitchc2 hours ago
    Great idea, terrible syntax.
    • ux2664781 hour ago
      Yeah I dislike it. Why are we babyducking sepples attributes? And what I assume to be namespace accessors? Why are logical assertions enclosed in backticks? I &quot;get it&quot;, because it&#x27;s actually kind of difficult to make a backwards compatible derivative of C that doesn&#x27;t devolve into glyph soup, but this has a massive frankengrammar stink to it. The proof language is eyebrow raising to say the least.
    • ahknight2 hours ago
      I say this about C every day.
    • rramadass2 hours ago
      What&#x27;s terrible about the syntax? Using &quot;[[require&#x2F;ensure&#x2F;invariant&#x2F;proof&#x2F;assert&#x2F;etc.]]&quot; is actually pretty neat.<p>And given that almost all C programmers are also C++ programmers, no mere syntax can faze us :-)
      • binaryturtle2 hours ago
        In my own ranking of favourite programming languages C is at the first place. C++ comes in last. I personally hate it when people write C&#x2F;C++ as if it&#x27;s the very same thing. I&#x27;m quite sure there&#x27;s more like me out there. :)<p>Interestingly Perl comes in second, even I use it rarely (aka not at all) these days. But that&#x27;s a slightly off-topic side note. :)
        • cwnyth12 minutes ago
          I&#x27;m always surprised on here when I see others admin to liking C and Perl. It makes me feel less alone.
        • ahknight2 hours ago
          Perl is just C with less type safety.<p>And yes, for the most part. C++ as simple shorthand for struct-attached functions and automatic memory management (no, not smart pointers; RAAI) is good. Every single thing added after that is misery and should push a modern developer to Rust, Go, or Zig (roughly in that order) where such things are implemented sanely or not at all.
          • stvltvs1 hour ago
            Funny I think of Perl as Bash with slightly saner syntax plus robust regexp. (said with love)
          • hnlmorg1 hour ago
            The only thing Perl and C have in common is the curly-brace.
        • rramadass1 hour ago
          For me, C++ is always in first place. It allows me to do high-level abstractions to low-level hijinks all with total control (i.e. zero-cost abstractions, Templates for compile time programming etc.) across all levels of the software stack and the full spectrum of available hardware.<p>Furthermore, any C++ programmer who says they do not know C, knows neither C nor C++ (hence my preference in using C&#x2F;C++ as a shorthand to encompass both and highlight the dependency of the latter on the former). I often see this in novice C++ programmers who started with &quot;Modern C++&quot; and identify it as something like Java&#x2F;C# because of the now huge set of standard libraries and copious syntactic sugar which only compounds their confusion further.
          • applfanboysbgon1 hour ago
            &gt; Furthermore, any C++ programmer who says they do not know C, knows neither C nor C++ (hence my preference in using C&#x2F;C++ as a shorthand to encompass both and highlight the dependency of the latter on the former).<p>Right, but this dependency is one-way. There is an entire legion of C programmers who reject C++ (most notably Linus), so claiming that almost all C programmers are also C++ programmers is a bit off.
            • rramadass43 minutes ago
              What i meant was that almost all C programmers are aware of and know C++ to varying degrees. But they choose to not use it for their application based on needs&#x2F;expertise&#x2F;etc.<p>Linus Torvalds objection to using C++ is perfectly logical for his use-case. I know many embedded programmers who refuse to use C++ even though they understand and agree with the benefits that it can bring to the table. Their C expertise is so good that when they program, cognitively the language just disappears and they &quot;flow&quot; through the problem solution implementation. This is the crux of problem-solving.
  • theokrueger2 hours ago
    formal verification is great and all, but you can never make it as ergonomic as functional verification. this matters for agents and real people alike.<p>formal verification requires a deeper understanding of underlying mechanisms to write correctly. yet nothing prevents you or your agent from changing invariants to fit the algorithm and making it incorrect.
    • ux2664781 hour ago
      And neither can be made as ergonomic as no verification at all. It&#x27;s all about how much you need. Functional verification isn&#x27;t an appropriate tool where a single bug is catastrophic.<p>&gt; yet nothing prevents you or your agent from changing invariants to fit the algorithm and making it incorrect.<p>If the thing we&#x27;re trying to prove is ungrounded, it&#x27;s trivially true that any verification method falls apart. You&#x27;re still encoding priors in your testing methodology. No matter how robust you think your testing suite is, I can still trick it if given free reign over the codebase.
    • rramadass1 hour ago
      <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=49613696">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=49613696</a>
  • bellowsgulch1 hour ago
    I suspect that there is a body of C programmers out here that use C on a regular basis that aren’t posting who know that using C safely is 99% just using Valgrind and some specific GCC or llvm flags and you’re done.<p>They don’t reply to these threads to share that knowledge because these threads devolve into cesspools about how you should just use Rust despite the language not meeting specific requirements authors have that you have to do additional work and maintenance for in “safe” languages that you get for free in C because you don’t have to emulate it.
    • Jtsummers1 hour ago
      &gt; I suspect that there is a body of C programmers out here that use C on a regular basis that aren’t posting who know that using C safely is 99% just using Valgrind and some specific GCC or llvm flags and you’re done.<p>C* (the submitted language) is not just about determining memory correctness and related program features like what Valgrind will do for you (or help with). It&#x27;s about proving correctness of programs more generally, so any C programmer not looking at it because they know about Valgrind are choosing to skip something interesting for a very poor reason.
    • rramadass55 minutes ago
      &gt; I suspect that there is a body of C programmers out here that use C on a regular basis that aren’t posting who know that using C safely is 99% just using Valgrind and some specific GCC or llvm flags and you’re done.<p>Absolutely right! I sincerely hope they share their knowledge here and elsewhere.<p>&gt; They don’t reply to these threads to share that knowledge because these threads devolve into cesspools<p>HN is often rage-inducing when it comes to comments on C&#x2F;C++&#x2F;Fortran&#x2F;Cobol&#x2F;etc. older languages and systems. There are many critical and industrial-strength systems developed by the previous generation of engineers&#x2F;programmers which today&#x27;s noobs&#x2F;cargo-cultists cannot even hope to imagine much less understand.<p>As an example, people talk about all the great features provided by Erlang but forget that its BEAM VM where most of the &quot;magic&quot; resides is actually written in C! Imagine how much expertise lies buried in its implementation!