Skip to content

Instantly share code, notes, and snippets.

Make Cirru great again!

Jon jiyinyiyong

Make Cirru great again!
View GitHub Profile
View chart.js
$.get(ROOT_PATH + '/data/asset/geo/HK.json', function (geoJson) {
echarts.registerMap('HK', geoJson);
myChart.setOption(option = {
title: {
jiyinyiyong / deque.nim
Last active Oct 14, 2020
Compare deque add(at tail) and delete(at head) performance with seq and linkedlist
View deque.nim
import nimprof
import times
import lists
import deques
let n = 40000
proc loopDeque(): void =
var data: Deque[int]
jiyinyiyong / output.text
Created Oct 12, 2020
Time consumption of calcit-runner running a tiny script
View output.text
=>> cat tests/snapshots/add.cirru
{} (:package |app)
:configs $ {} (:init-fn |app.main/main!) (:reload-fn |app.main/reload!)
:files $ {}
|app.main $ {}
:ns $ quote
ns app.main $ :require
:defs $ {}
|main! $ quote
jiyinyiyong / mini_list.nim
Created Oct 10, 2020
Simpler list to try...
View mini_list.nim
MiniList*[T] = ref object
value*: T
next*: MiniList[T]
proc initMiniList*[T](xs: varargs[T]): MiniList[T] =
if xs.len == 0:
return nil
jiyinyiyong / calcit.core.cirru
Created Sep 22, 2020
Drafted core abstractions in calcit-runner
View calcit.core.cirru
defn reduce-to-false (test prev xs)
if (empty? xs) true
if (test prev (first xs))
reduce-exit test (first xs) (rest xs)
, false
defn reduce-find (test xs)
if (empty? xs) nil
if (test (first xs)) (first xs)
View cond-impl.clj
(defmacro cond2
[& clauses]
(when clauses
(list 'if (first clauses)
(if (next clauses)
(second clauses)
(throw (IllegalArgumentException.
"cond requires an even number of forms")))
(cons 'user/cond2 (next (next clauses))))))
jiyinyiyong /
Last active Sep 24, 2020
Possible names of new projects
  • cassia 肉桂
  • kalmia 山月桂
  • minla 火尾希鹛
jiyinyiyong /
Created Apr 19, 2020
Links to my old sharings
jiyinyiyong / 九章.cirru
Last active Dec 22, 2019
View 九章.cirru
今有 三十三
今有 二十
今有 $
答曰 |丙为
术曰 问相加几何 ( )
You can’t perform that action at this time.