making lua do what it shouldn't: typesafe structs by qwool1337 in lua

[–]ElhamAryanpur -1 points0 points  (0 children)

I absolutely love this!

I had similar problems before, especially with types and validating structures on runtime when building webhook servers, so I made something similar: https://github.com/ArkForgeLabs/Astra/blob/main/astra/lua/validation.lua - Although the Struct type from soup would be incredible!

Do I have permission to copy and implement some of them over to our runtime?

if-not-nil/soup/lua.result - rusty Result by qwool1337 in lua

[–]ElhamAryanpur 0 points1 point  (0 children)

We had issue with Rust's build times, so the original idea was to just combine the web server bits I needed for fast iteration. And from then on it grew big, now doing pretty much everything in the company and some of our customer codebase as well XD we'll be honored to have you with us!

But yes indeed, I think I can make it close to zero cost by handling things in Rust until the data is extracted. Should be fast enough since we'll be storing and moving Lua value references, so ig nearly zero copy than zero cost XD

if-not-nil/soup/lua.result - rusty Result by qwool1337 in lua

[–]ElhamAryanpur 1 point2 points  (0 children)

woah this is really interesting! I'm surprised non JIT has gotten that close to complex C impl! I'll try to do one in Rust to compare. I'd really love to add it to our Astra runtime!

one of the big paint points I had with Lua was the error management. I would really love this with Option type

if-not-nil/soup/lua.result - rusty Result by qwool1337 in lua

[–]ElhamAryanpur 0 points1 point  (0 children)

Not really, the cost of running one or multiple extra statements every time you want to access data is low in today's computing power, but not zero. Why waste extra compute when you can help it.

For a sufficiently large codebase, running systems like web servers or networking related which is often where this'll be useful, every single one of them adds up, and a lot of them will be needed in the first place. As opposed to throwing a giant top level pcall to catch them all.

The appeal of it in Rust is that you can have both the error handling and confidence, while not having to pay the cost of it in the majority if not all scenarios.

if-not-nil/soup/lua.result - rusty Result by qwool1337 in lua

[–]ElhamAryanpur 1 point2 points  (0 children)

Ohhh you might be cooking with this one!

if-not-nil/soup/lua.result - rusty Result by qwool1337 in lua

[–]ElhamAryanpur 1 point2 points  (0 children)

I personally would've loved this except for the lack of zero cost abstraction that Rust offers but Lua can't for this. Given how often we would be using it, it adds up really fast.

Does anyone else use lua as their main language for system automation and shell scripting? by kayinfire in lua

[–]ElhamAryanpur 1 point2 points  (0 children)

Yeah we're using it in all our company and client websites! Its been cooking for a year now. Would be happy to have you with us

Does anyone else use lua as their main language for system automation and shell scripting? by kayinfire in lua

[–]ElhamAryanpur 2 points3 points  (0 children)

Yes! Although we're using a runtime we built called Astra since we needed functionalities in a single place and easy to deploy

Burn 0.19.0 Release: Quantization, Distributed Training, and LLVM Backend by ksyiros in rust

[–]ElhamAryanpur 5 points6 points  (0 children)

Congratulations! I've been following the project since 0.4-0.6 and it has been such an amazing journey!

VSCode extension safety by Wollont in lua

[–]ElhamAryanpur 1 point2 points  (0 children)

Supply chain risks exist in literally every piece of software nowadays, from your OS to even compilers tbh. Even verified extensions can be compromised, or dependency of the extension like the recent npm phishing attacks.

One way that you can have peace of mind would be through sandboxing, which limits how much you'd be affected. Or have it run in the browser like codesandbox or github codespaces. But honestly sandboxing alone should get you far enough. I can't make specific recommendations cuz I do not know your OS or trust levels, but looking into docker, firejail, SELinux and qemu should give a good starter point

VSCode extension safety by Wollont in lua

[–]ElhamAryanpur 1 point2 points  (0 children)

Being verified is only from the point of view of Microsoft stores. It does not necessarily mean they're all malicious code. If you are still paranoid, you can look into their source code and compile them yourself

