Has my motd gone too far? It loads a random ANSI catgirl from a folder. I use arch btw, server runs minimized Ubuntu Server.
Has my motd gone too far? It loads a random ANSI catgirl from a folder. I use arch btw, server runs minimized Ubuntu Server.
I’ve been learning Rust by going through The Book… there’s some wack-ass syntax in that language. I’ve mostly used C# and Python so most of it just looks weird… I can more or less understand what
while let Some((_, top)) = iter.next() { ... }
is doing, but.for_each(|((_, _, t), (_, _, b))| { ... }
just looks like an abomination. And I mean the syntax in general, not this code in particular.It’s not so different in python:
for ((_, _, t), (_, _, b)) in zip(top, bottom):
Or in C#:
.ForEach(((_, _, t), (_, _, b)) => Console.Write(...));
Is
| (...) | { ... }
a lambda expression then?Yep, lambda or closure (it’s an anonymous function but it can also capture state from the enclosing function, i think pure lambdas can’t do that?)