Roto: A Compiled Scripting Language for Rust
31–40 of 116 posts
Re: Roto: A Compiled Scripting Language for Rust
#32> Finally, we want a language that is easy to pick up; it should feel like a statically typed version of scripting languages you're used to. It looks like Rust. All Rust scripting languages do. Is this true for all other languages? Is this just a property of embeddable scripting languages, they will always resemble the language they're implemented in and meant to be embedded in?
IIRC Lua deliberately doesn’t resemble C - so if you’re going back-and-forth, editing both the host application code and a script, you can immediately tell which one you’re looking at. Makes sense to me - which means scripting languages for curly-brace languages should probably use either Lua-style begin-end or Python-style significant indentation.
Re: Roto: A Compiled Scripting Language for Rust
#33> Finally, we want a language that is easy to pick up; it should feel like a statically typed version of scripting languages you're used to. It looks like Rust. All Rust scripting languages do. Is this true for all other languages? Is this just a property of embeddable scripting languages, they will always resemble the language they're implemented in and meant to be embedded in?
> Is this just a property of embeddable scripting languages, they will always resemble the language they're implemented in and meant to be embedded in? No. Think about Lua or Tcl (both implemented in C) or others like Embeddable Common Lisp.
Re: Roto: A Compiled Scripting Language for Rust
#34> Finally, we want a language that is easy to pick up; it should feel like a statically typed version of scripting languages you're used to. It looks like Rust. All Rust scripting languages do. Is this true for all other languages? Is this just a property of embeddable scripting languages, they will always resemble the language they're implemented in and meant to be embedded in?
IIRC Lua deliberately doesn’t resemble C - so if you’re going back-and-forth, editing both the host application code and a script, you can immediately tell which one you’re looking at. Makes sense to me - which means scripting languages for curly-brace languages should probably use either Lua-style begin-end or Python-style significant indentation.
I think, that I'd better deal with a language recognition, I could configure emacs to use different highlighting for different languages. Or I could change background color for buffers based on a language.
Re: Roto: A Compiled Scripting Language for Rust
#35But I prefer the wasmtime webassembly component model approach these days.
Built a plugin system with that, which has one major upside in my book:
No stringly function invocation.
Instead of run_function("my-function-with-typo") I have a instantiated_plugin.my_function call, where I can be sure that if the plugin has been instantiated, it does have that function.
Re: Roto: A Compiled Scripting Language for Rust
#36ELI5: Why not use typescript and an embedded v8 engine or deno to run them? What kind of advantages will I miss if I go for typescript as an embedded language for my application? Also by using v8, I open up new possiblities via wasm (write in any lang and run it here?) Will be helpful if somebody enlighten me.
Personally I don't think it's a good choice for what it seems Roto is used for (mission critical code that never crashes) since TS doesn't have a sound typesystem and it's still very easy to fuck up without additional tooling around it.
Re: Roto: A Compiled Scripting Language for Rust
#37ELI5: Why not use typescript and an embedded v8 engine or deno to run them? What kind of advantages will I miss if I go for typescript as an embedded language for my application? Also by using v8, I open up new possiblities via wasm (write in any lang and run it here?) Will be helpful if somebody enlighten me.
Re: Roto: A Compiled Scripting Language for Rust
#38Earlier quoted context omitted.
Border Gateway Protocol But I don’t even think people in networking would say that, it is canonically BGP. This is kind of like complaining about the abbreviation HTML, sure yes it is Hypertext Markup Language but everyone knows it as HTML to the point that there are probably people that don’t know it’s an abbreviation.
A LLM response so don't trust it, but Biological and Genetic Programming: In biology, BGP can refer to methods or algorithms used in genetic programming or bioinformatics. BGP (Bureau of Governmental Personnel): In some governmental contexts, BGP may refer to a specific bureau or office related to personnel management. BGP (Bureau of Geographical Planning): In urban planning or geography, it might refer to a bureau t…
Try this prompt instead:
"Please explain the meaning of BGP in the following snippet: The need for Roto comes from Rotonda, our BGP engine written in Rust. Mature BGP applications usually feature some way to filter incoming route announcements. The complexity of these filters often exceed the capabilities of configuration languages. With Rotonda, we want to allow our users to write more complex filters with ease. So we decided to give them the power of a full scripting language."
Re: Roto: A Compiled Scripting Language for Rust
#39ELI5: Why not use typescript and an embedded v8 engine or deno to run them? What kind of advantages will I miss if I go for typescript as an embedded language for my application? Also by using v8, I open up new possiblities via wasm (write in any lang and run it here?) Will be helpful if somebody enlighten me.
Re: Roto: A Compiled Scripting Language for Rust
#40ELI5: Why not use typescript and an embedded v8 engine or deno to run them? What kind of advantages will I miss if I go for typescript as an embedded language for my application? Also by using v8, I open up new possiblities via wasm (write in any lang and run it here?) Will be helpful if somebody enlighten me.
Be warned that V8 is a behemoth and adds 100+MB to your binary size, is quite slow to link, and is not practical to compile from source for most projects. If you want a lighter weight JS runtime there's quickjs, if you want WASM there's wasmtime. Personally I don't think it's a good choice for what it seems Roto is used for (mission critical code that never crashes) since TS doesn't have a sound typesystem and it's s…