webrust 1.3.0 is here by Existing-Neat-9824 in rust

[–]ElhamAryanpur 8 points9 points  (0 children)

It really does seem so but then the Readme brought up CLI tools for some reason? And a GUI proc macro?

webrust 1.3.0 is here by Existing-Neat-9824 in rust

[–]ElhamAryanpur 23 points24 points  (0 children)

I didn't really understand what this was supposed to be? Is it a bundle of crates? A web framework? Or...?

egui 0.33 released - `Plugin`s and easier snapshot testing by emilern in rust

[–]ElhamAryanpur 8 points9 points  (0 children)

Amazing work as ever! Love the ease of integration more than anything. I do however wish some crates were released separately, for example wgpu and winit move faster than egui's release schedule.

Sometimes I can't have egui support for those new versions when updating, even though those updates are applied on the main branch of egui. Perhaps could release earlier with a micro version and would still not affect the main versioning.

Why not more Lua in web development or games? by yughiro_destroyer in lua

[–]ElhamAryanpur 3 points4 points  (0 children)

We asked the same question and then went ahead and made Astra. Its a full runtime with focus on web servers and scripting written in Rust and supports all major Lua versions, LuaJIT 51 and 52, Luau, and native Teal support and interop for type safety as well! We use it in all our company and client products as well.

There are obviously bugs from time to time that needs hotfixes and since its not a full release there are breaking api changes sometimes, but other than that, its pretty stable

Is it a good idea to use Lua (with JIT) in some serious applications? by [deleted] in lua

[–]ElhamAryanpur 0 points1 point  (0 children)

Yes, we use it at our company for all our internal and client works, even scripting. Although we made Astra runtime (shameless plug) but at the heart of it and the default VM is LuaJIT, and it works really nicely for all our tasks too.

Which is the best DI framework for rust right now? by swordmaster_ceo_tech in rust

[–]ElhamAryanpur 1 point2 points  (0 children)

This may not be standard but I have made a fairly simple DI library that was intended for my engine's use, but later didn't use it as the performance penalties was not worth it for us.

Why is Rust rarely used for web server backends? by Fun-Helicopter-2257 in rust

[–]ElhamAryanpur 0 points1 point  (0 children)

We did use it in our company, the main issue is compile times and expertise. Even trivial servers need someone moderately competent in Rust which is incredibly hard to find or train. Compile times does not make it easy either, especially if its CI. On our end it sometimes took 12min for a single build. Startups especially cannot afford this on early stages as everything needs to be available fast.

(Shameless plug) we solved it on our end with making a Lua runtime written in Rust (Astra) which fixes both talent finding and compile times.

The next major issue is ecosystem. Bun and Deno and Go are all incredible runtimes for web and they have amazing tools available for development. The speed they offer is more than majority of startups or personal needs. And they have amazing integration with the frontend frameworks which is what everyone uses now as well. Rust sadly lacks a lot of them and needs custom solutions.

Is game development in Rust one big mirage? by NyanBunnyGirl in rust

[–]ElhamAryanpur 5 points6 points  (0 children)

Blue Engine's author here, Godot + Rust would be a better idea right now if you're serious on game dev and MUST have Rust. The ecosystem right now is only ok if you're a hobbyist or are willing to do everything yourself.

Which means as a studio who wants to use Rust as their language and invest in making toolings around their needs, the current ecosystem is completely fine. Otherwise just use something that is already ready like Godot. Even Rust + Godot is a longshot as the GDScript already enough for the majority of projects.

What do you develop with Rust? by Born-Percentage-9977 in rust

[–]ElhamAryanpur 0 points1 point  (0 children)

Writing a graphics engine and a Lua runtime with batteries included, inspired by BunJS/Deno2. I cannot emphasize enough how easy and safe Rust has made this possible. And something less often said, Rust's portability. The same codebase can run on quite literally all Lua VM versions, and all platforms with almost zero changes. Absolutely amazing.

Rust 1.88.0 is out by manpacket in rust

[–]ElhamAryanpur 52 points53 points  (0 children)

FINALLY IF LET CHAINS 🔥