Friday, June 26, 2015

First reaction to Akka

Akka looks awesome. But never have I seen a more overdocumented framework. Every piece of docs is an exposition. Way too hard to find hello world. Most people today don't read docs top to bottom. We google "build akka" ...and we find this: http://doc.akka.io/docs/akka/snapshot/dev/building-akka.html

Any mention here of Maven being supported? Not that I saw. So I spent a while thinking I had to learn SBT. Then I found this page, which right at the top shows how to build with maven:

http://doc.akka.io/docs/akka/snapshot/intro/getting-started.html

But...WTF...the pom.xml they ship with doesn't include a connection to their repo! Have to add this:
Next we try to run some akka bins: ghendrey-mbp:akka-2.3.11 ghendrey$ ./bin/akka-cluster -bash: ./bin/akka-cluster: /bin/bash^M: bad interpreter: No such file or directory 

(yup, every bin script is borked with windows line returns and won't run)

LOL.

So how about we pop off the stack and try another approach:  http://doc.akka.io/docs/akka/2.0.1/intro/getting-started-first-java.html
 ...Follow the instructions..."
ghendrey-mbp:NetBeansProjects ghendrey$ cd akka/akka-tutorials/akka-tutorial-first
-bash: cd: akka/akka-tutorials/akka-tutorial-first: No such file or directory 
 
So after fixing the line breaks, fixing pom.xml, finding the right docs, finally hello world runs. Yeah. Now I try a more complex example.
Does it work?? NOPE. Exception spray:

 
 

Netbeans for c++

I have abandoned eclipse for c++ development on mac. Its "indexing" of large code basis was insanely slow (hours!!), and every now and then it would maddeningly begin redlining things again. I spent too many hours on it. It also can't debug with the current version of GDB. Spent so many hours in hell, compiling ancient versions of GDB. Ultimatly abandonded ship. The Eclipse UI was also vastly inferior to that of Netbeans. Just one of the irks is that the dropdown for open files doesn't display the files alphabetically. That's absurd. Then SWT look and feel, despite all the claims, isn't any faster than the Netbeans Swing-based UI. Does it look better? Nope. The icons in eclipse are outdated and the whole thing feels oldschool.

So...more or less happily  back to Netbeans. It has only one problem for c++ development. For some reason all method on STL classes, such as vector::push_back cannot be resolved and are redlined. I am willing to live with this since callgraph etc is all very fast. The same debugging issue exists on Netbeans as on eclipse but on Netbeans I found this workaround. If I run GDB server, using a netbeans plugin I can connect to GDB server and debug. The core problem you hit in both NB and eclipse is that the debugger will freeze on the first line you break at (not for any trivial hello world of course. But on every real project I actually need to work. Lot's of other people have run into it).

I speculate that it is some kind of race condition. By using GDB server, the connection to the breakpoint avoids the race.