- Emil Persson @Humus
- Matt Pettineo @mynameismjp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns x.ratelimit | |
(:require | |
[taoensso.carmine :as car :refer [wcar]] | |
[ring.util.response :as response] | |
[ring.mock.request :as mock]) | |
(:import | |
[java.util Calendar])) | |
;; Util ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn lazy-file-lines [file] | |
(try | |
(letfn [(helper [rdr] | |
(lazy-seq | |
(if-let [line (.readLine rdr)] | |
(cons line (helper rdr)) | |
(do (.close rdr) nil))))] | |
(helper (clojure.java.io/reader file))) | |
(catch Exception e nil))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LIBRARY user32 | |
EXPORTS | |
UserGetPrecisionTouchPadConfiguration @2548 | |
UserSetPrecisionTouchPadConfiguration @2549 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; ====================================================================================== | |
;; # Uses the Berkeley simple stk package for the `bf` and `se`. | |
;; ====================================================================================== | |
(define (reduce-berk f start coll) | |
(define (iter rest ret) | |
(if (empty? rest) | |
ret | |
(iter (bf rest) (f ret (first rest))))) | |
(iter coll start)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Uses Berkeley's (sentence) helper - slow after 1-5k, but supports larger range than `range-se-recur` | |
(define (range-se-iter start end) | |
(define (iter c ret) | |
(if (= c end) | |
ret | |
(iter (+ c 1) (se ret c)))) | |
(iter start '())) | |
; Uses Berkeley's (sentence) helper - quite slow after 1-5k, seg faults around 1-15k | |
(define (range-se-recur start end) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; outlet code for implementing traditional macro expansion | |
;; macros | |
(define (expand form) | |
(cond | |
((variable? form) form) | |
((literal? form) form) | |
((macro? (car form)) | |
(expand ((macro-function (car form)) form))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef AUGMENTED_C_GUARD | |
#define AUGMENTED_C_GUARD | |
#include <stddef.h> | |
typedef ptrdiff_t isize; | |
#define offset_of(Type, element) ((isize)&(((Type *)0)->element)) | |
#define JOIN2_IND(a, b) a##b | |
#define JOIN2(a, b) JOIN2_IND(a, b) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define BINKGL_LIST \ | |
/* ret, name, params */ \ | |
GLE(void, LinkProgram, GLuint program) \ | |
GLE(void, GetProgramiv, GLuint program, GLenum pname, GLint *params) \ | |
GLE(GLuint, CreateShader, GLenum type) \ | |
GLE(void, ShaderSource, GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length) \ | |
GLE(void, CompileShader, GLuint shader) \ | |
GLE(void, GetShaderiv, GLuint shader, GLenum pname, GLint *params) \ | |
GLE(void, GetShaderInfoLog, GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog) \ | |
GLE(void, DeleteShader, GLuint shader) \ |
Note: a lot of programmers talk about UI without mentionning the user even once, as if it was entirely a programming problem. I wonder what we’re leaving off the table when we do that.
- https://gist.github.com/vurtun/65977fcff17e413721dbd1191cda719d Vurtun’s notes about UI
- https://gist.github.com/vurtun/61b6dbf21ef060bcbbd8d1faa88350d9 Vurtun’s experiments
- https://gist.github.com/vurtun/9782db089430167453cff6785b37bb46 other notes by Vurtun
- https://gist.github.com/pervognsen/279156b894c5d04ca73df7afc12a37ee Notes about slate by Per Vognsen
- https://docs.unrealengine.com/latest/INT/Programming/Slate/
- https://docs.unrealengine.com/latest/INT/Engine/UMG/index.html
- https://soundcloud.com/podcastcode/6-dont-make-me-write-ui
OlderNewer