Downloading Julia from Anaconda or from julialang.org - anaconda

I want to download Julia (the last version is 1.0) from Anaconda. However, you can download from https://julialang.org/. My questions are: What are the differences between both ways of installing Julia? Can I install, for example, DifferentialEquations.jlor Symata.jl without problems if I choose Anaconda? If I choose Anaconda, how good is the package management?

The only benefits of Anaconda are, as far I'm aware, that it automatically selects the right binary (i.e., OS), and likely has a slightly easier updating experience (for the language itself). However, it does not seem to support Windows (https://anaconda.org/conda-forge/julia), so if you happen to be on that platform, you are out of luck. I would recommend grabbing the binary from the website directly, the installation process is very straightforward.
The management of Julia packages will still happen inside Julia. Julia 1.0 has a very good package manager called Pkg. You can read more on installing packages within Julia on https://docs.julialang.org/en/v1.0.0/stdlib/Pkg/.

Related

Can I use Anaconda for the future?

So basically I started learning python and with Visual Studio Code. It was great till I had to install simple packages(pandas, numpy, etc). I couldn’t get it to work because it was too complicated to change path and all that as I’m a beginner.
This is why I installed Anaconda, like all the modules were there. What I’m worried is about that in the future if I work in a company can I still use anaconda?
Is it common for programmers to use anaconda for module management?
Yes. Many enterprises use Anaconda. Anaconda continues to be a very relevant tool in managing python environments. Many tools such as AzureML and other build conda environments as a core component of their backend processes.
You can also try:
poetry
pip

How and which graphing library to install on Python 3

I have Python 3 on OSX Yosemite installed with Brew. I want to make some simple charts (like in Excel). I run Python from bash. Which library should I investigate, and the proper way to have it installed? I am looking for library which is easy to install, and then easy to use. Output probably png files?
matplotlib is a good choice.
How to install it on OS-X is mentioned in the installation FAQ.
Especially in combination with IPython notebooks it gives you a nice interactive environment to play with it.
Another alternative would be gnuplot. Pre-built packages are available.
It is not tied to Python, it is basically a domain specific language for graphing. There are python bindings available, gut it is also not difficult to use it with subprocess.
If you can use commercial libraries, you may also consider ChartDirector.

I need a way to run Haskell code without any install on a Mac

I enjoy developing in Haskell, but am presently confronted with a challenge. At my place of education, I don't have administrative rights on my account. I want to debug/test while there. I need a way to run Haskell code without installing haskell-platform or ghci or anything else requiring of an administrative level of privilege. For instance, a web site which will run haskell code (abeit limited to not include file access of course) or a java utility (or standalone .app, though java is preferred due to the nature of the "parental controls"), or something else I haven't thought of. Source or compiled Java, Flash, and source code in Ruby or Python are preferred to native code. This is on Mac OS X 10.6, for reference.
You can install GHC without admin privileges, but you'll have to build from source. Check out the Building on MacOS X for more details.
Essentially, like any other open-source project, you can compile code and install it, generally, anywhere on your filesystem like into a folder in your home folder (I often use the ~/.local folder for that purpose).
As the linked page mentions, you can also use MacPorts and install it to any place you can write to. Once MacPorts is installed you can install GHC.
EDIT
As pointed out by Carl in the comments below, you don't need to build from source. Just grab the binary tarball from http://www.haskell.org/ghc/download_ghc_7_4_1#binaries.
In addition to all the other ideas, several companies will rent you virtual (cloud) linux servers for a few cents an hour. You have root on those and can install whatever you want, then freeze the image until you need it again.
Normally this might not be advantageous over a local solution if you can make one work, but a possible extra benefit would be that your work can stay on a single "computer" which you could access while sitting in front of any variety of modern PC that might be available to you on a given day.
An alternative not only for Haskell is http://ideone.com/
For the website option, TryHaskell will hardly cut it, it's way to limited.
codepad, OTOH, is more liberal, and should be of more use.
But honestly the bindist option is the best one, clearly!
If you truly can't install anything, then there's
http://tryhaskell.org/ -- like GHCi, but you can't load modules, which means not only that you can't use many standard functions (say, the functions in Data.List), but also that you can't use certain language features (like user-defined algebraic data types).
I also remember a hpaste-style site which executes its code -- and allows you to have private pastes -- but I can't remember it at the moment. Edit: I was thinking of http://codepad.org/ -- thanks #Mog
Try http://hiji.tinyrocket.se/ It is a haskell interpreter written using javascript.
http://ghc.io/ GHC.IO is a version of the Haskell interactive interpreter, ghci, that runs online in a web browser.
You just need to install homebrew, which you can do without root rights if you do so in your home directory. You can then brew install cabal-install
which will automatically install cabal and ghc, or brew install stack to install stack.
There is a web-based interpreter for Haskell at http://tryhaskell.org/. However, it may not provide enough functionality for your requirements.

How to distribute frozen binary gems with Ruby application (not Rails)

I wrote a bunch of Ruby scripts that integrate different tools to create a "workflow for academics". A number of my friends have been very interested in trying this out, however they are held back by how hard it is to install or replicate my environment.
Although Ruby comes built-in with Mac OSX (the applications I integrate are all Mac applications, so unfortunately the solution can only work on Mac), I use a few binary gems, including Appscript (bridge to AppleScript). The problem is that this requires XCode, which my non-programmer friends do not have installed (and it seems a bit demanding to ask them to install 3GB of software to run a few kbs of code).
I tried freezing the gems by installing them with gem -i, into a subdirectory of the source (on github), and tried removing my entire central gems directory on my local computer - it worked fine, the scripts still ran, etc. However, when my friends tried running the scripts, they got error messages about missing library files etc.
So my two questions are:
* how specific are compiled binary gems? will they work on other Mac OSX versions? with other versions of Ruby? etc
* how can I find out exactly which binary files (located in central locations) a Ruby gem depends on, and package this with the source (and how do I tell the gem where to find these files in non-standard locations)
I know this might not be "standard procedure", and I should just package it as a gem and let my friends deal with the problems etc - but I'd really like to solve this, and I am sure there must be some way of doing this?
Thanks a lot
In my experience, compiled gems are not portable. They're dependent on the exact version of ruby and whatever other libraries they use. A better solution would be to have your friends install the "Command Line Tools" version of Xcode -- it's only 100-150 MB and includes everything you need to build gems (and other software). You'll need a (free) Apple Developer ID to download it though.
https://developer.apple.com/downloads?q=Command%20Line%20Tools

What are the pros and cons of building from source versus installing from a Disk Image on OS X?

What are the pros and cons of installing things like Python and Git from source instead of simply using the community provided Disk Image on OS X?
Dan Benjamin has an article about "Using /usr/local". However, given that the Git DMG installs into /usr/local/git and the Python DMG installs as a Framework, I'm not sure that the advantages Dan lists for building from source aren't still gained via a DMG install in these cases.
Obviously, one pro of using a Disk Image is that it's much simpler. However, are they tradeoffs that make it worth building from source?
There are two separate questions here: should add-on software you install go in /usr or /usr/local (short answer: it should go in /usr/local for the reasons Dan Benjamin gives), and should you install add-on software from a provided installer (disk image) or by building it yourself (short answer: whatever works best for you, but either way it should go in /usr/local).
I'll take Python as an example. OS X v10.6.6 includes python v2.6.1 in /usr/bin, with its frameworks in /System/Library/Frameworks. If you download an installer for a newer version (currently installers for v2.7.1 and v3.1.3 are available), it'll put the new version in /usr/local/bin, and its frameworks in /Library/Frameworks (/Library has roughly the same relation to /System/Library that /usr/local has to /usr), which is exactly what you want. If your paths are set properly, you'll use the newer version automatically. OTOH system scripts that may not be compatible with, say, Python v3 should start with #!/usr/bin/python, and keep using the old (standard) version. Furthermore, when OS X v10.6.7 ships and includes a relinked version of Python v2.6.1, it won't step on the update you installed.
If you were to build a newer version of Python yourself, you should do it just like the installer does: put the binary in /usr/local/bin and the frameworks in /Library/Frameworks, for exactly the same reasons. If you aren't sure how to do this, you should probably stick to the installer -- at least for major projects like Python and Git, there are likely to be smart people involved who know how to get this sort of thing right.

Resources