Tuesday, October 25, 2016

Good deal tomorrow on Alaska business class flight tomorrow with miles LAX -> LHR

Found this one browsing around Alaska's flights, figuring out a trip for next year - 50k miles for a business class ticket LAX -> LHR seems like a really good deal to me:

Tuesday, June 21, 2016

Xamarin Studio + Android Studio

If you have a Xamarin Studio project for an Android application, you'll probably want to use Android Studio to edit the resource files.
  • Create a new Android Studio project (I usually call it AndroidStudioHolder, but the name is unimportant)
  • cd AndroidStudioHolder/app/src/main
  • rm -rf res
  • ln -s ../../../../YourAndroidProject/Resources res
Unfortunately, you still have to deal with all the weird naming issues that Xamarin Studio creates.  You should fix them anyway, and it's easier to do it early in the project.  (Main.axml isn't a real layout file, for example, even though Xamarin Studio will create it for you by default.)

Thursday, May 26, 2016

Using F# modules and types from C#

It's simple to use FSharp modules from C#, but for some reason I always forget exactly how the system works
(maybe too much switching back and forth between Scala/C#/F#/Java...).

Here's some F# snippets and a C# example of how to pull them together. The weird one is C#'s "using static", since the name seems to indicate that it's just pulling in static methods. In addition to pulling in static methods, though, it also pulls in nested types.

Consuming from F# is slightly simpler:

Here's the F# specification for more details.

Wednesday, February 10, 2016

Fun with Shapeless - functions taking arguments converted to functions taking HList's

I'm starting to play with the Shapeless Scala library.

Here's how to take a normal function and turn it into a function that accepts an HList instead of the original arguments.