News for hackers. Stuff that matters.
Re:My God, it's full of yaks by mkesper on Friday June 24, 2016 @03:25PM (#11972680)
MacOS does not seem to be very developer friendly.
Re:My God, it's full of yaks by swagtricker on Friday June 24, 2016 @03:35PM (#11972765)
I believe part of the problem for Ron there is a.) speed of the community & lack of communication, b.) lack of consistent tool isolation. You notice he's using RVM (while most of the Ruby developers I know have moved to rbenv due to better support) and that it was out of date. Also, he had the foresight to isolate his Ruby tooling by using rvm (good on 'ya, Ron!) for bizarre system dependencies, but did not chose to use a similar Python environment manager strategy such as pyenv of pythonbrew (for suffering the same damn problems). I sincerely empathize with him, but some of this can be argued as the cost of doing development n! generations past we recognized the impact of 'internet time'.
Re:My God, it's full of yaks by pyre on Friday June 24, 2016 @03:33PM (#11972744)
I'm curious what the failure of MacOS was in this instance. This comment at face value seems like you're trolling.
Re:My God, it's full of yaks by x0x0 on Friday June 24, 2016 @04:25PM (#11973171)
The intermixing of macos python and brew installed python has been painful for me in the past.

Specifically, I spent hours and hours trying to fix

   import matplotlib.pyplot
producing

   ImportError: cannot import name _thread
but only in ipython, not the interpreter. (HAHAHAHA fuck you developers).

A ton of googling and swearing produced the fact that a package named six that does god knows what was being read out of

   /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six.pyc
instead of

   /Library/Python/2.7/site-packages
rm -rf'ing the former path fixed things, but fuck only knows what else I may have broken. Just because I want to plot things from ipython.

ps -- 6 months ago the above used to work. Why did it stop? I have no bloody idea. But this consumed multiple hours of my life.

Re:My God, it's full of yaks by pyre on Friday June 24, 2016 @10:42PM (#11974946)
These issues also crop up with installing python libraries via pip in a system managed by apt/yum/whatever, from what I remember. Dealing with Python versions / libraries that are not part of the OS's package manager can be painful. It's why people use things like virtualenv / pyenv / Docker even in controlled server environments.
Re:My God, it's full of yaks by mason55 on Friday June 24, 2016 @04:55PM (#11973389)
Seems like this would have been straight forward with a virtualenv?
Re:My God, it's full of yaks by geofft on Friday June 24, 2016 @05:03PM (#11973461)
Yup. Really, no OS is developer-friendly if you're going to mess with the system Python interpreter, because the system Python interpreter exists to serve system software written in Python. You can easily get yourself into very similar problems with Debian or Fedora or whatever else.

Install a virtualenv, and on OS X, maybe install Python from python.org, and then everything works amazingly.

Re:My God, it's full of yaks by x0x0 on Friday June 24, 2016 @05:20PM (#11973563)
After I learned more that was probably the right thing to do, but I'm not a python dev. I just want to use sklearn, pandas, and associated tools. I'm not sure what the smooth path to doing that is. At various times people recommend macports, brew, anaconda, and so on... Note that compiling numpy from source sucks, and I'd much rather someone else do so.
Re:My God, it's full of yaks by geofft on Friday June 24, 2016 @07:03PM (#11974165)
There are now wheels (binary distributions of Python modules) of numpy, scipy, and scikit-learn for both Linux and Mac OS X, so it should just be a matter of `virtualenv /tmp/v` (or wherever), `source /tmp/v/bin/activate`, `pip install -U pip` to make sure your pip is new enough to handle wheels, and `pip install numpy scipy scikit-learn`. Nothing gets built from source. Unfortunately the same can't (yet) be said for pandas; `pip install pandas` at this point will try to compile it.

Actually acquiring virtualenv on OS X seems not to be super straightforward, especially if you want to use the system Python interpreter. The best option seems to be to `brew install python`, and then `pip install virtualenv`. Or download Python from python.org, and maybe get Python 3 while you're at it.

Re:My God, it's full of yaks by solotronics on Saturday June 25, 2016 @05:40AM (#11975781)
one way is to get a standalone python and git clone virtualenv, then use the standalone python to make virtualenv for each project.. this leaves out anything to do with the system python
Re:My God, it's full of yaks by x0x0 on Friday June 24, 2016 @07:06PM (#11974182)
Thank you! I'll give that a whirl.
Re:My God, it's full of yaks by tanlermin on Friday June 24, 2016 @05:35PM (#11973679)
Anaconda. Its the best game in town right now.
Re:My God, it's full of yaks by AlexCoventry on Friday June 24, 2016 @08:23PM (#11974534)
I have found Anaconda to be substantially slower running on OS X than running on the same hardware in a docker container running on boot2docker.
Re:My God, it's full of yaks by newman314 on Friday June 24, 2016 @05:41PM (#11973721)
TBH, it really is not dev friendly due to odd/old versions, having to install brew etc.

Thus, I use my Mac as a fronted with business apps but all dev is done on Linux VMs. I like the separation and avoid all that hair pulling.

Now, dealing with proprietary HW is a whole other can of worms. I spent 3hrs last night trying to load a LE cert into a Polycom phone but had ZERO success getting the phone to use it instead of the factory cert. ARGH.

Re:My God, it's full of yaks by bovermyer on Friday June 24, 2016 @03:38PM (#11972786)
I have yet to have a problem with it. macOS seems to have the right balance between convenience and hackability.
Re:My God, it's full of yaks by gue5t on Friday June 24, 2016 @05:50PM (#11973772)
Which components are hackable? The closed-source kernel? The closed-source userspace libraries? The Internet service infrastructure (iCloud &c.)? The outdated versions of open-source software?

You have root, and you can build your own enclave of open-source code doing as you desire, but this is true of pretty much any system--certainly it's true on Windows, at least.

Re:My God, it's full of yaks by bovermyer on Monday June 27, 2016 @04:46PM (#11989330)
You answered your own question. I didn't say macOS was more or less hackable than other OSes. Also, I like many of the convenience features.

Linux is many (good) things, but up until this point in time, "convenience" is not a word I would associate with it. macOS and Windows own that world.