Some of the features mentioned in this document only work on the beta or Dev channel. To change your channel:
- chrome://help in a browser window
- Click Detailed Build Information
- Change Channel
- Select Beta (Or Dev, if you're feeling adventurous)
Wonder Boy: The Dragon's Trap | |
----------------------------- | |
Quick Guide for programmers | |
Last updated October 2018 | |
Contact: Omar Cornut <XXXXXX | |
=============================================== | |
INDEX | |
=============================================== |
# Encoding: utf-8 | |
# | |
# idle.rb | |
# | |
# goal: | |
# Ruby script to test how to fetch IMAP mails with IDLE mode. | |
# IMAP IDLE allow a sort of "push" / "real-time" delivery. | |
# | |
# I used the script to test LATENCY (end-to-end delivery times) |
class Saga | |
class << self | |
def with_redis; raise NotImplementedError; end | |
attr_accessor :cleanup_delay, :queue, :last_txid | |
def queue | |
Thread.current[:saga_queue] ||= [] | |
end | |
def last_txid |
This gist will collects all issues we solved with Rails 5.2 and Webpacker
# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-test
For the past two weeks or so, I've been working on a little compiler project in C, mostly for educational purposes, i.e. to understand how a compiler really works. I'm not using any libraries, other than the C runtime library.
I have a hand-written lexer and parser, and a simple code generator targetting
# frozen_string_literal: true | |
class AssociationLoader < GraphQL::Batch::Loader | |
attr_reader :klass, :association | |
def initialize(klass, association) | |
raise ArgumentError, "association to load must be a symbol (got #{association.inspect})" unless association.is_a?(Symbol) | |
raise ArgumentError, "cannot load associations for class #{klass.name}" unless klass < ActiveRecord::Base | |
raise TypeError, "association #{association} does not exist on #{klass.name}" unless klass.reflect_on_association(association) | |
@klass = klass |
I recently happened upon a very interesting implementation of popen()
(different API, same idea) called popen-noshell using clone(2)
, and so I opened an issue requesting use of vfork(2)
or posix_spawn()
for portability. It turns out that on Linux there's an important advantage to using clone(2)
. I think I should capture the things I wrote there in a better place. A gist, a blog, whatever.
This is not a paper. I assume reader familiarity with
fork()
in particular and Unix in general, though, of course, I link to relevant wiki pages, so if the unfamiliar reader is willing to go down the rabbit hole, they should be able to come ou