London.pm Emergency Technical Meeting 31st July
Chris Benson
chrisb at jesmond.demon.co.uk
Sat Aug 11 11:41:50 CDT 2001
London.pm held an emergency technical meeting because several Perl People
were passing through on the way from The Perl Conference (TPC4? 5?) in
San Diego to YetAnotherPerlConference::Europe in Amsterdam.
Visit to London.pm emergency technical meeting in honour of Brian Ingerson
author of Inline.pm
Venue: State51. A place with all the necessary facilities, space,
electricity ... and good Internet connection. Remarkable to this
first-time visitor: the range of sofas and chairs, the largest
free-standing table I've seen, the amount of warm beer and bagles
lying around.
Brian gave a laidback (jet-lagged?) talk about Inline, the recent TPC
in San Diego, working for Activestate, tattoos and piercing and showed
Inline::C, Inline::Java, C with embedded Perl ... using Inline to embed
C ... or was it Perl? Inline::Perl and his tattoos and piercings.
Inline.pm acts as a front-end to the standard way of embedding
non-Perl code in Perl: XS. Inline does a very good job of hiding
the nasty bits:-
#!/usr/bin/perl -w
use Inline C;
print "9 + 16 = ", add(9, 16), "\n";
print "9 - 16 = ", subtract(9, 16), "\n";
__END__
__C__
int add(int x, int y) {
return x + y;
}
int subtract(int x, int y) {
return x - y;
}
Works for multiple languages: useful ones like C/C++ and then the
rest: Java/Tcl/Python/... there's even a joke language: Inline::PERL
There's also CPR (SeePerlRun) that turns C into a scripting language
(with the full Perl language available to help it out):-
#!/usr/bin/cpr
int main(void) {
printf("Hello World, I'm running under Perl version %s\n",
CPR_eval("use Config; $Config{version}")
);
return 0;
}
Then about 10pm we went out for a drink, chatted for a while and the
I went back to the hotel.
--
Chris Benson
More information about the Tyneside-pm
mailing list