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 sample_fun () = | |
Format.printf "creating fragmented data\r\n%!"; | |
let make_data () = | |
let smol_array = Array.make 1000 "" in | |
let big_array = Array.make 1000 "" in | |
for i = 0 to 999 do | |
if i mod 2 = 0 then smol_array.(i) <- String.make 1 'h' | |
else big_array.(i) <- String.make 500_000 'x' | |
done; | |
smol_array |
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 React, { useState, useCallback, useMemo} from 'react'; | |
import ReactFlow, { | |
ReactFlowProvider, | |
useNodesState, | |
useEdgesState, | |
addEdge, | |
useReactFlow, | |
Handle, Position, | |
} from 'react-flow-renderer'; |
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 QueueOpts = { | |
maxConcurrency: Number; | |
}; | |
type Task<R> = () => Promise<R>; | |
class ConcurrentQueue<R> { | |
opts: QueueOpts = { | |
maxConcurrency: 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
open Cmdliner | |
(* our echo function just prints stuff out *) | |
let echo x = print_string x | |
(* this is our argument *) | |
let msg = Arg.(value & pos 0 string "" & info []) | |
(* this is our program *) | |
let echo_t = Term.(const echo $ msg) |
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
[[erlang_library]] | |
name = "lib" | |
deps = [ "//a:lib" ] | |
[[erlang_application]] | |
name = "b_app" | |
config = "b.app.src" | |
deps = [ ":lib" ] | |
[[otp_release]] |
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
use super::archive::Archive; | |
use super::IntoToolchainBuilder; | |
use super::ToolchainBuilder; | |
use anyhow::{anyhow, Context}; | |
use log::debug; | |
use std::collections::HashMap; | |
use std::collections::HashSet; | |
use std::io::{BufRead, BufReader, Write}; | |
use std::path::PathBuf; | |
use std::process::{Command, Stdio}; |
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
use anyhow::*; | |
use std::collections::HashMap; | |
use std::collections::HashSet; | |
use std::path::PathBuf; | |
use zap_core::{Action, Artifact, ComputedTarget, Label, Rule, Target, ToolchainManager}; | |
use zap_toolchains::ErlangToolchain; | |
#[derive(Debug, Clone)] | |
pub struct ErlangLibrary { | |
label: Label, |
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
.file "" | |
.section .rodata.cst8,"a",@progbits | |
.align 16 | |
caml_negf_mask: | |
.quad 0x8000000000000000 | |
.quad 0 | |
.align 16 | |
caml_absf_mask: | |
.quad 0x7fffffffffffffff | |
.quad -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
use anyhow::{anyhow, Context, Error}; | |
use std::fmt; | |
mod ffi; | |
#[derive(Clone, Debug)] | |
pub enum Sexp { | |
Atom(String), | |
List(Vec<Sexp>), | |
Nil, |
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
use anyhow::{anyhow, Context, Error}; | |
use std::fmt; | |
mod ffi; | |
#[derive(Clone, Debug)] | |
pub enum Sexp { | |
Atom(String), | |
List(Vec<Sexp>), | |
Nil, |
NewerOlder