Phillip Trelford's blog articles

0
comment
on 12/10/2014 9:22 AM
Yesterday I noticed a tweet recommending an “Uncle” Bob Martin video that is intended to “demystify compilers”. I haven’t seen the video (Episode 29, SMC Parser) as it’s behind a pay wall, but I did find a link on the page to a github repository with a hand rolled parser written in vanilla Java, plus a transformation step that compiles it out to either Java or C code. The parser implementation is quite involved with a number of files covering both lexing and parsing: Parser.java (168 loc) FSMSyn[...]
>> Read the full article
.
0
comment
on 12/8/2014 11:20 PM
Rosetta Code has a number of programming tasks with example solutions in multiple languages. One of those tasks is find the last Sunday of each month. Here’s a sample in C#: DateTime date; for (int i = 1; i <= 12; i++) { date = new DateTime(year, i, DateTime.DaysInMonth(year, i), System.Globalization.CultureInfo.CurrentCulture.Calendar); while (date.DayOfWeek != DayOfWeek.Sunday) { date = date.AddDays(-1); } Console.WriteLine(date.ToString("yyyy-MM-dd")); } I thought it might be fun [...]
>> Read the full article
.
0
comment
on 12/1/2014 11:45 PM
Welcome to day 2 of the F# Advent Calendar in English, and don’t miss Scott Wlaschin’s introduction to property-based testing from yesterday. In A Christmas Carol Charles Dickens wrote of cold winters with snow as a matter of course. White Christmases were common during the Little Ice Age that lasted from the 1550s to the 1850s. Nowadays the chances of a snowfall on Christmas day are much lower, but the imagery of a white Christmas persists. In this post we’ll generate our snowflakes instead. Koch Snowf[...]
>> Read the full article
.
0
comment
on 11/24/2014 12:40 AM
This weekend Evelina, Yan an I had the pleasure of speaking at f(by) the first dedicated functional conference in Belarus. It was a short hop by train from Vilnius to Minsk, where we had been attending Build Stuff. Sergey Tihon, of F# Weekly fame, was waiting for us at the train station to guide us to the hotel with a short tour of the city. The venue was a large converted loft space, by the river and not far from the central station, with great views over the city. The event attracted over 100 developers[...]
>> Read the full article
.
0
comment
on 11/17/2014 11:22 PM
Last week Gian Ntzik gave a great talk at the F#unctional Londoners meetup on the Nessos Streams library. It’s a lightweight F#/C# library for efficient functional-style pipelines on streams of data. The main difference between LINQ/Seq and Streams is that LINQ is about composing external iterators (Enumerable/Enumerator) and Streams is based on the continuation-passing-style composition of internal iterators, which makes optimisations such as loop fusion easier. The slides (using FsReveal) and sampl[...]
>> Read the full article
.
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