Skip to content

Instantly share code, notes, and snippets.

View legumbre's full-sized avatar

Leonardo Etcheverry legumbre

  • GlamST / Ulta
  • Montevideo, Uruguay
View GitHub Profile

Ring Run dev workflow de LLL

Motivación

  • Evitar XCode en cuanto sea posible. Solo se usa xcodebuild si se tocaron fuentes C/Obj-C.
  • Comandos y funciones de conveniencia para iniciar y controlar RR desde Emacs.
  • Forma fácil de evaluar chunks y expresiones en el contexto del RR desde Emacs.
  • Chequeo básico de sintaxis antes de largar el juego y mientras se edita un archivo.
@legumbre
legumbre / .emacs
Created November 9, 2012 20:54
LLL-ringrun-config
;; lua mode
(autoload #'lua-mode "lua-mode")
(add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode))
(setq-default lua-default-application "telnet")
(setq-default lua-default-command-switches (list "localhost" "9000"))
(autoload #'flymake-lua-setup "flymake-lua" nil t)
;; (setq lua-prompt-regexp "[^\n]*\\(K>?[\t ]+\\)+$")
(eval-after-load 'lua-mode
'(progn
http = require("socket.http")
ltn12 = require("ltn12")
function fsize (file)
local current = file:seek() -- get current position
local size = file:seek("end") -- get file size
file:seek("set", current) -- restore position
return size
end
(defun xiangs-command (name age)
(interactive "sWhat's your name? \nnHow old are you? ")
(message (format "Your name is %s and you're %d years old" name age)))
;; M-x xiangs-command
@legumbre
legumbre / *scratch*.el
Created November 2, 2012 20:30
lualisp test
K> require "LispInterpreter"
K> ok, value = pcall(Lisp.evalExpr, Lisp.getGlobalEnv(), '((lambda (x) (+ x 2)) 10)')
ok, value = pcall(Lisp.evalExpr, Lisp.getGlobalEnv(), '((lambda (x) (+ x 2)) 10)')
K> print(value)
print(value)
atom[type=NUM, lex="12"]
K>
(defadvice shell (around prevent-remote-shells-from-tramp compile activate)
(let ((default-directory (if (file-remote-p default-directory)
"~/" default-directory)))
ad-do-it))
function map(fn, t)
res={}
for k,v in pairs(t) do
res[k] = fn(v)
end
return res
end
function mapk(fn, t)
res={}
@legumbre
legumbre / *Help*.txt
Created October 25, 2012 16:29
mac port emacs configure options
system-configuration-options is a variable defined in `C source code'.
Its value is
" '--with-mac' '--enable-mac-app' '--without-imagemagick' '--with-jpeg' '--with-png' '--with-gnutls' '--prefix=/Users/leo/dev/emacs/build' '--without-dbus'"
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.
#include <stdio.h>
int main (int argc, char *argv[])
{
printf("hello world!");
}
/* Local Variables: */
/* compile-command: "make -k foo && ./foo" */
/* End: */