Craig Stuntz

F# • Compilers • Programming Languages • Functional Programming • Web

Posted by on in Blogs
Designing for Problems Too Big to Test In this post, I will show an example of where using unit testing as a design methodology does not work, and how to produce a design for correct code anyway. There is no single design methodology which works for all problems, so it's useful to have a variety of tools at your disposal. This post is my contribution to the 2015 F# Advent Calendar. I'm implementing a compiler for a tiny language without use of external libraries for things like parsing and code generation. The idea is to produc...

Posted by on in Blogs
F# Presentations at CodeMash 2016 I've been scouring the CodeMash accepted session list for talks featuring F#, and there are quite a few! A Developer’s Journey from Object Oriented to Functional Programming, by Reid Evans Async Everywhere!, by Stephen Cleary Deep Dive into Deep Learning, by Gary Short Functional Browser Automation Testing for Newbs, by Bryan Arendt Programs that Write Programs: How Compilers Work, by Craig Stuntz Recognizing patterns in noisy data using trainable ‘Functional’ State Machines, by Fa...
Speaking at Dog Food Conference, CloudDevelop, and CodeMash I'll be speaking about compilers, testing, and machine learning at a conference near you! Abstracts for all of these sessions are on my Presentations page. Programs that Write Programs: How Compilers Work Dog Food Conference and CodeMash What Testing Can Never Do and How to Do It Anyway Dog Food Conference Machine Learning with Azure ML CloudDevelop...
Adding a [FixedLength] Attribute in Code-First Entity Framework In Code First Entity Framework models, you can define the length of a string field with StringLengthAttribute, but you have to write code in OnModelCreating to indicate a CHAR/NCHAR fixed length field: public class MyEntity { [Key] public int Id { get; set; } [StringLength(2)] public string FixedLengthColumn { get; set; } } public partial class MyContext : DbContext { public virtual DbSet MyEntities { get; set; } protected override void OnModelCreating(DbModelBuilder mod...
How To Use Real Computer Science in Your Day Job I'll be speaking at Lambda Jam next week. Here's the synopsis: When you leave Lambda Jam and return to work, do you expect to apply what you’ve learned here to hard problems, or is there just never time or permission to venture outside of fixing “undefined is not a function" in JavaScript? Many of us do use functional languages, machine learning, proof assistants, parsing, and formal methods in our day jobs, and employment by a CS research department is not a prerequisite. As a consultant who w...

Posted by on in Blogs
Presentations Incredibly Strange Programming Languages Stir Trek · 6 May 2016 If you've ever suspected that “all programming languages are pretty much the same; they just have different syntax,” well, you will never suspect that again! Covering languages from the unusually powerful (Idris) to the illuminated (قلب) to the profoundly limited (BlooP), and all points in between, these languages will help you think differently about approaches to software problems you face in your day job. Of course we’ll h...

Posted by on in Blogs
Provable Optimization with Microsoft Z3 A few months ago, some coworkers sent around a Ruby challenge. It appears simple, but we can sometimes learn a lot from simple problems. Write a Ruby program that determines the smallest three digit number such that when said number is divided by the sum of its digits the answer is 20. In case that's not clear, let's pick a number, say, 123. The sum of the digits of 123 is 6, and 123/6 = 20.5, so 123 is not a solution. What is? Here's some Ruby code I wrote to solve it: def digitSum(num,...

Posted by on in Blogs
What Is the Name of This Function? There is a function I need. I know how to write it, but I don't know if it has a standard name (like map, fold, etc.). It takes one argument -- a list of something -- and returns a list of 2-tuples of equal length. Each tuple contains one item from the list and the list without that item. It's probably easiest if I show you an example: > f [1; 2; 3];; val it : (int * int list) list = [ (1, [2; 3]) (2, [1; 3]) (3, [1; 2]) ] Here's the implementation I'm using: let f (...
Your Flying Car is Ready: Amazing Programming Tools of the Future, Today! That's the title of my presentation at Dog Food Conference 2014, 29-30 September, in Columbus, Ohio. If you found my post on "Test-Only Development" with the Z3 Theorem Prover was interesting, then you'll love this. What if simply writing "unit tests" was enough to produce a program which makes them pass? What if your compiler could guarantee that your OpenSSL replacement follows the TLS specification to the letter? What if you could write a test which showed that your code had no unintention...
Cloud Security, For Real This Time: Homomorphic Encryption and the Future of Online Privacy That's the title of the presentation I'll be giving at CloudDevelop 2014, on October 17th, in Columbus, Ohio. If you read my blog at all then you're probably interested in where software development will be headed five years in the future. Two things I recommend that you study are proving systems and homomorphic encryption. I've written about proving systems in the past, and will have more to say in the future, but today we'll talk about homomorphic encryption. Homomorphic encryption will ...

Check out more tips and tricks in this development video: