Skip to content

Instantly share code, notes, and snippets.

View NPException's full-sized avatar
🐈

Dirk Wetzel NPException

🐈
View GitHub Profile
@torcado194
torcado194 / cleanEdge-shadertoy.glsl
Last active April 17, 2024 22:00
cleanEdge, a pixel art upscaling algorithm for clean rotations
/*** MIT LICENSE
Copyright (c) 2022 torcado
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following

Graphics

CLJC

  • Quil Graphics and animation sketches, based on Processing
  • th.ing/geom a comprehensive and modular geometry & visualization toolkit. WebGL, OpenGL, SVG.
  • Iglu Turning data into GLSL shaders for use by OpenGL and WebGL. By Zach Oakes, part of play-cljc.

Clojure

@xfthhxk
xfthhxk / graph.clj
Created April 19, 2021 02:04
DFS & BFS in clojure
(ns graph)
(def graph
{:A {:children #{:E :B}
:population 200
:id :A}
:B {:children #{:A :C :E}
:population 300
:id :B}
:C {:children #{:B :D}
@adam-james-v
adam-james-v / hc-main.cljc
Last active March 15, 2021 14:47
Minimal implementation of a Hiccup Compiler
;; source code related to the project shown in this video:
;; https://youtu.be/_XiEc0g2wL8
;; author: adam-james
(ns hc.main)
(defn hiccup?
[item]
(and (vector? item)
(keyword? (first item))))
@ericnormand
ericnormand / 00 Boolean combinators.md
Created November 23, 2020 15:27
404 - PurelyFunctional.tv Newsletter

Boolean combinators

In the Clojure Tip above, I described a kind of Boolean combinator that lets us build complex rules out of simpler rules. Your task is to build those combinators. Please define:

(defn rule-and
  ([])
 ([rule])
@devstopfix
devstopfix / ants.clj
Last active April 25, 2020 05:31 — forked from michiakig/ants.clj
Clojure ant sim from Rich Hickey
(ns ants.core)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Ant sim ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright (c) 2008 Rich Hickey. All rights reserved.
; The use and distribution terms for this software are covered by the
; Common Public License 1.0 (http://opensource.org/licenses/cpl.php)
; which can be found in the file CPL.TXT at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this license.
; You must not remove this notice, or any other, from this software.
@yogthos
yogthos / clojure-beginner.md
Last active April 15, 2024 17:11
Clojure beginner resources

Introductory resources

@angusiguess
angusiguess / biblio.md
Last active May 6, 2023 21:52
Emulators, Immutability, and Time Travel
@reborg
reborg / rich-already-answered-that.md
Last active February 23, 2024 13:09
A curated collection of answers that Rich gave throughout the history of Clojure

Rich Already Answered That!

A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.

How to use:

  • The link in the table of content jumps at the copy of the answer on this page.
  • The link on the answer itself points back at the original post.

Table of Content

@forax
forax / Interpreter.java
Last active September 7, 2017 10:45
Threaded like interpreter in Java
import static java.lang.invoke.MethodHandles.lookup;
import static java.lang.invoke.MethodType.methodType;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodHandles.Lookup;
import java.lang.invoke.MethodType;
import java.lang.invoke.MutableCallSite;
import java.util.Arrays;