Wednesday, April 22, 2015

Xamarin Studio 5.9 + F# - Target _CreateNativeLibraryArchive failing

If you're seeing an error like this in Xamarin Studio 5.9, building an Android project:

Target _CreateNativeLibraryArchive:
error : Error executing task CreateNativeLibraryArchive: Argument cannot be
Parameter name: unformatted

You may have mips binary files marked as EmbeddedNativeLibrary.  Turn that off (mips isn't supported yet anyway), and you should be able to build.

The bug has been reported to Xamarin - tech support found the solution.

Saturday, May 17, 2014

Topic from scalaz-stream

I've been playing around with scalaz-stream topics, and didn't understand how they worked. My first attempt was this:

(And note that this was supposed to be just a quick example; you certainly would end up with different threads publishing and subscribing to a topic.)

That had a few problems:

• Line 7-8: the type of out1 is Process[Task, String \/ Int]. Those are useful, but they're only part of the way towards what I needed. What I really wanted was to go from a process to a task to running the task.

• Line 11-13: again, I'm only part of the way there. Both of these produce Task[Unit], and they needed to be run.

So I asked for help on the scalaz mailing list, and Pavel Chlupáček pointed me in the right direction.
The working version is:

• Lines 6-8 produce a Task[IndexedSeq[String \/ Int]], one step further than in the first version (where the steps are process >> task >> run the task).

• Lines 10-12 actually run the task - and anything published before the attemptRun won't be seen by the subscriber.

• Line 19 stalls, waiting for the attemptRun to hook up the subscriber. (As the note says, I think this is only something you'd do for a demo).

• Lines 21-22 actually run the tasks they create

Sunday, April 27, 2014

AndroidProguardScala 51 released - supports 2.11

I just released v 51 of AndroidProguardScala, the Eclipse plugin for Scala + Android development.

The release adds support for Scala 2.11 (including the 3.x.x and 4.x.x branches of the Scala IDE).

Install instructions are here.