Hacking on LW

28 views
Skip to first unread message

Jeff Schwaber

unread,
Jan 24, 2012, 1:00:23 PM1/24/12
to LW Public Goods Team
I'm not sure if I'm in the right place, or if I should wait longer for
replies from other places (I sent an email to Wes Moore who used to
seem to be the guy in charge of development of LessWrong, but doesn't
seem to be listed on Tricycle's about-us page anymore, and haven't
received a response yet).

I'm trying to get going on developing code for LessWrong. I got a
working dev environment up back at the beginning of LessWrong's
codebase, but it languished both because I didn't know Pylons and
because it required a virtualbox to work because of needing Postgres
8.2 (I have to run 8.4 for work on my main system). So when I saw the
recent post about a virtualbox for LessWrong, I assumed that was the
reason for it, and figured I'd try it out again and see where things
were now that I know a little more about Pylons.

The virtualbox image seems to be running Postgres 8.4. But it's too
slow on my system for me to be able to spend any time in it to figure
out more. And I can't find any documentation on the wiki that doesn't
seem to imply 8.2 is still required -- there's a comment about an
experimental 8.3 branch on an apparently defunct google group. Does
anyone know the current state of the database requirement, or where
conversation about development is going on? I'd like to develop, but
if, for example, everything's in the middle of transition to 8.4 (or
even 9), I'd much rather wait for that to settle out. If that's not in
the works anytime soon, I'll figure out how to run 8.2 side-by-side
with 8.4 and get going.

Thanks,

Jeff

John Salvatier

unread,
Jan 24, 2012, 1:09:49 PM1/24/12
to lw-public-...@googlegroups.com, Laurent Bossavit
Hi Jeff, 

I don't have any expertise in this area, but Laurent Bossavit (Morendil) (lau...@bossavit.com) might. If he doesn't respond to this thread, you may consider sending him an email. 

The reason for the virtual machine is that it was generally difficult to get a development environment running in order to do development. I've run the virtual machine and was able to get the website to load and such, though I don't remember if I experimented with trying to make posts/accounts/comments.

John

Matthew Fallshaw

