Archive by Author

Coffeescript versus Javascript example for FUN

Coffeescript: window.someList = [1, 2, 3, 4, 5] addOne = (item) -> 1 + item window.runThings = () -> addOne item for item in someList Coffeescript compiled to JavaScript: (function() { var addOne; window.someList = [1, 2, 3, 4, 5]; addOne = function(item) { return 1 + item; }; window.runThings = function() { var item, [...]

Leave a comment Continue Reading →

Nemerle MVC 3 project

You can get it from my new git hub disaster. Just out of curiosity I was trying to see if I could get a basic MVC 3 project going with Nemerle. Never heard of Nemerle? Yeah neither had I up until last week. It’s a pretty powerful .Net language that can be used to expand [...]

Leave a comment Continue Reading →

Arg… Will have to actually start posting more content

Some interesting things to come. Totatlly not a lie and I’m totally not tipsy right now. Once I figure out this “git” thing the kids are talking about, I’ll start posting my futile attempts to turn C# into a functional language.

Leave a comment Continue Reading →

Fizzbuzz in Scheme/Racket

No idea why I did this… (define (fizzbuzz listIn [currentList empty]) (define (showWhich itemToTell) (let ([testString (string-append (if (= (modulo itemToTell 3) 0) "Fizz" "") (if (= (modulo itemToTell 5) 0) "Buzz" ""))]) (if (= (string-length testString) 0) itemToTell testString))) (define (add-head-to-list itemList listTAddTo) (append listTAddTo (list (showWhich (first itemList) )))) (cond [(null? listIn) currentList] [...]

Leave a comment Continue Reading →

Create An X Delimited String From A Char List Using Linq Aggregate

A quick example of how to use the Aggregate method to create a string of delimited members, or in this case characters. You might wonder why this example, or at least you should. It’s true, the character list to delimited string is pretty useless, but some idiot from where I work needed it. [TestMethod] public [...]

Leave a comment Continue Reading →