Skip to content

Instantly share code, notes, and snippets.

View rurban's full-sized avatar

Reini Urban rurban

View GitHub Profile
@rurban
rurban / dwg11.c
Last active April 15, 2022 08:01
dwg r11 parser
/* Scan DWG program -- for scanning a DWG file
Copyright (C) 1995, 1996 Frans Faase, Reini Urban
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@rurban
rurban / linkorder.log
Last active October 22, 2018 12:47
Search best cperl .o permution
make: Nothing to be done for 'miniperl'.
0 1.451963
0 1.453744
# perlmini miniperlmain gv toke perly opmini pad sv hv av run pp_hot ppmini pp_type scope pp_ctl pp_sys doop doio regcomp util xsutilsmini mg keywords regexec utf8 globals universal
# 27 1
0 1.462567
# perlmini miniperlmain gv toke perly opmini pad sv hv av run pp_hot ppmini pp_type scope pp_ctl pp_sys doop doio regcomp util xsutilsmini mg keywords regexec utf8 universal globals
# 27 2
0 1.455446
# perlmini miniperlmain gv toke perly opmini pad sv hv av run pp_hot ppmini pp_type scope pp_ctl pp_sys doop doio regcomp util xsutilsmini mg keywords regexec utf8 globals universal
@rurban
rurban / warn-shadow-pkg.pl
Last active August 3, 2018 07:14
use warnings 'shadow-package'
# detected by mziescha
use warnings 'shadow-package'; # or just shadow
package Acme::Test;
sub new { bless {}, shift }
sub Sub { 'shadowed' }
package Acme::Test::Sub;
sub new { print 'Sub'; bless {}, shift } # warn: "Package Acme::Test::Sub shadowed by Acme::Test->Sub at warn-shadow-pkg.pl, line 8"

Keybase proof

I hereby claim:

  • I am rurban on github.
  • I am rurban (https://keybase.io/rurban) on keybase.
  • I have a public key ASA4zOnAYHaV6V5Kkbs121Eju-DcyNamr0ZIRsNpVBDwRAo

To claim this, I am signing this object:

@rurban
rurban / i686-w64-mingw32-ddk.patch
Last active March 22, 2017 19:30
ReactOS DDK header for clisp appvoyer
rurban@cpan.org for clisp mingw64 builds
Avoid the need for -Iddk with #include <ntifs.h>
--- mingw32/i686-w64-mingw32/include/ddk/ntddk.h~ 2017-01-14 23:19:13.000000000 +0100
+++ mingw32/i686-w64-mingw32/include/ddk/ntddk.h 2017-03-22 14:46:54.000000000 +0100
@@ -35,11 +35,11 @@
#define NT_INCLUDED
#define _CTYPE_DISABLE_MACROS
-#include <wdm.h>

Perl 5 is still in business but lost lot of its market share since the announcement of Perl 6. I'll outline the technological problems with perl5 which led to perl6, the management problems, and my various attempts to get perl5 into proper shape. parrot, the perl compiler, p2 and cperl. There are interesting observations in toxic cultures and technological problems.

Session type: 40-minute presentation Topics: The new stuff Abstract

Perl 5 is still in business but lost lot of its market share since the announcement of Perl 6 in 2002.

I’ll outline the technological problems with perl5 which led to perl6, the management problems in the p5p perl community which led to serious brain drain, the various attempts to get parrot and perl6 into shape for the last 14 years and more.

$ for p in `cat benchperl.lst`; do perf stat -r3 $p bench.pl 2>> bench.dat; done
bench.pl: (no unicode, no oo)
#!/usr/bin/perl
my @a = (0..31);
my %h = (1..100);
my $s = '0123456789';
sub f {
my $n = shift;
$n % 2 and bless{1..4} and $h{$n} and $a[$n] and $s =~ s/$/../;
@rurban
rurban / players.pl
Last active January 18, 2016 17:03
#!/usr/bin/perl
# git clone https://github.com/BuzzFeedNews/2016-01-tennis-betting-analysis
# cd 2016-01-tennis-betting-analysis
use Digest::SHA 'sha256_hex';
# atp top100 2008-12-22
# wget 'http://www.atpworldtour.com/en/rankings/singles?rankDate=2008-12-22' -o singles.html
# grep /overview singles.html | perl -lne'm{">(.*)<\/a>} && print $1' > players
my @n = split(/\n/, `cat players`);
@rurban
rurban / users.json
Created March 13, 2015 11:12
googlecode to github
{
"users": {
"alexchorny": "chorny",
"bdraco": "bdraco",
"kid51": "jkeenan",
"brooklyn.kid51": "jkeenan",
"bulk88": "bulk88",
"erin.schoenhals": "xantronix",
"heinz.knutzen@gmx.de": "hknutzen",
"jquelin": "jquelin",
@rurban
rurban / id:000119,sig:11,src:000000,op:havoc,rep:8
Last active August 29, 2015 14:12
afl-fuzz parrot => SEGV
install afl: http://lcamtuf.coredump.cx/afl/
perl Configure --cc=afl-gcc --disable-shared
mkdir afl-out afl-testcase
cp t/op/literal.t testcase/
afl-fuzz -C -o afl-out -i afl-testcase -m4000 -- parrot_old -r @@
for f in afl-out/crashes/*; do ./parrot_old $f >/dev/null 2>/dev/null || echo $f $?; done
$ cat afl-out/crashes/id:000119,sig:11,src:000000,op:havoc,rep:8