Skip to content

Instantly share code, notes, and snippets.

View kanru's full-sized avatar

Kan-Ru Chen kanru

View GitHub Profile
@kanru
kanru / keybase.md
Created August 6, 2019 09:13
keybase.md

Keybase proof

I hereby claim:

  • I am kanru on github.
  • I am kanru (https://keybase.io/kanru) on keybase.
  • I have a public key ASC8lM-7nJh8v_zvLmfr8B55WoRlrBExeELA87EI5TPSvAo

To claim this, I am signing this object:

@kanru
kanru / round_robin_dispatcher.rs
Created March 14, 2021 14:59
Bastion example
use bastion::prelude::*;
use futures_timer::Delay;
use std::sync::Arc;
use std::time::Duration;
use tracing::Level;
///
/// Prologue:
/// This example demonstrate a idiomatic way to implement the round robin
/// algorithm with bastion. We will use two groups of children, one will be
@kanru
kanru / sicxeasm.pl
Created October 29, 2022 07:45
SIC/XE Assembler
#!/usr/bin/env perl
# Copyright (c) 2005 Kanru Chen
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
@kanru
kanru / suffix.n
Created October 29, 2022 07:47
Suffix Tree
/*
* Copyright (c) 2005 Kanru Chen
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*