I don’t think anyone in good faith can discount the navigation benefits of a modern IDE.  Yes my favorite is still written in C++, as is my favorite editor (put that vim and emacs shit down, son, it’s time to code…I KID), nothing beats speed when you just want to type code.  But JetBrains has shown how they can provide amazing IDE features for all kinds of code: C++, Python, Scala, etc. with their Java library stack.  Yes you pay a performance price and yes we’ve been burned by slow Java IDEs before, haven’t we, Eclipse… but JetBrains has really hit a critical mass of solid IDE functionality,  and I’m going to give it another good try.  Here are some rolling notes, made in cronological order…

  • the soggy keylag is KILLING me… but I love the navigation power… hrmph…
  • it’s not THAT laggy considering all it is doing… and my other dev environment is through a VM anyway (does that make it better or worse, not sure yet…) continuing…
  • on a VM, all hope is lost.  Even sublime is uselessly unusable.  Back to emacs.  Sad world.
  • The speed is now pretty good, I don’t know if it got everything indexed and it’s faster, or if I got used to it.  I think it’s faster!  Just in time for my open source license to expire… and JetBrains renewed it!  Yay, thanks guys.
  • Some things just take some adjustment.  Keymaps, panes, etc.  Also, don’t expect to copy/paste huge chunks of code as fast as you can in a dumb editor – it causes a ton of analysis to occur.  In a non-VM fairly-decent environment, CLion is humming along now.
  • CLion is undeniably faster than Sublime on my VM.  It is downright snappy at editing code compared to Sublime.  Happily shocked!
  • Uhoh… lots of clion lockups on laptop… doh, whoops, out of disk space.  Don’t let it happen!  🙂

Fun tips:

  • You can open a file into an existing clion session by running the startup script with a full path to the file, or do this:
    clion `pwd`/myfile.cpp
    or use the little bash script to do it for you:
    !/bin/bash
    # if $1 does not start with [/], prefix it with `pwd`
    MYFILE=$1
    if ! [[ $MYFILE =~ ^/ ]]; then MYFILE=`pwd`/$1; fi
    cd /home/m/apps/jetbrains/clion/bin
    ./clion.sh $MYFILE $2 $3 $4 $5 &
  • For the huge hirez monitors I have gotten addicted to using with i3, make sure you enable this (which is oddly disabled by default):

    File > Settings > Editor > General > [x] Change font size (zoom) with Ctrl+Mouse Wheel

  • CLion will auto-create projects from CMakeLists.txt, really nice.  It seems to auto-create Debug config using ./cmake-build-debug.  To create Release config too, go to:

    File > Settings > Build… > CMake > click +, it will auto-create Release (a little weird but it was what I needed)

I’m setting up a private wiki area in my trac wiki. There’s lots of old info regarding trac permissions, easy to get lost. It seems the most current clean way is to use the AuthzPolicy plugin/module, which is available in the base install. There are some steps to go through to get set up, but it’s pretty straightforward.

Go to the admin plugins page, click Trac arrow to open it, find AuthzPolicy, click arrow to open it for instructions. More instructions are here but may not be as up-to-date. When you’re ready, click the enable checkbox and save changes, then configure it. Here’s what I did:

easy_install configobj
emacs conf/trac.ini
  [trac]
  permission_policies = AuthzPolicy, DefaultPermissionPolicy, LegacyAttachmentPolicy
  [authz_policy]
  authz_file = conf/authzpolicy.conf
emacs conf/authzpolicy.conf
  [groups]
  devs = joe, jane
  [wiki:DevPage@*]
  @devs = WIKI_VIEW, WIKI_CREATE, WIKI_MODIFY
  * =
/etc/init.d/apache2 restart

The base Trac is pretty useless for managing users, so let’s get the plugin that fixes that (yes trac is still pretty much a hack 🙂 )…

easy_install TracAccountManager

Now let’s configure it. Same as before, pop it open in the trac admin page. More instructions are here.

I wrote about setting up trac for anonymous ticket creation here.

I upgraded to trac 1.0.1 and lost TracSpamFilter functionality. This post is about getting it working again. It also includes some warnings if you are using https.

