- Install stack.
- Run
stack setup
as a normal user. This will install GHC for you (under~/.stack
). - Run
stack ghci
to start ghci. Please see the rest of the page linked above on how to use stack to create and build projects.
// So, this used to be a really terrible shell script I wrote years ago. | |
// Its was buggy in all kinds of corner cases, If you really need it, check | |
// out the revision history. Otherwise, if you have a functioning C compiler, | |
// you *really* should be using the system's realpath(3) function to do this. | |
// Here's a bare-bones version. To compile, just: `cc realpath.c -o realpath` | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char *argv[]) { |
{-# LANGUAGE NamedFieldPuns #-} | |
import XMonad | |
import XMonad.Config.Desktop | |
import qualified Data.Map as Map | |
main :: IO () | |
main = | |
xmonad $ desktopConfig { | |
terminal = "konsole", |
" auto-install vim-plug | |
if empty(glob('~/.config/nvim/autoload/plug.vim')) | |
silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
autocmd VimEnter * PlugInstall | |
endif | |
call plug#begin('~/.config/nvim/plugged') | |
Plug 'junegunn/vim-easy-align' | |
Plug 'neomake/neomake' |
Moved to https://github.com/olivierlemoal/i3-swap-focus |
module Coso where | |
testOk1 = [1, 2, 3, 4] | |
testOk2 = | |
[ 1 | |
, 2 | |
, 3 | |
] |
A central piece of modern collaborative software development is done using source control
tools. One of the most prominent being git
. While this is by no means the only one, it
is probably the most commonly used one with a cottage industry of tooling around it.
While git
is conceptually decentralised, it is mostly used though a central server. Today
this central server is often GitHub, or to some degree GitLab, and even a lesser some other
hosted options. This provides value in that it's easily accessable from a browser (the
ubiquitous way to access information today), and provides discovery facilities.
However, one can argue that the most critical part of collaborative software development is
Somewhat-repeatable recipes for getting a reliable haskell build toolchain installed as of 2022Q1. You might need to make adjustments, eg on Windows, but hopefully not too many.
Current most popular method. Best way to get native arm tools on mac m1. You can use it to install the compiler ghc
, build tools cabal
and/or stack
, and IDE/editor language server hls
(under $HOME/.ghcup
). Actively maintained.
- install latest ghcup (manages haskell core tools)
module SocketUtils | |
( isPortOpen | |
, simpleSockAddr | |
) where | |
import Data.Word (Word8) | |
import Foreign.C.Error (Errno(..), eCONNREFUSED) | |
import GHC.IO.Exception (IOException(..)) | |
import Network.Socket (PortNumber, socket, connect, close', Family(AF_INET), SocketType(Stream), SockAddr(SockAddrInet), tupleToHostAddress) | |
import UnliftIO.Exception (try, bracket, throwIO) |