duangsuse::Echo
714 subscribers
4.24K photos
127 videos
583 files
6.46K links
import this:
美而不丑、明而不暗、短而不凡、长而不乱,扁平不宽,读而后码,行之天下,勿托地上天国。
异常勿吞,难过勿过,叹一真理。效率是很重要,盲目最是低效。
简明是可靠的先验,不是可靠的祭品。
知其变,守其恒,为天下式;穷其变,知不穷,得地上势。知变守恒却穷变知新,我认真理,我不认真。

技术相干订阅~
另外有 throws 闲杂频道 @dsuset
转载频道 @dsusep
极小可能会有批评zf的消息 如有不适可退出
suse小站(面向运气编程): https://WOJS.org/#/
Download Telegram
绝句词法.txt
2.3 KB
虽然最后(而且现在太晚了……)没有完成对 「的」「去」的高亮分词兼容,但是我总结出了这个,很方便继续修改。
绝句词法.md
2.2 KB
今天的最后一件事……
绝句词法.md
3.4 KB
不对,我打算早睡觉了的
flatMap :: forall t a. (a -> t a) -> (t a) -> (t a)
join :: forall t a -> t a -> t a -> t a

但是就可以注意到,类型推导 join 其实是写 t a 还是 a 都没问题的,就像 Kotlin 写 fun T?.wtf(): Tfun T.wtf() 一样,总感觉实现起来会要去 ? 一样的……
引记法 绝句.额联 「令为」

事 階乘(甲:数):数 为
若甲是一,回一。
否则,
量 乙 = 甲-1
量 丙 = 阶乘(乙)
量 丁 = 甲去乘(丙);回丁
事 入口() 为
阶乘(5)令为(::说)
https://codon.com/hello-declarative-world

Either(|) Both(&) 这不是比 disjuction, conjuction 对非英语母语的人友好多了么,我英文词感不算差偶尔脑力都跟不上辨别「disj是或」还是「conj是或」。
duangsuse::Echo
https://codon.com/hello-declarative-world Either(|) Both(&) 这不是比 disjuction, conjuction 对非英语母语的人友好多了么,我英文词感不算差偶尔脑力都跟不上辨别「disj是或」还是「conj是或」。
因为内联图片不能打印(要不然耗费太多墨水),我在这里把内联图片内容写一下:

more abstract(抽象级提升) →
unstructured(无结构编程) → procedural(过程式) → | imperative(表述式) → declarative(定义式) | → functional(函数式) → relational(关系式)

从函数式到关系又有一个断层:
programmer(human): what → solver(machine): how

Function:
(\x y. x+y) ← (x)19 ← (y)23
→ 42

Relation:

(\x y. x=y) ← (x)5 ← (y)?
→Yes. y=5

(\x y. x<y) ←(x)? ←(y)5
→Yes. x=4
→Yes. x=3
...
→Yes. x=0

State-Goal:
"State → Goal → State0, State1, ..."

Variable: (equal v v) (either g g)
State: "with variables x, y, ..., g" (both g g)

Some Functions:
['a', 'b', 'c'] → ('a', ('b', ('c', nil)))
3 → (:+, (:+, (:+, nil)))
duangsuse::Echo
https://codon.com/hello-declarative-world Either(|) Both(&) 这不是比 disjuction, conjuction 对非英语母语的人友好多了么,我英文词感不算差偶尔脑力都跟不上辨别「disj是或」还是「conj是或」。
Array.prototype.zipWith = function*(ys) { const minLenIn2=Math.min(this.length, ys.length); for (let i=0; i<minLenIn2; ++i) yield([this[i], ys[i]]); };

const imgContents = String.raw`
LRUG August 2015 "Hello, declarative world"
by Tom Stuart 10.08 2015
skillsmatter.com

more abstract(抽象级提升) →
unstructured(无结构编程) → procedural(过程式) → | imperative(表述式) → declarative(定义式) | → functional(函数式) → relational(关系式)

从函数式到关系又有一个断层:
programmer(human): what → solver(machine): how

more abstract(抽象级提升) →
unstructured(无结构编程) → procedural(过程式) → | imperative(表述式) → declarative(定义式) | → functional(函数式) → relational(关系式)

Function:
(\x y. x+y) ← (x)19 ← (y)23
→ 42

Relation:

(\x y. x=y) ← (x)5 ← (y)?
→Yes. y=5

(\x y. x<y) ←(x)? ←(y)5
→Yes. x=4
→Yes. x=3
...
→Yes. x=0

State-Goal:
"State → Goal → State0, State1, ..."

Six Primitives:
Variable: (equal v v) (either g g)
State: "with variables x, y, ..., g" (both g g)

Array to Pairs
['a', 'b', 'c'] → ('a', ('b', ('c', nil)))

Number to Pairs
3 → (:+, (:+, (:+, nil)))
`.split("—").map(s => s.trim());

document.querySelector('html').style.background='white'
let documentImages = [...document.querySelectorAll('img')];
let imgWithNewContents = [...documentImages.zipWith(imgContents)];
imgWithNewContents.forEach(t => { t[0].src=''; t[0].alt=t[1]; });
document.querySelectorAll('pre, blockquote').forEach(it => it.style.overflow = 'hidden')



body { width: auto !important; padding: unset !important; }
body { font: unset !important; }
This media is not supported in your browser
VIEW IN TELEGRAM
绝句所谓的 存储 不恰当,还是改成『取置』吧。

对何<值者>其中 值者:值 皆有
扩物 取置<值者?> 为
事 置空() 为
我去置为(空)


forall T where T: Any theres
extension Modifible<T?> where
fun makeNull() where
this.set(null)
绝句词法.md
18 KB
给正在期待新写作的同好
#book 《Kotlin 极简教程》怎么说用处也是蛮不小的。虽然内容新颖有深度,不过如果一定要提意见,就是有些东西的描述还可以再好好斟酌一下,是否足够简明、是否存在赘述或者该泛化没泛化的情况。
真是有点快了,不到三天时间,绝句居然就从一个比较随性的设想变成几乎切实可行、立刻就能开工写解析器的规范的程序设计语言
虽然最后把这一切联系在一起的是我一个人 😂,但是 Kate 的 Kotlin 高亮支持是功不可没……
绝句词法.md
19.5 KB
大概是完成了,就剩下修订、语法和「你」语法的定义了
你鸡,太美()。 🐔🤪
annotationUseSiteTarget ('field' | 'property' | 'get' | 'set' | 'receiver' | 'param' | 'setparam' | 'delegate')