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

Brain-Dead Moment of the day or… is IE9 trying to display your ajax result and double-submitting your forms?

A non-perl post but something that bugged me for a few hours today until:

I had an ajax-handled form that was working fine for ages, but when run under IE9 it would display the result of the ajax request, or try to download the ajax (when the content type was set to application/json).

Sadly, we didn’t have IE9 in our testing setup for this bit of code (our Windows machine was XP Pro, and that cannot have IE9 it seemed), so we got this as feedback from my co-worker when he got a new machine recently. (The shame is large).

Once I got the test machine updated and running IE9, it was clear the form was being double-submitted, and the result of the second submission was being displayed. hmmmm…

On that one form (oops) I had forgotten to set onsubmit=”return false;” in the form. The Ajax handler was returning false, and also stopping the event, but for some reason IE9 was submitting that form.

Adding onsubmit=”return false;” solved my problem (and that’s our S.O.P. that was missed for this form). Hope that helps!

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

Software to make your OSX usable in my opinion

This post is mostly for friends who have recently gotten Apple laptops and are trying to use them to code. I’m an OSX novice, but do have a particular style of work and I’ve found the few tools needed to turn OSX into a usable platform for my style. They may help you too.

Last Updated: Jan 10, 2012

  • Google Chrome
  • Better Touch Tool & Better Snap Tool (please pay for it! It’s the most useful non-free app on this list, and is about $3.00!) -
    I use them to do :
    • three finger tap is a middle click (great for pasting in terminal, and closing tabs in chrome, etc.)
    • command 2 (maximize window), command 1 (left half window), command 3 (right half window) … etc the pattern
    • three finger swipe left/right in chrome is forward/back tab
    • three finger swipe up in chrome is close tab (nice!)
    • dragging windows to screen edges does the right maximize/size effect
    • option arrows moves around spaces (though now four finger gesture with Lion is pretty sweet)
    • middle click (three fingers) on ‘fit’ button actually does maximize
    • and so many more.
    • Better Snap Tool: also: function-control – move window under cursor. function-option – resize window under cursor. This alone is worth your $3.00.
    • Seriously, better touch tool MAKES OSX WORK, and you should donate by purchasing better snap tool, as the developer requested.
  • Caffeine – stop computer from dimming after 15 minutes/etc while watching movies
  • Lime Chat – Irc
  • iTerm2   (was: TotalTerminal (used to be Visor) -) I bind the slide-down visor terminal to F12, so whenever I hit f12 a nice terminal (with opacity) slides down and I do my thing. Used constantly, along with emacs.
  • iterm2 – Thanks to feedback in the comments, I’ve tried out iterm2 and like it a LOT. It’s likely to replace TotalTerminal for me. They are both Very similar (and both have a top-screen mode that can be shown using a single key. But you have to turn this on in iterm2).
  • LibraOffice – I don’t really use MS office, doing most of my work in google docs/sheets/etc or wikis, but for me LibraOffice is sufficient for those rare cases
  • Adium – Chat
  • Skype – sometimes you gotta’
  • Microsoft Remote Desktop Connection – works fine
  • Chicken of the VNC – works fine for now, though I am a rare VNC user (I prefer NX when I can)
  • Emacs – I prefer the windowed version rather than the default command line version of emacs right now. I’m still working on making them play nice together, but I use this for most of my development.
  • homebrew – I try to keep my dev machine pretty sparse, but my job requires mysql, rabbitmq, memcached, and some other things. All well ‘scripted’ by the folks on homebrew. Things I have installed through brew: git, aspell, memcached, markdown, mysql, nmap, wget, tree, readline, rabbitmq…
  • dropbox- works nicely
  • noobproof as a firewall GUI to make sure some ports I use for $WORK are not available to the outside world (along with the OSX firewall being enabled)
  • MouseLocator is pretty cool, I use it right now, though I’m not sure how long I’ll use it.
  • AppCleaner – it’s what I use to delete apps, since it’s pretty good at throwing away preferences as well
  • AppFresh – Keep those apps up to date.
  • I cannot recommend gfxCardStatus because it kept causing problems for flash on Chrome, sorry! It would have been useful. I’ll keep trying it.
  • Monolingual – Only if you’ve got space problems (you bought the 120GB SSD?) you can strip some languages from some OSX apps. I wouldn’t try this on Microsoft apps, and be sure to google before use to find any problems. If you’ve got the HD space, don’t bother.
  • Notational Velocity / nvAlt – pretty good for some types of notes. I like it. [Note: I'm not really using this anymore, though I still think it's a good application]
  • I also use iCal and, gasp, Mail.app! Both of these of course are backed by google mail and calendar. iCal works fine, no issues. Mail.app is about where gmail was a few years ago, but I find it much more convenient to have a local mail app rather than go into browser. Just a personal preference, gmail still kicks ass. I use IMAP with my many gmail accounts. Let me know if you have any questions about the setup.
  • I also use meteorologist for my weather lookup needs, and I’ve got growl installed for notifications.
  • Use use spotlight as my launcher – which means:
    • I set my dock to only show running programs (and chrome, which I do occasionally close to free mem).
    • I just use command-space – program name to launch things, I don’t use the ios launcher feature nor do I go to Applications directory
    • Although I thought I would immediately get it – I did not bother with quicksilver / Jeeves yet. That may change.
    • I now primarily use QuickSilver, and while I find it annoying for a few things, it’s better than spotlight for the rest. I mostly use it as an app launcher along with clipboard history, nothing too fancy.
  • http://macrumors.com
  • perlbrew of course to get a current perl. Don’t mess with the downlevel Apple perl
  • I sometimes use JackSMS for fun when I leave my laptop at coffee shops, but I haven’t relied on it yet. I was hoping to build a solution with Proximity to have my phone auto-control Jack.
  • ack for code search
  • Herald for Mail.app notifications of new mail. [Note: I'm note using this anymore, since I check mail relatively regularly by revealing the dock which I normally have hidden]
  • OmniGraffle for diagraming (not free)
  • DashExpander – text expander, though I don’t use it often
I’ll update if I think of more things or if I change my usage.

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