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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <mruby.h> | |
#include <mruby/compile.h> | |
int main(void) { | |
mrb_state *mrb = mrb_open(); | |
char code[] = "p 'hello world!'"; | |
printf("Hello from mruby!\n"); |
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 hello) | |
(defn say-hello | |
"" | |
[] | |
(.log js/console "Hello world")) |
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
(def topic-fn [msg] | |
;; this is what I'm thinking about | |
) | |
(def p-ch (chan)) | |
(def p1 topic-fn p-ch) | |
(def s-ch1 | |
(sub p1 :foo s-ch1) |
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
<properties> | |
<maven.compiler.source>1.8</maven.compiler.source> | |
<maven.compiler.target>1.8</maven.compiler.target> | |
</properties> |
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
;> ooze "(def identity (fn [x] x)) (identity #t)" | |
; ModuleID = 'spikes' | |
%AnyVT = type <{ %AnyVT*, i8 }> | |
%Any = type <{ %AnyVT* }> | |
%Double = type <{ %AnyVT*, double }> | |
%Long = type <{ %AnyVT*, i64 }> | |
%Character = type <{ %AnyVT*, i32 }> | |
%Boolean = type <{ %AnyVT*, i1 }> |
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 pagination.core) | |
(defn slice [total size center] | |
(range | |
(max 1 (- center size)) | |
(inc (min total (+ center size))))) | |
(defn intersect? [s1 s2] (<= (first s2) (inc (last s1)))) | |
(defn group-slices [slices] |
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
[clojure-complete "0.2.3" :exclusions [[org.clojure/clojure]]] | |
[freactive.core "0.2.0-alpha1"] | |
[com.cemerick/austin "0.1.5"] | |
[com.cemerick/piggieback "0.1.3"] | |
[org.clojure/clojurescript "0.0-2227"] | |
[com.google.javascript/closure-compiler "v20131014"] | |
[args4j "2.0.16"] | |
[com.google.code.findbugs/jsr305 "1.3.9"] | |
[com.google.guava/guava "15.0"] | |
[com.google.protobuf/protobuf-java "2.4.1"] |
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 rules | |
(:require [clara.rules :refer :all])) | |
(defrecord Person [name gender]) | |
(defrecord Relation [person-a degree person-b]) | |
(defrecord Father [father descendant]) | |
(defrecord Mother [mother descendant]) | |
(defrule is-father "" | |
[Person (= :male gender) (= ?father name)] |
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
<tr class="nested-fields"> | |
<td> | |
<%= f.text_field :name %> | |
</td> | |
<td> | |
<%= link_to_remove_association 'Remover tarefa' %> <!-- IMPORTANTE: método adicionado pela gem que cria um link que executa um JS para REMOVER o trecho no form --> | |
</td> | |
</tr> |
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
t1 = Thing.create name: 'Book' | |
t2 = Thing.create name: 'Shirt' | |
t3 = Thing.create name: 'Game' | |
p1 = Person.create name: 'John' | |
p2 = Person.create name: 'Jane' | |
p3 = Person.create name: 'Mary' | |
Ownership.create owner: p1, thing: t1 # John owns a Book | |
Ownership.create owner: p2, thing: t2 # Jane owns a Shirt |