Update Needed to the old package

Hi everyone,

Sad to say that the Padre packages on wildperl are out of date. I’m hoping to get a chance to update them in the next few weeks, but until then there is a good chance they don’t represent the state of the art on OSX.

It probably makes sense to build from source until then.

My thanks.

Tom

Post to Twitter Post to Digg Post to Facebook Send Gmail Post to LinkedIn Post to Reddit Post to StumbleUpon

$DB::single = 1 : Make that debugger stop where you want it

Sometimes it’s useful to get a perl debugger to stop exactly where you want it to stop.

When debugging on the command line I’ve got a relatively manual process of bringing up a debugger, use-ing my module of choice if it’s not already loaded, breaking at a method name, continuing, then breaking at the line I want. It’s likely there is a better way to do this, but I haven’t found it yet because I usually just insert a

$DB::single = 1;

expression exactly where I want it.

I’m sure most people know about this, but if you don’t, take a look at

$ perldoc perldebug

and pay attention to the section describing

$DB::single = 1;

Inserting that expression will make the perl debugger stop on that line when it’s reached. You can just fire up your program or test case in the debugger and let it run.

Also useful could be wrapping that statement in a condition that checks for your particular case or iteration.

The perl debugger is filled with other great magic, but I find $DB::single is a feature I use often.

 

 

 

Post to Twitter Post to Digg Post to Facebook Send Gmail Post to LinkedIn Post to Reddit Post to StumbleUpon

OSX Package for Padre 0.92

I’m happy to provide the osx dmg for the latest Padre Perl IDE release, 0.92. The march to 1.0 continues thanks to the great work done by the Padre team! As usual, I used the Cava Packager to bundle the CPAN Padre with a few core plugins.

Please check this page for the latest package, and info on how to report bugs.

We would appreciate any testing you do on OSX, and please report bugs you run into. Why not stop by #padre and say hi while you download?

Note: Padre on OSX still has a number of rough edges.

Post to Twitter Post to Digg Post to Facebook Send Gmail Post to LinkedIn Post to Reddit Post to StumbleUpon

printing lists versus concat strings? a little nibble of a benchmark

Please check out the comments to see more information about this topic.

Going to put this out there because I saw some code the other day that printed comma separated strings and scalars, and it got me curious about how expensive it was to print a list of items, rather than concatenating them into a string and passing that to print.

I’ll let the code speak for itself:

 my $x = 'test';
 my $r = timethese(
 10000000,
 { 
 'commaprint'    => sub { print STDERR 'test', 'test', 'test', 'test', 'test', 'test'; },
 'varcommaprint' => sub { print STDERR $x, $x, $x, $x, $x, $x; },
 'interpprint'   => sub { print STDERR "$x $x $x $x $x $x"; },
 'concatprint'   => sub { print STDERR 'test' . 'test' . 'test' . 'test' . 'test' . 'test'; }, 
 'singleprint'   => sub { print STDERR 'test'; },
} );

And the result on my laptop:

commaprint: 33 wallclock secs (12.46 usr + 19.77 sys = 32.23 CPU) @ 310269.93/s (n=10000000)
varcommaprint: 32 wallclock secs (12.76 usr + 19.74 sys = 32.50 CPU) @ 307692.31/s (n=10000000)
interpprint: 10 wallclock secs ( 7.44 usr +  3.68 sys = 11.12 CPU) @ 899280.58/s (n=10000000)
concatprint:  6 wallclock secs ( 3.02 usr +  3.58 sys =  6.60 CPU) @ 1515151.52/s (n=10000000)
singleprint:  6 wallclock secs ( 2.97 usr +  3.52 sys =  6.49 CPU) @ 1540832.05/s (n=10000000)

I’m not completely surprised by the result, but I would’t want to speculate about what’s going on under the covers without spending time studying the perl code. For now this will just have to leave this out there as something to consider in the future.

 

Post to Twitter Post to Digg Post to Facebook Send Gmail Post to LinkedIn Post to Reddit Post to StumbleUpon

Padre 0.90 OSX dmg

I’m happy to provide the osx dmg for the latest Padre Perl IDE release, 0.90. The march to 1.0 continues thanks to the great work done by the Padre team!

Please check this page for the latest package, and info on how to report bugs.

We would appreciate any testing you do on OSX, and please report bugs you run into. Why not stop by #padre and say hi while you download?

Post to Twitter Post to Digg Post to Facebook Send Gmail Post to LinkedIn Post to Reddit Post to StumbleUpon

Padre 0.88 OSX dmg

I’m happy to announce that Padre 0.88 is available as an OSX dmg.

Along with all the amazing work Padre folks have been doing to release 0.88, we’ve also been hunting down critical OSX bugs that surfaced during the recent weeks.

There is some more TLC that needs to be given to the Padre codebase for OSX. Thus, along with the known OSX defects, I anticipate we’ll continue to find more issues that need fixing.

That’s why we need you to try the Padre 0.88 dmg, and let us know if you have any issues, crashes, or feature requests. I hope Padre on OSX will be on par with linux and windows by the 1.0 release with your help.

Bug reports can be made most easily by hopping into #padre on irc, or even commenting on this blog post.

Thanks:
I want to thank Mark for doing the work to develop the packaging project for Padre using Cava, and for his help with some of the gnarly issues I ran into these past weeks.

Also, thanks to the folks who reported bugs in the 0.86 dmg (that have been solved I hope), and to everyone on #padre.

Want to run Padre on OSX from source?
You can use the bin/padre-brew.pl script found in the padre-brew github to create a perl+padre on OSX.

If you’re on windows or linux, see the 0.88 release announcement.

 

Post to Twitter Post to Digg Post to Facebook Send Gmail Post to LinkedIn Post to Reddit Post to StumbleUpon

