Skip to content

Instantly share code, notes, and snippets.

View jangko's full-sized avatar

andri lim jangko

  • pontianak, indonesia
View GitHub Profile
@jangko
jangko / readme.md
Last active June 26, 2021 00:39
websock logo

Websock Logo

Websocket for Nim

This is an implementation of Websocket protocol for Nim.

@jangko
jangko / AsyncFD_stat.md
Last active October 12, 2019 01:38
New Mem Stat
typeKind typeName file line allocSize allocFreq avg size deallocSize deallocFreq unfreed
tySequence KeyValuePairSeq[fd.AsyncFD] lib\system\gc.nim 0 8_387_792 13 645_214 4_193_472 12 4_194_320
tyString nil lib\system\strmantle.nim 0 107_800 2_200 49 107_653 2_197 147
tyString nil fd.nim 0 70_500 2_300 30 70_360 2_296 140
tyRef PDispatcher fd.nim 0 16 1 16 0 0 16
@jangko
jangko / bc_stat.md
Last active October 7, 2019 15:23
Memory stat

Blockchain Test

typeKind typeName file line size alloc freq avg size
tySequence seq[Hash512] lib\system\mmdisp.nim 565 64_674_995_760 3_855 16_776_912
tySequence seq[byte] lib\system\gc.nim 484 10_059_505_036 6_384_320 1_575
tySequence seq[byte] lib\system\mmdisp.nim 565 5_249_628_843 5_527_921 949
tyString nil nimcrypto-0.3.9\nimcrypto\utils.nim 186 4_533_103_861 8_587_349 527
tySequence KeyValuePairSeq[asyncdispatch.AsyncFD] lib\system\gc.nim 484 1_272_020_832 635_278 2_002
tyRef BaseComputation nimbus\vm\computation.nim 21 354_494_880 82_059 4_320
version: '{build}'
cache:
- x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z
matrix:
fast_finish: true
environment:
matrix:
@jangko
jangko / Sample1.java
Last active April 12, 2020 19:17
JNI Example
public class Sample1
{
public native int intMethod(int n);
public native boolean booleanMethod(boolean bool);
public native String stringMethod(String text);
public native int intArrayMethod(int[] intArray);
public static void main(String[] args)
{
System.loadLibrary("Sample1");
@jangko
jangko / beer.cpp
Created October 23, 2015 14:40
example from cassowary-js
#include "kiwi/kiwi.h"
#include <ostream>
int main() {
kiwi::Variable ale = kiwi::Variable("ale");
kiwi::Variable beer = kiwi::Variable("beer");
kiwi::Variable profit = kiwi::Variable("profit");
kiwi::Variable corn = kiwi::Variable("corn");
kiwi::Variable hops = kiwi::Variable("hops");
kiwi::Variable malt = kiwi::Variable("malt");
import msgpack, streams
type
anyType = enum
msgMap, msgArray, msgString, msgBool,
msgBin, msgExt, msgFloat32, msgFloat64,
msgInt, msgUint, msgNull
msgPair = tuple[key, val: msgAny]