« Home

Projects [projs]

bib2tr [bib2tr]

A tool to convert .bib file to a list of reference cards.

html2scrbl [html2scrbl]

A web tool to convert input HTML to scribble/html

tr [tr-0000]

A site generator based on a collection of racket/scribble programs.

下面著手描述這個專案的核心想法

地址唯一性 [tr-0003]

每張卡片應有唯一的地址

生成 embed 與 index HTML [tr-0001]

embed 之間需要按引用關係構造,所以用 topological sort 排序(從 metadata.json 中復原依賴關係)後按順序編譯

通過分成兩階段生成,可以讓 index 引入 embed 的內容

raco tr next 與使用方式 [tr-0002]

raco tr next xxx 生成新的地址,就可以用 code $(raco tr next xxx).scrbl 這樣的方式開啟新檔案

數學支援 [tr-0004]

用 Katex 支援公式,用 LaTeX 支援複雜的圖

LaTeX 工作的獨立標籤 [tr-0006]

每個 address yyy 對 LaTeX 會創造新的相關的 _tmp/yyy/tex3212.tex 之類的檔案,tex3212 是用 gensym 產生。

如此一來 *.tex 檔案可知道自己是哪個 address 產出,如果 source 沒有更新便不編譯。

RSS 與 searching [tr-0005]

利用預先生成的 addr.metadata.json 進一步生成 RSS 與索引資料

violet [violet]

Contribution. racket-langserver [racket-langserver]

A Language Server Protocol implementation for Racket.

racket-llvm [racket-llvm]

LLVM bindings for racket

typed/racket eff [typed-racket-eff]

An effect system integrated with typed/racket.

agda-tree [agda-tree]

Converts agda produced *.tree to valid *.tree.

html2tree [html2tree]

Converts html syntax to forester namespace html syntax.

Algebraic Graph [algebraicgraph]

Contribution. llir/llvm [llir]

redux [redux]

type CountingModel struct {
    rematch.Reducer
    State int

    Increase *rematch.Action `action:"IncreaseImpl"`
}

func (c *CountingModel) IncreaseImpl(s, payload int) int {
    return s + payload
}

func main() {
    c := &CountingModel {
        State: 0,
    }
    store := store.New(c)
    store.Dispatch(c.Increase.With(30))
    store.Dispatch(c.Increase.With(20))

    fmt.Printf("result: %d\n", store.StateOf(c)) // expect: 50
}

rocket [rocket]

import (
    "github.com/dannypsnl/rocket"
)

type User struct {
    Name string `route:"name"`
    Age  uint64 `route:"age"`
}

func hello(u *User) string {
    return "Hello " + u.Name + ", your age is " + strconv.FormatUint(u.Age, 10)
}

// main.go
func main() {
    rocket.Ignite(8080).
        Mount(
            // put `hello` under a path `/user/:name/:age`, where `:name` and `:age` are variant parameters
            rocket.Get("/user/:name/:age", hello),
        ).
        Launch()
}