9 ms·
Kronos Haskell
- Red_Tarsius 12y agoDisclaimer: I am NOT the author of Kronos. I'm learning the language and I'm into all things Haskell. I thought it could be interesting to HN as well. You can read more here: http://goo.gl/SNLxjo http://goo.gl/SNLxjo 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 http://goo.gl/4RoYrJ EDIT – Here's a handy cheat sheet of features: http://cheatsheet.codeslower.com/CheatSheet.pdf http://cheatsheet.codeslower.com/CheatSheet.pdf
- toothbrush 12y agoHN automatically shortens URLs. Some people don't like blindly clicking on a redirector. The links are https://www.reddit.com/r/haskell/comments/2r43q0/kronos_haskell_notebook_mac_app/ https://www.reddit.com/r/haskell/comments/2r43q0/kronos_hask... and https://www.haskell.org/documentation https://www.haskell.org/documentation
- Red_Tarsius 12y agoThank you for the advice and showing the full url!
- coolsunglasses 12y agoIf you'd like to learn Haskell, I'd suggest doing cis194 and then the NICTA Course rather than LYAH and RWH, based on my experiences learning and teaching Haskell. I have a guide here that lists my recommendations: https://github.com/bitemyapp/learnhaskell#yorgeys-cis194-course 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.html http://bitemyapp.com/posts/2014-12-31-functional-education.h...
- Red_Tarsius 12y agoWOW Thank you for writing down such a clear learning path! I'm going to dive into it as soon as possible.
- dvdt 12y agoWanted to second the NICTA course as a top-notch resource for learning Haskell. It was only by working through the NICTA exercises that I finally understood functors, applicatives, monads, etc. and more importantly strengthened my intuition for when I could apply these functional tools to practical problems.
- tempodox 12y agoWow, every language should have such a nice working environment, with graph & math rendering built in. Too bad Haskell is such an impractical language.
- sfvisser 12y ago> Too bad Haskell is such an impractical language. When does this nonsense ever stop?
- tormeh 12y agoIt's not nonsense, though. But IMO it's not the language itself, but the libraries that are impractical. The naming is the worst. If Haskell's authors really wished to create a practical language, they would never have allowed things like ">>=", "\", "." or "!!" into the standard libraries. It's not the first programming language to use lots of arbitrary signs, but it's certainly the worst I've ever seen. The only conclusion I can draw from all this is that Haskell's written by people who love memorization and don't care much about explaining to others.
- wz1000 12y agoMany confusing operators certainly exist(especially in Control.Arrow), but the ones you have mentioned are the worst possible examples you could give. All of those have a clear meaning, and are extremely useful 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 (>>=)
- tormeh 12y agoIt's clearer to me, but I still have no idea what's going on. This, on the other hand, is a syntax made by people who thought it through: with Ada.Text_IO; use Ada.Text_IO; procedure Hello is begin Put_Line ("Hello, world!"); end Hello; Not that it's at comparable complexity, but I know what the following code does, but I still can't understand it. It's basically obfuscated: module Main where import Control.Monad import Control.Concurrent import Control.Concurrent.STM main = do shared <- atomically $ newTVar 0 before <- atomRead shared putStrLn $ "Before: " ++ show before forkIO $ 25 `timesDo` (dispVar shared >> milliSleep 20) forkIO $ 10 `timesDo` (appV ((+) 2) shared >> milliSleep 50) forkIO $ 20 `timesDo` (appV pred shared >> milliSleep 25) milliSleep 800 after <- atomRead shared putStrLn $ "After: " ++ show after where timesDo = replicateM_ milliSleep = threadDelay . (*) 1000 atomRead = atomically . readTVar dispVar x = atomRead x >>= print appV fn x = atomically $ readTVar x >>= writeTVar x . fn
- wz1000 12y agoIs there any way to build this for Linux, or am I better off just using IHaskell?
- ics 12y agoJust build IHaskell or use the docker container. Kronos is by the author of IHaskell and if I recall also had a repo for a node-webkit wrapper around IHaskell or IPython which this appears to be the continuation of. 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 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.
- lallysingh 12y agoAFAICT, this is just IHaskell running on the IPython notebook, packaged as a Mac app. So if you're able to run notebook, you've got something equivalent.
- kbd 12y agoGreat to see the IPython notebook being used by languages other than Python! 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/ http://haskell.cs.yale.edu/euterpea/haskell-school-of-music/
- wodenokoto 12y agoCan any of you get it to work? I spend forever trying to get the open source version working on Linux and gave up at tried this version on OS X. I hope it will become part of the juPyter package in the long run.
- wz1000 12y agoI used cabal install ihaskell --reorder-goals, and it built without any errors. However when I try to run it, IPython does not detect the IHaskell kernel. I get this error: /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 "
- PieSquared 12y agoHey all! Author of IHaskell and Kronos here. Feel free to ask any questions :) 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.
- wz1000 12y agoThanks for your work! 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?
- PieSquared 12y agoI recommend installing IPython 3 with pip, cloning the repository, and then running ./build.sh ihaskell. If that doesn't work, file an issue and I'll be happy to help figure out the installation woes. (Note that ihaskell install must be run for IPython to know about the kernel! Updating the documentation is the last bit before release... :) )
- baldfat 12y agoThis is the whole reason why Juypter is being made. Everything in Juypter will be kernel agnostic. The only part of Juypter that will be first class Python is the IPython kernel.
- PieSquared 12y agoJust released IHaskell 0.6, which supports and requires IPython 3.0 and higher! So you may now be able to use Hackage to install, and use with new IPython. (That said if you have problems I still recommend the Github route; especially the bit about filing an issue with your problem!)
- ElectricFeel 12y agoapplying this to my list of 'interesting techie things'
- hunnypot 12y agoThe GitHub Pages site is dead.