Skip Navigation

Posts
27
Comments
1,096
Joined
2 yr. ago

  • wow, never heard of it. do u use it?

  • one little inconvenvience for tonnes better security and privacy. r u possibly able to use a credit card in your phone case instead?

  • there are some niche reasons to root, like just tweaking system things or using rooted-only apps

  • u can buy a pixel second hand.

  • i get a proxy/vpn is the only solution?

  • yeah yeah windows bad. (i completely agree)

  • ok but if you work at a small business with few employees its just polite

  • :) no problem! i would assume resizing the image might be a little slower, because it creates a clone of the image, but if you use FilterType::NearestNeighbor, the speed is negligable in my opinion

  • i read through the code, and i have some tips, which you may find helpful (or not):

    • argument parsing: if --color is not the first argument, it will try to open a file named --color, which i assume is unintended. i would suggest checking out the clap crate to easily parse args
    • i'm quite sure why you used 'clusters' instead of resizing the image to the terminal width? if it is purely as a programming exercise, or for performance reasons, then that's great! but otherwise, calling image.resize() is easier
    • .len() on a string returns length in bytes, not characters, so could break with non-ascii text. in the context of this program, the text will always be ascii, so it is of course not a problem, but it's worth to keep in mind. to get character length, use .chars().count()
    • in my testing, the width of the image is always affected by the width of the terminal, always being less than the maximum possible width, causing the image to be stretched vertically. i'm not sure why this is happening
    • in get_brightness_of_cluster, pushing to a Vec and then calling .sum() can be replaced with a loop which increments a mutable u32 variable. this is a nitpick, but it can avoid unnecessary memory allocation

    check out this example. sorry if this comes off as rude or a nitpick, i'm just trying to provide some advice :)

  • the top comment is always a slur or a euphamism for suicide

  • just have a tub of water rigged above the server

  • why would you be against 4th of July and children?

  • haskell is an intricately designed laser gun that you cant shoot it without a learning group theory and lambda calculus

  • however, it is still used and endorsed by every army

  • no the Huffing™ variety has more uhhh toxins

  • the GOVERNMENT wants me to use my LEGS to MOVE

  • ?