This is a draft.
macOS doesn’t have many of the advanced Linux or UNIX features that have come about in the past 20 years. So getting a proper chroot environment up and running takes a little more work.
{ | |
"compilerOptions": { | |
// project options | |
"lib": [ | |
"ESNext", | |
"dom" | |
], // specifies which default set of type definitions to use ("DOM", "ES6", etc) | |
"outDir": "lib", // .js (as well as .d.ts, .js.map, etc.) files will be emitted into this directory., | |
"removeComments": true, // Strips all comments from TypeScript files when converting into JavaScript- you rarely read compiled code so this saves space | |
"target": "ES6", // Target environment. Most modern browsers support ES6, but you may want to set it to newer or older. (defaults to ES3) |
# Adapted from http://vojtastavik.com/2018/10/15/building-ios-app-without-xcode/ | |
SYS_BASE := /usr/local | |
SYS_LIB := $(SYS_BASE)/lib | |
SYS_INCLUDE := $(SYS_BASE)/include | |
ORGANIZATION := # Organization Name | |
NAME := # App Name | |
BUNDLE := $(NAME).app |
# | |
# This is a simple rackup file for geminabox. It allows simple role-based authorization. | |
# | |
# roles: | |
# - developer | |
# - upload | |
# - delete | |
# - admin (can do anything) | |
# | |
# For example, a developer who can access the service and upload new gems would have the following roles: `%w(developer upload) |
import Foundation | |
protocol Channel: IteratorProtocol { | |
func send(_ value: Element?) | |
} | |
/// A blocking channel for sending values. | |
/// | |
/// `send` and `receive` must run in separate separate execution contexts, otherwise you get a deadlock. | |
final class BlockingChannel<A>: Channel { |
import Foundation | |
import PlaygroundSupport | |
/// A thread-safe array. | |
public class SynchronizedArray<Element> { | |
private let queue = DispatchQueue(label: "io.zamzam.ZamzamKit.SynchronizedArray", attributes: .concurrent) | |
private var array = [Element]() | |
public init() { } | |
CRYSTAL = crystal | |
UNAME = "$(shell uname -ms)" | |
LIBRARY_PATH = $(shell brew --prefix crystal-lang)/embedded/lib | |
LIBS = -levent -lpcl -lpcre -lgc -lpthread | |
LDFLAGS = -Wl,-undefined,dynamic_lookup | |
TARGET = crystal_example_ext.bundle | |
$(TARGET): crystal_example_ext.o | |
$(CC) -bundle -L$(LIBRARY_PATH) -o $@ $^ $(LIBS) $(LDFLAGS) |
#include "SDL.h" | |
/* | |
Compilation: | |
============ | |
gcc -g --std=c99 -o sdl2_stbtt sdl2_stbtt.c `sdl2-config --cflags --libs` -lm | |
Usage: | |
====== | |
./sdl2_stbtt /usr/share/fonts/TTF/LiberationMono-Regular.ttf |