Skip to content

Instantly share code, notes, and snippets.

@bkaradzic
bkaradzic / why_i_think_immediate_mode_gui_is_way_to_go_for_gamedev_tools.md
Last active April 5, 2024 05:40
Why I think Immediate Mode GUI is way to go for GameDev tools

Why I think Immediate Mode GUI is way to go for GameDev tools

Prerequisites

Before you continue, if you don't know what IMGUI is don't bother reading this post, just ignore it, don't write anything in comments section, etc. If you're curious about IMGUI see bottom of this post, otherwise continue whatever you were doing, this post it's not for you. Thanks!

If you know what IMGUI is, for context read following presentations and blog posts:

  • Insomniac’s Web Tools Postmortem
@rogerallen
rogerallen / 0_tweegeemee.txt
Last active November 19, 2016 20:31
tweegeemee archive
Archive of the code for images posted to https://twitter.com/tweegeemee
Started October 9, 2016
:clisk-random-seed 1610
Learn more at https://github.com/rogerallen/tweegeemee
;; This is the sort of thing that makes me think you'd enjoy using one
;; of the better Common Lisp implementations for certain kinds of
;; work. I'm using the latest version of SBCL here.
;; Ok, contrived example, but easy to imagine the code that it should
;; generate...
(defun add (x y)
(+ x y))
@jackrusher
jackrusher / naive-plant.clj
Last active March 12, 2016 16:24
Preview of my new 3D Turtle library, Gamera.
(defn branch
"A recursive branching tree structure with half-cylinder flowers."
[level]
(if (= 0 level)
[(length 1.5) cylinder]
[(angle (fn [_] (m/random 3 5))) ry-
(length (fn [t] (* (m/random 0.75 1.5) (or (:last-length t) 1.5))))
(map (fn [[a b]] (concat (take 8 (cycle [a b])) (branch (dec level))))
[[ry line] [ry- line] [rx line] [rx- line]])]))
@Integralist
Integralist / 0. description.md
Last active June 17, 2023 21:49
Clojure deftype, defrecord, defprotocol
  • defprotocol: defines an interface
  • deftype: create a bare-bones object which implements a protocol
  • defrecord: creates an immutable persistent map which implements a protocol

Typically you'll use defrecord (or even a basic map);
unless you need some specific Java inter-op,
where by you'll want to use deftype instead.

Note: defprotocol allows you to add new abstractions in a clean way Rather than (like OOP) having polymorphism on the class itself,

@tkafka
tkafka / LICENSE.txt
Last active May 17, 2024 02:08
Drop-in replacement for ReactCSSTransitionGroup that uses velocity.js instead of CSS transforms. Add your own transitions to `transitions` hash.
The MIT License (MIT)
Copyright (c) 2014 Tomas Kafka
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 conditions:
@sebmarkbage
sebmarkbage / react-terminology.md
Last active January 9, 2023 22:47
React (Virtual) DOM Terminology
@wmealing
wmealing / gist:ece2a08d3077cbe75d45
Last active August 29, 2015 14:07
Using node_package with relx.
Add node_package to rebar.config
{deps, [
....
{node_package, ".*",
{git, "https://github.com/wmealing/node_package.git", {branch, "develop"}}}
]}.
@john2x
john2x / 00_destructuring.md
Last active April 23, 2024 13:18
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors and Sequences

@sebmarkbage
sebmarkbage / ElementFactoriesAndJSX.md
Last active May 17, 2022 11:06
New React Element Factories and JSX

New React Element Factories and JSX

In React 0.12, we're making a core change to how React.createClass(...) and JSX works.

If you're using JSX in the typical way for all (and only) React components, then this transition will be seamless. Otherwise there are some minor breaking changes described below.

The Problem