549 points · by eddyg · 7y ago · 108 comments
So you don't have to be a user to show appreciation ;)
edit: and re-reading my comment I feel it can come across like a manipulative sociopath comment, but I can assure you all that's not what I am. Though, that's exactly what a manipulative sociopath would say.
brew cask install sloth
https://github.com/Homebrew/homebrew-cask/blob/master/Casks/...
> Check formula for Homebrew coding style violations. This should be run before submitting a new formula. Will exit with a non-zero status if any errors are found, which can be useful for implementing pre-commit hooks. If no formula are provided, all of them are checked.
https://github.com/Homebrew/homebrew-cask/blob/master/USAGE....
> audit — verifies installability of Casks
You can see where it pulls from if you provide the --download flag but as far as I can understand it does not do any other validation regarding that.
brew cask audit virtualbox --download
AFAIK checksums are checked even if you don't run audit. $ brew cask audit sloth
audit for sloth: passed`lsof` exists in Linux. At least, my Ubuntu 16.04 has it. So if this were an Electron UI, would we instantly have a Linux version as well? Or is it not that simple?
I do really enjoy the look and feel of this mac version, though.
Many Electron apps are only written in JS without any (or no neccessary) platform specific code, but some also interface with the platform. In this case, if it just calls lsof through the shell and the versions are the same, it might actually just work. If it ships with its own binary it'd need to be switched out.
Once you've got the equivalent commands for each platform, it should be possible to build and package for all of them (Mac/Win/Linux).
I've just done a tri-platform Electron app which handles quite a few platform-specific commands. (For drive listing, SD-card formatting, file decryption (in custom C apps), etc.)
It does take a lot more work (and lots of time-consuming testing). But it can be done.
And why Electron? Why not QT, or Java swing, or some other language with GTK?
In this specific case, the app was targeted for MacOS and OS X earlier. Java really isn't a good solve on that platform. Which also makes it not a good solve for anything on the Mac platform.
I have been wanting to build a UI tool for non-techies to be a front end to a collection of shell scripts that I have been using for day-to-day tasks. I have written the scripts to be a friendly as I can make them with drag-n-drop folders as inputs rather than requiring arguments to be provided. This looks like a good example for me to use as research.
What kind of security risk is this for me?
Also, the "security risk" doesn't get a whole lot smaller when the app is signed. Only widely known malware apps will get their certificates revoked in time.
The new "notarization" is slightly more thorough but the risk is still up to you and the app permissions for non-appstore non-sandboxed apps are indeed quite open. Malicious or not, an app that is not sandboxed can steal or damage your data anywhere in the filesystem.
So again - all up to you to decide.
But there is little stopping a signed app from becoming malicious, so from a security standpoint, being signed doesn't ALWAYS mean being "safe".
Meanwhile kernel ABIs can and do change between versions (the API less so, but it still means that you have to rebuild your code).
What can happen however is that a tool of the same name might have a different output or behavior on different operating systems (most notably between the GNU and BSD variants). But in this case the kernel API is probably different as well, so you'll have to implement an abstraction layer anyway.
Sloth exists only on OSX and is a GUI app.
I’d ask the opposite: Any reason anyone would anyone use Sloth over lsof?
pony | lulee --pew | eels | cyan ..Yep, is definitely a Mac :D
Curious what patterns you iOS developers out there do to avoid code like this? Personally I am a big fan of ReSwift.
I will admit it’s a hard problem for me. Putting everything into one view controller is so easy and makes certain problems go away. e.g. Storyboards are a lot easier to deal with when their outlets are in the massive view controller. Custom UIviews with storyboards are a huge pain to get working with interface builder.
[1] https://academy.realm.io/posts/andy-matuschak-refactor-mega-... [2] https://www.smashingmagazine.com/2016/05/better-architecture...