Skip to content

Instantly share code, notes, and snippets.

@jkeenan
jkeenan / subversion-to-git-migration-of-cpan-module.pod
Last active September 6, 2017 13:30
Migrate List-Compare from Subversion on One Machine to Git on Another

Migrate List-Compare from Subversion on One Machine to Git on Another

... and then up to github.com!

Initial Situation

On a Mac OS X iBook G4, I had a Subversion repository with a wide variety of projects: my CPAN modules, YAPC and other conference presentations, etc. I wanted to transfer the locus of development for certain projects, beginning with my CPAN distribution List-Compare, to a newer machine running Ubuntu

@jkeenan
jkeenan / gist:34e3cde46b1693309e40
Created December 17, 2014 03:09
Parrot build failure on Darwin-PPC at commit d0d0694
/usr/local/bin/perl tools/build/h2inc.pl include/parrot/enums.h lib/Parrot/Pmc2c/PCCMETHOD_BITS.pm
/usr/local/bin/perl tools/build/addgenerated.pl "lib/Parrot/Pmc2c/PCCMETHOD_BITS.pm" "[devel]" lib
/usr/local/bin/perl tools/build/pbcversion_h.pl > include/parrot/pbcversion.h
/usr/local/bin/perl tools/build/addgenerated.pl "include/parrot/pbcversion.h" "[main]" include
/usr/local/bin/perl tools/build/vtable_h.pl
/usr/local/bin/perl tools/build/addgenerated.pl "include/parrot/vtable.h" "[main]" include
/usr/local/bin/perl -Ilib tools/build/pmc2c.pl --vtable
/usr/local/bin/perl -Ilib tools/build/pmc2c.pl --dump src/pmc/default.pmc
/usr/local/bin/perl -Ilib tools/build/pmc2c.pl --dump src/pmc/fixedintegerarray.pmc
/usr/local/bin/perl -Ilib tools/build/pmc2c.pl --c src/pmc/fixedintegerarray.pmc
@jkeenan
jkeenan / gist:37fbe0432816ed1f4189
Created June 7, 2015 22:35
Request help on interaction between 'perlbrew' and 'cpanm'

