Get it from the App Store.
In XCode's Preferences > Downloads you can install command line tools.
test: test_c.o test_d.o | |
cc -shared -m32 test_c.o test_d.o -o test.so -lphobos2 | |
test_c.o: test.c | |
gcc -c -m32 test.c -o test_c.o | |
test_d.o: test.d | |
dmd -c -m32 test.d -oftest_d.o |
#include "mruby.h" | |
#include "mruby/string.h" | |
#include "mruby/array.h" | |
mrb_value | |
migrate_simple_value(mrb_state *mrb, mrb_value v, mrb_state *mrb2) | |
{ | |
mrb_value nv; /* new value */ | |
const char *s; | |
int len; |
# navigation | |
# ctrl + A - moves to the start of the line | |
# ctrl + E - moves to the end of the line | |
# ctrl + B - move back on character | |
# ctrl + F - move forward one character | |
# esc + B - move back one word | |
# esc + F - move forward one word | |
# alt + <-/-> | |
# ctrl + U - delete from the cursor to the beginning of the line | |
# ctrl + K - delete from the cursor to the end of the line |
This is a summary of the "Learn You A Haskell" online book under http://learnyouahaskell.com/chapters.
# config/initializers/source_maps.rb | |
if Rails.env.development? | |
module CoffeeScript | |
class SourceMapError < StandardError; end; | |
class << self | |
def compile script, options | |
script = script.read if script.respond_to?(:read) |
require 'fiddle' | |
class GVL | |
handle = Fiddle::Handle::DEFAULT | |
address = handle['rb_thread_blocking_region'] | |
func = Fiddle::Function.new address, [Fiddle::TYPE_VOIDP, | |
Fiddle::TYPE_VOIDP, | |
Fiddle::TYPE_VOIDP, | |
Fiddle::TYPE_VOIDP], Fiddle::TYPE_VOIDP |
### | |
# Execute tests in parallel using multiple processes. Uses DRb to communicate | |
# between processes over a unix socket. | |
gem 'minitest', '~> 5.1.0' | |
require 'minitest' | |
require 'minitest/spec' | |
require 'minitest/mock' | |
require 'drb' | |
require 'drb/unix' |
Find it here: https://github.com/bitemyapp/learnhaskell
class HTTPRouter | |
self() | |
self.routes = { } | |
end | |
add(verb is String, path is String, func is Function) | |
self.routes[#self.routes + 1] = Route(verb, path, func) | |
end | |
match(verb, path) | |
for i=1, #self.routes do | |
m, q = self.routes[i].match(verb, path) |