Skip to content

Commit

Permalink
eng of hash scrbl
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyingwang committed Nov 22, 2024
1 parent b2c3c39 commit ea9ce0f
Show file tree
Hide file tree
Showing 9 changed files with 189 additions and 263 deletions.
118 changes: 59 additions & 59 deletions mapping/racket/base/hash.rkt
Original file line number Diff line number Diff line change
@@ -1,80 +1,80 @@
#lang at-exp s-exp "../../../private/mapping-lang.rkt"


>>> hash 􏿰 @elem{创建@racket[􏾌]}
>>> hashalw 􏾋 @elem{类上,不过键的唯一性是通过@racket[􏾗?]确立的} ; 􏾱􏿰
>>> hasheqv 􏾊 @elem{类上,不过键的唯一性是通过@racket[􏾃?]确立的}; 􏾪􏿰 􏾰􏿰 􏾭 􏾫
>>> hasheq 􏾉 @elem{类上,不过键的唯一性是通过@racket[侗?]确立的}; 􏾯􏿰

>>> hash? 􏿰? @elem{是否是@racket[􏾌]、@racket[􏾋]、@racket[􏾊]、@racket[􏾉]的任一种}
>>> hash-equal? 􏾌? @elem{是否是@racket[􏾌]}
>>> hash-equal-always? 􏾋? @elem{是否是@racket[􏾋]}
>>> hash-eqv? 􏾊? @elem{是否是@racket[􏾊]}
>>> hash-eq? 􏾉? @elem{是否是@racket[􏾉]}

>>> hash-strong? 􏾎? @elem{类上,键是否是被刚性存储的} ; 刚 强
>>> hash-weak? 􏾏? @elem{类上,键是否是被柔性存储的}; 柔
>>> hash-ephemeron? 􏾈? @elem{类上,键的存储是否是采用@racket[􏾧]}

>>> make-hash 􏿰^ @elem{@racket[􏿳]转换成@racket[􏾑]}
>>> make-hashalw 􏾋^ @elem{@racket[􏿳]转换成@racket[􏾑]}
>>> make-hasheqv 􏾊^ @elem{@racket[􏿳]转换成@racket[􏾑]}
>>> make-hasheq 􏾉^ @elem{@racket[􏿳]转换成@racket[􏾑]}

>>> make-immutable-hash 􏾐^ @elem{如上类推}
>>> make-immutable-hashalw 􏾆^ @elem{如上类推}
>>> make-immutable-hasheqv 􏾅^ @elem{如上类推}
>>> make-immutable-hasheq 􏾄^ @elem{如上类推}

>>> make-weak-hash 􏾏^ @elem{如上类推}
>>> make-weak-hashalw 􏾁^ @elem{如上类推}
>>> make-weak-hasheqv 􏾀^ @elem{如上类推}
>>> make-weak-hasheq 􏽿^ @elem{如上类推}

>>> make-ephemeron-hash 􏾈^ @elem{如上类推}
>>> make-ephemeron-hashalw 􏽽^ @elem{如上类推}
>>> make-ephemeron-hasheqv 􏽼^ @elem{如上类推}
>>> make-ephemeron-hasheq 􏽻^ @elem{如上类推}

>>> hash-set 􏿰攸 @elem{以新造数据的方式来修改某“键”对应的“值”}
>>> hash-set* 􏿰攸+ @elem{以新造数据的方式来修改某些“键”所对应的“值”}
>>> hash-update 􏿰攸/入 "类上,区别是入参不同"
>>> hash-set! 􏿰􏾩 @elem{直接修改某“键”对应的“值”}
>>> hash-set*! 􏿰􏾩+ @elem{直接修改某些“键”所对应的“值”}
>>> hash-update! 􏿰􏾩/入 "类上,区别是入参不同"

>>> hash-ref 􏿰弔 @elem{以“键值对”中“阳”位数据为基准,来索引查询“键值对”并返回“阴”位数据(未找到数据则返回默认设置值);} ;􏽚; make new char from merging 􏿰弔 as one
>>> hash-ref-key 􏿰􏽙 @elem{以“键值对”中“阳”位数据为基准,来索引查询“键值对”并返回“阳”位数据;} ;𦙨 􏽙 􏿰弔日
>>> hash 􏿰
>>> hashalw 􏾋 ; 􏾱􏿰
>>> hasheqv 􏾊
>>> hasheq 􏾉