Perl 5.22 just came out. Up until last year, when a new perl would come out, I would download a tarball to my machine (either an older Mac laptop or a Debian server on http://linode.com), unpack the tarball, configure, build and test from source, and finally call sudo make install to install the executable into /usr/local/bin. I would then use the cpan shell to download, configure, build and install Perl modules into /usr/local/lib.

In other words, I would install Perl and its libraries in a traditional Unix-y way.

When I got my current laptop in March 2014, I decided to take a different approach. I decided to forego installing into /usr/local and to instead use perlbrew to install all the perl versions I wanted underneath my home directory. One reason I took this approach is that in the work I do for Perl 5 Porters, it's important to be able to switch back and forth between various Perl versions with great ease.

I also decided to start using cpanm to install Perl modules,

@jkeenan
jkeenan / rpn.pl6
Created May 14, 2016 11:57
Bennett Todd's 'rpn' calculator program
#!/usr/bin/env perl6
use v6;
use fatal;
sub rpn (Str $line, @stack) returns Array {
for $line.words {
#say 'Debug ' ~ @stack.perl ~ $_;
when $_ ~~ /\d/ { @stack.push( +($_)); };
my $top = @stack.pop() if @stack;
my $next = @stack.pop() if @stack;
when '+' { @stack.push($next + $top) };
@jkeenan
jkeenan / vagrant_up_failure.md
Created August 4, 2016 14:07
'vagrant up' fails to find VirtualBox

Immediate problem:

$ vagrant up --provider virtualbox
No usable default provider could be found for your system.

Vagrant relies on interactions with 3rd party systems, known as
"providers", to provide Vagrant with resources to run development
environments. Examples are VirtualBox, VMware, Hyper-V.
@jkeenan
jkeenan / openbsd_install_problem.md
Created August 6, 2016 22:15
OpenBSD: After reboot, cannot get past installation program

I am trying to install OpenBSD/amd64 5.9 inside VirtualBox 5.1. I did this successfully with FreeBSD 10.3 last weekend, so I had high hopes for success with OpenBSD. Since the FreeBSD install required a .iso file, I located a similar file for OpenBSD:

http://ftp5.usa.openbsd.org/pub/OpenBSD/5.9/amd64/install59.iso

The installation process went fairly smoothly. I selected a root password and created one user and that user's password. I selected the defaults in almost all cases and attempted nothing fancy. I finally got to this point:

CONGRATULATIONS! Your OpenBSD installation has been successfully completed.
To boot the new system, enter 'reboot' at the command prompt.

So I then entered reboot at the # prompt, and the system proceeded to reboot in what appeared to be the expected manner. However, after the demsg message printed out and I got to here:

@jkeenan
jkeenan / vagrant_up_failure.md
Created August 16, 2016 02:26
'vagrant up' does not complete smoothly

I have a FreeBSD 10.3 virtual machine running inside a VirtualBox 5.1 box sitting on a Linux x86-64 (Ubuntu 16.04 LTS) host. I control the virtual machine via Vagrant 1.8.5. From the Linux command-line I say:

$ cd ~/vagrant
$ vagrant up

... to which the output is:

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
@jkeenan
jkeenan / valgrind.texi2any.sh
Created November 7, 2016 21:06
valgrind around script with panic
$ valgrind $PERL -w ../texi2any.pl --set-customization-variable=TEXI2HTML --force --conf-dir ./../t/init/ --conf-dir ./../init -I formatting// -I ./ --set-customization-variable L2H_FILE=./../t/init/l2h.init --error-limit=1000 --set-customization-variable TEST=1 --set-customization-variable L2H_CLEAN=0 --output formatting//out_parser/simplest_test_prefix_info/ --info --set-customization-variable 'PREFIX truc' ./formatting//simplest.texi
==1502== Memcheck, a memory error detector
==1502== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==1502== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==1502== Command: /home/jkeenan/testing/a5540cf/bin/perl -w ../texi2any.pl --set-customization-variable=TEXI2HTML --force --conf-dir ./../t/init/ --conf-dir ./../init -I formatting// -I ./ --set-customization-variable L2H_FILE=./../t/init/l2h.init --error-limit=1000 --set-customization-vari
@jkeenan
jkeenan / valgrind.more.detail.texi2any.sh
Created November 7, 2016 21:22
valgrind with more leak detail
This file has been truncated, but you can view the full file.
valgrind --leak-check=full --show-leak-kinds=all $PERL -w -d ../texi2any.pl \
--set-customization-variable=TEXI2HTML \
--force \
--conf-dir ./../t/init/ \
--conf-dir ./../init -I formatting// -I ./ \
--set-customization-variable L2H_FILE=./../t/init/l2h.init \
--error-limit=1000 \
--set-customization-variable TEST=1 \
--set-customization-variable L2H_CLEAN=0 \
--output formatting//out_parser/simplest_test_prefix_info/ \
@jkeenan
jkeenan / cpan.river.csv
Created April 9, 2017 15:28
CPAN River in CSV format (as of 2017-04-09)
We can't make this file beautiful and searchable because it's too large.
count,distribution,core_upstream_status,maintainers,top_3_downstream
27572,perl,,,"PathTools:27554 Test-Simple:27554 Carp:27554 Pod-Simple:27554 Pod-Escapes:27554"
27554,Carp,blead-upstream,"DAPM DOM FLORA JESSE LBROCARD NWCLARK P5P RJBS ZEFRAM","File-Path:27554 PathTools:27554 File-Temp:27554 Exporter:27554 Pod-Simple:27554"
27554,Data-Dumper,blead-upstream,"EDAVIS GSAR ILYAM P5P SMUELLER","ExtUtils-MakeMaker:27554 CPAN-Meta:15702 ExtUtils-Manifest:14885 Module-Build:14784 ExtUtils-Config:8432"
27554,Encode,cpan-upstream,DANKOGAI,"podlators:27554 ExtUtils-MakeMaker:27554 CPAN-Meta:15702 Encode-Locale:7319 IO-HTML:7302"
27554,Exporter,blead-upstream,"FERREIRA FLORA NWCLARK P5P TODDR","File-Temp:27554 Carp:27554 Pod-Escapes:27554 Encode:27554 Module-Metadata:18384"
27554,ExtUtils-MakeMaker,cpan-upstream,"ABURLISON ANDK BINGOS CHORNY ETHER ETJ FLORA LEONT MMML MSCHWERN MSTROUT P5P","podlators:27554 Scalar-List-Utils:27554 Pod-Simple:27554 Test-Harness:27554 IO:27554"
27554,File-Path,cpan-upstream,"DLAND FLORA J