geopjr / blahaj Goto Github PK
View Code? Open in Web Editor NEW๐ฆ๐ณ๏ธโโง๏ธ๐ณ๏ธโ๐ Gay sharks at your local terminal - lolcat-like CLI tool
Home Page: https://blahaj.geopjr.dev/
License: BSD 2-Clause "Simplified" License
๐ฆ๐ณ๏ธโโง๏ธ๐ณ๏ธโ๐ Gay sharks at your local terminal - lolcat-like CLI tool
Home Page: https://blahaj.geopjr.dev/
License: BSD 2-Clause "Simplified" License
does it support wsl?
I threw together a quick single-threaded rust implementation of this, and found a ~5.21x performance improvement compared to the multi-threaded implementation of BLAHAJ.
This performance improvement still carries over to larger inputs:
For abnormally large files that you usually wouldn't pass through this (32768 lines in the 1st below example, 12MB of #\n
repeating in the 2nd), the gap does get significantly smaller, however there is still a significant performance improvement:
Also, my testing does not include a multithreaded rust implementation, which could be even faster. I'm guessing the lower gap in the last 2 is primarily due to my implementation being singlethreaded.
As a result of this discovery, I thought it might be worth mentioning that rewriting this in rust may provide a significant performance advantage overall :)
Note that my implementation is very barebones, and a more complete implementation may see less of a performance improvement - however it should still see some of the 1.3x to 5x improvement.
If the stdin is not a pipe, we are not coloring the output of any commands, instead we are coloring our inputs in the terminal. This looks boring and is not expected.
We have several ways to detect if stdin is a pipe or a terminal. isatty(STDIN_FILENO)
can detect terminal and S_ISFIFO(st.st_mode)
can detect pipe. I don't know any clue about crystal though.
It would be cool if a new release could be published, since a new flag has been added!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.