July 1, 2008 | 1 Comment
The Skydeck API had only been out a few days when someone began a Ruby binding for it. We’re thrilled that there’s been so much interest already, and look forward to some great applications built against our API.
Of course, we like OCaml here, so we are pleased to announce the release of an OCaml binding to the API. You can find it on our developer downloads page.
As part of our API design we decided to use OAuth, so you can allow applications to access your data without giving away your Skydeck username and password. We are also pleased to announce the release of ooauth, an OCaml implementation of OAuth.
Ooauth implements both the consumer and service provider parts of OAuth (we use it in our server and in the API binding above), so you can use it to implement your own API or to consume the many APIs that use OAuth, such as the Google Data APIs. It is also available on the developer downloads page.
Posted by: Jake
Categories: Announcements, Programming, ocaml
June 2, 2008 | 1 Comment
Today we’re announcing three new features that we’re really excited about.
The Network Tab
For most people, the best thing about Skydeck is the way we re-organize your address book around the people that are most important to you (and the people you’ve been neglecting). You could have a thousand names in your address book, but Skydeck knows who belongs at the top of your list.
We call it your true social network: your most important personal and professional relationships. But it’s just the ‘first degree’. Who are their most important connections?

(more…)
Posted by: Jason
Categories: Announcements, Programming, Featured
March 7, 2008 | Be the first to comment
The next BayFP meeting is Wednesday, March 12th. Something a little different this time (although with some connections to Burak Emir’s talk last month about pattern matching in Scala); I’ll be speaking about Twelf.
(more…)
Posted by: Jake
Categories: Technology, Programming
January 7, 2008 | Be the first to comment
This month’s BayFP meeting is Wednesday, January 9th. We’re fortunate to be overlapping POPL 2008, and have arranged for Philip Wadler to repeat a talk on “Well typed programs can’t be blamed“. The talk will be held at 7:30pm in the Nob Hill Room at The Stanford Court Hotel, San Francisco.
This joint paper with Robby Findler introduces blame — from contracts — to a type system with casts. The authors then show that any failure of a cast from a dynamically-typed term to a well-typed context must be blamed on the dynamically typed term (they call this positive blame). Similarly, any cast from a more-precisely-typed term to a less-precisely-typed context must be blamed on the less-precisely-typed context (negative blame). Thus, the title of the talk: well-typed programs can’t be blamed.
The paper concludes with the observation that programming languages with libraries, development tools, user communities and other network effects often get adopted faster regardless of technical superiority. The authors propose that integrating dynamic and static typing into a single language may form a better basis for comparing the strengths and weaknesses of each.
This talk is not just for type theorists and functional programming enthusiasts; many professional programmers work with both static and dynamic types every day. As the authors point out, Visual Basic already supports both static and dynamic typing, and similar integration is planned for Perl 6 and Javascript. One way or another, if you program for a living then you’re probably already switching between the designs, although usually not within a single language.
Several of us from Skydeck will be there on Wednesday and we’d love to see you there. The talk is free, even though it’s being held in the same hotel as the ACM conference. Speaking of the conference, drop us a line if you’ll be in San Francisco for it. Some of us will be attending affiliated events earlier in the week.
Posted by: Mike
Categories: Technology, Programming
January 2, 2008 | Be the first to comment
Following up on our earlier patch, here is a patch to show backtraces in the OCaml top level and for dynamically-loaded code (this patch subsumes the previous one). This feature is often requested on the OCaml mailing list, and we have found it very useful in development to get a quick idea of where something is breaking.
(more…)
Posted by: Jake
Categories: Programming, ocaml
November 6, 2007 | Be the first to comment
If you’re in the San Francisco Bay Area on Wednesday and you have an interest in functional programming languages, come join us at the Bay Area Functional Programmers meeting. David Pollak will be giving a talk on Lift at 7:30pm at the Carnegie Institute on the Stanford campus. Last month’s talk on HAppS was excellent — we’ve integrated a couple of ideas from it into our system at Skydeck. Several of us from Skydeck will be there, so we hope you can make it too.
Posted by: Mike
Categories: Announcements, Programming
October 11, 2007 | 5 Comments
It can be hard to go back to a conventional language once you’ve enjoyed the freedoms of typed functional programming. That’s why, when we needed to write some Javascript at Skydeck, our first inclination was to find some way around it. Javascript is not such a terrible language—it has higher-order functions at least—but we missed the safety of static type inference and OCaml’s expressive features like variant types and pattern matching. So instead of writing Javascript, we wrote ocamljs, a back end to the OCaml compiler that generates Javascript.
(more…)
Posted by: Jake
Categories: Programming, ocaml
September 14, 2007 | 5 Comments
One annoyance of OCaml (compared to Java or most any of the scripting languages) is that it does not automatically print a stack trace when your program throws an exception. To get one you have to compile with -g to include debugging information in the executable, and launch the runtime with -b so that it captures a stack trace on an exception. By default the runtime doesn’t spend time capturing the stack trace; this reflects a design choice to make exceptions very lightweight. Because exceptions are cheap it is good OCaml style to use them freely as a control-flow mechanism, while in most other languages such use is discouraged—exceptions are meant to be used only for error handling.
Once you’ve -g and -b‘d your way to a stack trace you can only get it printed to standard error, and then only if it reaches the top level. This is usually fine for a batch program, but for a long-running program like a web server it is a severe restriction. So we’ve written a small patch to the OCaml runtime that lets you get the stack trace as a string so you can show it in a web page, log it, etc. You can also turn the capturing of backtraces on and off inside the program so you incur the cost only when you need it.
(more…)
Posted by: Jake
Categories: Programming, ocaml
August 21, 2007 | 5 Comments

