Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
terts
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
by
terts
4mo ago
This is something we've been backpedaling a bit indeed. 0.11 changed some things to look a lot more like Rust. The reason for this being different in the first place is that were not trying to make Rust-but-simpler necessarily. Or targ
2.
▲
by
terts
4mo ago
That's kind of right, but they are adding new literals, not changing existing ones. The hooks are for the lexer and they can decide what syntax they accept. The syntax it defines would be a parse error if the hook is not used. But, ind
3.
▲
by
terts
4mo ago
Other commenters have given most of the reasons already, but since you asked specifically for the author, I'll chime in as well. The fact that Roto gets compiled at the runtime of the Rust application is very important. That means we c
4.
▲
by
terts
4mo ago
Good suggestion! We haven't done that because there's only one domain at the moment but going forward that could be useful.
5.
▲
by
terts
4mo ago
Hi! Author here. You're looking at Rust code there. Roto is very similar but without `&`. I wont pretend to be good at language design, but being similar to Rust has many advantages.
6.
▲
by
terts
4mo ago
Thanks! > When you made Roto what kind of workloads were you optimizing for? We're building a BGP collector with custom filters written in Roto. Imagine a database that constantly receives updates and we want to filter (or transform
7.
▲
by
terts
4mo ago
Hi! Author here. What we call the `Runtime` in Roto is not a state of the program, it's only the set of functions, types and constants that are available to the script. Roto scripts cannot really keep state at the moment. The advantage
8.
▲
by
terts
4mo ago
Hi! Author here. We are actually planning on removing those literals and allowing applications to extend Roto with their own literals [0]. They should do so with care of course, because indeed adding more literals adds some edge cases. Most
9.
▲
by
terts
1y ago
Hi! That bit of the docs is a bit outdated. We're probably gonna make it optional. The reason for that choice was that the filters for Rotonda need to be very quick and don't really require loops as long as you can do `contains` c
10.
▲
by
terts
1y ago
Hi! Author here. You could try but there are some fundamental limitations. 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
11.
▲
by
terts
1y ago
They're on the roadmap for sure. While loops are quite easy to add I think, but it would also need an assignment operator to make it useful. Lists are complicated because they're generic over the element type. That's why I&#x
12.
▲
by
terts
1y ago
Yes, you definitely could! And thanks for the kind words! If you try it out for your own purposes, you'll probably run into some missing features (e.g. lists and loops), but we'd be happy to hear what you think!
13.
▲
by
terts
1y ago
It depends. I'd love to make a prototype using Bevy with Roto. What I'm trying to say is that if you only want something to make Rust compile faster, then Rust might the better option. If you want something that behaves more like
14.
▲
by
terts
1y ago
Hi! Author here. Mun is super cool, but works slightly differently as far as I know. You compile Mun scripts outside of your application to a dynamic library, which can then be (re)loaded by your application. The advantage of that approach
15.
▲
by
terts
1y ago
Hi! Author here. Yep, sorry about that. It is indeed Border Gateway Protocol.
16.
▲
by
terts
1y ago
Hi! Author here. Would be super cool, but while the compiled scripts would work without allocations, the compiler itself does a lot of allocations. So unfortunately I don't think I could make that work.
17.
▲
by
terts
1y ago
Hi! Author here. There's a couple of reasons. 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. Secon
18.
▲
by
terts
1y ago
Not many iterations, but a lot of head scratching was involved haha. 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
19.
▲
by
terts
1y ago
Hi! Author here. It is indeed expression-oriented, mostly following the same rules as Rust. If-else is an expression, for example.
20.
▲
by
terts
1y ago
Hi! So for Roto, our introspection needs are actually fairly limited. We only need the `TypeId`, the type name, the size and the alignment. which Rust can give us without any additional traits. It's not possible currently to - for exam
21.
▲
by
terts
4y ago
It's a good idea to make the prefix matching optional. I think it might be confusing to gate other features behind it though. I guess we'll get to this once we find flags that are important enough. So far, we haven't really h
22.
▲
by
terts
4y ago
I can't find any discussion. But I know that some alternative implementations disable this feature. The cause of this behaviour is actually the glibc `getopt_long` function, which does this automatically, so it can't be changed un
23.
▲
by
terts
4y ago
Outside of the coreutils, not much I think. The GNU coreutils all have it though. It's documented here: https://www.gnu.org/software/coreutils/manual/html_node/Comm...
24.
▲
by
terts
4y ago
> In a busybox situation depending on some regex crate is a given anyway uutils can behave as a busybox-like binary. But I think there's some confusion over the requested feature, because that can't really be done with regex, b
25.
▲
by
terts
4y ago
It's possible I suppose, but three dashes already sometimes appears in GNU for hidden options and, probably more importantly, I think it would be frustrating to have to remember whether it was `--filter` or `---filter` for all long fla
26.
▲
by
terts
4y ago
One of the maintainers of uutils here. We have a few flags that are not in GNU for one reason or another. Some were rejected by GNU, others come from other coreutils implementations like FreeBSD. We document those at https://uuti
27.
▲
by
terts
5y ago
That is a very interesting idea! It is not something we've discussed before as far as I know. For some utils (like chmod) it might be possible, but any util that is focused on outputting information currently does so by printing direct