Skip to content

Instantly share code, notes, and snippets.

Unhandled exception: System.InvalidCastException: Cannot cast from source type to destination type.
at Niecza.CLRBackend.DowncallReceiver.new_unit (System.Object[] args) [0x00000] in <filename unknown>:0
at Niecza.CLRBackend.DowncallReceiver.Call (System.Object[] args) [0x00000] in <filename unknown>:0
at Niecza.CLRBackend.DowncallReceiver.get_Item (System.Object i) [0x00000] in <filename unknown>:0
at /home/larry/perl6/niecza/src/NieczaFrontendSTD.pm6 line 273 (ANON @ 3)
at <unknown> line 0 (ExitRunloop @ 0)
at /home/larry/perl6/niecza/src/NieczaFrontendSTD.pm6 line 274 (NieczaFrontendSTD.parse @ 61)
at /home/larry/perl6/niecza/src/NieczaCompiler.pm6 line 34 (NieczaCompiler.compile @ 18)
at /home/larry/perl6/niecza/src/NieczaCompiler.pm6 line 65 (NieczaCompiler.compile_string @ 5)
at /home/larry/perl6/niecza/src/niecza line 165 (ANON @ 6)
@masak
masak / events.list
Created November 19, 2012 15:46
The events in Adventure::Engine
Initiation phase
================
Adventure::TwoRoomsConnected
Adventure::TwoRoomsDisconnected
Adventure::DirectionAliased
Adventure::RoomMadeDark
Adventure::ThingPlaced
Adventure::ThingMadeAContainer
@miyagawa
miyagawa / gist:3998304
Created November 2, 2012 02:22
perl -MExtUtils::Installed -E 'say for ExtUtils::Installed->new->modules'
Algorithm::C3
Algorithm::Diff
Algorithm::Merge
Amon2
Any::Moose
AnyEvent
AnyEvent::HTTP
AnyEvent::Redis
AnyEvent::Twitter::Stream
App::CLI
@masak
masak / base.pl
Created November 1, 2012 21:08
All your base (and unbase) are belong to us
use v6;
sub base(@rad, @a) { [+] ([\*] 1, @rad.reverse) Z* @a.reverse };
sub unbase(@rad, $val is copy) {
reverse gather {
for @rad.reverse {
take $val % $_;
last unless ($val /= $_).=Int;
}
@audreyt
audreyt / posa.mkdn
Last active November 28, 2022 21:24
EtherCalc.tw

從 SocialCalc 到 EtherCalc

先前在《開源應用程式架構》 一書中,我介紹了 SocialCalc 這個在瀏覽器中運行的試算表編輯器,以取代伺服器為中心的 WikiCalc 架構。SocialCalc 在瀏覽器中執行所有的運算,只有在載入和儲存試算表時才會使用伺服器。

追求效能是 Socialtext 團隊在 2006 年時設計 SocialCalc 的主要目的。重點在於:在 JavaScript 環境下執行客戶端運算,儘管在當年的速度僅有伺服器端 Perl 運算的十分之一,但仍然勝過 AJAX 來回傳輸資料造成的網路延遲:


WikiCalc 與 SocialCalc 架構比較

******
@am0c
am0c / gist:3979793
Created October 30, 2012 11:59 — forked from aanoaa/gist:3979758
bugzilla-install.sh
#!/bin/sh
BZ_ADMIN_EMAIL='<user>@gmail.com'
BZ_ADMIN_PASSWORD='****'
BZ_ADMIN_REALNAME='realname'
BZ_SERVER_NAME='bz4.localhost'
BZ_URLBASE='http://bz4.localhost/'
BZ_APACHE_GROUP='www-data'
BZ_INSTALL_PATH='/home/bugzilla/public_html/bugzilla'
@aanoaa
aanoaa / gist:3979758
Created October 30, 2012 11:43
bugzilla-install.sh
#!/bin/sh
BZ_ADMIN_EMAIL='<user>@gmail.com'
BZ_ADMIN_PASSWORD='****'
BZ_ADMIN_REALNAME='realname'
BZ_SERVER_NAME='bz4.localhost'
BZ_URLBASE='http://bz4.localhost/'
BZ_APACHE_GROUP='www-data'
BZ_INSTALL_PATH='/home/bugzilla/public_html/bugzilla'
@audreyt
audreyt / posa.mkdn
Last active October 12, 2021 01:06
EtherCalc Chapter for the upcoming book "The Performance of Open Source Applications" - Draft - comments welcome!

From SocialCalc to EtherCalc

Previously, in The Architecture of Open Source Applications, I described SocialCalc, an in-browser spreadsheet system that replaced the server-centric WikiCalc architecture. SocialCalc performs all of its computations in the browser; it uses the server only for loading and saving spreadsheets.

For the Socialtext team, performance was the primary goal behind SocialCalc's design in 2006. The key observation was this: Client-side computation in JavaScript, while an order of magnitude slower than server-side computation in Perl, was still much faster than the network latency incurred during AJAX roundtrips:


WikiCalc and SocialCalc's performance model

******
@sng2c
sng2c / buscheck.pl
Created September 25, 2012 07:29
고속버스 빈자리 체크
#!/usr/bin/perl
use utf8;
use LWP::UserAgent;
use Encode;
use AnyEvent;
binmode(STDOUT,":utf8");
my $cv = AE::cv;
my $only_biz = 1;
@yongbin
yongbin / silex-skel-db-no-orm.pl
Created April 20, 2011 17:06
DB를 사용하지만 ORM을 사용하지 않는 간단한 스크립트 작성에 사용하는 skel 입니다.
#!/usr/bin/env perl
use 5.010;
use utf8;
use strict;
use warnings;
use autodie;
use Getopt::Long::Descriptive;
use Carp qw/croak/;