qbane

@q

"I seek not to know the answers, but to understand the questions."

Joined on Sep 2, 2015

按這裡回到我的烘焙雞 🏠

  • currently a scratchpad :( AMD Ryzen 5 7640U with Linux (Pop!_OS) Expansion cards: 2 USB-C (in the rear position), 1 Type A, 1 HDMI Charger: Gigastone 100W charger -- 2C + 1A My current boot parameter /etc/kernelstub/configuration: rootflags=subvol=@: see Filesystem setup (BTRFS). amdgpu.abmlevel=1: see this thread, Adaptive Backlight Management (ABM). 2 is marginly tolerable, 3 and 4 are too aggressive to me.
     Like  Bookmark
  • To embed JS code literally in <script>: Replace < to \x3C in sequences </ and <!--. To interpolate inside an HTML tag:Replace & to &amp; first, and then Replace < to &#x3c;. Same to interpolate text in <title>; Keyword: RCDATA state. To interpolate an attribute: additional " to &#x22; or ' to &#x27; depending on which type of quotation marks. avoid unquoted user input (harder to escape)!
     Like  Bookmark
  • ... to make a drop-in replacement of (now unmaintained) Fira Mono. [!Important] "Show me the code" The development happens in: https://github.com/qbane/FiraCodeNL. The build is considered stable, but the modifications to Glyphs source code are ad-hoc, not easily mergable with upstream, and should be considered half-done. Project update: 2025/3/23 Unfortunately, the glyph file format is updated in this commit. If I want to pick up the work, I need to rebase everything I have changed to this commit... Background
     Like  Bookmark
  • [!Note] Update The author has revisited this topic at Functional Thursday in June 2024. See the end of this document for updates. Extra content will be gathered into a separate note. 2023/11/20~2024/1/31 GHC version: 9.8.1 Clang version: 18.0.0 Agda version: 2.6.5 (nightly) The icon ✨ is used to mark sections that require patching code.
     Like 1 Bookmark
  • Collections on public resources (for test datasets) https://github.com/Sea-n/Telegram-IV-Templates https://github.com/undrfined/iv https://github.com/ChrisChV/Telegram-Instant-Views Parsing Basic syntax traits: Line delimited. # means comment for the rest of the line.
     Like  Bookmark
  • OS: Pop!_OS / Debian (buster) DE: GNOME (v42+) Terminal emulator: Tilix / Gnome Terminal Editor: vim (vim-plug), Sublime Text 4 (licensed) Multiplexer: tmux Shell: bash / zsh / fish (non-POSIX) Browser: Mozilla Firefox / Google Chrome Really want to try i3wm but my screen is not big enough for tiling :D Really want to try PaperWM.
     Like  Bookmark
  • JSDoc-TypeScript : JavaScript with JSDoc that is understood by TypeScript compiler. For what is supported by TypeScript compiler or langauge server, see JSDoc Reference. JSDoc's annotation looks like: /** your annotation here */. Type annotations The list is NOT meant to be exhaustive. Vol. 1 -- To annotate types
     Like  Bookmark
  • This document describes Telegram's Instant View format in stupefying detail. If this is your first time hearing about Instant View, please check out our Introduction and Sample Templates before you dive in. If you're comfortable with the idea of Instant View templates, let's look at what makes them tick. To begin with, this is our in-house artist's idea of how Instant View pages are generated: <a href="https://instantview.telegram.org/file/811140069/3/HNOgxR07ql4.872234/f83bfd30da8845e186" target="_blank"><img src="https://instantview.telegram.org/file/811140938/2/FF1p2pxErHM.79819/a582b1940327a15468" title="How Instant View Pages are made, click for hi-res version" class="dev_page_image"></a> It turns out, he is not entirely wrong. This is how Instant View pages are really generated: Whenever Telegram needs to display a link preview for a URL, it also checks whether an Instant View template exists for that domain. If a template exists, our Instant View Bot obtains the page using the URL (it only processes pages that have the MIME-type text/html).
     Like  Bookmark
  • :::info Updates (2024/3/4) The development was continued in early 2024. On 2024/1/13 Bellard released a new version on the project website. (2023/11/28) There is a community-maintained fork live at https://github.com/quickjs-ng/quickjs! ::: Warning: QuickJS's last official commit is on 2022/3/7. Consider it <del>no longer</del> community maintained.
     Like  Bookmark
  • I do not like VS Code (why?). For some reason I still need to install and use it. This is the list of settings I immediately add to a new installations of VS Code. { "update.mode": "manual", "telemetry.telemetryLevel": "off", "workbench.startupEditor": "none", "workbench.editor.empty.hint": "hidden", // marking non-ASCII chars by default is disrespectful
     Like  Bookmark
  • Written by a licensed Sublime Text user from v2 to v4. Overall I think Zed has a good performance and some superior UX than Sublime Text. Here is my optionated config. { "base_keymap": "SublimeText", "vim_mode": false, // behaviors "seed_search_query_from_cursor": "selection",
     Like  Bookmark
  • Started on 2022/6/24. Disclaimer: I don't use an iPhone. Notable zsh config Why there's no default .zshrc provided??? My suggestion would be copying from Debian's default one at /etc/skel. Note that I mainly use bash (dash) on Linux. Homebrew"command-not-found".But it is very slow comparing to the Linux one. Prevent Homebrew from auto-updating: Add export HOMEBREW_NO_AUTO_UPDATE=1 to .zprofile. dircolors
     Like  Bookmark
  • Most are done during crafting Agda REPL. A (not published) UTF-8 offset table for rapidly mapping between UTF-8 positions and UTF-16 code units in the document.It is a semi-persistent data structure backed by CM's rope structure. Introduction. A draggable gutter extension to allow selecting lines by dragging on the line gutter. Does not interfere with other clickable gutter elements.Demo. Discussion thread. A leading-whitespace folding service to allow ad-hoc folding by whitespace indentations.Similar to Vim's concept of folding. Useful when the language is indent-sensitive but you do not have a language service in hand. An Agda input method built upon hacking the out-of-the-box autocompletion plugin.A hack to gather candidates of the same label and allows one to navigate it like a grid. An enhanced search panel that replaces the search field with another CodeMirror instance.Allow one to bake syntax highlighting, autocompletions, etc. into the field. A single line setup to make CM a drop-in replacement to regular text fields.A bullet-proof setup to ensure that the text can never contain newline characters. (Concept only) A proposal on indented-wrapped line appearence ported from CM5.
     Like  Bookmark
  • This topic is a proceeding from Agda in WebAssembly & Experiments on Language Servers. I aim to study deeper on replicating POSIX I/O mechanism. tl;dr, poll_oneoff for WASI preview 1 is hard to get right. Will making stdin non-blocking help? Let's see the following sample code: #include <stdio.h> #include <fcntl.h> #include <unistd.h> #include <errno.h>
     Like  Bookmark
  • Transformed from: https://github.com/WebAssembly/WASI/blob/main/legacy/preview1/docs.md Skip to Types. Imports Memory Linear memory to be accessed by WASI functions that need it. Functions <a href="#args_get" id="args_get">#</a> args_get
     Like  Bookmark
  • §4.3: Packet types name value hex SSH_FXP_INIT 1 0x01 SSH_FXP_VERSION
     Like  Bookmark
  • This page serves as a tentative list of resources to study and experiment with the SFTP protocol after its original specification draft having expired and in the process of being forgotten. My hope is that SFTP will be great widely-adopted again. My specific use cases are: To communicate in SFTP with web apps To bridge server-side file-system-based programs with web clients interacting with the same file tree Browser as a SFTP client websocketfs (modern) Check out websocketfs: https://github.com/sagemathinc/websocketfs
     Like 1 Bookmark
  • From the official documentation of Emscripten as of v3.1.48: WasmFS is a high-performance, fully-multithreaded, WebAssembly-based file system layer for Emscripten that will replace the existing JavaScript version. The JavaScript-based file system was originally written before pthreads were supported and when it was more optimal to write code in JS. As a result it has overhead in pthreads builds because we must proxy to the main thread where all filesystem operations are done. WasmFS, instead, is compiled to Wasm and has full multithreading support. It also aims to be more modular and extensible. Its public-facing API is at src/library_wasmfs.js. To let a project adapt WasmFS, link it with the flag -s WASMFS. It replaces the position of the traditional FS layer in mainstream. Considering that all filesystem APIs are native in the first place, you probably want -s FORCE_FILESYSTEM as well to expose the JS APIs. Unlike traditional FS implementation that wires almost all system calls through their counterparts in JS land, WasmFS is mostly written in C/C++ that is then compiled to WASM alongside with other libraries. This makes async operations directly at comsumer's disposal and provides thread safety naturally when interacting with file systems. In theory, it also helps reduce the runtime JS bundle size, though some benchmark is needed to draw this conclusion.
     Like  Bookmark
  • By qbane (the thread 🧵) 2022/8 Update 2023/8/18 The author has found a leaner approach: https://github.com/PuruVJ/neocodemirror. tl;dr. It provides an action and let you optionally create a specific store for passing in. The data would be notified via the store only if a store is present. Comment: The "use:action" syntax may be more mighty than one might have thought!
     Like  Bookmark
  • Originally invented by Roy Dyckhoff in Contraction-free sequent calculi for intuitionistic logic. G4ip is the sequent calculus derived from G3ip. Also see an implementation by Michel Levy: http://teachinglogic.liglab.fr/ I traced down the code from the file preuve.ml ("proof" in French) in the DN1 variant. Let context $\Gamma = \Gamma_0 \cup \Gamma_1 \cup \Gamma_2 \cup \Gamma_3$, where $\Gamma_1$ is a set of atoms, $\Gamma_2$ is a set of clauses of the form $b \to c$ where $b$ is an atom, $\Gamma_3$ is a set of clauses of the form $(b \to d) \to c$,
     Like  Bookmark