Skip to content

Instantly share code, notes, and snippets.

C:\Windows>winget install Git.Git
Found Git [Git.Git]
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licences to, third-party packages.
Downloading https://github.com/git-for-windows/git/releases/download/v2.28.0.windows.1/Git-2.28.0-64-bit.exe
██████████████████████████████ 48.7 MB / 48.7 MB
Successfully verified installer hash
Installing ...
Successfully installed!
@feuery
feuery / madness i say.el
Created April 13, 2020 15:33
emacs madness
(let* ((buffer-name (concatenate 'string "qmapper-" (prin1-to-string (random))))
(proc (open-network-stream buffer-name (get-buffer-create buffer-name)
qmapper-server qmapper-editor-port
:nowait nil)))
(process-send-string proc "LIST-TILESETS;\n")
(set-process-sentinel proc (lambda (p e)
(with-current-buffer (get-buffer buffer-name)
(message (buffer-string)))
(kill-buffer buffer-name)))
nil)
@feuery
feuery / wat
Created September 13, 2017 16:21
roland:/home/feuer2/Dropbox/qt-test % sbcl
fatal error encountered in SBCL pid 4105(tid 0x7ffff7fbbfc0):
can't find core file at NIL/sbcl.core
void immutable_obj::setup_texture(QOpenGLFunctions_4_3_Core *f, const char* filename)
{
if(strcmp(filename, "") == 0) {
qDebug() << "Not loading texture's from an empty string";
return;
}
if(!shader_loaded) { qDebug()<<"Shader isn't loaded?"; return; }
f->glGenTextures(1, &texture);
(assoc-in {} [:this 0 :is] :test) ;;=> {:this {0 {:is :test}}}
(what-implements-this? {} [:this 0 :is] :test) ;; => {:this [{:is :test}]}
bool square_collision_p (int x1, int y1, int w1, int h1,
int x2, int y2, int w2, int h2) {
return x1 < x2 + w2 &&
x1 + w1 > x2 &&
y1 < y2 + h2 &&
(y1 + h1) > y2;
}
bool collisions_p (int maxI) {
(defun rpn->infix (expr)
"Outputs expr in infix form. For example\n(rpn->infix '(< x1 (+ x2 w2))) => x1 < x2 + w2\n\nI'm not going to write an interactive version cause I don't remember how to command emacs' interactive-fn :D"
(let* ((symbol (car expr))
(param1 (cadr expr))
(param2 (caddr expr)))
(insert (prin1-to-string param1) " "
(prin1-to-string symbol) " ")
(if (atom param2)
(insert (prin1-to-string param2))
(rpn->infix param2))))
(def rooms [{:x 0 :y 0 :w 3 :h 3}
{:x 2 :y 2 :w 2 :h 1}
{:x 5 :y 2 :w 10 :h 1}])
(for [[x y w h :as a] (map (juxt :x :y :w :h) rooms)
[x2 y2 w2 h2 :as b] (map (juxt :x :y :w :h) rooms)
:when (not= a b)]
(square-collision? a b))
PUSH 'iszero
LAMBDA
PUSH 0
PEQ
RET
PUSH 'waszero
LAMBDA
MULTIPLY CX
RET
{:G__31964
{:y 150,
:name "New sprite",
:type :sprite,
:angle 327.7682228088379,
:id :G__31964,
:parent-id :MAP__30960,
:order 1,
:x 205,
:subtype :static},