118 pointsby ducktective8 hours ago11 comments
  • cyanregiment6 hours ago
    Clicked like 5 pages and never found 1 code example.

    Idk why languages don't have their syntax in a sandbox front-and-center on the home page.

    It's like a video game site with zero screenshots or videos (also rampant).

    New programming languages I want 2 things:

    1. What does the syntax look like

    2. Why would I use this language

    Talk about the proof logic, show the syntax, thank you

    • Verdex6 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't ready to take a significant mental journey.
      • redrobein34 minutes ago
        This is needless fearmongering. F* looks a lot like F# code with semantics you should be familiar with if you'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.
    • rixed5 hours ago
      I'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.
      • sroerick5 hours ago
        So I'm very seriously considering making my language indentation based. You're saying you wouldn't like that?
        • Georgelemental2 minutes 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
        • rixed4 hours ago
          No indeed I'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's not an important consideration either way.
          • NuclearPMan hour ago
            What is code edition?
            • aleph_minus_one27 minutes ago
              > What is code edition?

              I think rixed means "code editing" (I guess that rixed is simply not a native (L1) or excellent L2 English speaker).

        • mcluck2 hours ago
          For what it'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's much easier to navigate braced languages when using a vim-like editor
        • dunham3 hours ago
          I don't mind indentation based languages. I used to hate them, but they'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).

          That said, it is hard-mode:

          - You'll have to figure out how to parse it.

          - If you want editor support, it's a pain to get tree-sitter to handle it.

          - You may not be able to pull off editor operations like "rename" without implementing a pretty printer (a rename might affect indentation).

          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.

          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.)

        • zlsa5 hours ago
          I think this falls under "[wanting] to know the user case the authors had in mind"
          • BretonForearm4 hours ago
            There is no "user case", it's called use case.
            • aleph_minus_one4 hours ago
              > There is no "user case", it's called use case.

              Perhaps English is not a native language for zlsa?

        • giancarlostoro4 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.
          • koolala4 hours ago
            Isn't it easy to just auto format it?
      • NuclearPMan hour ago
        Use case. Not “user case”.
    • kasumispencer24 hours ago
      > Clicked like 5 pages and never found 1 code example.

      But I clicked one (1) link to the online book and found a thousand?

      • giancarlostoro4 hours ago
        Should be on the home page of any programming language site.
        • kasumispencer24 hours ago
          Is there actually any difference when it's just one (1) link away? Are most of us seriously this busy that we cannot spend even half a minute on this?
          • broken-kebaban hour ago
            There's a difference, yes. How big it is isn't really relevant question cause its simply an unnecessary tax on visitors.
      • 4 hours ago
        undefined
    • munchler6 hours ago
      • _flux5 hours ago
        I guess it's a bit popular right now

            * Error 17 at Welcome.fst(24,0-28,30):
              - Could not start SMT solver process.
              - Command: ‘/home/site/wwwroot/fstar/bin/z3’
              - Exception:
                  Unix.Unix_error(Unix.ENOENT, "create_process", "/home/site/wwwroot/fstar/bin/z3")
            
            1 error was reported (see above)
      • aleph_minus_one5 hours ago
        > https://fstar-lang.org/tutorial/

        FYI: The link to this tutorial is unluckily a little bit obscured on the F* website: Go to

        > https://fstar-lang.org/index.html#learn (1)

        and click on the image below the text "You probably want to read it while trying out examples and exercises in your browser by clicking the image below.".

        In the section of (1) also the PDF version is linked:

        > https://fstar-lang.org/tutorial/proof-oriented-programming-i...

        • cyanregiment5 hours ago
          I still don't see any code examples!

          But I do see the editor to try it.

          I wonder why more languages don't have a few simple examples of: "HTTP server", "hello world", "todo list app" that you can just click and it shows the code for how you'd make it in that language.

          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

          Edit: Page 18 of the PDF. That's the first time I found what the code looks like, thanks for sharing!

          • aleph_minus_one4 hours ago
            > I wonder why more languages don't have a few simple examples of: "HTTP server", "hello world", "todo list app" that you can just click and it shows the code for how you'd make it in that language.

            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 "more boring" consequences of this different way of thinking.

            --

            If you want a programming language that "just" enables you to write something well-understood (in particular in the area of web development) like your suggested

            > "HTTP server", "hello world", "todo list app"

            in a perhaps just a little bit more elegant/concise way, just look at which web development language/framework is currently fashionable on HN.

            • cyanregiment39 minutes ago
              > just look at which web framework

              See, by listing those, you can tell what it is.

              I imagine the quick project showcase would be different for Swift or for Rust.

              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.

              Like what kinds of things i can even think of writing with it - an implementation example

              • aleph_minus_one30 minutes ago
                > I imagine the quick project showcase would be different for Swift or for Rust.

                > 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.

                I suggest simply having a look at the table of contents of

                > https://fstar-lang.org/tutorial/proof-oriented-programming-i...

                This in my opinion gives you a first rough idea for what kind of problems people are using F*.

                Spoiler alert: these are not the kind of problems which are related to ["HTTP server", "hello world", "todo list app", ...].

                This is exactly the reason why I wrote further above:

                > Often the reason [why more languages don't have a few simple examples of: "HTTP server", "hello world", "todo list app"] 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 "more boring" consequences of this different way of thinking.

                • cyanregiment16 minutes ago
                  > these are not the kind of problems which are related to ["HTTP server", "hello world", "todo list app", ...].

                  Ok, what kinds of problems are they?

                  And ideally - what does a simple solution look like in F-star?

                  Set me on the path to installing the thing (ideally above the fold)

    • rainyq6 hours ago
      just click the screenshot
      • cyanregiment5 hours ago
        Takes you to an empty editor with still no code examples
    • summarity35 minutes ago
      What? There’s literally a completely interactive book linked right from the home page.
    • remywang4 hours ago
      That’s because syntax is the least interesting part of F*.
    • voodooEntity3 hours ago
      Thank you ! I just had the absolute same experience and was about to write a similar comment - take my upvote instead !
    • qzzi6 hours ago
      I clicked on 2 links on the main page in the Learn F* section...
      • 5 hours ago
        undefined
  • LelouBil8 minutes ago
    [delayed]
  • LelouBil21 minutes ago
    I like Haskell, and to me this seems really useful as a kind of "noob" to functional languages.

    Is this used in the industry ? And for what kind of software ?

  • pvsnp6 hours ago
    I liked being able to express calling external libraries while incrementally migrating existing C codebases to F*. Very solid language.
    • rixed4 hours ago
      What do you mean "express calling"? You mean calling the former C versions of the functions not yet ported, while asserting their behavior?
  • boutellan hour ago
    I guess responsive stylesheets can't be implemented without side effects...
  • 3lambda5 hours ago
    Would this language be useful for implementing compilers and formally proving things about them?
    • physPop2 hours ago
      yes thats the main reason, agda , coq similar ideas
  • IshKebab5 hours ago
    F* seems to be a collection of like five different languages and proof systems. Honestly I never figured it out.

    Does it get basic stuff like subtraction and u8 right, unlike Lean?

  • rustfreeforme5 hours ago
    [dead]
  • rustfreeforme5 hours ago
    [dead]
  • yourewrongsorry3 hours ago
    [flagged]
  • kirlfiend_grill5 hours ago
    [flagged]