Thoughts, stories and ideas.

Ruby chat-server with Fibers & Eventmachine

Posting this mostly for my reference so I don’t lose it again later. require 'rubygems' require 'eventmachine' class Connection < EventMachine::Connection attr_accessor :fiber, :name def initialize @fiber

String matching with C++ PCRE

bool regex_match( const char *pattern, const std::string str, std::vector<:string> *substrings ) { const char *err; int erroffset = 0; pcre *re = pcre_compile( pattern, 0, &err,