Conversation
|
My end goal would be semi-human readable lua. Here's the style I'm aiming for for classes. -- example object
Account = {balance = 0}
function Account:new (o)
o = o or {}
setmetatable(o, self)
self.__index = self
return o
end
function Account:deposit (v)
self.balance = self.balance + v
end
function Account:withdraw (v)
if v > self.balance then error"insufficient funds" end
self.balance = sel |
|
Need to merge and update. Then add objects |
|
Personal life got a bit busy for a minute there, things have calmed down I'll put some effort in tonight. It would be really fun if we could mod games like noita (my fav) or others with F#. |
| type Expr = | ||
| | Ident of LuaIdentity | ||
| | Const of Const | ||
| | Unary of UnaryOp * Expr |
Check notice
Code scanning / Ionide.Analyzers.Cli
Verifies each field in a union case is named.
| type Expr = | ||
| | Ident of LuaIdentity | ||
| | Const of Const | ||
| | Unary of UnaryOp * Expr |
Check notice
Code scanning / Ionide.Analyzers.Cli
Verifies each field in a union case is named.
| | Ident of LuaIdentity | ||
| | Const of Const | ||
| | Unary of UnaryOp * Expr | ||
| | Binary of BinaryOp * Expr * Expr |
Check notice
Code scanning / Ionide.Analyzers.Cli
Verifies each field in a union case is named.
| | Ident of LuaIdentity | ||
| | Const of Const | ||
| | Unary of UnaryOp * Expr | ||
| | Binary of BinaryOp * Expr * Expr |
Check notice
Code scanning / Ionide.Analyzers.Cli
Verifies each field in a union case is named.
| | Ident of LuaIdentity | ||
| | Const of Const | ||
| | Unary of UnaryOp * Expr | ||
| | Binary of BinaryOp * Expr * Expr |
Check notice
Code scanning / Ionide.Analyzers.Cli
Verifies each field in a union case is named.
| | Return of Expr | ||
| | Do of Expr | ||
| | SNoOp | ||
| | ForLoop of string * start: Expr * limit: Expr * body: Statement list |
Check notice
Code scanning / Ionide.Analyzers.Cli
Verifies each field in a union case is named.
| | Fable.StringConstant(s) -> Const(ConstString s) | ||
| | Fable.BoolConstant(b) -> Const(ConstBool b) | ||
| | Fable.UnitConstant -> Const(ConstNull) | ||
| | Fable.CharConstant(c: char) -> Const(ConstString(string c)) |
Check warning
Code scanning / Ionide.Analyzers.Cli
Checks if the `string` function call is type annotated.
There was a problem hiding this comment.
This might be a bug in IonideAnalyzers because I can't think of a different way to annotate it.
There was a problem hiding this comment.
Thanks! I can't believe I missed that in retrospect.
|
next TODO is making type parameters either go away or do something useful |
|
I didn't even realize this while working on it but this would be actually quite nice for neovim scripting.... |
|
It could indeed, only "problem" I see is that from my POV Vim people are often focused on performance. So perhaps, they will not like having a dependency like |
|
I do think a lot of F# I'd write for neovim probably would translate to relatively straightforward lua, and I might be able to trim the library to parts that are being used after compiling. |

This is @alexswan10k 's work, though they have decided to prioritize rust, I'd like to keep this PR #2509 available so that work may continue on it, and people interested can contribute to it. I personally would love to contribute, and have played with it some but haven't yet made meaningful contribution. I wasn't able to find the branch @alfonsogarciacaro was referencing in the pr so I just used main as a placeholder for now.