[-] qqq@lemmy.world 2 points 3 days ago* (last edited 3 days ago)

For loops with find are evil for a lot of reasons, one of which is spaces:

$ tree
.
├── arent good with find loops
│   ├── a
│   └── innerdira
│       └── docker-compose.yml
└── dirs with spaces
    ├── b
    └── innerdirb
        └── docker-compose.yml

3 directories, 2 files
$ for y in $(find .); do echo $y; done
.
./are
t good with fi
d loops
./are
t good with fi
d loops/i

erdira
./are
t good with fi
d loops/i

erdira/docker-compose.yml
./are
t good with fi
d loops/a
./dirs with spaces
./dirs with spaces/i

erdirb
./dirs with spaces/i

erdirb/docker-compose.yml
./dirs with spaces/b

You can kinda fix that with IFS (this breaks if newlines are in the filename which would probably only happen in a malicious context):

$ OIFS=$IFS
$ IFS=$'\n'
$ for y in $(find .); do echo "$y"; done
.
./arent good with find loops
./arent good with find loops/innerdira
./arent good with find loops/innerdira/docker-compose.yml
./arent good with find loops/a
./dirs with spaces
./dirs with spaces/innerdirb
./dirs with spaces/innerdirb/docker-compose.yml
./dirs with spaces/b
$ IFS=$OIFS

But you can also use something like:

find . -name 'docker-compose.yml' -printf '%h\0' | while read -r -d $'\0' dir; do
      ....
done

or in your case this could all be done from find alone:

find . -name 'docker-compose.yml' -execdir ...

-execdir in this case is basically replacing your cd $(dirname $y), which is also brittle when it comes to spaces and should be quoted: cd "$(dirname "$y")".

25

Seems like a ton (over 1k) of people were affected because of an auto updating VS Code extension. Check your bashrc/zshrc and GitHub account if you use nx

[-] qqq@lemmy.world 15 points 1 month ago* (last edited 1 month ago)

You shared a Wikipedia link with sources[1] (and also numerous sections and assertions in the Wikipedia article itself) showing that cats generally impact wildlife populations but came to the conclusion that they don't. Am I missing something here? Is it because you're specifically focusing on birds?

[1] https://besjournals.onlinelibrary.wiley.com/doi/full/10.1111/1365-2656.13745

5 CONCLUSIONS

Free-roaming domestic cats affect wildlife through predation, disease, hybridization, and indirect fear and competition effects. Our review highlights biases and gaps in the global literature on these impacts, including a focus on oceanic islands, Australia, Europe and North America, and on rural areas, predation, impacts of unowned cats, and impacts at population and species levels. Key research advances needed to better understand cat impacts include more studies in underrepresented regions (Africa, Asia, South America), on impacts other than predation, and on management methods designed to reduce impacts. This review also supports past studies in illustrating that cats negatively affect wildlife populations and communities in most cases in which these potential impacts were evaluated

[-] qqq@lemmy.world 30 points 1 month ago

Beyond the bird or wildlife problem, outdoor free roaming cats are just generally a problem. I have two cats and an outdoor cat likes to come and taunt them at the window: it seriously stresses them out. It'll go so far as climbing up screens and damaging them. Cats will also often mark people's houses.

I walk my cats on leashes. I don't understand why cat owners can't understand that people don't want their cat around unmanaged.

[-] qqq@lemmy.world 23 points 2 months ago* (last edited 2 months ago)

I work in security and I kinda doubt this. There are plenty of issues just like what is outlined here that would be much easier to exploit than social engineering. Social engineering costs a lot more than GET /secrets.json.

There is good reason to be concerned about both, but 95% sounds way off and makes it sound like companies should allocate significantly more time to defend against social engineering, when they should first try to ensure social engineering is the easiest way to exploit their system. I can tell you from about a decade of experience that it typically isn't.

[-] qqq@lemmy.world 29 points 2 months ago* (last edited 2 months ago)

https://github.com/Chocobozzz/PeerTube/releases/tag/v2.3.0

ChatGPT is correct? The irony of people confidently asserting that ChatGPT is wrong, while being wrong, seems to be lost on the crowd here. Kinda makes you understand why ChatGPT is often so confident even when wrong.

[-] qqq@lemmy.world 18 points 3 months ago

Sounds like you're cherry picking both; I've seen plenty of garbage that costs money as well.

[-] qqq@lemmy.world 37 points 6 months ago* (last edited 6 months ago)

JavaScript alone is not a simple beast. It needs to be optimized to deal with modern JavaScript web apps so it needs JIT, it also needs sandboxing, and all of the standard web APIs it has to implement. All of this also needs to be robust. Browsers ingest the majority of what people see on the Internet and they have to handle every single edge case gracefully. Robust software is actually incredibly difficult and good error handling often adds a lot more code complexity. Security in a browser is also not easy, you're parsing a bunch of different untrusted HTML, CSS, and JavaScript. You're also executing untrusted code.

Then there is the monster that is CSS and layout. I can't imagine being the people that have to write code dealing with that it'd drive me crazy.

Then there are all of the image formats, HTML5 canvases, videos, PDFs, etc. These all have to be parsed safely and displayed correctly as well.

There is also the entire HTTP spec that I didn't even think to bring up. Yikes is that a monster too, you have to support all versions. Then there is all of that networking state and TLS + PKI.

There is likely so much that I'm still leaving out, like how all of this will also be cross platform and sometimes even cross architecture.

[-] qqq@lemmy.world 16 points 7 months ago* (last edited 7 months ago)

An equal amount of wasted energy is output defending a trillion dollar corporation that doesn't care about those defending them at all. Apple be fine. Let's just use our computers and move on with our lives; it doesn't have to be personal.

[-] qqq@lemmy.world 18 points 11 months ago* (last edited 11 months ago)

No. https://kamalaharris.com/issues/ this is not too far right. People need to stop just listening to sound bites and talking points. All of the socialist voters think we're going to just randomly have a socialist state one presidential cycle? Come on. I don't buy it. The real fact here is that people who considered themselves unaffected by Trump couldn't get off their high horse and try to help. You know what drags us more right? Trump winning and Republicans owning Congress.

[-] qqq@lemmy.world 35 points 11 months ago* (last edited 11 months ago)

I'm so sick of this; that wasn't her platform. People constantly saying that was her platform stopped people from actually looking at her platform. I'm so sick of Dems that think they can just not vote because they don't fall in love with their candidate. Politics is practical and the USA just shit the bed and it will have a real impact on the world. All of the Dems or left leaning people who didn't vote are complicit.

[-] qqq@lemmy.world 55 points 2 years ago* (last edited 2 years ago)

Async features in almost all popular languages are a single thread running an event loop (Go being an exception there I believe). Multi threading is still quite difficult to get right if the task isn't trivially parallelizable.

[-] qqq@lemmy.world 19 points 2 years ago

They're just having fun

view more: next ›

qqq

joined 2 years ago