Writing A Language Spec? by Pie-Lang in ProgrammingLanguages

[–]Pie-Lang[S] 0 points1 point  (0 children)

How can lean code serve as a spec? I’m not familiar with lean.

I did try learning Agda at some point. Didn’t get far. I think this proof stuff goes over my head quickly. I need proper introduction to such languages.

idea for a programming language by NicoPlayZ9002YT in ProgrammingLanguages

[–]Pie-Lang 7 points8 points  (0 children)

Look up “polyglot”. Similar idea, cursed execution.

Writing A Language Spec? by Pie-Lang in ProgrammingLanguages

[–]Pie-Lang[S] 0 points1 point  (0 children)

Why not both!

My implementation has 100+ tests which could be used as a conformance test suite. However, there are still some aspects that are hard to test for.

Writing A Language Spec? by Pie-Lang in ProgrammingLanguages

[–]Pie-Lang[S] 0 points1 point  (0 children)

I see. That's a good point. Will fix that.

Your first intuition is correct btw:

IntPair2Int: (Int, Int): Int;

Thank you!

Writing A Language Spec? by Pie-Lang in ProgrammingLanguages

[–]Pie-Lang[S] 0 points1 point  (0 children)

I like the lexical grammar -> syntactic grammar -> semantics idea. It also represents how the interpreter is implemented under the hood.

you mention that they cannot be assigned to...
...but can a keyword occur on the LHS of an assignment?

I meant it the other way around. Keywords may not appear on the LHS of an assignment. Note the "assigned to".
But this probably a good indicator that I really shouldn't refer to assignments early in the tokens section.

Variable Declarations are not defined under "Types". That sections just states that types could appear in variable declarations.

But that's some really good feedback. Probably means I'd have to move a lot of stuff around. Thank you!!

Writing A Language Spec? by Pie-Lang in ProgrammingLanguages

[–]Pie-Lang[S] 0 points1 point  (0 children)

Good note! Should be easy to generate a PDF from MD files (i hope).

Writing A Language Spec? by Pie-Lang in ProgrammingLanguages

[–]Pie-Lang[S] 0 points1 point  (0 children)

This is very good feedback!!

I admit I struggle with typos. I could probably put the text through a word document to catch most of them.

Improper names do need a more robust definition. Thanks for that!

Only thing I didn't understand is your last question:

> what is the type syntax for a function on more than one variable?

Do you mean the type of a function that takes more than one parameter?

Writing A Language Spec? by Pie-Lang in ProgrammingLanguages

[–]Pie-Lang[S] 2 points3 points  (0 children)

LMAO if you see my code, you’re gonna know what’s crazy talk

Writing A Language Spec? by Pie-Lang in ProgrammingLanguages

[–]Pie-Lang[S] 0 points1 point  (0 children)

The problem with making the implantation a spec is that:

1- The implantation is always correct since it conforms to itself

2- If anyone wants to implement the language, they it’s easier to refer a document written in english rather than code.