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
Purtroppo la bizzarra gestione delle porte USB su Raspberry Pi Zero (ora sono tipo micro e una sola di fatto), che obbliga all'acquisto | |
di una scheda di espansione con le porte USB "normali", lo hanno reso di fatto poco interessante. | |
Il collegamento via Bluetooth lo sconsiglio: costo dei controller, possibili latenze, e non dimentichiamo che è sempre roba che | |
va messa in mano a dei bambini (pile, sportellini, ecc.). | |
Si deve giocoforza ripiegare sul più caro Pi 3 Model B che costa circa 20€ in più. :( | |
Su Amazon il Kit completo più economico (e che straconviene) include: | |
1. Raspberry Pi 3 Model 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
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} |
NewerOlder