Skip to content

Instantly share code, notes, and snippets.

Sean Billig sbillig

Block or report user

Report or block sbillig

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sbillig
sbillig / gist:5272756
Last active Dec 15, 2015 — forked from thomaslee/gist:4753338
Dumb "Hello World" TCP server in Rust. Updated for Rust 0.6
View gist:5272756
extern mod std;
use std::net;
use std::uv;
type ErrChan = comm::SharedChan<Option<net::tcp::TcpErrData>>;
fn on_ready(_kill_ch: ErrChan) {
io::println("listener is ready");
}
@sbillig
sbillig / gist:5287073
Created Apr 1, 2013
Rust str each_char error.
View gist:5287073
use core::str::*;
fn main() {
let s = ~"hello";
let f = |ch| { io::println(fmt!("%?",ch)); true };
// Works:
each_char(s, f);
// Fails:
// s.each_char(f);
@sbillig
sbillig / Makefile
Created Jan 28, 2014
C++ starter Makefile
View Makefile
CXX := clang++
CXXFLAGS := -isystem ./external -std=c++11 -stdlib=libc++ -MMD -MP \
-Wall -Wpedantic -Wextra -Weffc++ -O3
SRCS := $(wildcard src/*.cpp)
OBJS := $(SRCS:.cpp=.o)
TESTSRCS := $(wildcard tests/*.cpp)
TESTOBJS := $(TESTSRCS:.cpp=.o)
TESTOBJS += $(filter-out src/main.o,$(OBJS))
You can’t perform that action at this time.