Convert a value to an optional something:
let some_message = Option.some "goodbye";;
Suppose you have some data:
Tutorial/cheat sheat for running/compiling OCaml.
| module Token = struct | |
| type t = | |
| | L_array_bracket | |
| | R_array_bracket | |
| | L_object_bracket | |
| | R_object_bracket | |
| | Colon | |
| | Comma |
Useful tutorials:
Show the dynamically linked libraries:
| (*********************************************************) | |
| (** Simple functor example. *) | |
| (** A simple signature. *) | |
| module type X = sig | |
| val x : int | |
| end | |
| (** Here's a fuctor. | |
| * It takes an input: [M], which is an implementation |
To run the examples below, open baptop, then:
open Bap.Std;;
| (** | |
| MAKEFILE: | |
| plugin = primus_evaluator_example | |
| all: clean build install | |
| build: | |
| bapbuild -pkg bap-primus -tags 'warn(A)' $(plugin).plugin |
Some quick tips for using QEMU from the command line (on macOS, but should work on Linux too).
Download an OS ISO, e.g., the netinstall Debian 9.7 ISO:
wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-9.7.0-amd64-netinst.iso
| (* | |
| plugin = primus_set_register_example | |
| all: clean build install | |
| build: | |
| bapbuild -pkg bap-primus -tags 'warn(A)' $(plugin).plugin | |
| install: |
| (* | |
| MAKEFILE: | |
| plugin = primus_set_regs | |
| all: clean build install | |
| build: | |
| bapbuild -pkg bap-primus -tags 'warn(A)' $(plugin).plugin |