Live data from Hacker News

F*: A general-purpose proof-oriented programming language

fstar-lang.org

51–60 of 107 posts

Re: F*: A general-purpose proof-oriented programming language

#51

Earlier quoted context omitted.

> 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

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

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

Re: F*: A general-purpose proof-oriented programming language

#52

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 ?

I found these links in the F* book

https://www.microsoft.com/en-us/research/blog/everparse-hard...

https://lwn.net/Articles/770750/

https://project-everest.github.io/

Re: F*: A general-purpose proof-oriented programming language

#54
post #12

Earlier quoted context omitted.

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.

So I'm very seriously considering making my language indentation based. You're saying you wouldn't like that?

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't support that, having a second indicator makes it less error-prone to fix manually)

Re: F*: A general-purpose proof-oriented programming language

#55

Earlier quoted context omitted.

Then why are we all so interested? Examples provide more than syntax. It's the semantics that we care about most.

> Examples provide more than syntax. It's the semantics that we care about most. ... and this semantics is explained in a quite encompassing way in the introductory notes "Proof-Oriented Programming in F*": > https://fstar-lang.org/tutorial/proof-oriented-programming-i... > https://fstar-lang.org/tutorial/

The OP doesn't want encompassing, they want the following example from the tutorial on the front page:

    type vec (a:Type) : nat -> Type =
      | Nil : vec a 0
      | Cons : #n:nat -> hd:a -> tl:vec a n -> 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 -> v2
        | Cons hd tl -> Cons hd (append tl v2)
This is a completely reasonable thing to want and expect.

Edit: For comparison, Rocq https://rocq-prover.org/ and Lean https://lean-lang.org/ both manage to do this.

Re: F*: A general-purpose proof-oriented programming language

#56

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?

https://xenaproject.wordpress.com/2020/07/05/division-by-zer...

Re: F*: A general-purpose proof-oriented programming language

#57

Earlier quoted context omitted.

So I'm very seriously considering making my language indentation based. You're saying you wouldn't like that?

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't support that, having a second indicator makes it less error-prone to fix manually)

> have to fix it up manually

Any editor written or actively maintained in the current century does this automatically for you. (Yes that obviously includes Emacs and Vim).

Re: F*: A general-purpose proof-oriented programming language

#58
post #39

Earlier quoted context omitted.

So I'm very seriously considering making my language indentation based. You're saying you wouldn't like that?

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

For somebody unable to empathize with the "braces are easier to scan" part, could yiu explain why?

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.

Re: F*: A general-purpose proof-oriented programming language

#59

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?

https://xenaproject.wordpress.com/2020/07/05/division-by-zer...

> But it doesn’t lead to confusion when doing mathematics in a theorem prover.

This is demonstrably untrue.

In any case that post is pretty unpersuasive. Basically saying it's too tedious to do it right, in a language whose whole purpose is tediously doing things right!

Probably the better conclusion is that more proof automation is needed for simple things like "this number is not negative" so it is less tedious.

(I'm not a Lean expert but I was totally put off by it happily accept a uint8 with value 300.)

Re: F*: A general-purpose proof-oriented programming language

#60
post #7

Earlier quoted context omitted.

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.

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.

Fearmonger? Me? Well I never.

Also

> if you've worked with other proof oriented languages.

That's doing a lot of heavy lifting.

Post reply on HN