>>> hash? 􏿰?
>>> hash-equal? 􏾌?
>>> hash-equal-always? 􏾋?
>>> hash-eqv? 􏾊?
>>> hash-eq? 􏾉?

>>> hash-strong? 􏾎? ; 刚 强
>>> hash-weak? 􏾏?
>>> hash-ephemeron? 􏾈?

>>> make-hash 􏿰^
>>> make-hashalw 􏾋^
>>> make-hasheqv 􏾊^
>>> make-hasheq 􏾉^

>>> make-immutable-hash 􏾐^
>>> make-immutable-hashalw 􏾆^
>>> make-immutable-hasheqv 􏾅^
>>> make-immutable-hasheq 􏾄^

>>> make-weak-hash 􏾏^
>>> make-weak-hashalw 􏾁^
>>> make-weak-hasheqv 􏾀^
>>> make-weak-hasheq 􏽿^

>>> make-ephemeron-hash 􏾈^
>>> make-ephemeron-hashalw 􏽽^
>>> make-ephemeron-hasheqv 􏽼^
>>> make-ephemeron-hasheq 􏽻^

>>> hash-set 􏿰攸
>>> hash-set* 􏿰攸+ (􏿰攸 +)
>>> hash-update 􏿰攸/入
>>> hash-set! 􏿰􏾩
>>> hash-set*! 􏿰􏾩+ (􏿰􏾩 +)
>>> hash-update! 􏿰􏾩/入

>>> hash-ref 􏿰弔 ;􏽚; make new char from merging 􏿰弔 as one
>>> hash-ref-key 􏿰􏽙 ;𦙨 􏽙 􏿰弔日
;; >>> hash-ref-key 􏿰弔日 @elem{以“键值对”中“阴”位数据为基准,来索引查询“阳”位数据并返回;} ;𦙨

>>> hash-ref! 􏿰𫼛 @elem{以“键值对”中“阳”位数据为基准,来索引查询“键值对”并返回“阴”位数据(未找到数据则直接修改原数据增加新“键值对”);} ;􏿰𫼛 􏿰弔!
>>> hash-has-key? 􏿰日? @elem{是否存在某“键”} ;􏿰日? 􏿰􏺉? 􏿰有?
>>> hash-ref! 􏿰𫼛 ;􏿰𫼛 􏿰弔!
>>> hash-has-key? 􏿰日? ;􏿰日? 􏿰􏺉? 􏿰有?

>>> hash-remove 􏿰􏾘 @elem{以新造数据的方式来删除某“键”和其对应的“值”}
>>> hash-remove! 􏿰􏽘 @elem{直接删除某“键”和其对应的“值”} ; ; 􏿰􏽘 􏿰􏾘!
>>> hash-remove 􏿰􏾘
>>> hash-remove! 􏿰􏽘 ; ; 􏿰􏽘 􏿰􏾘!

>>> hash-clear 􏿰𠛮 @elem{以新造数据的方式来删除全部“键”和其对应的“值”}
>>> hash-clear! 􏿰􏽗 @elem{直接删除全部“键”和其对应的“值”} ;􏽗 􏿰𠛮!
>>> hash-clear 􏿰𠛮
>>> hash-clear! 􏿰􏽗 ;􏽗 􏿰𠛮!

>>> hash-copy-clear 𠛮􏿰 @elem{以删除全部“键”和其对应的“值”的方式新造空数据}
>>> hash-copy-clear 𠛮􏿰

>>> hash-map 􏿰􏺆 @elem{把某一个例程依次作用在各个明(键值对)上,出参是@racket[􏿴]}
>>> hash-map/copy 􏿰佫 @elem{把某一个例程依次作用在各个明(键值对)上}
>>> hash-map 􏿰􏷑化􏿴 (􏿰􏷑 化 􏿴)
>>> hash-map/copy 􏿰􏷑

>>> hash-keys 􏿰􏺈 @elem{返回􏿰中所有键值对的“键”组成的@elem{􏿴}} ;􏿰阳
>>> hash-values 􏿰􏺇 @elem{返回􏿰中所有键值对的“值”组成的@elem{􏿴}} ;􏿰阴
>>> hash-keys 􏿰􏺈 ;􏿰阳
>>> hash-values 􏿰􏺇 ;􏿰阴

>>> hash->list 􏿰化􏿳

