Skip to content

Instantly share code, notes, and snippets.

View q66's full-sized avatar
💭
🐱

q66 q66

💭
🐱
View GitHub Profile

RISC-V Linux kernel build performance (defconfig, 5.19.11)

software:

  • qemu 7.0 (for both system and user)
  • rvvm git (https://github.com/LekKit/RVVM)
  • ubuntu 22.04 (all hosts, all guests), default kernel (hosts), 5.19.11 (guests)
  • default compiler (gcc, riscv64-linux-gnu cross or native)

hardware:

-- generates a string to be used as weechat.color.chat_nick_colors value
-- when using 256 color terminals; includes all hues, skips #000000 (16)
--
-- arguments: <min_saturation>:<max_saturation> <min_value>:<max_value>
-- as in HSV, the 4 values are between 0 and 1
-- enable if you want grayscale (232-255) to be included
local include_gray = false
-- base weechat nick colors (maps to 0-15)
local base_colors = "cyan,magenta,green,brown,lightblue,default,"
@q66
q66 / gist:7170288
Last active December 26, 2015 15:09
lisp interpreter in vortex 2.0
let globs = {
["set" ] = |l, e| globs[l[1]] = l[2],
["cdr" ] = |l, e| rest(l[1]),
["car" ] = |l, e| first(l[1]),
["quote"] = |l, e| l[1],
["cond" ] = |l, e| if let el = firstcond(l[1], |el| eval(el[1], e))
then eval(el[2], e)
["+" ] = |l, e| l[1] + l[2],
["-" ] = |l, e| l[1] - l[2],
["*" ] = |l, e| l[1] * l[2],
@q66
q66 / octa2048.lua
Last active August 29, 2015 13:58
Implementation of 2048 with OctaForge UI.
local genblock = |val, color, tcolor| || gui.Color_Filler {
color = color, min_w = 0.18, min_h = 0.18,
gui.Label {
text = tostring(val), scale = 3.5, color = tcolor
}
}
local blocktypes = {
[0] = || gui.Color_Filler {
color = 0xccc0b3, min_w = 0.18, min_h = 0.18