9 ms·
Ravi is a dialect of Lua, with JIT and AOT compilers
- synergy20 3y agoit's based off MIR, does it have something to do with https://mlir.llvm.org/ https://mlir.llvm.org/ ? for typed lua, there is a newer typescript-alike effort https://github.com/teal-language/tl https://github.com/teal-language/tl than the mentioned one at https://github.com/andremm/typedlua https://github.com/andremm/typedlua
- matthews2 3y agoMIR comes from the Rubyverse and isn't related to LLVM MLIR. https://github.com/vnmakarov/mir?tab=readme-ov-file#mir https://github.com/vnmakarov/mir?tab=readme-ov-file#mir
- deleted 3y ago[deleted]
- ArkimPhiri 3y agoRavi is interesting to work with. It's simplicity is was draws me the most.
- uticus 3y agoLove it. Use case is difficult to grasp at first, but seems to be somewhere less powerful than LuaJIT, but with typing; and more powerful than Typed Lua, but with the same typing? > Lua is perfect as a small embeddable dynamic language so why a derivative? Ravi extends Lua with static typing for improved performance when JIT compilation is enabled. > There are other attempts to add static typing to Lua - e.g. Typed Lua but these efforts are mostly about adding static type checks in the language while leaving the VM unmodified. > Of course there is the fantastic LuaJIT implementation. Ravi has a different goal compared to LuaJIT. Ravi prioritizes ease of maintenance and support, language safety, and compatibility with Lua 5.3, over maximum performance.
- logtempo 3y agonoob question from a hardware guy : what is a small embeddable dynamic language? What would be a user-case for example?
- bbkane 3y ago"small embeddable dynamic languages" are usually used to configure or program other larger compiled applications. This is bes understood by example: https://create.roblox.com/docs/tutorials/scripting/basic-scripting/intro-to-scripting https://create.roblox.com/docs/tutorials/scripting/basic-scr... - make a mini game in Roblox https://github.com/openresty/lua-nginx-module?tab=readme-ov-file#typical-uses https://github.com/openresty/lua-nginx-module?tab=readme-ov-... - configure and extend NGINX https://wezfurlong.org/wezterm/config/lua/general.html https://wezfurlong.org/wezterm/config/lua/general.html - make your terminal more useful (my personal config changes the tab color based on the process name - https://github.com/bbkane/dotfiles/blob/master/wezterm/dot-config/wezterm/format_tab_title.lua https://github.com/bbkane/dotfiles/blob/master/wezterm/dot-c... https://m.youtube.com/watch?v=MQBr9hwf0BY https://m.youtube.com/watch?v=MQBr9hwf0BY - configure your text editor
- __s 3y agoThe C Lua interpreter takes ~150k. It's easy to extend with your own types/functions. So it makes it easy to use as a Turing complete configuration language redis exposes a Lua scripting interface if one wants to avoid latency of executing commands back & forth over network: https://redis.io/docs/interact/programmability/eval-intro https://redis.io/docs/interact/programmability/eval-intro Over the last couple weeks I've been integrating gopher-lua (a Lua implementation in Go, which then plays nice with Go types & its GC) into PeerDB for scripting data transformations. It's been easy expose stuff like decimal types to the script. It allows a program to make itself extensible
- vitiral 3y agoLove it but don't quite get it. Lua only has 5 "data" types: nil, bool, number, string, and table. There is also "userdata" (defined in C) Would this improve performance for functions that take in the non-table types? Or does it provide some mechanism for structured data besides tables? I have a hard time believing there are many performance gains to be had for the few functions that take in only native types. I suppose compiling those could have major performance improvements in a few tight-loop use-cases?
- Moomoomoo309 3y agoYou forgot in Lua 5.3+ "integer". (there's also "thread" for coroutines and "function", but those aren't "data" types)
- vitiral 3y agoInteger is a good point. I just learned about math.type in 5.3!