C# Trivia - What? No Overflow?

By on 1/11/2009 3:01 PM ()

As can be seen from the icfp 2007 organizers report ([link:www.cs.uu.nl] record, there was the only one team who used F#. I have registered my entry with preferred lang. F#, so i suppose, that team is myself :)

My entry was about 450-500 LOC, and i have used lists as basic structure to represent DNA. Sadly, but i had just friday evening and saturday to work with task. My program was too slow, but it works and i got the first picture.

That entry was my first F# program > 100 LOC, and i have impressed by one thing: i found just 4 logical errors when debug my code,

i.e. 1 error per 100 LOC, and that metric is stable for all my F# code (for now my largest program is about 2.5 KLOC). For my C++ code i do about 2.5-3 errors per 100 LOC, for python/groovy there is 2-2.5 errors per 100 LOC and for java/perl/LISP code it's about 5. This metric is very stable and doesn't change for years.

P.S. my icfp 2006 entry was written in C++ and was about 250 LOC, but i used this code (thank to boost serialisation) and shell script to paralell brute force passwords on 4 servers instead of code it in UM BASIC :)

By on 10/23/2007 10:02 PM ()

I find it odd that the code under your C implementations link is 112 lines long and the code for your umrun-unsafe.fs is exactly 112 lines long also.

By on 8/16/2006 12:59 PM ()
By on 8/15/2006 7:01 PM ()

Good point - we'll try that technique and get back to you

By on 8/15/2006 4:01 PM ()

Nice article!

I was just curious about the memory-pinning-problem: If you just want to access a pinned memory block - why didn't you allocate it using System.Marshal.AllocHGlobal or AllocCoTaskMem? That way you'd get a pinned block of memory for raw access without disturbing the GC. You could even pack these memory blocks into managed classes with finalizers and actually _use_ the GC for these memory blocks (thanks to GC::AddMemoryPressure).

Niki

By on 8/15/2006 1:18 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper