186 points · by Red_Tarsius · 11y ago · 81 comments
Sadly Kronos is outdated now, because it is based on IPython 2. IHaskell now supports IPython 3 / Jupyter only, as of the release that I'm going to try to put on Hackage today. I strongly recommend installing from Github master now - we have two easy to read installation scripts for Linux and Mac (so no need to trust them blindly, you can just read their source to see what they do).
Someday when I have the time Kronos will get an overhaul. The Python version will become free - it makes no money, unsurprisingly - and you will be able to download kernels from the app, perhaps including Julia and others, instead of installing separate apps.
I was trying to get IHaskell to build on Arch Linux(using the Hackage package). I couldn't get it to work with either the arch packages for ipython2 or for ipython3. The version that IHaskell tries to install also didn't work. Should I just wait for your latest release?
(That said if you have problems I still recommend the Github route; especially the bit about filing an issue with your problem!)
If you want get into functional programming, Learn You a Haskell for Great Good!, Real World Haskell and Parallel and Concurrent Programming in Haskell are available online for free: http://goo.gl/4RoYrJ
EDIT – Here's a handy cheat sheet of features: http://cheatsheet.codeslower.com/CheatSheet.pdf
I have a guide here that lists my recommendations: https://github.com/bitemyapp/learnhaskell#yorgeys-cis194-cou...
I've explained my stances towards what not to use to learn Haskell here: http://bitemyapp.com/posts/2014-12-31-functional-education.h...
The links are https://www.reddit.com/r/haskell/comments/2r43q0/kronos_hask... and https://www.haskell.org/documentation
I've been wanting to read The Haskell School of Music[1]. I'm hopeful this would be a useful environment for working through it.
[1] http://haskell.cs.yale.edu/euterpea/haskell-school-of-music/
To add: Building and installing IHaskell (on Mac at least) is a bit of a hassle if you just want to get up and running. You need XQuartz, cairo for the Diagrams module, gcc, a non-distribution ipython (recommended), and of course a sane cabal environment. If you know what you're doing, that's a few minutes in shell commands, making sure you're in a sandbox, etc. If you're new to all of this, have fun figuring out why your build keeps exiting because of some weird ABI breakage in an upstream Haskell package, or setting the right library paths so that GCC can do its job, or finally getting everything to build after GHC takes a week off in the Bahamas only to find that the kernel dies immediately... (https://github.com/gibiansky/IHaskell/issues/287 now fixed, don't worry!)
Despite that, it's a great tool and without it I don't think I would have been as motivated to work through the stack of Haskell learning materials I've got piling up.
Edit: Based on the author's comment above (PieSquared) Kronos is deprecated with IPython 2, so it must be what I was thinking of regarding the older repo.
I hope it will become part of the juPyter package in the long run.
/usr/lib/python3.4/site-packages/IPython/kernel/manager.py:95: UserWarning: Setting kernel_cmd is deprecated, use kernel_spec to start different kernels. warnings.warn("Setting kernel_cmd is deprecated, use kernel_spec to "When does this nonsense ever stop?
Regardless of its practicality or lack thereof, Haskell is definitely at least hard to get started with.
Furthermore, the specific operators you cite are confusing examples, given that ">>=" can be elided using do notation, "\" looks enough like a lambda that it took me a while to remember what you were referring to, and "!!" is rarely used. A slightly more reasonable argument for your case would be to cite the operators used in the lens library, but those are all aliases for regularly-named functions.
There are some arguments against Haskell in terms of practicality, but this is not one of them.
Haskell has 21 reserved keywords that cannot be used
as names for values or types. This is a relatively low
number (Erlang has 28, OCaml has 48, Java has 50, C++
has 63.
In particular, some of the operators you mention represent such fundamental and common tasks that it makes sense to have a shortened form. I'm in agreement that descriptive names are preferable in general, but not always. Haskell syntax is quite simple and predictable (I say that as a former Rubyist); it only appears strange in the beginning because there are so many new concepts to learn.[0] https://github.com/kqr/gists/blob/master/articles/simple-syn...
f . g y . h z a . f'
is certainly much clearer than f `compose` g y `compose` h z a `compose` f'
The same goes for (>>=) >>= += <<= -= *= ...
?: ! ~ ^ % ...