Sign in
Chris Smith's completely unique view
Algorithms, functional programming, CLR 4.0, and of course, F#!
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Options
About
Email Blog Author
RSS for posts
RSS for comments
OK
Search
Tags
A day in the life
Active Patterns
Agile Development
Awesome F#
best of
Community
Data Structures
F#
F# Design
F# Zen
fslex
fsyacc
Games
Math
Microsoft
NEWS FLASH
Pages
PDC
Project Euler
Scripting
Shameless Plugs
Snippets
Software Development
Testing
The future
Archive
Archives
April 2010
(1)
March 2010
(1)
February 2010
(3)
January 2010
(1)
November 2009
(4)
October 2009
(2)
September 2009
(1)
August 2009
(2)
June 2009
(1)
May 2009
(3)
April 2009
(3)
February 2009
(1)
January 2009
(2)
December 2008
(3)
November 2008
(2)
October 2008
(4)
September 2008
(7)
August 2008
(2)
July 2008
(3)
June 2008
(3)
May 2008
(3)
April 2008
(5)
March 2008
(6)
February 2008
(3)
January 2008
(4)
December 2007
(2)
November 2007
(2)
October 2007
(2)
June 2007
(1)
May 2007
(3)
April 2007
(2)
March 2007
(1)
January 2007
(1)
December 2006
(2)
October 2006
(4)
September 2006
(4)
August 2006
(2)
July 2006
(1)
June 2006
(4)
May 2006
(3)
April 2006
(4)
March 2006
(2)
February 2006
(5)
January 2006
(3)
December 2005
(3)
November 2005
(5)
October 2005
(4)
September 2005
(5)
August 2005
(8)
July 2005
(7)
June 2005
(7)
May 2005
(5)
April 2005
(4)
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
Chris Smith's completely unique view
fsyacc Sample on Code Gallery
Posted
over 5 years ago
by
ChrSmith
1
Comments
The first release is a simple four function calculator, which builds off of last week's blog post and integrates fsyacc for parsing. The net result is the ability to write simple simple expressions like "10 * 2 - 15 / 3" and get it evaluated using the order of operations....
Chris Smith's completely unique view
fslex Sample
Posted
over 5 years ago
by
ChrSmith
5
Comments
In this post I’ll focus on creating a simple program which will take advantage of fslex, and show how to generate a scanner to parse basic mathematical expressions like “1.0 / (sin pi + cos pi)”....
Chris Smith's completely unique view
F# Snippet - Enums and Discriminated Unions
Posted
over 5 years ago
by
ChrSmith
1
Comments
I was writing some F# code this week and ran into problem. Consider the following code: type Thingey = This | That | SomethingElse Which looks like an enum. So I assumed that, like things inheriting from System.Enum, an instance of the type had a ToString method which did the right thing. But, alas, when I type it into the F# Interactive Console I get: > (Thingey.That).ToString();; val it : string = "FSI_0002+Thingey" The reason being is that the type Thingey is actually a Discriminated Union. In F#, to produce an Enumeration type you use the same syntax except you must explicitly provide an integer value for each member. Discriminated Unions can do a lot more than Enums in F#, but there are situations in which to use both. The following snippet shows you how to use Enums and simple Discriminated Union types in F#....
Chris Smith's completely unique view
F# and Markov Chains, oh my!
Posted
over 5 years ago
by
ChrSmith
2
Comments
Recently I started playing a collectable card game after some friends got me into it. (Who themselves got back into it after some friends of theirs started playing. Witness the economic potential of viral card games!) As it turns out, I am a pretty poor card player I figured I would get into the business of collecting cards. Which is fun, you can do alone, and requires no skill. I figured I would answer the question “If I started from scratch, how many booster packs would it take for me to collect the whole set”. Well, since booster packs give you cards randomly the best you can shoot for is a confidence interval. ...
Page 1 of 1 (4 items)