Skip to content

Instantly share code, notes, and snippets.

View vizanto's full-sized avatar

Danny Wilson vizanto

View GitHub Profile

Nx Plugin Policy Refactor Plan

Backstory

CI unit-test stress runs started hanging after test output appeared complete. The first visible symptom looked like lmao:test had finished all tests and then stalled before Nx printed a completion footer. We added targeted cleanup and process diagnostics, switched stress output to streaming, and sampled live processes during GitHub Actions runs.

The process sampler eventually showed that the live process was not LMAO cleanup. It was packages/cli running bun test, with nested fixture subprocesses under that test process. Streaming logs identified a concrete timed-out CLI

(def multi-transfer-invariant
'[$balance-sums
[:find [(sum ?balance-before) :as sum-before
(sum ?balance-after) :as sum-after
(sum ?balance-change) :as sum-of-change]
:with ?affected-entity
:in $before $after $txn
:where
;; Unify data from databases and transactions with affected-entity
[$after ?affected-entity :account/balance ?balance-after]
package;
using SizeOf;
import io.Bytes;
import haxe.macro.Context;
import haxe.macro.Expr;
import haxe.macro.TypeTools;
#if !macro @:genericBuild(InlineArrayBuilder.build()) #end
class InlineArray<T> extends ReadOnlyBufferSlice {
}
-server
-Xms12G
-Xmx12G
-XX:+UnlockExperimentalVMOptions
-XX:+UnlockDiagnosticVMOptions
-XX:+PrintClassHistogram
-XX:+UseG1GC
-XX:G1HeapRegionSize=16M
@vizanto
vizanto / hardware-configuration.nix
Created February 27, 2018 12:03
NixOS 17.03 on SmartOS LX-branded Zone
{ config, lib, pkgs, ... }: with lib;
{
### SmartOS Linux Branded Zone specific configuration
boot.isContainer = true;
boot.loader.initScript.enable = true;
networking.useDHCP = false;
networking.firewall.enable = false;
services.nscd.enable = true;# false;
@vizanto
vizanto / Macro.hx
Last active September 21, 2017 15:53
This example shows a way to provide field name and types (without the need to fully qualify types) by abusing the Haxe type checking syntax as argument to a build macro.
import haxe.macro.Expr;
import haxe.macro.ExprTools;
import haxe.macro.Context;
class Macro {
static macro function addField (nameAndType : Expr) : Array<Field> {
var fieldName;
var ct;
switch nameAndType.expr {
@vizanto
vizanto / Main.hx
Last active September 18, 2017 18:51
WIP: Clojure frontend for Haxe
package hxclj;
import hxclj.edn.Parser;
import byte.ByteData;
class Main {
static function main() {
var expr = "^:yo clojure.core// (.lol wut) .1 (+ 0N 0.1M 0xdeadbeef 1 2 ~a ~@aas)";
// trace("Parse ", expr);
var input = sys.io.File.getBytes("test.clj");
var parser = new Parser(@:privateAccess new ByteData(input), "test.clj");
#!/usr/bin/env python3
import os
import re
import requests
from autologin import AutoLogin
from configparser import SafeConfigParser
from glob import glob
# Helper definitions
@vizanto
vizanto / hardware-configuration.nix
Created March 19, 2016 14:28
NixOS 16 on LX brand
{ config, lib, pkgs, ... }:
{
imports = [ ];
### SmartOS Linux Branded Zone specific configuration
nix.extraOptions = ''
build-users-group =
'';

Keybase proof

I hereby claim:

  • I am vizanto on github.
  • I am vizanto (https://keybase.io/vizanto) on keybase.
  • I have a public key ASALosUXuO-ugRRf0YeRfru1XuZ_JEwfq-NDnDc0rt9P-Qo

To claim this, I am signing this object: