lua_formatter = lua_formatter or { initDone = false }
-- Not using @johnnymorganz/[email protected]/stylua.web/stylua_lib.js
-- because of https://github.com/JohnnyMorganz/StyLua/issues/999
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
| #!/bin/bash | |
| TMPDIR="$(mktemp -d)" | |
| cmd_status() { | |
| local pid=$1 | |
| local cmd=$2 | |
| local log=$3 | |
| if ps h ${PIDS[$cmd_idx]} > /dev/null; then | |
| echo -e "› \033[32m${cmd}\033[0m" |
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
| https://www.uiua.org/pad?src=0_12_0-dev_2__8J-UoiDihpAg4oqCwrDii5XiipniiqLiirjip7sK8J-XnO-4jyDihpAg4pmt4oi14peH8J-UouKKnOKWoeKKuC1AIAriiY0iM0EyQjJBMUMi8J-XnO-4jyJBQUFCQkFBQyIK | |
| 🔢 ← ⊂°⋕⊙⊢⊸⧻ | |
| 🗜️ ← ♭∵◇🔢⊜□⊸-@ | |
| ≍"3A2B2A1C"🗜️"AAABBAAC" |
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
| { | |
| "NotebookModel": "LENOVO 20R4001CBR", | |
| "Author": "Rafaelti", | |
| "EcPollInterval": 2000, | |
| "ReadWriteWords": false, | |
| "CriticalTemperature": 92, | |
| "FanConfigurations": [ | |
| { | |
| "ReadRegister": 149, | |
| "WriteRegister": 148, |
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
| function handleEvent(name, payload) { | |
| fetch('http://localhost:8118/report?'+JSON.stringify({name, payload})); | |
| } | |
| chrome.tabs.onActivated.addListener( | |
| (tabId, windowId) => handleEvent("activated", {tabId, windowId})); | |
| chrome.tabs.onActiveChanged.addListener( | |
| (tabId, selectInfo) => handleEvent("activeChanged", {tabId, selectInfo})); |
This describes an adaptive, stable, natural mergesort, modestly called
timsort (hey, I earned it ). It has supernatural performance on many
kinds of partially ordered arrays (less than lg(N!) comparisons needed, and
as few as N-1), yet as fast as Python's previous highly tuned samplesort
hybrid on random arrays.
In a nutshell, the main routine marches over the array once, left to right, alternately identifying the next run, then merging it into the previous
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
| (defn insertion-sort [arr left right] | |
| (for i (+ left 1) (+ right 1) | |
| (def temp (in arr i)) | |
| (var j (- i 1)) | |
| (while (and (>= j left) (> (in arr j) temp)) | |
| (set (arr (+ j 1)) (in arr j)) | |
| (-- j)) | |
| (set (arr (+ j 1)) temp)) | |
| arr) |
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
| (defmacro dbg! [form] | |
| (let [func (first form) | |
| args (drop 1 form)] | |
| (var accum @['do]) | |
| (var syms @[]) | |
| (each arg args | |
| (let [sym (gensym)] | |
| (array/push accum (tuple 'def sym arg)) | |
| (array/push syms [arg sym]))) |
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
| function dtype(t) { return t=="function" ? "Function" : (t=="macro" ? "Macro": "Builtin");} | |
| let s = ""; | |
| for (let b of document.querySelectorAll('.binding')) { | |
| s += `INSERT OR IGNORE INTO searchIndex(name, type, path) VALUES ("${b.firstChild.id}","${dtype(b.children[1].innerText)}","api/index.html#${b.firstChild.id}");\n`; | |
| } | |
| s |
| URL | Stars | Created |
|---|---|---|
| http://github.com/ahungry/ahungry-janet | 3 | 2020-05-29 02:54:07 |
| http://github.com/ahungry/ahungry-janet-user | 0 | 2020-05-29 04:28:45 |
| http://github.com/ahungry/janet-code | 8 | 2019-07-28 05:10:59 |
| http://github.com/ahungry/janet-p99-map | 1 | 2020-05-10 04:13:27 |
| http://github.com/ahungry/janet-pobox | 7 | 2020-05-27 04:36:08 |
| http://github.com/ahungry/janet-xbuild | 2 | 2020-05-28 14:17:09 |
| http://github.com/ahungry/puny-gui | 83 | 2020-04-24 02:52:59 |
| http://github.com/ahungry/puny-server | 1 | 2020-04-23 01:42:38 |
NewerOlder