This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provide { | |
day-02 : day-02 | |
} | |
end | |
include my-gdrive("aoc19-02-input.arr") | |
include string-dict | |
data Opcode: | |
| add |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace NSMain; | |
function fuel(mass: Int) : Int | |
requires mass > 0; | |
{ | |
return (mass / 3) - 2; | |
} | |
entrypoint function main(): [Int, Int] { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Table length: 63 | |
Number of parses: 16 | |
Parse Charts | |
Chart: 0 | |
0: {SOMMAS → ● "[" SHORT_ABSTR "," RETHORICAL_TYPOLOGY "," EXTABST "]"}, from: 0 | |
Chart: 1 | |
0: {SOMMAS → "[" ● SHORT_ABSTR "," RETHORICAL_TYPOLOGY "," EXTABST "]"}, from: 0 | |
1: {SHORT_ABSTR → ● SHORT_ABSTR$string$1 SENTENCE_LIST ")"}, from: 1 | |
2: {SHORT_ABSTR$string$1 → ● "s" "h" "o" "r" "t" "_" "a" "b" "s" "t" "r" "("}, from: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Match the results of sommas clause | |
@builtin "number.ne" # `int`, `decimal`, and `percentage` number primitives | |
@{% | |
var sommasObject = function (a,b,c) { | |
return function (d) { | |
return {"short_abstr": d[a], "rethorical_typology": d[b], "extabst": d[c]}; | |
}; | |
}; | |
var appendItem = function (a, b) { return function (d) { return d[a].concat(d[b]); } }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- sortedtree.hs | |
-- Jeremy.Singer@glasgow.ac.uk | |
-- Example code for #FLhaskell course | |
-- Nodes contain integers, Leaves are empty | |
data Tree | |
= Leaf | |
| Node Int | |
Tree | |
Tree | |
deriving (Show) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System.Random | |
{- | |
A little more generic version of the Bulls and Cows | |
guessing game. | |
To reproduce the original game simply call: | |
bullandcows 4 "123456789" | |
For a detailed description of the game look at: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System.Random | |
wordlist = ["awkward","bagpipes","banjo","bungler","croquet","crypt", | |
"dwarves","fervid","fishhook","fjord","gazebo","gypsy", | |
"haiku","haphazard","hyphen","ivory","jazzy","jiffy", | |
"jinx","jukebox","kayak","kiosk","klutz","memento", | |
"mystify","numbskull","ostracize","oxygen","pajama", | |
"phlegm","pixel","polka","quad","quip","rhythmic","rogue", | |
"sphinx","squawk","swivel","toady","twelfth","unzip","waxy", | |
"wildebeest","yacht","zealous","zigzag","zippy","zombie"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
× | |
TypeError: xs is undefined | |
make/newrecord[9] | |
src/game.re:176 | |
173 | var newrecord = component.slice(); | |
174 | newrecord[/* render */9] = (function (self) { | |
175 | var history = self[/* state */3][/* history */0]; | |
> 176 | var current = Caml_array.caml_array_get(history, self[/* state */3][/* stepNumber */2]); | |
177 | var winner = calculateWinner(current); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let component = ReasonReact.statefulComponent "CommentConfirmation"; | |
type state = {showConfirm: bool}; | |
let make ::onConfirm children => { | |
let toggleConfirmMessage _event {ReasonReact.state: state} => | |
ReasonReact.Update {showConfirm: not state.showConfirm}; | |
let confirmAction _event _self => { | |
onConfirm; | |
ReasonReact.Update {showConfirm: false} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 info it worked if it ends with ok | |
1 verbose cli [ '/usr/bin/nodejs', | |
1 verbose cli '/usr/bin/npm', | |
1 verbose cli 'install', | |
1 verbose cli '-g', | |
1 verbose cli 'https://github.com/reasonml/reason-cli/archive/beta-v-1.13.6-bin-linux.tar.gz' ] | |
2 info using npm@3.10.10 | |
3 info using node@v6.11.2 | |
4 silly loadCurrentTree Starting | |
5 silly install loadCurrentTree |
NewerOlder