Compare commits

..

5 Commits

Author SHA1 Message Date
Yue-bin
5efb845143 在途的luna
Some checks failed
Build and Check / Astro Check for Node.js 20 (push) Successful in 3m6s
Build and Check / Astro Build for Node.js 20 (push) Successful in 4m36s
Build and Check / deploy (push) Failing after 9s
2026-06-23 00:52:31 +08:00
Yue-bin
b7b6e76fc1 在途的infnoise 2026-06-23 00:52:31 +08:00
Yue-bin
597f7af985 test 2026-06-23 00:52:31 +08:00
Yue-bin
31ae053ab3 补充 2026-06-23 00:52:31 +08:00
Yue-bin
dd19dd503a lunash之死 2026-06-23 00:52:31 +08:00
4 changed files with 111 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
---
title: '复刻infnoise'
published: 2026-06-22
description: '硬件真随机数发生器!'
tags: ['工具', '熵']
category: '小工具'
draft: true
lang: ''
---
## 缘起
是这样,我最近

View File

@@ -11,3 +11,12 @@ lang: ''
我真的很喜欢她 我真的很喜欢她
真的真的 真的真的
```mermaid
graph LR
x --> v2["x × y"]
y --> v2
x --> v3["sin(x)"]
v3 --> v4["x × y + sin(x)"]
v2 --> v4
```

13
src/content/posts/luna.md Normal file
View File

@@ -0,0 +1,13 @@
---
title: '用lua写随机数服务'
published: 2026-06-22
description: '本质暴露本地设备到网络'
tags: ['工具', 'luna', '熵']
category: '小工具'
draft: true
lang: ''
---
## 缘起
是这样,我最近

View File

@@ -0,0 +1,76 @@
---
title: 'luna shell之死'
published: 2026-06-22
description: '堂堂完结!'
tags: ['工具', 'lunash', 'shell']
category: '小工具'
draft: false
lang: ''
---
## why not lua-shell
显而易见的,`lua`作为shell还是太繁琐了但是这其实不是重点重点在于
*wow fiiiiiish*
gosh, why not [fish](https://fishshell.com/)!
他妈的关键字几乎是一样的!哪来的孪生姐妹!
``` fish
if test $n -eq 1
echo "one"
else if test $n -eq 2
echo "two"
else
echo "many"
end
while test $i -lt 3
echo $i
set i (math $i + 1)
end
for f in *.txt
echo "Processing $f"
if string match -q "skip*" $f
break
end
end
```
``` lua
if n == 1 then
print("one")
elseif n == 2 then
print("two")
else
print("many")
end
while i < 3 do
print(i)
i = i + 1
end
for _, f in ipairs(files) do
print("Processing " .. f)
if f:match("^skip") then
break
end
end
```
*差别在哪我怎么看不到这不两段一样的代码吗*
你是说有一个功能强大、语法优雅、社区成熟、生态丰富的shell她满足了我的既要又要还要
我草我真的睡醒了吗,都给我去用`fish`
## 为什么像啊
据说是二者都出生在一个时代(~~我就说是孪生姐妹吧~~),然后彼时彼刻,一股推翻老一代留下的技术债的风潮正在掀起
lua推翻了cfish推翻了bash
当然其实并没有真的推翻了,但是确实是反其道而行之,抛弃其固有范式
好吧其实我查了一下我记错了,她俩差了十二年出生,不过精神内核都是一致的