Edit: I had to double check, because it seems that both translations are valid.
Scrambled eggs would be "huevos revueltos"
Edit: in Spain at least. YMMV for other Spanish-speaking countries.
So it's closer to something like C or C++, where it just defined stuff and you can choose what to use? I guess that's fine when there's no initialization for the script to do. Maybe in your domain that's never the case. But many languages end up adding static initialization as a first-class feature eventually.
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.
I'm currently writing an article about Flowspec and had to comb a few RFCs to understand what's going on.
I opened the Roto announcement and felt very smart, lol
But it still would have been a favor to the original commenter to write "BGP (Border Gateway Protocol)". If you write just "BGP" you annoy the reader who doesn't know what it is; they'll think it's your fault. But if you write "BGP (Border Gateway Protocol)", they still won't know what it is but they won't be irritated at you anymore.
I don’t think anyone in their right mind would open every article with HTML(Hypertext Markup Language) and CSS( Cascading Style Sheets).
For networking it would be the same with BGP/OSPF/RIP.
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 that focuses on geographical data and planning.
BGP (Big Green Potato): In agriculture or gardening, it could refer to a specific type of potato or a gardening initiative.
BGP (Bilateral Grant Program): In finance or international relations, it may refer to programs that provide grants between two countries.
Elsewhere someone posted a link to the wikipedia disambiguation page. It is very insightful to compare the two lists - you should do this.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."
Its entire response:
"In a Hacker News article, BGP most likely refers to Border Gateway Protocol, a key internet protocol used for routing data between different networks (autonomous systems) on the internet. It’s often discussed in contexts like network security, internet infrastructure, or outages caused by misconfigurations, as BGP is critical for directing traffic across the global internet. For example, a Hacker News article might cover BGP-related incidents like route leaks or hijacks, which can disrupt connectivity or enable cyberattacks.
If the context suggests something else (e.g., a specific acronym in a niche domain), could you provide more details about the article? I can also search for the specific post if you have a link or title."
Pretty good, eh?
I believe that every possible combination of 3 letters has at least 5 different meanings - most of them only used in some tiny niche (often just one department of a company)
Did you mean Hypertext Markup Language (HTML)?
It's a trite comment to make (the original complaint). Don't know an abbreviation? Takes two seconds to look it up. Not all content on the web is written for the lowest common denominator, and thank god for that.
Statically typed, hot reloadable scripting? Sign me up.
With fast development cycles and a safe scripting language, Rust will find itself in every single programming niche. Server development, game development, desktop application development. If the WASM DOM bridge gets better, maybe even web development. Everything will open up.
You can prototype in the scripting language, write mature application logic in the scripting language, and for the parts that matter, move them to Rust.
I hope Roto can be that. There are lots of other Rust scripting languages that fall short.
A good scripting language will have great Rust interop, similar syntax, and allow simple calling and passing of data structures. It shouldn't weaken Rust in any way.
Alternatively, look at a project like ruff— hundreds of linter rules statically implemented in native Rust [1], maybe that would make more sense if the rules could be more tersely expressed as runtime-loadable roto scripts that have access to the Python AST and a toolkit of Rust-supplied functions for manipulating and inspecting it?
[1]: https://github.com/astral-sh/ruff/tree/main/crates/ruff_lint...
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 be great.
I've been out of the loop for a while, but last I checked, the running gag was that there are more game engines written in rust than games. Have things changed? Any high profile games that were made in rust?
It's mostly a custom stack, but it's written in Rust and uses some parts of Bevy from what I understand.
https://github.com/mun-lang/mun
- Ahead of time compilation
- Statically typed
- First class hot-reloading
Not sure how both languages compare though
The downside is that it's not really possible to share types between the host application and the script as far as I know. They have something called called `StructRef` which does this a bit, but it's all runtime checks if I understand correctly.
If somebody here knows more about Mun, I'd be happy to be corrected. This is just my understanding from their documentation.
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.
And personally I will go out of my way to not use TS/JS if I can
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.
One of my favorite things about writing Rust is that it's expression-oriented (i.e. almost everything is an expression), something you almost never see in non-functional languages.
I was wondering if Roto is also expression-oriented?
Rust is giving me just enough information to pull the current version of. More powerful introspection/reflection is not possible without derive macros. If you're ok with derive macros though, you could look into the 2 crates I mentioned.
Hope that answers your question!
I decided against using a trait and a derive macro because I wanted to avoid running into Rust's orphan rule. We have a crate called routecore where most of our types are declared and then a separate crate called Rotonda which uses those types and uses Roto. I wanted Rotonda to be able to register routecore types.
That's also the downside of the current reflection crates; they require each type to have a derive macro.
But 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.
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 the "call_ontimedcallback"? It's not a string. The compiler ensures it exists on the Plugin type generated from the .wit file.If of course I put a wasm file in the plugin folder that doesn't adhere to that definition, that wasm file isn't considered a plugin.
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 the loaded component for the string names present: it also type checks that all of the types in the component match those given by the wit. So, when you call the export functions above, you can be quite sure all of the bindings for their arguments, and any functions and types they import, all match up to Rust types. And your component can be implemented in any language!
More info: https://github.com/bytecodealliance/wasmtime/issues/8036 Several folks have volunteered work on the C bindings over the last year or two, with this contributor making progress most recently: https://github.com/bytecodealliance/wasmtime/pulls?q=is%3Apr...
I assume you wouldn't ship the whole plugin runtime for each plugin that wants to host another plugin?!
I manually compile a plugin and in my system I can "refresh" a plugin and even say "activate version 1.1 of the plugin" or "activate version 1.2" of the plugin etc.
But that's something I had to build myself and is not built into wasmtime itself.
With Rust's safety, it's not even that bad to re-open and re-load the binary when it changes; the big footgun with dlopen is use-after-free.
Right?
First, this language is syntactically a lot like Rust but semantically quite different. It has no references for example. We're trying to keep it simpler than Rust for our users.
Second, using Rust would require compiling the script with a Rust compiler, which you'd then have to install alongside the application. Roto can be fully compiled by the host application.
I think your approach might be preferred when the application author is also the script author. For example, if you're a game developer who is using a script to quickly prototype a game.
Re: lists and loops, is that not supported because it hasn't been a priority or because it requires some fundamental redesign? Which is to say, if I wanted to add those down the road, is this something I could try my hand at implementing on my own and possibly contributing back?
The biggest limitation is that we don't have access to the full type system of Rust. I don't think we can ever support registering generic types (e.g. you can register `Vec<u32>` but not `Vec<T>`) and you don't have access to traits. So it would work if you can reduce your API to concrete types.
Otherwise - apart from some missing features - you could probably write big chunks in Roto if you wanted to. You could also prototype things in Roto and then translate to Rust with some simplified types.
Also you'd have to accept that it gets compiled at runtime.
Wait, what?! Isn't that choice a bit extreme?
There have been plenty of times in scripting where I've needed loops! Am I missing something here?
[1] https://rotonda.docs.nlnetlabs.nl/en/stable/roto/00_introduc...
So it should probably say "Roto _in Rotonda_ does not have loops". Roto the language as a separate project can then have loops.
90s_dev•3h ago
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?
pansa2•3h ago
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.
90s_dev•2h ago
ordu•2h ago
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.
andsoitis•3h ago
No. Think about Lua or Tcl (both implemented in C) or others like Embeddable Common Lisp.
90s_dev•2h ago
Philpax•3h ago
To your more general question: it depends. AngelScript [0] looks very much like C++, while others, like Lua, don't. It's really up to the designer's discretion.
[0]: https://www.angelcode.com/angelscript/, but https://angelscript.hazelight.se/ has better examples of what it actually looks like in use
axegon_•3h ago
Et tu, brute? :D
nicoburns•3h ago
epage•2h ago
Not koto (https://koto.dev/) which is one of the reasons I appreciate it. I want an embeddable language targeted at my users, rather than myself which I feel Rust-like ones do. I also want an embeddable language not tied to my implementation language so if I change one, I don't have to change both. Koto only supports Rust atm but I don't see why it couldn't be supported elsewhere.