スキル一覧に戻る
plurigrid

squint-runtime

by plurigrid

everything is topological chemputer!

2🍴 3📅 2026年1月20日
GitHubで見るManusで実行

SKILL.md


name: squint-runtime description: Squint ClojureScript runtime for minimal JS output compilation

Squint Runtime Skill

Status: ✅ Production Ready Author: Michiel Borkent (borkdude) Trit: 0 (ERGODIC - neutral transport) Stars: 1.2k+


Overview

Squint is a light-weight ClojureScript dialect that compiles to JavaScript with minimal runtime overhead. It's the "minimal" alternative in borkdude's browser runtime spectrum.

When to Use Squint vs Cherry

AspectSquintCherry 🍒
Runtime sizeMinimal (~10KB)Full cljs.core (~100KB)
SemanticsJS-likeFull CLJS
Data structuresJS objects/arraysPersistent immutable
KeywordsStringsCLJS keywords
InteropSeamlessRequires macros
JSX
Use caseSmall scripts, interopFull applications

Installation

npm install squint-cljs@latest

Usage

;; example.cljs
(ns example)

;; Functions compile to regular JS functions
(defn greet [name]
  (str "Hello, " name "!"))

;; JS interop is seamless
(js/console.log (greet "World"))

;; Object destructuring works naturally
(defn process [{:keys [a b c]}]
  (+ a b c))

(process #js {:a 1 :b 2 :c 3})  ; => 6

Compile and Run

# Compile to JS
npx squint compile example.cljs

# Run directly
npx squint run example.cljs

Key Differences from CLJS

  1. Data structures are JS native:

    {:a 1}  ; => {a: 1} in JS (plain object)
    [1 2 3] ; => [1, 2, 3] in JS (array)
    
  2. Keywords become strings:

    :foo ; => "foo" in JS
    
  3. No persistent data structures (use JS mutation)

  4. Faster interop (no conversion needed)

Integration with Gay.jl Colors

(ns squint.gay-colors)

;; SplitMix64 constants
(def GOLDEN 0x9E3779B97F4A7C15)
(def MASK64 0xFFFFFFFFFFFFFFFF)

(defn splitmix64 [state]
  (let [s (bit-and (+ state GOLDEN) MASK64)
        z (-> s
              (bit-xor (unsigned-bit-shift-right s 30))
              (* 0xBF58476D1CE4E5B9)
              (bit-and MASK64))
        z (-> z
              (bit-xor (unsigned-bit-shift-right z 27))
              (* 0x94D049BB133111EB)
              (bit-and MASK64))]
    (bit-xor z (unsigned-bit-shift-right z 31))))

(defn color-at [seed idx]
  (loop [state seed i idx]
    (if (zero? i)
      (let [v (splitmix64 state)
            l (+ 10 (* 85 (/ (bit-and v 0xFF) 255)))
            c (* 100 (/ (bit-and (unsigned-bit-shift-right v 8) 0xFF) 255))
            h (* 360 (/ (bit-and (unsigned-bit-shift-right v 16) 0xFFFF) 65535))]
        {:L l :C c :H h})
      (recur (splitmix64 state) (dec i)))))

Commands

just squint-compile file.cljs  # Compile CLJS to JS
just squint-run file.cljs      # Run CLJS file
just squint-watch              # Watch mode compilation

Skill Name: squint-runtime Type: ClojureScript Compiler Trit: 0 (ERGODIC) Invariant: ✅ Deterministic compilation

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です