14 March 2013
Over the last few months, I’ve been working on various aspects of the OCaml.org design project. This covers things like the design, information architecture and how to incorporate new functionality. One of the methods for thinking through these was to put together a bunch of wireframes using Balsamiq and use these to express (and generate) ideas as well as get feedback quickly.
If you haven’t used wireframes before, think of them as a slightly more advanced form of sketching things out on a whiteboard. The best aspect is that it’s far quicker, easier and cheaper to iterate using wireframes than on an actual website. As you’ll see below, you can also convey a lot of information about how a site might work by showing people a clickable demo.
I want to make this work public and I thought the best way would be to show you some screencasts of how the upcoming OCaml.org website might work and also make the demo available to all of you. The three videos below cover three aspects of the site and I’d encourage you to go through them in order (about 16 minutes in total). Apologies if my screen isn’t particularly clear in the videos but you can visit the demo for yourself and see things in more detail (link and info on feedback at the end of this post).
For those who’d like to watch the videos back-to-back and scaled to fit your browser window, you can view the Vimeo album in ‘couchmode’. Otherwise, individual videos are embedded below (total time 16m17s).
Public wireframe demo
Not everything that looks like it might be clickable actually is (and vice versa). There’ll be a toggle on the bottom right of the browser window that will highlight what can be clicked.
There are parts of the site which are ‘work in progress’ and are marked as such.
The designs you see aren’t necessarily final. Your feedback will help shape our decisions and the best way to provide it is via the infrastructure mailing list.
4 October 2012
This post is part of a series where I'm trying to teach myself OCaml.
You might want to start at the beginning.
It’s been a few days into my OCaml experience so this is a write-up of what I’ve come across so far. I’ve spent more time reading background rather than getting stuck in so I’ve copied in some of the links that I’ve found interesting/useful at the end.
There are number of ways you can get OCaml on your machine. The most obvious would be to get the source via the release page, but you could also use something called GODI, which apparently bundles a bunch of other stuff alongside the language.
I don’t really want to install from source ‘by hand’ and I definitely don’t need all the stuff that comes with GODI. I happen to use Homebrew on my machine, so I checked to see if I can install that way. Turns out I can, so that’s what I ended up doing.
$ brew install objective-caml
The current version of OCaml is 4.00.0 and you can check the version you have installed by typing
ocaml -version in your terminal.
Be aware that Homebrew has it’s own installation process and depends on Ruby. To get Ruby, someone recommended that I install via Ruby Version Manager. To be able to do the above, you’ll need to have the OSX developer tools installed, which means having Xcode.
The first thing to do is get a hello world programme working. Since OCaml is a compiled language, that means writing the necessary source code into a file, compiling it and then executing it. In this case I only need one line that prints ‘hello world’ to the screen and I’m taking it from INRIA’s site (link).
print_string "Hello, world!\n";;
Take the one line above and save it in a file called
hello.ml. Now we need to compile that file using the OCaml compiler. At the command prompt, type the following:
$ ocamlc -o hello hello.ml $ ./hello
Since I don’t really understand the first line I should break it down.
ocamlc is the command to invoke the compiler, the option
-o hello means you want to name the output executable to be (in this case) ‘hello’ and the final argument is the source code file. It’s useful to look at the man page for
ocamlc to see what other options are available. The second line executes the programme, which prints hello world to the screen with a line-break.
I also notice that I now have two other files in addition to the source,
hello.cmo. According to the man page, these are the ‘compiled interface’ and ‘compiled object code file’ respectively. I have no idea what that means but removing the files doesn’t affect the executable.
Even though OCaml is a compiled language, there’s something called ‘toplevel’ that allows interactive use (more on toplevel). To enter this mode, you simply have to type
ocaml at the prompt so let’s try running the above hello world program using toplevel.
$ ocaml OCaml version 4.00.0 # print_string "Hello, world!\n";; Hello, world! - : unit = () # #quit;; $
$ prompt is the command line and the
# prompt is where toplevel is awaiting a new line of input. The input can span multiple lines and is terminated by
;; (as in the source code).
To exit toplevel, type
#quit;;. It took me three attempts to get that right. I haven’t really played around with toplevel much and I think I’m likely to stick with source code and compiling until I’m a little more comfortable with the syntax.
That’s pretty much where I am for the moment and everything so far has been straightforward. Obviously, I should push myself a bit harder :)
This is the material I found and have been looking over for the last couple of days. Useful as background but I’d say I’m in danger of (semi-productive) procrastination if I’m not careful.
- OCaml Manual (from INRIA)
- OCaml examples (also INRIA)
- OCaml Intro (wikibooks)
- Minsky on ML (Jane Street)
- OCaml pros (Steve Yegge)
- OCaml cons (Sam Steingold)
- Think OCaml (PDF book)
1 October 2012
I’ve set myself a challenge that over the next thirty days, I’ll teach myself some functional programming using OCaml. This will be my first experience of FP in addition to learning a new language so I expect it’ll be quite challenging.
As I go along, I’ll try and write regular posts – hopefully one a day – describing my experiences and frustrations as well as the questions that occur to me. I suspect a number of the posts might be summaries to help me organise my understanding, especially where things seem unexpected. For the times where I can formulate well-posed questions, I’ll put them up in places like Stack Overflow as well as describing them here. Either way, keeping some form of diary will be useful for me and maybe also for other folks who’ve considered trying out FP and OCaml in particular.
Obviously, I’m not completely new to programming but I would say I have any deep experience (especially compared to the folks I tend to hang out with). Just to give you a better picture, my coding experience so far has involved:
- Some C/C++ with a little OOP programming for a High Energy Physics simulation (during my undergrad - a long time ago so I’ve forgotten everything)
- A bunch of Matlab and Bash scripting for analysis of neuroimaging data (during my PhD)
- A bunch of VBA within MS Excel for analysing behavioural data (also during my PhD – I really wish someone had pointed me to Python back then)
- Part of Learn Python the Hard Way (I keep dipping in and out of this)
I tried to dump most of my old scripts – at least those I could find – into a github repo, but I still haven’t collated the Matlab bits. You can judge my coding skills for yourself.
By the end of the 30 days, I’m hoping to have the ability to pick up and read other people’s OCaml code and write basic stuff for myself. I don’t actually have a particular project in mind but I’m not going to let that be an excuse for not getting started.
I’ll post again tomorrow with the mundane parts of how to get things installed and running on a Mac*. Onward!
*Admittedly, I already did this some time ago but I want this series of posts to start right from the beginning.Share / Comment
28 August 2012
Actually, I’ve been here for a while now and feeling (mostly) settled in. I’m in the US for another couple of months, most of which will be in SF, with a short trip to Colorado and New York thrown in.
So far, I’ve met a bunch of folks from ‘back home’, people that they know, and a handful of new ones. While I’m out here, I’m hoping to meet a lot more people who might be interested in the work we’re doing in the Lab. Specifically things related to Software Defined Networking, Identity and Functional Programming – basically anything that overlaps with projects like Signpost and Mirage (if you happen to know anyone, bonus points for putting me in touch).
I’ve also managed to get out of town, courtesy of friends-with-a-car, and saw the Monterey Aquarium (some pics below). Not been hiking yet but will hopefully make it out of town again at some point.
Overall, SF is a very interesting place and I can see the draw for people to come here. Although a lot of the companies are further south, there’s much more ‘stuff’ happening here. I’m looking forward to the next couple of months.Share / Comment