This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 不改的壞處(全是工程債,無 soundness) | |
| 1. 渲染邏輯被迫雙份維護(最實際的成本) | |
| Abstract 和 Typed 各有一份幾乎平行的 handleExpr(Render Expr),Pretty 也各一套。任何「表達式怎麼顯示」的調整要改兩處,且容易 | |
| drift——現在兩份已有細微差異。 | |
| 2. 拔不掉 Abstract render/pretty cluster(你的原始目標被擋住) | |
| Render Expr/Chain/CaseClause/Interval/... 一整包得留著,純粹因為 array bound 還是 Abstract.Expr。死重量。 | |
| 3. 心智模型是假的,會誤導人 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE OverloadedStrings #-} | |
| -- 這幾個 OPTIONS 是為了讓 refutable 的 let/where pattern binding 不被 | |
| -- 專案的 -Werror=incomplete-patterns 擋下(純 demo,無所謂 totality)。 | |
| {-# OPTIONS_GHC -Wno-incomplete-patterns -Wno-incomplete-uni-patterns #-} | |
| {-# OPTIONS_GHC -Wno-error=incomplete-patterns -Wno-error=incomplete-uni-patterns #-} | |
| -- 用法: | |
| -- cd gcl | |
| -- stack ghci gcl:lib | |
| -- :load a.hs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| genFib = function* () { | |
| let [curr, next] = [0, 1]; | |
| while (true) { | |
| yield curr; | |
| [curr, next] = [next, curr + next]; | |
| } | |
| }; | |
| fib = genFib(); | |
| while (true) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| digraph AgdaCoreTermHierarchy { | |
| rankdir=BT; | |
| fontname="Helvetica,Arial,sans-serif"; | |
| nodesep=0.7; | |
| ranksep=0.9; | |
| node [shape=box, style="rounded,filled", fillcolor="#f0f8ff", fontname="Helvetica,Arial,sans-serif", penwidth=1.5, color="#4682b4"]; | |
| edge [color="#d35400", fontname="Helvetica,Arial,sans-serif", fontsize=11, fontcolor="#d35400"]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ● 分析完成。252 個 orphan instances 分佈在 28 個檔案,可以分成三大類: | |
| --- | |
| 結論:大部分 orphan 是架構上難以避免的 | |
| 1. 結構上必要的 orphan(~100+ 個)— 不建議動 | |
| Pretty / Render instances 是最大宗。原因是經典的循環依賴問題: | |
| Syntax/Abstract/Types.hs 定義 Expr, Stmt, Type ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- NextDidChange.csp | |
| -- FDR4 model to verify the NextDidChange property of the GCL Server-Edit protocol. | |
| -- | |
| -- Reference: https://github.com/scmlab/gcl-all/wiki/Server-Edit | |
| -- | |
| -- Property (NextDidChange): | |
| -- If workspace/applyEdit succeeds (client applied the edit), | |
| -- then the next textDocument/didChange the server receives | |
| -- belongs to that edit. | |
| -- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE DuplicateRecordFields #-} | |
| {-# LANGUAGE NamedFieldPuns #-} | |
| module Server.Load2 where | |
| import Data.IntMap (IntMap) | |
| import Data.Text (Text) | |
| import Error (Error (..)) | |
| import GCL.Predicate (Hole, PO, Spec) | |
| import GCL.Range (Range) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cp -rL /usr/share/xpra $HOME/xpra_copy | |
| sed -i 's/getboolparam("swap_keys", Utilities\.isMacOS())/getboolparam("swap_keys", false)/' \ | |
| "$HOME/xpra_copy/www/index.html" | |
| xpra start --bind-tcp=0.0.0.0:8080 --html=$HOME/xpra_copy/www --start=emacs-lucid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % grep Trace /tmp/a.txt | |
| [Trace - 2:45:29 AM] Sending request 'initialize - (0)'. | |
| [Trace - 2:45:29 AM] Received response 'initialize - (0)' in 7ms. | |
| [Trace - 2:45:29 AM] Sending notification 'initialized'. | |
| [Trace - 2:45:29 AM] Sending notification 'textDocument/didOpen'. | |
| [Trace - 2:45:29 AM] Sending request 'gcl/reload - (1)'. | |
| [Trace - 2:45:29 AM] Received request 'client/registerCapability - (1)'. | |
| [Trace - 2:45:29 AM] Sending response 'client/registerCapability - (1)'. Processing request took 0ms | |
| [Trace - 2:45:29 AM] Sending notification 'workspace/didChangeConfiguration'. | |
| [Debug] VFS: opening file:///workspaces/gcl[Trace - 2:45:29 AM] Received request 'workspace/configuration - (2)'. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "key": "shift+enter", | |
| "command": "workbench.action.terminal.sendSequence", | |
| "args": { | |
| "text": "\u001b\r" | |
| }, | |
| "when": "terminalFocus" | |
| } | |
| ] |
NewerOlder