Skip to content

Instantly share code, notes, and snippets.

View NPException's full-sized avatar
🐈

Dirk Wetzel NPException

🐈
  • Germany
View GitHub Profile
@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.
@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])
@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))))
@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}

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

@torcado194
torcado194 / cleanEdge-shadertoy.glsl
Last active April 24, 2025 09:48
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