hamid palo
code and other things

A simple thread-safe non-blocking file logger for F#

By Hamid On December 24, 2011 · Leave a Comment

A few months ago I shared the logging code that I use in a side project. I’ve been writing to stdout during development but today I found myself aching for something that can write to files reliably. I took a look at a lot of the .NET logging libraries and was very turned off by [...]

Continue Reading →

F# logging with type-safe format strings

By Hamid On October 2, 2011 · Leave a Comment

I’m currently working on a fairly large F# project and I wanted something that would make logging nicer than the typical .NET String.Format. The code is on GitHub.

Usage is pretty straightforward:

log Error “Error retrieving record for %A. Exception: %s” item exc

You can use whatever you want [...]

Continue Reading →

Scala-like XML parsing for F#

By Hamid On August 7, 2011 · Leave a Comment

Parsing XML on .NET is quite easy especially with XPath and LINQ. However both of those were designed for use in C# and VB.NET and while perfectly functional and efficient they look slightly weird (at least to me) when used in F#.

In contrast, Scala ships with excellent XML support baked-in which is probably my [...]

Continue Reading →

Implementing |> from F# in Ruby

By Hamid On July 17, 2011 · Leave a Comment

I am a big fan of F#. It’s a functional language that targets .NET and as such gives you the best of both worlds. One of my favorite things is the pipeline operator |>. For those unfamiliar it is defined something like:

a |> b = b a

That is, given a value a and [...]

Continue Reading →

Hello World!

By Hamid On July 17, 2011 · Leave a Comment

I’ve decided to start a blog since it seems that all the cool kids are doing it. Most of the content will focus on F# and possibly Ruby (on Rails) since that is what I use for my side projects.

Continue Reading →
  • about

    f1-driver wanna-be, lover of cartoon network and nutella. sometimes i write code, and occasionally it even does what i want it to.
  • tags

    F# hack Ruby scala xml

hamid palo

Pages

  • About

The Latest

  • A simple thread-safe non-blocking file logger for F#
    A few months ago I shared the logging code that I use […]

More

© 2011 Hamid Palo
Platform by PageLines