Skip to content

Instantly share code, notes, and snippets.

@marianoguerra
marianoguerra / core.clj
Created June 10, 2014 14:48
immutant 1.1.2 and tools.logging error
(ns logerror.core
(:require
[immutant.cache :as cache]
[clojure.tools.logging :as log]))
(println #'clojure.tools.logging/*logger-factory*)
(try
(def my-cache (cache/create "cache"))
(catch Exception e
(println #'clojure.tools.logging/*logger-factory*)))
-file("examples/use_macros.fn", 1).
-module(use_macros).
-export([main/0]).
-file("examples/ms.hrl", 1).
what_am_i() -> a_function_in_the_macro_file.
@marianoguerra
marianoguerra / hello-2.lisp
Created April 7, 2012 03:11
hello world 2
; ask for the name
(display "name? ")
; bind the input to a variable
($let ((name (read-line)))
; build the message and bind it t a variable
($let ((message (string-append "Hello " name "!\n")))
; display the message
(display message)))
@marianoguerra
marianoguerra / hello-0.lisp
Created April 7, 2012 03:05
hello world 0
; display the message
(display "hello world\n")
@marianoguerra
marianoguerra / hello-3.lisp
Created April 7, 2012 03:13
hello world 3
; define a function to ask for a name
($define! ask-name ($lambda ()
($sequence
(display "name? ")
(read-line))))
; define a function to build the message
($define! build-message ($lambda (name)
(string-append "Hello " name "!\n")))
@marianoguerra
marianoguerra / hello-4.lisp
Created April 7, 2012 03:14
hello world 4
; define a function to ask for a name
($define! ask-name ($lambda ()
($sequence
(display "name? ")
(read-line))))
; define a function to build the message
($define! build-message ($lambda (name)
(string-append "Hello " name "!\n")))
@marianoguerra
marianoguerra / hello-1.lisp
Created April 7, 2012 03:20
hello world 1
; ask for the name
(display "name? ")
; display the message
(display (string-append "Hello " (read-line) "!\n"))
@marianoguerra
marianoguerra / README.rst
Created August 3, 2012 10:08
test requirejs toUrl method on different settups (requirejs version 2.0.4)

require.toUrl test

this repo is setup to store some files to test require.toUrl

to run start a web browser at the root of this repo, for example:

cd 3246403
python -m SimpleHTTPServer
@marianoguerra
marianoguerra / README.rst
Created August 3, 2012 13:07
requirejs example for issue 404

requirejs example for issue 404

this gist contains code to propose a fix for issue 404 on requirejs.

project structure:

├── demo.js
├── index.html
├── libs
@marianoguerra
marianoguerra / pypy-ctypes-bug.rst
Created August 7, 2012 04:55
Pypy ctypes struct initialization and assignment bug

Pypy ctypes struct initialization and assignment bug

to setup the example:

mkdir pypy-ctypes-bug
cd pypy-ctypes-bug
git clone https://github.com/hcatlin/libsass.git
cd libsass
./configure && make