Skip to content

Instantly share code, notes, and snippets.

Avatar
🛠️
ars longa vita brevis

Leandro Ostera ostera

🛠️
ars longa vita brevis
View GitHub Profile
View app.jsx
import React, { useState, useCallback, useMemo} from 'react';
import ReactFlow, {
ReactFlowProvider,
useNodesState,
useEdgesState,
addEdge,
useReactFlow,
Handle, Position,
} from 'react-flow-renderer';
View ConcurrentQueue.ts
type QueueOpts = {
maxConcurrency: Number;
};
type Task<R> = () => Promise<R>;
class ConcurrentQueue<R> {
opts: QueueOpts = {
maxConcurrency: 1
};
View echo.ml
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)
View Build.toml
[[erlang_library]]
name = "lib"
deps = [ "//a:lib" ]
[[erlang_application]]
name = "b_app"
config = "b.app.src"
deps = [ ":lib" ]
[[otp_release]]
View erlang.rs
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};
View erlang_library.rs
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,
View camlasmf24ff5.s
.file ""
.section .rodata.cst8,"a",@progbits
.align 16
caml_negf_mask:
.quad 0x8000000000000000
.quad 0
.align 16
caml_absf_mask:
.quad 0x7fffffffffffffff
.quad -1
View lib.rs
use anyhow::{anyhow, Context, Error};
use std::fmt;
mod ffi;
#[derive(Clone, Debug)]
pub enum Sexp {
Atom(String),
List(Vec<Sexp>),
Nil,
View lib.rs
use anyhow::{anyhow, Context, Error};
use std::fmt;
mod ffi;
#[derive(Clone, Debug)]
pub enum Sexp {
Atom(String),
List(Vec<Sexp>),
Nil,
View lib.rs
use anyhow::{anyhow, Context, Error};
use std::fmt;
mod ffi;
#[derive(Clone, Debug)]
pub enum Sexp {
Atom(String),
List(Vec<Sexp>),
Nil,