Monday, March 06, 2017

Haskell on Visual Studio Code for Windows

I am happy to hear a news about Haskell support on Windows via Visual Studio Code and its extension called Haskelly. These days, my main operating system has been Windows 7 and 10. Linux is for running a web server, and Mac is for an old laptop. My students have extensively used Windows OS. For me to teach Haskell programming, I have no option but to find an appropriate IDE necessarily running on Windows. Sometime ago, I recommended Eclipse and Haskell plugin on it. Now I believe I will recommend Visual Studio Code and its extension called Haskelly for Haskell programming to my Windows-favored students.

[Haskelly]

  • https://marketplace.visualstudio.com/items?itemName=UCL.haskelly


[Installation instructions]
  • Install Visual Studio Code
  • Run Visual Studio Code to activate the Haskelly extension
  • Download a stack installer and run it
  • Launch your CMD window or Windows PowerShell
  • Run "stack install intero QuickCheck stack-run --install-ghc"
    • stack : the name of a command for Haskell tool stack
    • intero : a tool for auto-completion of names in Haskell programs
    • QuickCheck : a property-based testing tool
    • stack-run : an option to direct stack to compile the source codes and to run the default executable
    • --install-ghc : an option to install GHC (Glasgow Haskell compiler)
  • Rerun Visual Studio Code
  • Open a new file named Main.hs extension to write the following
    • module Main where
    • main = putStrLn "Hello Haskell"
  • Run it!

Note. I guess you will meet some error messages: infero does not work.  But VS code may work partially for Haskell programming, though type information is not properly displayed by infero when you hover a mouse cursor over some function.

In this error, you may try the following

  • Run "stack build intero", "stack build QuickCheck", "stack build stack-run" separately. 
  • It may help you to build intero and QuickCheck at least. 
  • But I failed to build stack-run with an error message like "In the dependencies for unix-2.7.2.1: unbuildable must match <0, but the stack configuration has no specified version"
  • I do not know what solution is available for the problem. 



Lectures on Haskell Programming


For novice learners, U. of Pennsylvania lecture, Introduction to Haskell  is good :



Middle-level learners may be interested in S. Weirich's lecture, Advanced Programming, which teaches from basic and advanced Haskell programming :


For advanced learners, I recommend Bryan O'Sullivan's stanford lecture, Functional Systems in Haskell :

Thursday, February 02, 2017

Excel : Mouse Wheel zooms in and out instead of scrolls

When you suddenly find out your mouse wheel make the excel worksheet zoom in and out instead of scrolling it, you can correct it by

 - File -> Option -> Advanced -> Zoon On Roll with Intellimouse

https://answers.microsoft.com/en-us/msoffice/forum/msoffice_install-mso_other/mouse-wheel-magnifies-instead-of-scrolls/40644484-e043-446d-bee6-52cbb3d4865a

Friday, January 27, 2017

EdX Courseware Open Source Platform



XBlock SDK

  • https://github.com/edx/xblock-sdk


XBlock Courseware Components

  • https://github.com/edx/XBlock