If you need to use svn+ssh with Subclipse on OS X, use SVNKit instead of JavaHL. Otherwise, you will receive errors such as “Network connection closed unexpectedly”
In Eclipse, go to Eclipse – Preferences, then Team – SVN. Under SVN interface, choose Client: SVNKit (Pure Java) SVNKit vx.x.x.xxx.
I am working on an ASP.Net web services project, and, out of the blue, lost the ability to debug in Visual Studio. When I tried to debug my application that tested the web services, it could not load the symbols of the web services project. It was all very mysterious as nothing about my environment had obviously changed; one minute it was working, then it was not. So after much reviewing of project settings, cleaning, and rebuilding, what worked was to go to C:\inetpub\wwroot\MyApp, delete everything, then do a fresh rebuild and Publish. Voila, I could debug and hit breakpoints again.
Work has been very busy, but I have been stealing whatever moments I can to continue learning Clojure. Finished Programming Clojure, started The Joy of Clojure, and have been working on the exercises in the labrepl. It is finally starting to really sink in. I feel that ah-hah moment coming… not quite there yet, but I think it’s close. Next: watch Clojure videos and screencasts. I signed up at Project Euler and will start those soon. Multiple people have suggested that.
I have various reasons to develop against Java 1.5 (and 1.4!) and found that Java 1.5 is missing from OS X Snow Leopard.
These instructions worked perfectly for me. Once I installed 1.5, I used the Java Preferences in OS X – /Applications/Utilities/Java Preferences to make 1.5 default.
A Java update will probably break this, so when that happens, these steps will likely have to be repeated.
I had some flaky issue with Subclipse where it could not communicate with one particular repository with https. Everything worked fine with straight svn at the command line and through the browser, but no dice in Eclipse. After many agonizing hours (as very little of this was clear from logs, error messages, etc… I had to rely on google search after google search), I finally determined that I would just have to use the JavaHL connector, but for some reason, JavaHL was not available.
Failed to load JavaHL Library. These are the errors that were encountered: no libsvnjavahl-1 in java.library.path no svnjavahl-1 in java.library.path /opt/local/lib/libsvnjavahl-22.214.171.124.dylib: no suitable image found. Did find: /opt/local/lib/libsvnjavahl-126.96.36.199.dylib: mach-o, but wrong architecture
Finally discovered that this was due to an incompatibility between the 64 bit Eclipse/JVM and the 32 bit subversion-javahlbindings libraries I got from MacPorts. (Subclipse’s answer to just use those from CollabNet did not work for me as I had the same error with my https repository with CollabNet’s build of Subversion.)
This many hours in, I should have given up and returned to using svn from the command line as I had been doing for a few months, but I would not give up! I could not bear the idea of slogging through this whole upcoming project without IDE integration with source control.
The answer: I built the subversion-javahlbindings for 64 bit which required some learning about MacPorts.
To enable the x86_64 target in MacPorts:
In /opt/local/etc/macports.conf, add x86_64 as one of the universal targets:
universal_archs i386 x86_64
Then add the universal variant to the macports install of the subversion javahl bindings (I also needed no_bdb):
sudo port install subversion-javahlbindings +no_bdb +universal
This then required me to build a number of other dependencies with the +universal variant: zlib, cyrus-sasl2, ncurses, expat. I hope I haven’t broken a bunch of other macports software I am using by doing this. The nice thing about MacPorts, though, is that they only use MacPorts libraries and separate everything off into /opt/local. So this should not affect any other OS X stuff.
This may not be an issue at all with Snow Leopard; I don’t know. I am running Leopard and have not been compelled to upgrade. Thought about it a bit tonight.
When I first installed Clojure, I had a working java environment on OS X, so all I had to do was download the clojure jars. Then I ran the REPL with
java -cp clojure.jar clojure.main
That got packaged into a shell script, clj, which was added to my path and chmod +x so that I could run the REPL with
That worked for a while, but then I got frustrated not having command history (arrow up to get your last so many commands). I followed the instructions here to use the JLine ConsoleRunner, which works just fine.
(Here is another set of instructions to do the same thing, but with rlwrap.)
When I went exploring for more Getting Started material, I found the Clojure Assembla, which led me to Leiningen and labrepl. This made me rethink how I got clojure in the first place. Akin to test-driven development, you can do something along the lines of “deploy-driven” builds – get your tools/environment with the build tool. Clever. Here are some great instructions on how to get clojure using the clojure build tool, Leiningen.
There is also cljr, but I have not used that yet.
I got Leiningen and labrepl installed and started working through some of the labrepl exercises. It’s nice to have some more supporting learning materials in addition to the Programming Clojure book. It is a good introduction to the language, but it is not Learning Clojure. I will likely also get Joy of Clojure.
For some background on where Clojure came from, there is Rich Hickey’s keynote at the 2009 JVM Language Summit.
What I am fully immersed in right now, though, is learning Clojure. I am reading Programming Clojure and a variety of online resources. Functional programming languages have always been an over the horizon quest for me. A bit of Lisp in college Programming Languages, a few months of watching SICP lectures, read part of an Erlang book, etc. I have never quite gotten it, though. Now the light bulb is finally starting to go off. I don’t know if it’s that I’ve reached a brain critical mass or if it’s Clojure. I went to a functional programming meetup, and foldr finally really made sense to me. That might have just been due to how well it was presented there, though.
This week I started reading Aaron Hillegaas’ Cocoa book. Learning Objective-C is a bit confusing – all the ‘s and @’s, etc – but not too bad. It reminds me a lot of Smalltalk if you used a salt shaker to sprinkle some C on top of it.
What I think I really need to do, though, is just start some OpenGL tutorials and start creating games on OS X, then add the Cocoa bits later. From what I understand right now, I don’t really need to use much of Cocoa to make a game for OS X. So I can just add the Cocoa parts later after I figure out how to program a straight game.