idk why I never thought of this but apparently you can straight up `cat` files to a physical printer
If your file only contains text can literally just do
`cat myfile.txt | netcat <printer-ip> 9100`
At least with my printer here it worked
I also tried with a pdf file but it never seemed to print hmmmm
No that I'm particularly interested in doing that but at least now I can literally printout the man pages to have a nifty little physical man pages book
I think I've found my new favorite analogy to explain the importance in balancing bit-rate and resolution to people that want to stream:
Bit-rate := butter
Resolution: bread/toast
Too much bread(resolution), not enough butter(bit-rate)? Then your image quality is trashed.
Too much butter(bit-rate), not enough bread(resolution)? Great image quality but after a point it's wasted due to the resolution.
As it turns out mpv can actually take commands remotely via `input-ipc-server`
Why would you ever want to? If you're like me you have mpv running in the background for animated backgrounds; sometimes i use music videos as my background.
With that flag above I can have another script I call from dmenu which pauses/resumes the background video
Also debian apparantly has a package for sending data to a socket on the commandline which is socat(its pretty neat)
As it turns out multi-threaded asynchronous web servers are much harder to write than I expected in Rust. Haven't had an issue with the borrow checker/lifetimes until I realized that passing shared memory is probably not the way to go for what I'm doing.
At least in my case(RTC server) I realize it makes more sense to not rely on using threads to take incoming message to broadcast on one thread and broadcast on another thread. Instead it makes more sense to have a special data structure that actually organizes connections and manages its own data.
>being organized makes things easier
who would have thought
Never though I would get to the point of implementing an an authenticated RTC server with Freechat but here I am...
Soon I'll have text message listening capabilities and as soon as that is done I can move towards implementing VOIP.
Shilling below:
Freechat is a chat platform I've been working on in order to replace platforms like Discord/Slack. It's still a work in progres and there's somethings I need to retroactively fix but at least the server portion is usable. I'm adding RTC on various channels as an optional feature but polling for recent messages also works. The biggest challenge right now is coming up with an application that regular people can use(which I'm also working on).
If a FOSS Discord/Slack alternative sounds interesting check the gitlab project linked at the bottom.
Finally I've been building the backend with the intention that the API be easy to use so anyone can make their own client; heck I used to and sometimes still test the API with just a bash script!
API Reference: https://freechat.shockrah.xyz/
Gitlab Repository: https://gitlab.com/shockrah/freechat
Finally wrote some proper documentation for my to-be discord replacement
now to figure how tf to make a proper app for this thing because im getting really impatient using discord so much
oh and it doesn't use any javascript! yay
https://freechat.shockrah.xyz
Got to implement a Berger Table Generator today
Even though it was simple it felt really nice to think about a janky little algorithm instead of features or deadlines
Also never heard of this stuff before so I felt like a first CS student again lots o fun :^)
Ref: https://en.wikipedia.org/wiki/Round-robin_tournament#Berger_tables
Disclaimer: rocket.rs is actually incredible especially for writing up simple web servers _really_ quickly
things breaking on rust nightly every other day has finally pushed me to straight up drop using rocket entirely
I'd rather just do things myself than be at the mercy of a massive library from now on
Hyper here I come!
Ran some tests querying data off a firebase instance from python with synchronous and asynchronous methods and wow.
I really want to refactor a lot of code for those massive query time gains but the code but I have in mind is already fraught with problems and missing features oh well maybe one day I'll get to it, for now it goes on the todo list
I make stuff on the internet