Skip to content

Instantly share code, notes, and snippets.

Francesco Stiffoni fstiffo

Block or report user

Report or block fstiffo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View day01.bsq
namespace NSMain;
function fuel(mass: Int) : Int
requires mass > 0;
{
return (mass / 3) - 2;
}
entrypoint function main(): [Int, Int] {
View prova.md

Ciao questa è una prova. Per fare un link vai a questo link

  • ciao
  • pippo
  • mamma mamma ciao

Sezione 1

Sezione 2

vAs Kanye West said:

@fstiffo
fstiffo / parsed.txt
Created Mar 10, 2018
Sommas result of parsing
View parsed.txt
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
View sommas.ne
#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]); } };
@fstiffo
fstiffo / sortedtree.hs
Created Oct 6, 2017
Solution for #FLhaskell course 3.9
View sortedtree.hs
-- 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)
View bullsandcows.hs
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:
View starman.hs
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"]
View Runtime errors.txt
×
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);
@fstiffo
fstiffo / commentConfirmation.re
Created Aug 23, 2017
Reason React first component try
View commentConfirmation.re
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}
@fstiffo
fstiffo / npm-debug.log
Created Aug 21, 2017
Error after installing reson-cli binaires
View npm-debug.log
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
You can’t perform that action at this time.