- Lavoreremo su un'unico progetto? - Assolutamente no, il numero e il tipo di progetti non sono decisi da nessuno a priori.
- Come si decidono i progetti su cui si lavorerà nel corso della giornata? - All'inizio della giornata chi vuole ha a disposizione 3 minuti di tempo per presentare una propria idea/progetto sul quale lavorare durante la giornata. Alla fine delle presentazioni si fanno i gruppi, ognuno può decidere di aggregarsi ad un progetto presentato oppure lavorare singolarmente su un proprio progetto, non è obbligatorio lavorare in coppia/gruppo anche se farlo è decisamente più divertente che farlo da soli.
- Chi propone di lavorare su un progetto deve essere un'esperto della materia? - Non obbligatoriamente, è lecito chiedere aiuto per una cosa che ci piacerebbe realizzare ma per la quale non abbiamo le competenze necessarie, vi chiedo solo di esplicitarlo quando fate la proposta in modo che le persone ne siano consapevoli.
- Dobbiamo portare il nostro portatile? - Noi no
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
type Tuple<X, Y> = [X, Y] | |
type Equal<X, Y> = | |
(<T>() => T extends X ? 1 : 2) extends | |
(<T>() => T extends Y ? 1 : 2) ? Tuple<true, Y> : Tuple<false, Y> | |
type Assert<T extends Tuple<true, any>> = T[1]; | |
type AppendToAll<X, A extends Array<Array<any>>, R extends Array<any> = []> = | |
A extends [] | |
? R | |
: A extends [infer H extends Array<any>, ...infer T extends Array<Array<any>>] |
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
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ( | |
k: infer I | |
) => void | |
? I | |
: never; | |
type UnionToOvlds<U> = UnionToIntersection< | |
U extends any ? (f: U) => void : never | |
>; |
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
const combineN = <T,>(n: number, xs: T[]): T[][] => { | |
if (n > xs.length) return []; | |
if (n == 1) return xs.map(x => [x]); | |
const [h, ...t] = xs; | |
return [ | |
...combineN(n - 1, t).map(ts => [h, ...ts]), | |
...combineN(n, t) | |
]; | |
} |
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
type Tuple<X, Y> = [X, Y] | |
type Equal<X, Y> = | |
(<T>() => T extends X ? 1 : 2) extends | |
(<T>() => T extends Y ? 1 : 2) ? Tuple<true, Y> : Tuple<false, Y> | |
type Assert<T extends Tuple<true, any>> = T[1];// | |
// P = collecting param names | |
// N = current param name | |
// I = true if we are collecting a name | |
type RouteParameters<R extends string, P extends string = never, N extends string = "", I extends boolean = 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
type CompanyName = "dallbogg" | "wakam" | |
type ActionNames = ["Quote", "Save", "Emit"] | |
type ActionName = ActionNames[number] | |
type Tuple<X, Y> = [X, Y]; | |
type CompatibleWith<X, Y> = X extends Y ? Tuple<X, true> : Tuple<X, false>; | |
type Equals<X, Y> = [X] extends [Y] ? [Y] extends [X] ? Tuple<Y, true> : Tuple<Y, false> : Tuple<Y, 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
type Tuple<X, Y> = [X, Y]; | |
type CompatibleWith<X, Y> = X extends Y ? Tuple<X, true> : Tuple<X, false>; | |
type Equals<X, Y> = [X] extends [Y] ? [Y] extends [X] ? Tuple<Y, true> : Tuple<Y, false> : Tuple<Y, false> | |
type Assert<X extends Tuple<any, true>> = X extends Tuple<infer Y, true> ? Y : never; | |
const assertUnreacheable = (x: never): never => { throw new Error() }; |
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
module Parser.Combinators where | |
import Test.Hspec | |
import Data.Either | |
import Data.Char | |
import Control.Applicative | |
import Data.Foldable | |
newtype Parser a = Parser (String -> (Either String a, String)) |
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 Debug.Trace (trace) | |
-- Try to implement and use a `putString` function without the RW and | |
-- see the behaviour of calling it and calling it multiple times | |
-- type RW = RW | |
type RW = Integer | |
type MIO a = (RW -> (a, RW)) |
NewerOlder