Skip to content

Instantly share code, notes, and snippets.

View vemv's full-sized avatar
🧑‍💻
Sprinting

vemv vemv

🧑‍💻
Sprinting
View GitHub Profile
@vemv
vemv / .md
Last active September 30, 2026 07:01
Don't attribute intelligence to it

Don't attribute intelligence to it

Meat-thought, hand-written.

One of the most frustrating aspects of today's tech landscape is just how much intelligence is attributed to AI.

It all begins with the naming. 'AI' designates a goal that was established more than 50 years ago. That we may be approaching it doesn't mean we have attained any degree of it.

An accurate, and fair name for LLM-obtained assets (like code, images, etc) would be Probabilistic Results. LLMs always give us a result, a 'thing' that is useful to some degree. And that result that was obtained probabilistically. Probabilistic Results is a non-judgemental label. It doesn't say that the results suck, or are great, or have/lack intelligence. It just says that you got results, and that probably, with today's tech, they'll be useful to you. And that's great! We do need useful things in our daily endeavors.

@vemv
vemv / esm-package.md
Created December 26, 2024 21:49 — forked from sindresorhus/esm-package.md
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.

Keybase proof

I hereby claim:

  • I am vemv on github.
  • I am vemv (https://keybase.io/vemv) on keybase.
  • I have a public key ASCkeXyHMIHdU_Rz5d7eBXm-XusfXJGsOxpkcKOEeU1UzAo

To claim this, I am signing this object:

@vemv
vemv / json_libs_equivalence_test.clj
Last active August 12, 2020 11:10
json-libs-equivalence-test
(ns json-libs-equivalence-test
"Includes code derived from:
https://github.com/metosin/jsonista/blob/211306f04bb15d7232b536cf6c6d8ecfeae0512d/LICENSE
https://github.com/dakrone/cheshire/blob/4525b23da1c17decba363202402a8a195d21705f/LICENSE"
(:require
[cheshire.core :as cheshire]
[clojure.data.json]
[clojure.java.io :as io]
[clojure.test :refer [are deftest is testing]]
[jsonista.core :as jsonista]

Publishing jars to Maven easily

Occasionally one needs to use a hacked .jar:

  • You need to modify a .jar (clojure/java) in-place
  • You built a cljsjs package, and want to upload the generated .jar
  • There's some obscure java .jar that is not in Maven.

Leiningen support for floating jars has never been official, and doesn't seem to work with cljsjs.

@vemv
vemv / gist:3250136
Created August 3, 2012 18:18
file unzipper
(ns vemv
(:require [clojure.java.io :as io]
[clojure.string :as string])
(:import [java.util.zip ZipInputStream]
[java.io FileOutputStream]))
(defmacro while-let
"The composition of a side-effects based while, and a single-binding let, ala if-let.\n\nAvoids loop/recur redundance."
[[sym expr] & body]
`(loop [~sym ~expr]