>>> hash-keys-subset? 􏿰􏺈仔? @elem{前者是否是后者的@racket[阳]的子集}
>>> hash-for-each 􏿰
>>> hash-keys-subset? 􏿰􏺈?^
>>> hash-for-each 􏿰􏷒
>>> hash-count 􏿰巨
>>> hash-empty? 􏻵? ; 空􏿰 􏿰空
>>> hash-empty? 􏻵?

>>> hash-iterate-first ?􏿰引
>>> hash-iterate-next ?􏿰继引
>>> hash-iterate-key ?􏿰引日
>>> hash-iterate-value ?􏿰引月
>>> hash-iterate-pair ?􏿰引明
>>> hash-iterate-key+value ?􏿰引日月
>>> hash-copy 􏾑化 @elem{将@racket[􏾐]转化为@racket[􏾑]} ; 袭 抄 仿 摹 模 拟 似 抄 􏿰􏽕
>>> hash-copy 􏾑化 ; 袭 抄 仿 摹 模 拟 似 抄 􏿰􏽕
4 changes: 2 additions & 2 deletions mapping/racket/hash.rkt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#lang at-exp s-exp "../../private/mapping-lang.rkt"

>>> hash-union 􏿰并 ;􏿰并 􏿰联
>>> hash-union! 􏿰并!
>>> hash-intersect 􏿰交!
>>> hash-union! 􏿰并! (􏿰并 !)
>>> hash-intersect 􏿰交! (􏿰交 !)
2 changes: 1 addition & 1 deletion private/scribble-styles/css/cangjie.css

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions scribble.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

(provide defmapping defhzify section+elemref section+autotag
eleph-note elucidate
means whmeans
stands-for whstands-for same-as-cnchar same-as-cnchar-but
modernly-simplifies anciently-simplifies
simplf-from
modernly-means mingly-resembles
Expand Down Expand Up @@ -199,10 +199,14 @@
(define tag (string-join content ""))
(section #:tag tag content))

(define (means . content)
(elem "means" (hspace 1) @(italic content)))
(define (whmeans . content)
(elem "which means" (hspace 1) @(italic content)))
(define (stands-for . content)
(elem "stands for" (hspace 1) @(elucidate content)))
(define (whstands-for . content)
(elem "which stands for" (hspace 1) @(elucidate content)))
(define (same-as-cnchar-but cnchar ori-meaning standing)
(elem "same as Chinese character " @zitools-ref[cnchar] ", which means " @elucidate{@ori-meaning} ", but borrowed to " @stands-for[@standing] " in Ming"))
(define (same-as-cnchar cnchar meaning)
(elem "same as Chinese character" (hspace 1) @zitools-ref[cnchar] ", " @stands-for[@meaning] " in Ming"))

(define (eleph-note . content) ;; 像注, elephant in chinese is wrote as 象, and 像 means like
(margin-note (elem "🐘" (hspace 1) content))) ;; 💡
Expand Down
2 changes: 1 addition & 1 deletion scribblings/ming-lib/list.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Shorts for @code{(􏷴 (􏷵 LST N) M)}.
@; }

@defproc[(􏿳 [V any?] ...) 􏿳?]{
@defcompost[􏿳 (双 􏿴)]{@means{association list}.}
@defcompost[􏿳 (双 􏿴)]{@stands-for{association list}.}
@eleph-note{@racket[􏿰]}
@examples[#:eval (the-eval)
(􏿳 1 2 3 4 1 5)
Expand Down
6 changes: 6 additions & 0 deletions scribblings/naming-rules.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@
@elem{The type of input data is list}
@elem{@code{􏹊^ 伄^}}
)
(list
@elem{suffix @bold{@litchar{+}}}
"same type objects as input"
@elem{"more than one same type objects as input" }
@elem{@code{􏿰攸+ 􏿰􏾩+}}
)

(list
@elem{include @bold{@litchar{/}}}
Expand Down
2 changes: 1 addition & 1 deletion scribblings/racket-lib/equality.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

@title[#:tag "equality"]{同}
@section+elemref{同? 􏷇? 冃? 􏷅?}
@defzi[同]{@means{equal} in Chinese.}
@defzi[同]{@same-as-cnchar["" "equal"].}
@defzi[􏷇]{almost same as @zi[同] other than that @zi[𭕄] implies difference about mutable data.}
@defzi[冃]{the simplification version of @zi[同]. (Do not confuse with @zi[月])}
@defzi[􏷅]{almost same as @zi[冃] other than that @zi[米] implies difference about numbers.}
Expand Down
Loading

0 comments on commit ea9ce0f

Please sign in to comment.