Live data from Hacker News

Roto: A Compiled Scripting Language for Rust

blog.nlnetlabs.nl

111–116 of 116 posts

Re: Roto: A Compiled Scripting Language for Rust

#111
post #84

Earlier quoted context omitted.

match Plugin::instantiate_async(&mut store, &component, &linker).await { Ok(plugin) => { match plugin .plugin_guest_oncallback() .call_ontimedcallback(&mut store, &callback_name) .await { Ok(()) => debug!("Successfully called oncallback for {plugin_path:?}"), Err(e) => warn!("Failed to call oncallback for {plugin_path:?}: {e}"), } } Err(e) => { error!("Failed to call oncallback for {plugin_path:?}!: {e}"); } } See th…

Thanks for using wasmtime! I worked on the component bindings generator you’re using and it’s really nice to see it out in the wild. To elaborate a bit further: wasmtime ships a [bindings generator proc macro]( https://docs.wasmtime.dev/api/wasmtime/component/macro.bindg... ) that takes a wit and emits all the code wasmtime requires to load a component and use it through those wit interfaces. It doesn’t just check th…

Thanks so much for your work on this! So far it's been a good pattern for adding hot-reloadable logic to my Rust projects.

Next up I'm hoping to integrate this stuff into a game so you can have hot-reloadable game logic, with the potential for loading and sandboxing user-created mods.

Re: Roto: A Compiled Scripting Language for Rust

#112

Earlier quoted context omitted.

- The best package manager in the world, bar none. Compiling, linking, and platform difficulties disappear. The devops/devexp is next-level sublime. - "low defect" software without much work. I'm not talking about memory management, but rather Option and Result . For the same amount of effort as writing Golang or Java or C#, you can get defect free code. - Easy deployable to WASM without packaging a memory management…

It’s also a pleasant language to work in. I love that everything is an expression, I love match statements, I love that structs and enums are full powered, etc.

> It’s also a pleasant language to work in

I know, practically self-documenting code!

https://github.com/tokio-rs/tokio/blob/tokio-1.45.0/examples...

I'm not trying to pick on tokio, it was just a public link demonstrating that the syntax can get to be a bit much

Re: Roto: A Compiled Scripting Language for Rust

#113
post #96

Earlier quoted context omitted.

So no clear examples?

In the Java/Groovy space, Jenkins and Gradle are the obvious ones. I'm less familiar with the Lua world (not a gamedev), but this is an example of the kind of thing I'm imagining— a build system / task runner that's half lua and half C/C++: https://github.com/xmake-io Having a modern on-prem replacement for Jenkins/Rundeck built in rust and exposing a roto interface rather than yaml definitions sounds like it would b…

So, how is Rust better than these? What does it have that these lack?

Re: Roto: A Compiled Scripting Language for Rust

#114
post #43

Earlier quoted context omitted.

What does Rust have that other languages with these properties don't?

- The best package manager in the world, bar none. Compiling, linking, and platform difficulties disappear. The devops/devexp is next-level sublime. - "low defect" software without much work. I'm not talking about memory management, but rather Option and Result . For the same amount of effort as writing Golang or Java or C#, you can get defect free code. - Easy deployable to WASM without packaging a memory management…

Java 8 was released in 2014, since then Optional is in the standard library and a rather common pattern. Like Rust you can use LLVM to compile Java to WASM (JWebAssembly), and there's also TeaVM for turning a project into an optimised WASM application and CheerpJ for running a JVM in WASM.

It was rather messy to use cargo on handheld ARM, it didn't spark joy so I kind of stopped trying after a while. Mostly I use Rust as a dependency I don't need to touch, but when I've programmed in it I didn't feel like cargo was that big of a thing. Maybe I would feel another way if the frame of reference was only like webpack or Pip or something.

Re: Roto: A Compiled Scripting Language for Rust

#115
post #113

Earlier quoted context omitted.

In the Java/Groovy space, Jenkins and Gradle are the obvious ones. I'm less familiar with the Lua world (not a gamedev), but this is an example of the kind of thing I'm imagining— a build system / task runner that's half lua and half C/C++: https://github.com/xmake-io Having a modern on-prem replacement for Jenkins/Rundeck built in rust and exposing a roto interface rather than yaml definitions sounds like it would b…

So, how is Rust better than these? What does it have that these lack?

Package management, expressiveness, community, open source code availability... a helpful compiler and goated type system.... overall sanity

Re: Roto: A Compiled Scripting Language for Rust

#116

Earlier quoted context omitted.

It’s also a pleasant language to work in. I love that everything is an expression, I love match statements, I love that structs and enums are full powered, etc.

> It’s also a pleasant language to work in I know, practically self-documenting code! https://github.com/tokio-rs/tokio/blob/tokio-1.45.0/examples... I'm not trying to pick on tokio, it was just a public link demonstrating that the syntax can get to be a bit much

Of all the examples of crazy Rust code you could have picked, you chose that one?

Is adding ‘a really too much for you?

Post reply on HN