• About
  • Projects
  • Sources
  • Tools

Oliver Steele

Languages of the real and artificial

Home ::

Monads on the Cheap I: The Maybe Monad

By oliver - Posted on December 17th, 2007
Tagged:  
  • Essays
  • JavaScript
  • Programming Languages
  • Tips

Don’t worry, this isn’t YAMT (Yet Another Monad Tutorial). This is a practical post about a code smell that afflicts everyday code, and about an idiom that eliminates that smell. It just so happens that this idiom corresponds to one of the uses for monads in Haskell, but that’s just theory behind the practice, and I’ve saved the theory for the end.

This post is about style: implementation choices at the level of the expression and the statement. Style doesn’t matter much in a small program, or a write-only program (one that nobody will read later). It isn’t necessary to make a program run: by definition, it doesn’t make a functional difference. Style makes a difference to how easy or pleasant a program is to read; this can make a difference to whether it gets worked on (by its author, or somebody else) later.  read more »

  • oliver's blog
  • 14 comments

Overloading Semicolon, or, monads from 10,000 Feet

By oliver - Posted on December 3rd, 2007
Tagged:  
  • Essays
  • JavaScript
  • Programming Languages

amichail on reddit asks about understanding monads in one minute. My thoughts ran longer than a comment and more than a minute, so I’ve placed them here.

The main message of this posting is that you already use monads, just without the labels. The complexity in most explanations comes from factoring out the different pieces of what you already know, and from the mathematical exposition in terms of category theory and monad laws. (I like the math, but you won’t find any of it here.) This posting trades away accuracy for ease; I hope it’s a helpful start.  read more »

  • oliver's blog
  • 9 comments

Ruby and Laszlo

By oliver - Posted on March 8th, 2005
Tagged:  
  • OpenLaszlo
  • Programming Languages
  • Ruby

I first heard of Ruby at the second Lightweight Languages Workshop 2, where Matz and I were both speakers. This was first public disclosure of the then-proprietary Laszlo platform language. I’m afraid I was more worried about preparing my talk then listening to Matz at the time!

Since then, a number of different people have expressed interest in both Laszlo and Ruby. I figured I had finally better take a look at it.  read more »

  • oliver's blog
  • 3 comments

Becoming Lisp

By oliver - Posted on September 11th, 2004
Tagged:  
  • Programming Languages

Python really is becoming lisp. With the type/class unification, decorators, and generator expressions, it’s jumped from 80 percent of Common Lisp + CLOS to 90 percent1, and for web tasks the web programming libraries often make up the difference.  read more »

  • oliver's blog
  • 7 comments

Designing a Language

By oliver - Posted on May 13th, 2003
Tagged:  
  • Programming Languages

One of the things we’re building at Laszlo is LZX, a language for Rich Internet Applications. (Some of the other things we’re building are the client, server, and compiler pieces necessary to make applications written in that language actually do anything.)

Language design is a process, and there’s process-specific knowledge about how to do it. Much of the knowledge is the same that’s needed to design an architecture, or an API; some of it is language-specific. Here are some of the principles I’ve found helpful in designing LZX:

Know the Past

 read more »

  • oliver's blog

The DSL Tower

By oliver - Posted on May 7th, 2003
Tagged:  
  • Programming Languages

A domain-specific language is a language for dealing with a specific problem domain, such as students at a university or entries in a blog. DSL implementation has become so easy, and some of the domains have become so deep, that there’s now a market for subdomain-specific languages (SDSLs).
 read more »

  • oliver's blog

Recent

  • Latin Agreement and Case
  • Smiley Socket
  • Commit Policies
  • My Git Workflow
  • Pneumococoa
  • My No TV
  • The Biofuel Economy
  • Ambimation
  • jQuery Profile Plugin
  • The Shadow of a Legacy
more

Categories

  • Amusements (10)
  • Essays (20)
  • Family (8)
  • General (9)
  • Health (1)
  • Illustrations (11)
  • Inventions (2)
  • JavaScript (24)
  • Libraries (21)
  • Math Education (9)
  • OpenLaszlo (31)
  • Programming (7)
  • Programming Languages (6)
  • Projects (23)
  • Python (3)
  • Ruby (7)
  • Software (3)
  • Open Source (4)
  • XML (6)
  • Software Development (8)
  • Systems Thinking (6)
  • Technology (7)
  • Tips (5)
  • Visualizations (13)
  • Words (9)

Navigation

  • Recent posts
  • Tools

Syndicate

Syndicate content

About

Oliver Steele lives in Western Massachusetts and commutes to downtown LA, where he is bringing an operating system from handwaving to reality. He was the architect of OpenLaszlo, the author of PyWordNet and other open source projects. His interests include programming languages, knowledge representation, information visualization, and math education. [more]

Tools

  • reAnimator
  • reWork

Amusements

  • Aargh
  • foldr
  • WideURL.com

Popular

  • Functional JavaScript
  • JavaScript Memoization
  • Overloading Semicolon
  • reAnimator
  • The IDE Divide
  • Visualizing Basic Algebra
Copyright 1995-2008 by Oliver Steele. All rights reserved.