Skip to content

Instantly share code, notes, and snippets.

View include-yy's full-sized avatar
😋
打 个🦶 先

YI YUE include-yy

😋
打 个🦶 先
View GitHub Profile
@include-yy
include-yy / README.md
Last active February 22, 2022 09:43
A stream implemented with elisp

SICP 流计算的一个实现

yystream-nullp 判断 stream 是否为空

yystream-car 取得 car 部分

yystream-cdr 取得 cdr 部分

yystream-cons 构建 stream 序对

@include-yy
include-yy / README.md
Last active February 22, 2022 09:43
Rubik's Cube 2*2

使用 elisp 解魔方

运行方法:

加载好所有函数和变量后

M-: (run)

@include-yy
include-yy / README.md
Last active February 22, 2022 09:44
th11_reimu_a_extra

东方地灵殿 梦A ex 通关 replay

使用方法:

  • 通过命令 base64 将文本格式转换为 replay 格式文件,即

base64 -d th11_07.rpyb64 > th11_07.rpy

(建议直接下载压缩包,如果直接复制文本内容的话,请注意使用 LF 作为换行符)

@include-yy
include-yy / README.md
Last active January 13, 2024 10:31
simple hashtable implemented in elisp

yyhash -- yy's hashtable implemented in emcas-lisp

  • yyhash-make &optional size ,创建一个哈希表,可以通过 size 指定初始大小

  • yyhash-p obj ,判断对象是否为哈希表

  • yyhash-count obj ,获取哈希表中键值对个数

  • yyhash-size obj ,获取哈希表大小

@include-yy
include-yy / README.md
Last active September 2, 2023 10:57
simple Common Lisp gv feature

setf 的一个实现

  • yy-ref-table 获取哈希表中的值

  • yy-set-table 设置哈希表键值对

  • yy-clr-hash 清空哈希表

  • yy-dse define-setf-expander

@include-yy
include-yy / README.md
Last active October 7, 2022 02:46
brainfuck implemented in elisp

yybf —— brainfuck implemented in elisp

  • yybf1.el 纯解释实现
  • ☉-execute 接受 brainfuck 代码字符串并执行
@include-yy
include-yy / README.md
Last active November 20, 2022 05:26
test Rescript uncurry and array unsafe operation

对计算函数的反柯里化测试

  • c 后缀表示去柯里化
  • unsafe 后缀表示使用了无检查的数组操作
  • add 后缀表示直接进行加法,不使用加法函数
  • s 后缀表示带副作用操作
  • n 后缀表示创建新的结果向量,不使用默认提供的结果向量
@include-yy
include-yy / README.md
Last active September 2, 2023 10:57
ray tracing in one weekend implemented in ReScript
@include-yy
include-yy / README.md
Last active September 2, 2023 10:57
soft serial port implemented in python

使用 Python 实现的软串口

该程序实现的功能是:两个线程通过 UART 串口协议进行通信,发送比特的时间间隔为 1s,虚拟时钟为 4hz。线程在收到数字后加 1 重新发送,直到接收的数字大于 3 为止。

直接使用 Python 运行即可:

python port.py
@include-yy
include-yy / Readme.md
Created February 5, 2023 07:13
simple org html export config

对 ox-html 的一些 advice

记得打开 org-html-prefer-user-labels