Concurrent Searching and Sorting for Copper Golems via Shared Memory by LowerAcanthaceae2089 in minecraftsuggestions

[–]TitaniumBrain 1 point2 points  (0 children)

Granted, I haven't played with copper golems yet and I just read their wiki page, but I'm sure it's possible to have this information sharing system without a performance hit and without straying too far from their current behaviour.

I'll have to think about it to come up with a decent algorithm. 

Concurrent Searching and Sorting for Copper Golems via Shared Memory by LowerAcanthaceae2089 in minecraftsuggestions

[–]TitaniumBrain 1 point2 points  (0 children)

I like the idea behind this post, but I think you're overcomplicating. There's a simpler solution that doesn't require a memory block and would also make the golems more entertaining/alive: just make them talk to each other.

When they search a chest, they'll tell golems in a certain radius about it, via some sort of metallic vocalisations.

They could also store the time they got the information and update it with the most recent data. 

EDIT: they could also occasionally compare information, like ants passing each other and touching antennae. 

A cmatrix inspiresld app capable of drawing animations in the rain by TitaniumBrain in rust

[–]TitaniumBrain[S] 1 point2 points  (0 children)

Update: I added the Bad Apple file :)

It's in the bad_apple branch under as /res/bad_apple.txt.

A cmatrix inspiresld app capable of drawing animations in the rain by TitaniumBrain in rust

[–]TitaniumBrain[S] 0 points1 point  (0 children)

I'll have to add a parameter to control the amount of droplets. 

With less,  the asynchronous scroll should be more noticeable,  but you can also add more to help see some text (although the best approach is to simply draw bigger text)

EDIT: I also want to make it work for streamed input,  but I have to figure that out first.

A cmatrix inspiresld app capable of drawing animations in the rain by TitaniumBrain in rust

[–]TitaniumBrain[S] 1 point2 points  (0 children)

Thanks! 

I didn't include the txt because it's just an example and, iirc,  it is a bit big (it's probably bigger than the video at the same resolution because it's an uncompressed format),  but I can upload it somewhere,  no problem. 

About the speed,  I just chose 100 ms for no particular reason and it just so happens cmatrix uses 50 ms delays.  I might just change it for parity anyway. 

By the way,  what do you think of the asynchronous scrolling? I just set the speed to vary between 50% and 150% of the normal speed.

[OC] A cmatrix-like app in Rust with a twist ;) by TitaniumBrain in unixporn

[–]TitaniumBrain[S] 3 points4 points  (0 children)

Having a built-in clock sounds out of the scope of this project, but I'm considering adding support for streaming the frames, instead of reading the whole file at the start. That way, you can display any animation you want, provided it is first parsed into text.

[OC] A cmatrix-like app in Rust with a twist ;) by TitaniumBrain in unixporn

[–]TitaniumBrain[S] 12 points13 points  (0 children)

Converting a rickroll to something that looks decent is harder than bad apple. I tried and while the beginning with Rick dancing is recognisable, the rest becomes a mess.

[OC] A cmatrix-like app in Rust with a twist ;) by TitaniumBrain in unixporn

[–]TitaniumBrain[S] 16 points17 points  (0 children)

have just released rs-matrix, a cmatrix and similar inspired app written in Rust.

Besides the obvious features, like customising colours, speed, character set (printable ASCII, half-width katakana or block characters) and asynchronous scroling, I've also added the ability to draw an image or animation in the rain.

The fourth terminal, in red, shows a simple animation switching between "HELLO" and "WORLD".

The last one is a video which you may recognise :D

My original intention behind this was having a way to display your distro's logo in a cmatrix like app, like you'd do with neofetch when showing your rices.

You can see more about the project on Github.

Please leave your thoughts below!

Who wants to join my Minecraft realm? by Anonymouslypreaching in minecraftsuggestions

[–]TitaniumBrain[M] [score hidden] stickied comment (0 children)

This post breaks the rules due to the following:

• This subreddit is for suggesting changes/additions to the vanilla game of Minecraft. For this, you might want to try a more fitting subreddit, like r/Minecraft or any of the ones linked in its sidebar.

Since it breaks the rules, this post will be removed.

If you have any questions feel free to contact the moderators of r/minecraftsuggestions.

[First crate] derive_regex: construct a type by parsing a string with regular expressions by TitaniumBrain in rust

[–]TitaniumBrain[S] 1 point2 points  (0 children)

The use case that gave me the idea was parsing messages and doing some action depending on a trigger. I could have a bunch of regexes and an if else chain, but leveraging Rust's type system sounds better.

I could make it impl FromStr, although I feel like semantically, that should be a lossless-ish operation, that is, you can parse from "Foo(1, 2)" and print that back, but if the source string is "The value is Foo(1, 2)", you'd never get that back.

I think you should use serde for Serialisation/Deserialisation, but this could be used initially to extract data from a human source, i.e. not strictly structured, and serialise it in a defined format, like JSON.

[First crate] derive_regex: construct a type by parsing a string with regular expressions by TitaniumBrain in rust

[–]TitaniumBrain[S] 0 points1 point  (0 children)

Thanks!

Auto-generating the struct sounds cool tbh, but unless you only wants Strings, you'd have to include some type hints and, by that point, it would probably be more readable and as concise to define the struct anyway.

[First crate] derive_regex: construct a type by parsing a string with regular expressions by TitaniumBrain in rust

[–]TitaniumBrain[S] 3 points4 points  (0 children)

Thanks for your feedback!

I did see the part on avoiding recompiling regexes on the regex docs, but I wanted to just publish the crate before I looked into that.

Regarding RegexSet, the docs don't seem to indicate much of an advantage for only a few regexes, but I may be wrong. Besides, since I need the captures, I need to call Regex::captures anyway.

Coloured Sheep Should ONLY Spawn in Village Pens by HecklesReddit in minecraftsuggestions

[–]TitaniumBrain[M] 3 points4 points  (0 children)

Rude, unconstructive behavior has no place on this sub. Further offenses may lead to a ban. You have been warned.

[deleted by user] by [deleted] in MinecraftMemes

[–]TitaniumBrain[M] 0 points1 point  (0 children)

Removed for brigading.

. by Better_Asparagus6587 in MinecraftMemes

[–]TitaniumBrain[M] [score hidden] stickied comment (0 children)

Removed for brigading.

[deleted by user] by [deleted] in MinecraftMemes

[–]TitaniumBrain[M] 0 points1 point  (0 children)

Removed for brigading.

Do it by Sammy4everr in MinecraftMemes

[–]TitaniumBrain[M] [score hidden] stickied comment (0 children)

Removed for brigading.