This file contains 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
# Here's what needs to happen: | |
# 1) Add a compiler switch to tcc that lets me specify the output filename for | |
# serialized extended symbol tables. DONE | |
# 2) Add a compiler switch to tcc that lets me specify the output filename for | |
# a list of global identifier names. DONE | |
# 3) Compile a text file with the headers below, saving the serialized extended | |
# symbol table and the list of global identifiers | |
# 4) Create an XS file with a BOOT section that loads the serialized table, | |
# adds the global identifiers, and pushes the extended symbol table onto the | |
# Perl exsymtab collection. |
This file contains 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
cc -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/home/dcmertens/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1/x86_64-linux-thread-multi/CORE -Wl,-E -fstack-protector -L/usr/local/lib -L/home/dcmertens/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1/x86_64-linux-thread-multi/CORE -lperl -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc func_test_402YB8e5.c -o func_test_9EF5Maod | |
/tmp/ccXxD47M.o: In function `S_croak_memory_wrap': | |
func_test_402YB8e5.c:(.text+0x5): undefined reference to `PL_memory_wrap' | |
func_test_402YB8e5.c:(.text+0x14): undefined reference to `Perl_croak_nocontext' | |
collect2: error: ld returned 1 exit status |
This file contains 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
use strict; | |
use warnings; | |
use Prima qw(Application); | |
my $wDisplay = Prima::MainWindow-> create( | |
text => 'Mouse Test', | |
onMouseDown => sub { | |
print "onMouseDown got args [", join('], [', @_), "]\n"; | |
}, | |
onMouseMove => sub { |
This file contains 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
=head1 NAME | |
PDL::Transform::Color - Convert between color systems | |
=head1 SYNOPSIS | |
# load an image (in this case the cartographic demo) | |
use PDL::Transform::Cartography; $rgb = earth_image(); | |
# convert the image to CMYK |
This file contains 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
#!/usr/bin/perl | |
# This is a simple IRC bot that just rot13 encrypts public messages. | |
# It responds to "rot13 <text to encrypt>". | |
use warnings; | |
use strict; | |
use POE; | |
use POE::Component::IRC::State; | |
use constant CHANNEL => '#pdl'; | |
# Load the current piddlebot functions: |
This file contains 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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use POE; | |
use POE::Component::IRC::State; | |
use POE::Component::IRC::Plugin::AutoJoin; | |
#use POE::Component::IRC::Plugin::BotTraffic; | |
use POE::Component::IRC::Plugin::BotCommand; | |
use POE::Component::IRC::Plugin::CycleEmpty; |
This file contains 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
use strict; | |
use warnings; | |
use PDL; | |
use Inline Pdlpp => Config => | |
INC => "-I$ENV{HOME}/include", | |
LIBS => "-L$ENV{HOME}/lib -ltcc", | |
; | |
use Inline 'Pdlpp'; |
This file contains 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
use strict; | |
use warnings; | |
our @all_listings; | |
my %actions; | |
# Import the names of the main listings and run the command or print help | |
sub PDL_Checker::import { | |
shift; | |
@all_listings = @_; |
This file contains 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
use strict; | |
use warnings; | |
use PDL; | |
my $data; | |
BEGIN { | |
$data = rfits('20kV_1p45A_14deg_Fourier.fit'); | |
} | |
use PDL::Graphics::Prima::Simple [$data->dims]; |
This file contains 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
use strict; | |
use warnings; | |
=pod | |
To run, say something like this: | |
perl fit-data.pl data.dat | |
where data.dat is the file created using make-data.pl |
OlderNewer