flowchart LR
a((a)) --> b((a))
classDef default stroke:#333,stroke-width:2px
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
for (const N of [10_000, 100_000, 1_000_000]) { | |
Deno.bench("Array.fill()", { group: `${N}`, baseline: true }, () => { | |
new Array(N).fill(0) | |
}) | |
Deno.bench("Array.from()", { group: `${N}` }, () => { | |
Array.from({ length: N }, () => 0) | |
}) | |
} |
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 OverloadedRecordDot #-} | |
{-# LANGUAGE DuplicateRecordFields #-} | |
{-# LANGUAGE NoFieldSelectors #-} | |
import Data.List (intercalate) | |
mergeSort :: Ord a => [a] -> [a] | |
mergeSort [] = [] | |
mergeSort [x] = [x] | |
mergeSort xs = merge (mergeSort left) (mergeSort right) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Look ma, no build step</title> | |
</head> | |
<body> | |
<div id="root"></div> | |
<script type="module" src="./main.js"></script> |
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
/** | |
* Sync PR/revert인 경우 merge commit, 그 외에는 squash merge | |
* | |
* 의존성: [github cli](https://cli.github.com) | |
* 설치: gh alias set pr-merge '! deno run -A /스크립트가/있는/경로/gh-pr-merge.ts $@' | |
* | |
* @module | |
*/ | |
import $ from "jsr:@david/dax@^0.41.0" |
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
const f = (g: (x: number) => number) => (x: number) => g(x) | |
Deno.bench("closure directly", { baseline: true }, () => { | |
const foo = [...Array(1000).keys()].map(f((x) => x + 1)) | |
}) | |
Deno.bench("closure indirectly", () => { | |
const g = f((x) => x + 1) | |
const foo = [...Array(1000).keys()].map(g) | |
}) |
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
import { walk } from "https://deno.land/[email protected]/fs/walk.ts" | |
import { join } from "https://deno.land/[email protected]/path/join.ts" | |
import { parse } from "https://deno.land/[email protected]/path/parse.ts" | |
import { asynciter } from "https://deno.land/x/[email protected]/mod.ts" | |
import { snakeCase } from "https://deno.land/x/[email protected]/mod.ts" | |
if (import.meta.main) { | |
// walk all markdown files in doc/src/content, and rename filenames to snake_case | |
await asynciter(walk("doc/src/content", { exts: ["md"], includeDirs: false })) | |
.map(({ path }) => ({ path, ...parse(path) })) |
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
! Title: Clean DCInside UI | |
! Homepage: https://gist.github.com/scarf005/50451bd971f647da7b4f5f79798a53e6/edit | |
! 로갤 로스트아크갤 구분 | |
||https://gall.dcinside.com/board/lists/?id=lostark$all | |
google.*##.g:has(a[href*="https://gall.dcinside.com/board/lists/?id=lostark"]) | |
||dcimg5.dcinside.com/dccon.php?no=62b5df2be09d3ca567b1c5bc12d46b394aa3b1058c6e4d0ca41648b65feb246efc7dee44a100573d4877e943faabd47cae7095ad596fb484b6618dc825dbe838dcd667f5$image |
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 NoImplicitPrelude #-} | |
import Data.Bool (Bool, (&&), (||)) | |
import Numeric.Natural (Natural) | |
import Prelude (Int, (+), (-)) | |
{- | | |
마그마(Magma)는 집합과 '닫힌' 이항 연산자 (이항 연산의 결과가 집합에 속함) | |
(𝕄, •) ⊢ ∀ a, b ∈ 𝕄 ⟹ a • b ∈ 𝕄. |