Skip to content

Instantly share code, notes, and snippets.

@justinwoo
justinwoo / diff.diff
Created October 9, 2018 12:55
diff results
[bash:~/Code/spacchetti] update ギ ./scripts/diff.pl ../package-sets/packages.json
--- ours.txt 2018-10-09 15:55:11.976603821 +0300
+++ compare.txt 2018-10-09 15:55:14.792600639 +0300
@@ -17,8 +17,8 @@
bigints;v4.0.0;integers,maybe,strings
canvas;v4.0.0;arraybuffer-types,effect,exceptions,functions,maybe
catenable-lists;v5.0.0;control,foldable-traversable,lists,maybe,prelude,tuples,unfoldable
-chanpon;v1.0.0;effect,node-sqlite3,prelude,record
-chirashi;v0.1.0;exceptions,prelude,variant
+chanpon|NO ENTRY IN THEIRS
--- ours.txt 2018-09-19 14:03:21.987785235 +0900
+++ compare.txt 2018-09-19 14:03:23.955748692 +0900
@@ -17,7 +17,7 @@
bigints;v4.0.0;integers,maybe,strings
canvas;v4.0.0;arraybuffer-types,effect,exceptions,functions,maybe
catenable-lists;v5.0.0;control,foldable-traversable,lists,maybe,prelude,tuples,unfoldable
-chanpon;v1.0.0;effect,node-sqlite3,prelude,record
+chanpon|NO ENTRY
choco-pie;v3.0.0;event,prelude,record,typelevel-prelude
colors;v5.0.0;arrays,integers,lists,partial,strings
@justinwoo
justinwoo / purs-11.7-to-12-guide.md
Last active January 6, 2019 16:34
See the PureScript Resources guide page at https://purescript-resources.readthedocs.io/en/latest/0.11.7-to-0.12.0.html. PureScript 0.11.7 -> PureScript 0.12.0 checklist

There are some changes you will need to make for most applications to be upgraded to PureScript 0.12. With some usage of editor commands, you should be able to convert any 20K LOC codebase in less than an hour.

Libraries

  • Remove eff, install effect
  • Remove dom and dom-*, use web-dom and such from purescript-web. Use type holes (?whatmethod) to discover new APIs
@justinwoo
justinwoo / .travis.yml
Created May 27, 2018 00:31
install shit
env:
- PATH=$HOME/purescript:$PATH
install:
- TAG=$(wget -q -O - https://github.com/purescript/purescript/releases/latest --server-response --max-redirect 0 2>&1 | sed -n -e 's/.*Location:.*tag\///p')
- wget -O $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/linux64.tar.gz
- tar -xvf $HOME/purescript.tar.gz -C $HOME/
- chmod a+x $HOME/purescript
- npm install -g bower
- npm install
script:
slamdata /
purescript-aff
justinwoo /
purescript-aff-promise
purescript-contrib /
purescript-arraybuffer-types
slamdata /
purescript-avar
justinwoo /
purescript-behaviors
before_script:
- TAG=v0.12.0
- wget -O $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/linux64.tar.gz
- tar -xvf $HOME/purescript.tar.gz -C $HOME/
- chmod a+x $HOME/purescript
- export PATH=$PATH:$HOME/purescript
digraph G {
graph [ fontname=Helvetica, fontsize=24 ];
node [ fontname=Helvetica, fontsize=18];
edge [ fontname=Helvetica, fontsize=16 ];
start [label="Start"]
library_dev [label="I'm developing a library and\nneed to publish to pulp/bower"]
dont_mind_world_being_on_fire [label="I don't mind the world being on fire"]
dont_mind_world_being_on_fire_sure [label="Are you sure?"]
dont_mind_world_being_on_fire_sure_yes [label="Yes"]
[:~/Code/vidtracker] master ± loc
--------------------------------------------------------------------------------
Language Files Lines Blank Comment Code
--------------------------------------------------------------------------------
JSON 3 3505 0 0 3505
PureScript 9 1246 118 3 1125
CSS 1 20 0 0 20
HTML 1 18 1 0 17
JavaScript 3 19 3 0 16
Markdown 1 20 8 0 12
@justinwoo
justinwoo / parse-you-a-thingy-with-imperfect-json-that-you-convert-bad-properties-from.purs
Last active July 5, 2018 20:42
When you have json that you know could be rubbish and just need a concrete parser to change how specific fields are parsed.
module Main where
import Prelude
import Effect (Effect)
import Effect.Console (logShow)
import Data.Either (Either)
import Foreign (ForeignError)
import Data.List.NonEmpty (NonEmptyList)
import Data.Maybe (fromMaybe)
@justinwoo
justinwoo / asdf.hs
Created August 26, 2017 13:43
data kinds + kind signatures because yolo
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
module Main where
import Data.Proxy
import Data.List
data Validity = Validated | NotValidated