padre-brew now supports OSX LION (Build your own Padre on OSX)

My padre-brew script, which creates a standalone version of perl (32 bit) + wxWidgets + Padre, has been updated to support OSX Lion. Currently it supports OSX out of the box, and does work on Linux though you’ll need to get wxWidgets working your system first.

You can have a look at the github here: http://bit.ly/oiME1I

If you want to try Padre on OSX (warts and all, we’ve got a long way to go on OSX), all you need to do is grab the source and run:

./bin/padre-brew.pl --no-test

That will create a PadreApp directory, with a padre script you can run. As always thanks to Mark @ Cava for doing all the hard work to get all the build flags, etc. All mistakes are my own.

Tom

Post to Twitter Post to Digg Post to Facebook Send Gmail Post to LinkedIn Post to Reddit Post to StumbleUpon

Padre on OSX DMG – Now on Leopard, Snow Leopard, and Lion

Please use the 0.88 DMG.

Below is the old 0.86 post for reference.


Thanks to Mark @ Cava for giving me the perl build line needed to produce Padre packages that work on the latest three OSX versions.

You can now grab the latest OSX Padre packages (0.86) with a few plugins embedded, at:

http://wildperl.com/wp-content/uploads/Padre/0.86/padre-osx-uni-0-86-0.dmg

I plan to post a complete ‘how go build and package Padre on OSX’ post (and/or wiki page on Padre trac) as soon as I update my padre-brew.pl tool for Lion.

If you’re interested, I now build perl with this command:

perlbrew install 5.14.1 -ders -Dusethreads -Duseithreads -Accflags="-arch i386" -Accflags="-B/Developer/SDKs/MacOSX10.6.sdk/usr/include/gcc" -Accflags="-B/Developer/SDKs/MacOSX10.6.sdk/usr/lib/gcc" -Accflags="-isystem/Developer/SDKs/MacOSX10.6.sdk/usr/include" -Accflags="-F/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks" -Accflags="-mmacosx-version-min=10.5" -Aldflags="-arch i386 -Wl,-search_paths_first" -Aldflags="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk" -Aldflags="-mmacosx-version-min=10.5" -Alddlflags="-arch i386 -Wl,-search_paths_first" -Alddlflags="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk" -Alddlflags="-mmacosx-version-min=10.5" -Duseshrplib

And I configure and build Alien::wxWidgets and Wx::Scintilla with the following build:

CFLAGS='-arch i386' CXXFLAGS='-arch i386' CPPFLAGS='-arch i386' LDFLAGS='-arch i386' OBJCFLAGS='-arch i386' OBJCXXFLAGS='-arch i386' perl ./Build --wxWidgets-extraflags=" --with-macosx-sdk=/Developer/SDKs/MacOSX10.6.sdk --with-macosx-version-min=10.5 " --wxWidgets-build='yes' --wxWidgets-source='tar.bz2' --wxWidgets-version=2.8.12

If you have bugs, please file them in track: http://padre.perlide.org/trac/wiki/osxbugs

All errors are my own.

Thanks!

Post to Twitter Post to Digg Post to Facebook Send Gmail Post to LinkedIn Post to Reddit Post to StumbleUpon

Padre DMG for OSX Lion – alpha build

With great pleasure I can finally announce that we’ve got OSX Lion builds for Padre!

You can grab the latest here: http://wildperl.com/wp-content/uploads/Padre/0.86/padre-osx-uni-0-86-0-LION.dmg

Getting reliable packages for Padre on OSX has been my goal for the past few weeks, and these have surfaced a number of OSX bugs that have not yet been adressed.

You can find a list of current defects (and open your own) here: http://padre.perlide.org/trac/wiki/osxbugs

My work was really that of glue-er, and it would have been impossible if not for the real heavy lifting done by Mark @ Cava who built the packaging scripts we use, and Cava, and also supported wxwidgets building on Lion.

We are using Cava to package on OSX at the moment (and potentially other platforms in the future).

Post to Twitter Post to Digg Post to Facebook Send Gmail Post to LinkedIn Post to Reddit Post to StumbleUpon

wxwidgets 2.8.12 (and Alien::wxWidgets) on OSX Lion

I can finally make this a short post!

I was able to combine the advice found in this post http://wiki.wxwidgets.org/Development:_wxMac  and some messages from the gurus on the wxPerl mailing list to other Lion builders.

To build Alien::wxWidgets 2.8.12, as well as (and this was the crux) Wx::Scintilla, on OSX 10.7 (Lion), I’m using:

CFLAGS='-arch i386' CXXFLAGS='-arch i386' CPPFLAGS='-arch i386' LDFLAGS='-arch i386' OBJCFLAGS='-arch i386' OBJCXXFLAGS='-arch i386' perl Build* --wxWidgets-extraflags=" --with-macosx-sdk=/Developer/SDKs/MacOSX10.6.sdk --with-macosx-version-min=10.6 " --wxWidgets-build='yes' --wxWidgets-source='tar.bz2' --wxWidgets-version=2.8.12

*For simplicity I use the same environment and arguments for the ./Build.PL and ./Build step

Note a few things:

  1. I am using a 32 bit perl (info below) because I am using wx 2.8.12
  2. Thus I must include all those -arch prefixes when building (see link above)
  3. I set the Min version to 10.6, though I have only been able to test on 10.7
  4. The same flags must be used for wx-things like Wx::Scintilla – in my semi-automated build I drop into a cpanm –look to build these right now, but I hope to include them into my padre-brew.pl script shortly.

 

Post to Twitter Post to Digg Post to Facebook Send Gmail Post to LinkedIn Post to Reddit Post to StumbleUpon