12 comments

  • cyanregiment7 hours ago
    Clicked like 5 pages and never found 1 code example.<p>Idk why languages don&#x27;t have their syntax in a sandbox front-and-center on the home page.<p>It&#x27;s like a video game site with zero screenshots or videos (also rampant).<p>New programming languages I want 2 things:<p>1. What does the syntax look like<p>2. <i>Why would I use this language</i><p>Talk about the proof logic, show the syntax, thank you
    • Verdex7 hours ago
      To borrow your video game analogy. F* is the dwarf fortress of programming languages. Screenshots are only going to confuse anyone who isn&#x27;t ready to take a significant mental journey.
      • redrobein2 hours ago
        This is needless fearmongering. F* looks a lot like F# code with semantics you should be familiar with if you&#x27;ve worked with other proof oriented languages. The website design is dated is all. The book gives exactly what the OP wants in the introductory chapter.
        • Verdex56 minutes ago
          Fearmonger? Me? Well I never.<p>Also<p>&gt; if you&#x27;ve worked with other proof oriented languages.<p>That&#x27;s doing a lot of heavy lifting.
          • _doctor_love38 minutes ago
            Fearmonger is a little heavy handed but the comparison to Dwarf Fortress is probably too strong.<p>I don&#x27;t find F* syntax anymore intimidating than Haskell, Scala, Mercury, Prolog, etc. aka the hard languages. I love Ruby and I didn&#x27;t find it intuitive when I first began learning it (specifically, the block&#x2F;lambda passing mechanism).
            • Verdex23 minutes ago
              Meanwhile I&#x27;m sure there&#x27;s people out there baffled that anyone finds dwarf fortress challenging to get into.<p>I&#x27;m old enough that I&#x27;ve had the pleasure of handholding software engineers through their first anonymous function usage. Effect system, refinement types, totality checker? The best I get is blank stares before they go back to C# and JavaScript. These days I&#x27;m just glad they tolerate linq expressions and typescript.<p>It matters where you&#x27;re standing for what feels incomprehensible. But then again, you can say the same thing about dwarf fortress.
    • rixed7 hours ago
      I&#x27;m the opposite: when landing in a programming language site I want to know the user case the authors had in mind, the memory model, the type system, the compilation targets, the data layout, the control structures, and only at the end just check that the syntax is not indentation based.
      • sroerick6 hours ago
        So I&#x27;m very seriously considering making my language indentation based. You&#x27;re saying you wouldn&#x27;t like that?
        • Georgelemental2 hours ago
          Indentation based is a pain when copy-pasting between contexts with different indentation levels, as you have to fix it up manually, which is error-prone. In languages without it, you can just auto-format. (And even in an editor that doesn&#x27;t support that, having a second indicator makes it less error-prone to fix manually)
          • teiferer1 hour ago
            &gt; have to fix it up manually<p>Any editor written or actively maintained in the current century does this automatically for you. (Yes that obviously includes Emacs and Vim).
            • jcgl47 minutes ago
              But that doesn&#x27;t work if the indentation carries semantic meaning; you can&#x27;t change the indentation without changing the meaning. Maybe you can correct syntactically-incorrect spacing (e.g. change 3 spaces to 4 spaces), but not much beyond that.
        • rixed6 hours ago
          No indeed I&#x27;m not a fan. I find it brittle and arbitrary for data values especially; that also makes automatic code generation and edition harder, for no good reason. But that&#x27;s not an important consideration either way.
          • NuclearPM3 hours ago
            What is code edition?
            • aleph_minus_one2 hours ago
              &gt; What is code edition?<p>I think rixed means &quot;code editing&quot; (I guess that rixed is simply not a native (L1) or excellent L2 English speaker).
        • mcluck3 hours ago
          For what it&#x27;s worth, I love the semantics of many indentation based languages (F# for example) but really dislike editing them. Visually scanning is much easier with braces (imo) and it&#x27;s much easier to navigate braced languages when using a vim-like editor
          • teiferer1 hour ago
            For somebody unable to empathize with the &quot;braces are easier to scan&quot; part, could yiu explain why?<p>I find it easy to see if things are on the same indentation. I find it much harder to visually scan for opening and closing braces unless syntax highliting makes them scream at me or they are accompanied by ...indentation.
        • dunham5 hours ago
          I don&#x27;t mind indentation based languages. I used to hate them, but they&#x27;ve grown on me after using python, Haskell, Idris, Agda, etc. And I ended up making my own language indentation based (it is similar to Idris).<p>That said, it is hard-mode:<p>- You&#x27;ll have to figure out how to parse it.<p>- If you want editor support, it&#x27;s a pain to get tree-sitter to handle it.<p>- You may not be able to pull off editor operations like &quot;rename&quot; without implementing a pretty printer (a rename might affect indentation).<p>I think it is helpful for crude error recovery. On parse error, my language will simply skip to the next column 0 token and parse another declaration.<p>I did not do this (hindsight), but I would recommend arranging the grammar so you only get indented blocks in cases where the previous line ends in a keyword that introduces it. I think python has a trailing `:` every time indentation is introduced, and Elm does this too - in statements like `let` you need a newline after the `let` to get the multi-declaration version. (This addresses the rename issue.)
        • zlsa6 hours ago
          I think this falls under &quot;[wanting] to know the user case the authors had in mind&quot;
          • BretonForearm6 hours ago
            There is no &quot;user case&quot;, it&#x27;s called use case.
            • aleph_minus_one5 hours ago
              &gt; There is no &quot;user case&quot;, it&#x27;s called use case.<p>Perhaps English is not a native language for zlsa?
        • giancarlostoro5 hours ago
          I love that people hate indentation based so I show them a poorly indented C style languages codebase to see how they feel about indentation.
          • koolala5 hours ago
            Isn&#x27;t it easy to just auto format it?
      • NuclearPM3 hours ago
        Use case. Not “user case”.
    • kasumispencer26 hours ago
      &gt; Clicked like 5 pages and never found 1 code example.<p>But I clicked one (1) link to the online book and found a thousand?
      • giancarlostoro5 hours ago
        Should be on the home page of any programming language site.
        • kasumispencer25 hours ago
          Is there actually any difference when it&#x27;s just one (1) link away? Are most of us seriously this busy that we cannot spend even half a minute on this?
          • broken-kebab3 hours ago
            There&#x27;s a difference, yes. How big it is isn&#x27;t really relevant question cause its simply an unnecessary tax on visitors.
    • munchler7 hours ago
      <a href="https:&#x2F;&#x2F;fstar-lang.org&#x2F;tutorial&#x2F;" rel="nofollow">https:&#x2F;&#x2F;fstar-lang.org&#x2F;tutorial&#x2F;</a>
      • _flux7 hours ago
        I guess it&#x27;s a bit popular right now<p><pre><code> * Error 17 at Welcome.fst(24,0-28,30): - Could not start SMT solver process. - Command: ‘&#x2F;home&#x2F;site&#x2F;wwwroot&#x2F;fstar&#x2F;bin&#x2F;z3’ - Exception: Unix.Unix_error(Unix.ENOENT, &quot;create_process&quot;, &quot;&#x2F;home&#x2F;site&#x2F;wwwroot&#x2F;fstar&#x2F;bin&#x2F;z3&quot;) 1 error was reported (see above)</code></pre>
      • aleph_minus_one7 hours ago
        &gt; <a href="https:&#x2F;&#x2F;fstar-lang.org&#x2F;tutorial&#x2F;" rel="nofollow">https:&#x2F;&#x2F;fstar-lang.org&#x2F;tutorial&#x2F;</a><p>FYI: The link to this tutorial is unluckily a little bit obscured on the F* website: Go to<p>&gt; <a href="https:&#x2F;&#x2F;fstar-lang.org&#x2F;index.html#learn" rel="nofollow">https:&#x2F;&#x2F;fstar-lang.org&#x2F;index.html#learn</a> (1)<p>and click on the image below the text &quot;You probably want to read it while trying out examples and exercises in your browser by clicking the image below.&quot;.<p>In the section of (1) also the PDF version is linked:<p>&gt; <a href="https:&#x2F;&#x2F;fstar-lang.org&#x2F;tutorial&#x2F;proof-oriented-programming-in-fstar.pdf" rel="nofollow">https:&#x2F;&#x2F;fstar-lang.org&#x2F;tutorial&#x2F;proof-oriented-programming-i...</a>
        • cyanregiment7 hours ago
          I still don&#x27;t see any code examples!<p>But I do see the editor to try it.<p>I wonder why more languages don&#x27;t have a few simple examples of: &quot;HTTP server&quot;, &quot;hello world&quot;, &quot;todo list app&quot; that you can just click and it shows the code for how you&#x27;d make it in that language.<p>It matters a lot how the syntax looks IMO and seeing how, say, an API is scaffolded, helps understand a lot about the language in one glance<p>Edit: Page 18 of the PDF. That&#x27;s the first time I found what the code looks like, thanks for sharing!
          • aleph_minus_one6 hours ago
            &gt; I wonder why more languages don&#x27;t have a few simple examples of: &quot;HTTP server&quot;, &quot;hello world&quot;, &quot;todo list app&quot; that you can just click and it shows the code for how you&#x27;d make it in that language.<p>Often the reason is that the value that the programming language brings is thinking very differently about how to write code - the examples how to write something in it are merely the &quot;more boring&quot; consequences of this different way of thinking.<p>--<p>If you want a programming language that &quot;just&quot; enables you to write something well-understood (in particular in the area of web development) like your suggested<p>&gt; &quot;HTTP server&quot;, &quot;hello world&quot;, &quot;todo list app&quot;<p>in a perhaps just a little bit more elegant&#x2F;concise way, just look at which web development language&#x2F;framework is currently fashionable on HN.
            • cyanregiment2 hours ago
              &gt; just look at which web framework<p>See, by listing those, you can tell what it is.<p>I imagine the quick project showcase would be different for Swift or for Rust.<p>Would be nice to have something like that for this Fstar or any language I haven’t heard of - or maybe have but never looked into so I see why people are using it.<p>Like what kinds of things i can even think of writing with it - an implementation example
              • aleph_minus_one2 hours ago
                &gt; I imagine the quick project showcase would be different for Swift or for Rust.<p>&gt; Would be nice to have something like that for this Fstar or any language I haven’t heard of - or maybe have but never looked into so I see why people are using it.<p>I suggest simply having a look at the table of contents of<p>&gt; <a href="https:&#x2F;&#x2F;fstar-lang.org&#x2F;tutorial&#x2F;proof-oriented-programming-in-fstar.pdf" rel="nofollow">https:&#x2F;&#x2F;fstar-lang.org&#x2F;tutorial&#x2F;proof-oriented-programming-i...</a><p>This in my opinion gives you a first rough idea for what kind of problems people are using F*.<p>Spoiler alert: these are not the kind of problems which are related to [&quot;HTTP server&quot;, &quot;hello world&quot;, &quot;todo list app&quot;, ...].<p>This is exactly the reason why I wrote further above:<p>&gt; Often the reason [why more languages don&#x27;t have a few simple examples of: &quot;HTTP server&quot;, &quot;hello world&quot;, &quot;todo list app&quot;] is that the value that the programming language brings is thinking very differently about how to write code - the examples how to write something in it are merely the &quot;more boring&quot; consequences of this different way of thinking.
                • cyanregiment2 hours ago
                  &gt; these are not the kind of problems which are related to [&quot;HTTP server&quot;, &quot;hello world&quot;, &quot;todo list app&quot;, ...].<p>Ok, <i>what kinds of problems are they?</i><p>And ideally - what does a simple solution look like in F-star?<p>Set me on the path to installing the thing (ideally above the fold)
                  • aleph_minus_one27 minutes ago
                    &gt; Ok, what kinds of problems are they?<p>&gt; And ideally - what does a simple solution look like in F-star?<p>RTFM<p>Or to explicate on this point: find a section in the table of contents that looks interesting to you, go to the respective section, and look at a code example.<p>&gt; Set me on the path to installing the thing (ideally above the fold)<p>How to install this thing:<p>1. Read <a href="https:&#x2F;&#x2F;fstar-lang.org&#x2F;index.html#download" rel="nofollow">https:&#x2F;&#x2F;fstar-lang.org&#x2F;index.html#download</a><p>2. Go to the GitHub page linked there: <a href="https:&#x2F;&#x2F;github.com&#x2F;fstarlang&#x2F;fstar&#x2F;releases" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;fstarlang&#x2F;fstar&#x2F;releases</a><p>3. Download F* for an operating system of your choice there.
    • rainyq7 hours ago
      just click the screenshot
      • cyanregiment7 hours ago
        Takes you to an empty editor with still no code examples
    • remywang6 hours ago
      That’s because syntax is the least interesting part of F*.
      • thomastjeffery6 hours ago
        Then why are we all so interested?<p>Examples provide more than syntax. It&#x27;s the semantics that we care about most.
        • aleph_minus_one5 hours ago
          &gt; Examples provide more than syntax. It&#x27;s the semantics that we care about most.<p>... and this semantics is explained in a quite encompassing way in the introductory notes &quot;Proof-Oriented Programming in F*&quot;:<p>&gt; <a href="https:&#x2F;&#x2F;fstar-lang.org&#x2F;tutorial&#x2F;proof-oriented-programming-in-fstar.pdf" rel="nofollow">https:&#x2F;&#x2F;fstar-lang.org&#x2F;tutorial&#x2F;proof-oriented-programming-i...</a><p>&gt; <a href="https:&#x2F;&#x2F;fstar-lang.org&#x2F;tutorial&#x2F;" rel="nofollow">https:&#x2F;&#x2F;fstar-lang.org&#x2F;tutorial&#x2F;</a>
          • derdi1 hour ago
            The OP doesn&#x27;t want encompassing, they want the following example from the tutorial on the front page:<p><pre><code> type vec (a:Type) : nat -&gt; Type = | Nil : vec a 0 | Cons : #n:nat -&gt; hd:a -&gt; tl:vec a n -&gt; vec a (n + 1) let rec append #a #n #m (v1:vec a n) (v2:vec a m) : vec a (n + m) = match v1 with | Nil -&gt; v2 | Cons hd tl -&gt; Cons hd (append tl v2) </code></pre> This is a completely reasonable thing to want and expect.
    • qzzi7 hours ago
      I clicked on 2 links on the main page in the Learn F* section...
    • voodooEntity5 hours ago
      Thank you ! I just had the absolute same experience and was about to write a similar comment - take my upvote instead !
    • summarity2 hours ago
      What? There’s literally a completely interactive book linked right from the home page.
  • pvsnp8 hours ago
    I liked being able to express calling external libraries while incrementally migrating existing C codebases to F*. Very solid language.
    • rixed6 hours ago
      What do you mean &quot;express calling&quot;? You mean calling the former C versions of the functions not yet ported, while asserting their behavior?
  • LelouBil2 hours ago
    <a href="https:&#x2F;&#x2F;fstar-lang.org&#x2F;tutorial&#x2F;" rel="nofollow">https:&#x2F;&#x2F;fstar-lang.org&#x2F;tutorial&#x2F;</a>
  • LelouBil2 hours ago
    I like Haskell, and to me this seems really useful as a kind of &quot;noob&quot; to functional languages.<p>Is this used in the industry ? And for what kind of software ?
    • LelouBil2 hours ago
      I found these links in the F* book<p><a href="https:&#x2F;&#x2F;www.microsoft.com&#x2F;en-us&#x2F;research&#x2F;blog&#x2F;everparse-hardening-critical-attack-surfaces-with-formally-proven-message-parsers&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.microsoft.com&#x2F;en-us&#x2F;research&#x2F;blog&#x2F;everparse-hard...</a><p><a href="https:&#x2F;&#x2F;lwn.net&#x2F;Articles&#x2F;770750&#x2F;" rel="nofollow">https:&#x2F;&#x2F;lwn.net&#x2F;Articles&#x2F;770750&#x2F;</a><p><a href="https:&#x2F;&#x2F;project-everest.github.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;project-everest.github.io&#x2F;</a>
  • _doctor_love40 minutes ago
    Looks very very interesting and exciting! Key question: is anyone using it anger and has experience to share?
  • boutell3 hours ago
    I guess responsive stylesheets can&#x27;t be implemented without side effects...
  • 3lambda6 hours ago
    Would this language be useful for implementing compilers and formally proving things about them?
    • dnautics50 minutes ago
      personally i think you should just have a separate proof language that doesn&#x27;t also try to be a programming language and build a bridge between them (ideally as a compilation target). anyways im working on this with my spare opus tokens.
    • physPop3 hours ago
      yes thats the main reason, agda , coq similar ideas
  • IshKebab6 hours ago
    F* seems to be a collection of like five different languages and proof systems. Honestly I never figured it out.<p>Does it get basic stuff like subtraction and u8 right, unlike Lean?
    • gugagore1 hour ago
      <a href="https:&#x2F;&#x2F;xenaproject.wordpress.com&#x2F;2020&#x2F;07&#x2F;05&#x2F;division-by-zero-in-type-theory-a-faq&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xenaproject.wordpress.com&#x2F;2020&#x2F;07&#x2F;05&#x2F;division-by-zer...</a>
      • IshKebab1 hour ago
        &gt; But it doesn’t lead to confusion when doing mathematics in a theorem prover.<p>This is demonstrably untrue.<p>In any case that post is pretty unpersuasive. Basically saying it&#x27;s too tedious to do it right, in a language whose whole purpose is tediously doing things right!<p>Probably the better conclusion is that more proof automation is needed for simple things like &quot;this number is not negative&quot; so it is less tedious.<p>(I&#x27;m not a Lean expert but I was totally put off by it happily accept a uint8 with value 300.)
  • rustfreeforme6 hours ago
    [dead]
  • rustfreeforme6 hours ago
    [dead]
  • yourewrongsorry5 hours ago
    [flagged]
  • kirlfiend_grill7 hours ago
    [flagged]
    • aleph_minus_one5 hours ago
      &gt; &gt; F* (pronounced F star)<p>&gt; No, it isn&#x27;t.<p><a href="https:&#x2F;&#x2F;fstar-lang.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;fstar-lang.org&#x2F;</a> claims otherwise:<p>&quot;F* (pronounced F star)&quot;.