Inside F#

Brian's thoughts on F# and .NET

Off-topic

Posted by Brian on May 5, 2010

I should probably be doing “real work” now, but don’t feel like it.  And so then I should probably be writing a “real” blog post now, but I don’t feel like that either.  (Though I do have some ‘real’ content in the pipeline; watch this space for another F# screencast soon.)  But I feel the need to write something to get “un-stuck” on the “writing” front, so I’m going to do an atypical, completely self-indulgent blog post where I talk about all the ideas I have sitting in my “to blog” folder, teasing you with great ideas and rants, most of which I’ll never find the time to write or publish.  And I’ll ask for your opinion and then probably ignore it.  Life is not fair!

Despite that awful disclaimer, here you are, still reading, so let’s get to it.

Brian’s random blogging ideas

In absolutely no particular order.  And just a sample of the full list.

Write a prolog unification engine and EDSL in F#.  Well, duh, of course, I did this in a past life, and it’s a simple general component with a number of potential uses.  Oh, and I said this.  Hm.

Encapsulation using classes versus functions.  The classic “how to model classes using closures over mutable state” stuff you might cover in a LISP/Scheme class, but in F#.  Not all that interesting; cool the first time you see it, but then nothing special.

F# Units of Measure.  Something on the topic, of course illustrating things like Smoots and “rad” as an alias for the “1” measure, and whatnot.

Bling.  I need another lifetime to go be a designer and learn all that cool stuff, darn.  But it looks very, very suitable to an F# EDSL.

LazyLists versus IEnumerables.   Discuss the one thing IEnumerables suck at (“tail”) and when and how to apply the PowerPack LazyList type.

Tubes.  Something like Yahoo Pipes, but with an IObservable programming model and a visualization layer and cool combinators and whatnot and it would be cool somehow maybe.  (That’s a concrete design proposal, right?)

What are types?  I’m a fan of static typing, but it’s useful to step way back and talk about types as a set of values, or an interface of operations, closed versus open, automatically separately checkable, abstraction-plateau, puzzle-piece-shaped, design objects, places to hang encapsulation boundaries or invariants or semantics or docs, nominal versus structural and ducks, type system ‘strength’ (too weak –> useless, too strong –> complex/verbose), exceptions, effects, …  That’s a pretty sexy topic.  To me, anyway.

Functional calisthenics.  Like object calisthenics, but for FP rather than OO.  Like maybe no mutables, no classes, no for/while.  No recursion (only map/fold/etc).  Who knows.  I don’t really like the idea, but sometimes it’s fun to push things to ridiculous extremes and see what happens.  (Haskell?)

Comparison/survey of async/parallel technologies on .NET.  Probably out of my scope, alas.

Write a Scheme interpreter in F#.  Had the idea, but then a month later, someone already beat me to that.  Awesome, saves me the time.

Learn a new language every two years.  I guess kinda based on this; the “standard” advice I always hear thrown around is “a new programming language every year”, but I think that is too fast.  This is also a topic-excuse to do my own auto-biographical how-I-got-here-and-learned-all-this-stuff kinda blog entry.

A CSV file reader.  Or more hot uses of the F# “dynamic” (?) operator.

The best tool for the job is rarely the right tool for the job.  A whole rant about the common advice for picking tools, and the real world factors you should use instead.

F# VSIX extensions.  VSIX is hot, the “app store” of Visual Studio.  I will have more to publish on that front soon, I expect.  I wrote an F# VSIX extension, but it was kinda lame, for a rarely used feature (signature files), and it exposed product bugs, so I’m not publishing it.  But a good trial run.  There is still future stuff here, I expect.  (Jared wrote lots of VsVim in F#, how awesome is that?)

Make blog tags.  My blog is not very searchable.  I am also not fond of my blog host.  :)  But it is too unfulfilling right now to do real work to make progress here.

Architecture explorer and DGML.  The high-end VS SKUs have some cool features like Intellitrace (that everyone knows about), but there are cool less-well-known features too.  I wrote a little app to display the “link graph” of my blog in DGML, and it was fun and easy.  DGML has potential.

Rants about languages.  Even C++ has lambda now.  How can anyone bring themselves to use C or Java by day, without hanging themselves that night?  A language without lambda (and generics) is like a day without sunshine.  (Which is like night.)  Gaaaah!

Observations about “good enough”.  Back in school when I was neck-deep in C++, I really loved the factoring of the STL data structures and algorithms.  And then after being all awash with various iterator categories like RandomAccessIterator, I learned .NET, where for the most part you use IEnumerable (which essentially waters down the whole abstraction to “forward-only”)… and I was like, how will I be able to live like this?  And as it turns out, I can count on my fingers (and maybe just one hand, or perhaps even zero) the number of times I’ve “missed” the expressiveness of STL.  IEnumerable is the sweet spot, the 95% case, and there are always things like IList and arrays you can fall back on, and well, it’s amazing what you can gain from ‘simplicity’ when you trade off a little on the absolute ‘expressiveness’ scale.  This is one of many cases where the “the good is the enemy of the best”, rather, “the best is the enemy of the good” comes into play.

How to teach/learn X.  Or what to teach/learn.  In (practically every level of) school I learned almost nothing useful (for work or life).  Ok, that’s too strong, but like, in ten years of college and grad school I learned almost nothing about threading or server-side scaling, or practical programming languages, or source control, or how to work on teams, or build systems, or the Joel Test, or a bunch of other important stuff for my day job.  (I did learn big-oh, and basic abstraction, and gain lots of experience programming and using various languages… it wasn’t all for naught.)  It’s very hard to teach what’s important, or a good way to do things, to people who don’t have experience (prioritizing, or doing things badly), because they can’t appreciate what’s important/good.  I dunno.

Uhm…

Probably other stuff too.

See, this whole blog entry is going nowhere!

What would you like to see me write about?

Tough luck, comments are off right now because I’m trying to fight off the comment-spam-bots with the inadequate tools of my blog host.  Sigh.  Reddit was having problems today too!  The whole internet is broken – how will you be able to express that someone (like me) is WRONG!?!?  How frustrating!

(The comments will probably get turned on again soon and then you can tell me how my one-sentence summary opinions/rants above are wrong, or vote for your favorite topics.  Not that it will affect anything.  I try not to write a blog on a topic unless I’m feeling passionate about it, and “votes” are unlikely to light that fire in me.  Completely unfair to you!  I gave you the disclaimer at the beginning of the blog entry, so don’t say I didn’t warn you.  :P  )

Let’s all hope this got my blog-writing juices flowing so I can churn out some ‘real’ content in the near future.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: