Mai 2007 - Einträge

Haskell decision making
30 Mai 07 09:59 | realfiction - TrivadisContent

A few days ago, while I was implementing something in PL/SQL for that dreaded Oracle Forms project I had to code some scary if-else construct spanning two logic checks that depending on the combination gave four different results.

if a=true and b=true then 1
elsif a=true and b=false then 2
elsif a=false and b=true then ...

Back in the train on the way home I had a look if my limited Haskell knowledge could come up with something nicer.

read more

Haunted by PI - changing a number's base in Haskell
15 Mai 07 11:15 | realfiction - TrivadisContent

I was looking back at Christoph's ruby code and was thinking that by now I should be able to implement that algorithm in Haskell. Indeed, one of my solutions looks like that:

read more

Stay calm, gather information and then do the right thing
12 Mai 07 11:11 | realfiction - TrivadisContent

In the last post I was talking about how we could create the natural Haskell function composition operator into C# and my first solution (also contained as the Functional assembly in the attached solution) was one based on the possibilities provided by the 2.0 Version of the .NET framework. It worked, but it was clumsy, with a lot infrastructure to support a single requirement.

read more

How much Haskell can I squeeze out of C#?
10 Mai 07 12:52 | realfiction - TrivadisContent

You know all this talk about a new language every year and that it should be something different, etc. Since functions are playing a more & more important role in C#, I thought that it would make sense to have a look at a language that has been functional all along: Haskell. Well, I do not want to bore you with introductory details, of which there are enough on the web.

read more