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 layoutViews = () => { | |
let t = Js.Date.now() | |
// Initialize the views and get the tallest narrative headline | |
// @Todo this could just go over narratives instead of all snips... | |
let tallestNarrativeHeadline = ref(0.) | |
let m: ref<Belt.Map.Int.t<timelineElementViewT>> = ref(Belt.Map.Int.empty) | |
for i in 0 to state.narrativeHeadlineViews->Array.length - 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
@bs.val external prod: bool = "process.env.PROD" | |
// Effectful imports | |
%raw("require('firebase/auth')") | |
%raw("require('firebase/functions')") | |
%raw("require('firebase/firestore')") | |
type userT = { | |
displayName: string, | |
email: 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
let bodyView = document.body; | |
bodyView.style.position = "absolute"; | |
let rect = bodyView.getBoundingClientRect(); | |
bodyView.style.width = "100%"; | |
bodyView.style.height = "100%"; | |
let body = { | |
pos: { | |
x: 40, |
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
{"lastUpload":"2020-01-15T07:27:39.390Z","extensionVersion":"v3.4.3"} |
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
// Bug 1 | |
// Typescript only looks at the fields and methods to type check, not the constructors. | |
// Root cause: structural typing | |
class Animal { | |
feet: number; | |
constructor(name: string, numFeet: number) { } | |
} | |
class Size { | |
feet: number; |
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
bla |
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
cur__root=/Users/benjamin/Desktop/tmp/example2 | |
esy_build__build_type=out-of-source | |
cur__toplevel=/Users/benjamin/Desktop/tmp/example2/node_modules/.cache/_esy/store/s/bsb_native_example-0.0.0-5f5bb9b0/toplevel | |
SHELL=env -i /bin/bash --norc --noprofile | |
cur__target_dir=/Users/benjamin/Desktop/tmp/example2/node_modules/.cache/_esy/store/b/bsb_native_example-0.0.0-5f5bb9b0 | |
esy_build__source_root=/Users/benjamin/Desktop/tmp/example2 | |
cur__depends= | |
esy_build__source_type=root | |
esy_build__install_command= | |
OCAMLPATH= |
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
value _11_SDL_SetHint(value x36, value x35) | |
{ | |
char* x37 = CTYPES_ADDR_OF_FATPTR(x36); | |
char* x38 = CTYPES_ADDR_OF_FATPTR(x35); | |
int x39 = SDL_SetHint(x37, x38); | |
return Val_long(x39); | |
} |
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
/* Template for proposals to update the syntax. | |
This lists all cases of function definition, function type definition and function application. | |
Full credit to Jordan Walke, I copied the list from https://gist.github.com/jordwalke/6935739b74eb9b8496670cc7860f5acf and | |
only minorly tweaked it. */ | |
let a = 10; | |
let b = 20; | |
/* A */ | |
let nonNamed a b => a + 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
/* The only whitespace sensitivity here is between the first colon and the named argument | |
let a c :b => c | |
VS | |
let a c : b => c | |
The former is a function that takes 2 arguments where the 2nd one is a named argument, and it returns `c` of open type. | |
The latter one is a function that takes one argument and that returns `c` of type `b` | |
*/ | |
let a = 10; | |
let b = 20; |
NewerOlder