This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LIBNAME = lpeg_utf8 | |
OUT = $(LIBNAME).so | |
LUADIR = /usr/include/lua5.1/ | |
LPEGDIR = ../lpeg-0.10.2/ | |
CFLAGS = -O2 -fpic --pedantic -I$(LUADIR) -I$(LPEGDIR) | |
CC = gcc | |
$(OUT): lpeg_utf8.o |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local lpeg = require 'lpeg' | |
local U = require 'icu.ustring' | |
local re = require 'icu.regex' | |
local utf8_codepoint | |
do | |
-- decode a two-byte UTF-8 sequence | |
local function f2 (s) | |
local c1, c2 = string.byte(s, 1, 2) | |
return c1 * 64 + c2 - 12416 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'celluloid' | |
module CellMixin | |
include Celluloid # seems to have no effect | |
def foo | |
p Celluloid.current_actor # causes Celluloid::NotActorError | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'celluloid' | |
class PluginOne | |
include Celluloid | |
def foo(args) | |
args[:first_added] = true | |
yield :continue | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/home/hinrik/.rvm/gems/ruby-1.9.3-p0/gems/celluloid-0.9.0/lib/celluloid.rb:88:in `new': undefined local variable or method `allocate' for Connector:Module (NameError) | |
from lib/connector.rb:11:in `<main>' | |
################## | |
require 'celluloid/io' | |
module Connector | |
include Celluloid::IO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Replace Rails' confirmation dialog with a translatable Bootstrap modal dialog. | |
# Requires jQuery 1.7, Bootstrap, and i18n-js (https://github.com/fnando/i18n-js) | |
# Translation strings used: confirm.title, confirm.ok, confirm.cancel | |
$ -> | |
$.rails.confirm = (message) -> | |
$("#confirm_dialog > .modal-body").html("<p><i class='icon-warning-sign'></i> " + message + '</p>') | |
false | |
if $('[data-confirm]') | |
$('body').append("<div class='modal hide' id='confirm_dialog'><div class='modal-header'><a class='close' data-dismiss='modal'>×</a><h3>" + I18n.t('confirm.title') + "</h3></div><div class='modal-body'></div><div class='modal-footer'><a class='btn btn-primary'></a><a href='#' data-dismiss='modal' class='btn'>" + I18n.t('confirm.cancel') + "</a></div></div>") | |
$('[data-confirm]').each -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Replace Rails' confirmation dialog with a translatable jQuery UI modal dialog. | |
# Requires i18n-js (https://github.com/fnando/i18n-js) | |
# Translation strings used: confirm.title, confirm.ok, confirm.cancel | |
$ -> | |
$.rails.confirm = (message) -> | |
$("#confirm_dialog").html('<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>' + message + '</p>') | |
false | |
if $('[data-confirm]') | |
$('body').append("<div id='confirm_dialog' title='" + I18n.t('confirm.title') + "'></div>") | |
diag_elem = $('#confirm_dialog') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You can run this like so (see https://metacpan.org/release/App-Pocoirc): | |
# $ pocoirc -itv -I /source/dir -n grokbot -s irc.freenode.net -j '#perl6' -a Connector -a 'Grok{"Channels": ["#perl6"]} | |
package Grok; | |
use strict; | |
use warnings FATAL => 'all'; | |
use Carp qw(croak); | |
use App::Grok; | |
use App::Grok::Resource::Functions qw<func_fetch>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12:01:34 <@Hinrik> this bug I'm trying to track down is just insane | |
12:02:49 <@Hinrik> as I remove more lines of code to make it as simple as possible, it's taking more runs of the program to trigger the bug | |
12:07:00 <@dngor> BinGOs: There are potential races with SIGCHLD. It can be delivered ahead of the pipe read that registers EOF. | |
12:07:31 <@Hinrik> sounds like something I'm experiencing | |
12:07:55 <@BinGOs> it wasn't so much the delivery order, but the fact that a forked process of the PWR process was holding the wheel 'open' | |
12:08:02 <@dngor> What happens if you add a sleep wherever you've been removing code? | |
12:09:49 <@BinGOs> was that for me ? | |
12:10:22 <@dngor> It was for Hinrik. He's seeing a race that goes away as he simplifies the test case. | |
12:10:33 <@BinGOs> Oh fine >:) | |
12:11:05 <@BinGOs> I think the forked process is holding the STDOUT/ERR filehandles open, so in my case the wheel doesn't close. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
is: | |
errors: | |
messages: | |
not_found: "Afsakið, síðan fannst ekki." | |
not_authorized: "Afsakið, auðkenning mistókst." | |
not_available: "Afsakið, þessa síða er niðri tímabundið." | |
not_existent: "Afsakið, þessi síða er ekki til." | |
devise: | |
confirmations: |