Trac seems to be in motion and sometimes figuring out the latest “right” way to do something is confusing. To start, look at the default plugins in the base installation. Log in as admin and select the plugins page. Then click the arrow next to the [Trac ###] item to see available plugins.

TracSpamFilter is not there, it appears we’ll have to specifically (re-)install as a plugin. But that’s easy:

easy_install TracSpamFilter
/etc/init.d/apache2 restart  

And it looks like all my configuration was left intact, whew. Weird that the plugin went away.

Recheck all your configuration settings under the Admin page’s Spam Filtering link. You should also only enable the parts you need, by hitting the sideways dropdown arrow next to TracSpamFilter under the Admin plugins page. Read more here.

Time to test! Testing requires that you set your spam filter scoring so that you know it will trigger a capture, log out, create a new ticket, and hit submit. Only then will trac check your request to see if it is spam. When I tested things out, the need for a capture was properly identified during ticket creation, and the ticket was reloaded under the /capture url.
But the capture failed to be displayed.

So I turned on debugging by adding this to trac.ini (WARNING: trac will resave the trac.ini file stripping out any comments, boo):

[logging]
# MDM This places the log in /var/lib/trac/sites/mysite/log
log_file = trac.log
log_level = INFO
log_type = file

And here’s what I saw…

2013-04-25 14:40:39,070 Trac[env] INFO: Reloading environment due to configuration change
2013-04-25 14:40:42,478 Trac[env] INFO: -------------------------------- environment startup [Trac 1.0.1] --------------------------------
2013-04-25 14:40:42,514 Trac[env] WARNING: base_url option not set in configuration, generated links may be incorrect
2013-04-25 14:40:42,765 Trac[api] WARNING: Unable to find repository '(default)' for synchronization

Does any of that matter? I headed to irc, posted questions… and got nothing over two days of waiting. Let’s go back and analyze the what we’re seeing. Viewing the source revealed that I was getting the captcha code in the html! Good deal. Hitting F12 in google chrome gives you a nice set of tools ripped from the heart of Firefox’s Firebug. After poking around some, I realized that both the recaptcha and keycaptcha code snippets were using http, not https. Chrome is a bitch about this type of stuff. And after firing up Firefox and finding that everything worked fine, I confirmed that it was to blame. You suck, chrome! You can’t introduce new rules, even if they’re good, that break 50% of the web. Well, I can’t really argue, https should be https. But in this case, I can’t even figure out where the plugin code is to fix it. No time this time. So for now, I’m falling back to the “Expression Captcha”, which sucks but is embedded in trac and therefore works everywhere.

I’ll have to revisit this again, when I have time, to get trac to use https in its captcha code snippets. Or, with no irc response, is it time to move from trac to something else?

Good lord things are getting out of hand in Python land.

I recently bumped up my entire server with the typical emerge –world and –depclean and revdep-rebuild. To get trac working again, I had to jump through some hoops…

  • bump my entire machine, watch trac fail with “ImportError: No module named trac.web.main”
  • run python-updater (which didn’t seem to do enough?)
  • upgrade to unstable trac 1.0.1
  • re-emerge world to upgrade all six versions of python (either new versions were posted overnight or apparently installations were damaged by –depclean?)
  • set active version of python back from 3.2 to 2.7 with eselect
  • re-emerge mod_wsgi
  • restart apache

Of course I did a LOT MORE than that to figure out that that’s what I had to do! 🙂

Ahh the price of fame.

The stupid Windoze gaming sirens had me out of linux for a bit on my desktop. Back with a vengeance, and a huge emerge world. Hours of fun! The nice thing is I’ve gotten into gentoo enough that I no longer feel the need to document every massive emerge. For the most part, just keep using these strategies until it works itself out – while keeping your brain engaged of course:

  • emerge -DavuN @world
  • emerge -DavuN –with-bdeps=y @world
  • emerge -DavuN @world –autounmask-write
  • emerge –resume –skipfirst
  • emerge –unmerge (i unmerge the SHIT out of all conflicting non-world packages! keep it clean! :O)
  • emerge -1v (anything that’s missing!)
  • gcc-config (as early as possible)
  • eselect (boost|java-vm|php|python|etc….)
  • use eix and equery to answer any package questions
  • get the latest gentoo-sources and configure that kernel!
  • don’t forget to emerge nvidia-drivers or any other kernel-specific package
  • google for help – gentoo support information is AMAZING
  • dispatch-config
  • emerge -av –depclean
  • revdep-rebuild
  • lafilefixer –justfixit
  • python-updater
  • perl-cleaner –all
  • targeted rebuild, for those nasty upgrades: revdep-rebuild –library libpng14.so.14
  • find broken autotools stuff: find /usr/ -name ‘*.la’ -exec grep png14 -c {} +|grep \:1
  • rinse and repeat!

I had a few new wrinkles…

  • considered emerging gnome-base/gnome (new) to get GNOME 3 but it is soft-masked and who knows how much trouble would follow
  • stupid libpng upgrades always cause everyone all kinds of headaches – see this awesome post
  • 
    revdep-rebuild --library '/usr/lib64/libpng14.so.14' -- --keep-going
    emerge -1av --keep-going $(find /usr \( -name "*.la" -o -name "*.pc" -o -name "*-config" -o -name "*.pm" \) -exec grep -H png14 {} \; | cut -d : -f 1 | xargs qfile -CSq | sort | uniq)
  • removed nsplugin USE flag from picasa and acroread since it thought that firefox (not firefox-bin) was a requirement, stooopid things
  • Qt needed a bump, which should happen all at once, which is impossible 🙂
  • of course i had to add a FEW more bells and whistles!
  • emerge -DavuN xfce4-meta xfce4-verve-plugin xfce4-mixer xfce4-taskmanager xfwm4-themes thunar thunar-volman tumbler thunar-archive-plugin google-chrome
  • etc