unread,
Jan 25, 2012, 10:39:19 PM1/25/12
to lw-public-...@googlegroups.com
Wes (who is still on the TrikeApps site here, are you looking at the Tricycle Developments site?) and David Powell (the Tricyclist who's done the most hacking on LW recently) both poked to respond here.

David Powell

unread,
Jan 26, 2012, 5:13:55 PM1/26/12
to lw-public-...@googlegroups.com
Hi Jeff,

You should be fine using postgresql 8.4 for lesswrong development - that is what I use. 

(I suspect the lesswrong code would also work fine on 9.0.)

Cheers,

David

John Salvatier

unread,
Jan 30, 2012, 12:57:24 PM1/30/12
to lw-public-...@googlegroups.com
Laurent sends along this email: 


Hi John,

I've been trying to reply to this thread a couple times, and for some reason my emails don't appear to be showing up on the group. Below is a copy of the most recent one.

Laurent Bossavit
lau...@bossavit.com

Hi all,

I'm working today on a little something to make hacking on LW *even* easier.

One of my goals in software development is to reduce opaque dependencies. That is, the kind of thing that makes you go "but it works on my machine".

The ideal endpoint is when you have a source repository that is totally self-sufficient: pull the sources, and you can just run the product.

Obviously "self-sufficient" is always relative to a particular environment: for instance, there is no source code that you cal just pull from a Github repo and run on a bare-metal PC - for instance if you only had bare metal you wouldn't have Git in the first place. There are assumptions: for instance, that you have an underlying OS, and usually that this OS has some dev tools that are enough to "bootstrap" to a running product.

But, for my taste, having a prebuilt virtual machine image to run LW in is insatisfactory: that VM resulted from a manual configuration process done by someone else, and I can't audit that process, reproduce it, make it better. I don't know how to experiment to know what can be left out, etc.

So, I've been working on a Vagrant setup for LW. (This makes a useful contribution to the community and I learn Vagrant as a side-effect; or, according to point of view, the other way around.)

Vagrant is a (cool) tool that lets you programmatically define virtual development environments, in plain text. The Vagrantfile is a normal Ruby source file that specifies "recipes" for building a Ubuntu virtual box from scratch, and then configuring that Ubuntu box with the prerequisites to hacking on LW.

In particular, this lets you specify what version of postgres is to be installed. I can confirm that 8.4 works.

My preliminary results are up on my Github repo: https://github.com/Morendil/lesswrong

Hacking on LW is now done as follows:
- Prerequisites: git, Ruby, rubygems, Virtualbox
- Installing Vagrant: "gem install vagrant"
- Getting the LW source code: "git clone g...@github.com:Morendil/lesswrong.git"
- Creating the LW virtual box: "vagrant up"
- Logging into the LW box: "vagrant ssh"
- Starting the LW server: "cd /vagrant/r2; paster serve --reload development.ini port=8080"

(Note that the above instructions point to my fork of LW, not the official repo.)

Let me know if you try it and run into problems.

At the moment I bump into a stupid issue with the Captcha library; earlier when I was hacking on LW I'd just commented out the Captcha things, but I'll try to see how to fix it for good. In a nutshell the VirtualBox file system has been deliberately broken to be compatible with Windows' case insensitive file name scheme; this creates trouble for the Captcha module. I'm trying to figure out a sensible fix.

Cheers,
Laurent 

Laurent Bossavit

unread,
Jan 30, 2012, 12:25:20 PM1/30/12
to lw-public-...@googlegroups.com

John Salvatier

unread,
Jan 30, 2012, 1:04:42 PM1/30/12
to lw-public-...@googlegroups.com
This is very cool indeed. I hope you'll be posting about this to LW. 

I think I've fixed your posting problem. It was holding your messages for moderation, but not letting me know. 

Jeff Schwaber

unread,
Jan 30, 2012, 1:53:45 PM1/30/12
to lw-public-...@googlegroups.com
So, news:

I got the LW code up and running by following the instructions on the
wiki, but using Postgresql 8.4. It was not difficult. I fairly quickly
established enough understanding of the code that I was able to change
a minor thing and see it reflected in the website. So I'm set up to
the point where I can (probably slowly) make substantive changes. The
next thing from my point of view is to be part of a mailing list where
ongoing development is going on, both so I can know what's happening
and when I need to update for big things, and so I can receive the
benefit of excitement generated by seeing ongoing development.

My local group, brand new though it is, has expressed some interest in
hacking on the code, and I'll show them what I've learned and hope
that generates more excitement as well, but I'm a little worried that
there doesn't seem to be a place where people are talking about
hacking on the code. Maybe it's here, and the code is just in a slow
state right now?

Anyway, that's where I am. Happy to talk to or work with other people
in similar boats.

Thanks,

Jeff

John Salvatier

unread,
Jan 30, 2012, 2:10:36 PM1/30/12
to lw-public-...@googlegroups.com
That's good to hear! 

Perhaps we could ask Matt at Trike to give LessWr...@googlegroups.com open membership? I'll shoot him an email.

Emile Kroeger

unread,
Jan 30, 2012, 3:54:16 PM1/30/12
to lw-public-...@googlegroups.com
Heh, that mailing list was never an official one, I created it a couple years ago when a bunch of people were talking about hacking LW, and I thought a mailing list would be more convenient; but it was never really used munch.

I didn't make the list open-access just to avoid spam, which tends to eat up lists like that - I just made a bunch of people managers of it, which could help.

John Salvatier

unread,
Jan 30, 2012, 4:32:36 PM1/30/12
to lw-public-...@googlegroups.com
Thanks Emile!
Reply all
Reply to author
Forward
0 new messages