It’s said that the fox knows many tricks, but the hedgehog knows one big trick. If Java is the hedgehog, with objects as its one big trick, then OCaml is the fox, with lots of different tools for structuring code. Many of the things you’d use objects for in Java have simpler, cleaner, or safer alternatives in OCaml: tuples and records for structuring data, higher order functions in place of one-method anonymous inner classes, parametric polymorphism for collections instead of pervasive downcasts (although this has improved with the introduction of Java generics), functors and signatures in place of (compile-time) parameterization of code with interfaces.
Nonetheless, sometimes you want objects—as I did recently when interfacing with some object-oriented native code—and you can get them in OCaml too (objects are of course the O). But they aren’t quite the objects that you’re used to in Java. In Java, you can put two objects with a common superclass into a single List. I tried to do that in OCaml and got a mysterious type error. It took me some time, a little research, and a little profanity, but I got my code working and learned some things. (more…)
Posted by: Jake
Categories: Programming, ocaml
August 13, 2007 | 4 Comments
It’s pretty easy to get overly confident about the correctness of your code when you program in OCaml. After all, the strict type checking eliminates whole classes of bugs at compile time; you never fight them because your code never builds with them. Even so, I still love running automated tests. The compiler can’t catch all boundary conditions and it certainly can’t verify any situation that is dynamically built at runtime.
At Skydeck, we use OUnit for our unit tests. It’s really straightforward to use because, not surprisingly, it follows the typical n-unit pattern: set-up and tear-down test cases, implement individual tests, and gather them all into suites for execution. Similar to other implementations — cppunit for example — you need to write your own test suites with OUnit. It’s repetitive work, ripe for automation and almost makes you miss reflection (but not quite). So we threw together a module to automate this and hooked it into ocamlbuild. Now adding a new test is simple: we just write new test functions and OCaml does the rest. I love being able to add tests quickly even more than I love that feeling when all the tests pass.
Below is the code that generates the test suite. If you’re using ocamlbuild and want to integrate with it, I’ve included the relevant sections from our myocamlbuild.ml too. (more…)
Posted by: Mike
Categories: Programming, ocaml
Next Page »