- type based auto complete
- semantic highlighting
- let%ppx abc = "def"; syntax highlighting
- autocomplete when backspace
- autocomplete on f(g(~expr=here)) sucks
- let.bind auto complete
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
#!/bin/bash | |
cd /app | |
sudo apt-get -y install nodejs npm m4 | |
curl -o- -L https://yarnpkg.com/install.sh | bash | |
source ~/.bashrc | |
export OPAMYES=true | |
opam switch create 4.06.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
FROM archlinux | |
ENV OPAMYES=true | |
RUN pacman -Sy --noconfirm base-devel awk m4 git unzip perl wget nodejs npm yarn | |
RUN curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh | sh | |
RUN useradd -m updatebs | |
USER updatebs |
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
/* | |
your obj pointer came in the first position of the stack | |
so you will load it on a register | |
*/ | |
movl (%esp), %eax ; | |
/* | |
then you want to do obj.a += 6, if we suppose | |
that we're talking about records not dictionaries |
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 sharp from 'sharp'; | |
import fs from 'fs-extra'; | |
import _ from 'lodash/fp'; | |
const parseImage = (path: string) => | |
Promise.all([ | |
sharp(path).metadata(), | |
sharp(path) | |
.grayscale() | |
.raw() |
- remove
caml_exn_Division_by_zero
when it cannot happen, likea / (a * a)
- perhaps generalize it to knowing that a number is positive not operating on it
- do simple math inside of big functions
- try to optimize x |> map() |> map()
- search
module String
on https://ocaml.janestreet.com/ocaml-core/latest/doc/base/Base/ - check to see if it inlines
| x when is(x)
andis
is another pattern matching - typechecker should try to ensure value when dealing with records, there is no need to open a module for that
- remove inner closures without any reference
let.some (_, _, name, received_value_type, index) =List.nth_opt(variable_table, table_index);
no warning even if not used on index
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
/* | |
features: | |
- auto currying | |
- closures | |
- recursion | |
- basic branching | |
- ffi with JS | |
missing: | |
- tail call recursion |
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
#! /bin/sh | |
## Requirements | |
## - esy | |
## - brew install nodejs | |
## - brew install coreutils | |
## Full Xcode installed | |
## look for /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk | |
git clone https://github.com/EduardoRFS/reason-mobile.git |