A realtime webserver allowing users to store and forward custom messages.
cabal sandbox init
cabal install --only-dependencies --enable-tests
Trying to follow haskell conventions. Though, if a variable is needed in the method signature, I am using smalltalkish convention: for example
f :: T -> T f aT = aT
if the above function is written as below:
f = \aL -> aL
in the latter case the variable is curried, and aL(ocal). Though, we should probably use a sequence, which would then look as below
f =\a1 -> a1
If things are working, we dont need to go about changing conventions. Though each new refactoring, which is almost a daily activity, I try to fix these as I go.
If you need to restart.
sudo /etc/init.d/postgresql restart
sudo route add -net 224.0.0.0 netmask 240.0.0.0 dev lo
sudo ifconfig lo multicast
This worked for me. : Linux pop-os 4.13.0-16-generic #19-Ubuntu SMP Wed Oct 11 18:35:14 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$ curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host: echo.websocket.org" -H "Origin: http://localhost:30001"
When we see postgresql errors, it is most likely on ubuntu due to missing libraries:
sudo apt-get install liblz-dev
sudo apt-get install c2hs cpphs hscolour hugs
sudo apt-get install postgresql-server-dev-all
Tool to print heap analysis is hp2pretty (not hp2ps). The output is in svg and you need inkscape or some of the popular tools for viewing svg files.
Install stack and run the following
- stack setup
- stack build
- stack-run <executable_name>
stack install stack-run
The onboarding may be a bit more smoother.