Good Morning All,

 

Firstly, thanks to everyone who turned up to last week’s AGM, I hope you enjoyed exercising your democratic right. From it we have elected a new committee, who will take over the running of the society from Easter. More details about them, and where to find the minutes of the meeting

 

This week Jane Street Capital will be coming to give us a talk titled “Real world functional programming”. I think this should be a very interesting talk, and will hopefully lay to bed any doubts (that I’m sure most of us harbour) about the place of functional programming in industry. Jane Street is a quantitative proprietary trading firm who are always looking to recruit, so if you are interested in a career with them this would be an excellent opportunity to meet some of their staff. The talk will be followed by drinks courtesy of Jane Street.

 

Full details of the new committee, the AGM minutes, this week’s talk and more can be found below.

 

Have a good one,

 

Ben and Alex

CompSoc Co-Presidents

 

*******************************************

 

                      The Oxford Computer Society

 

*******************************************

 

Jane Street Capital: Real world functional programming

Wednesday 29/02, 20:15, St Catz Arumugan Building First Floor Car Park Facing

FB Event: http://www.facebook.com/events/307624742624821/

 

Please note the change of venue compared to our printed termcard

 

Real-world functional programming at Jane Street

 

Nearly two million lines of OCaml code and sixty full-time OCaml coders. Functional programming on Linux reigns supreme at Jane Street, a trading firm with offices in London, New York and Hong Kong. Come and hear about how you can use functional languages to write reliable, large-scale, distributed software.

 

Followed by drinks courtesy of Jane Street.

 

http://www.janestreet.com/

 

Here is a handy map for finding Catz: http://g.co/maps/eeut2

The Arumugan building is the fancy name of the lodge, we will be in the room facing the car park on the first floor. We’ll put up some signs in the lodge (which is that big glass building straight in front of you as you walk into catz) to the room.

 

If you get truly lost in Catz, you can call Ben on 0754 999 3401. The talk starts at 2015.

 

------------------------------------------------------------------------

 

CompSoc AGM Minutes + New Committee:

 

Recently the CompSoc AGM elected a new committee who will begin running the society from Trinity term.

 

They are all 1st year Computer Scientists at St Catherine's College, and have formed the committee as follows:

 

- President - Pete York

- Vice-President - Mike Savage

- Secretary - Sam Lanning

- Treasurer - Laura Bengescu

 

A more comprehensive introduction from them will probably follow on the mailing list at some point.

 

Minutes for the AGM are available at http://compsoc.net/minutes/Annual_General_Meeting__44___Hilary_2012/.

 

------------------------------------------------------------------------

 

Technology Competition:

Challenge 7:

 

Yes, once again: A discrete elevator simulation. Anyone who solves this challenge will receive a 20 prize.

 

This challenge is using a given list of discrete elevator request events (found at http://compsoc.dartoxia.com/request.txt) determine the number of elevators required to service the requests, and their final configuration once the requests have been serviced. The number of elevators required is the minimum needed to ensure all requests are serviced within 21 time blocks (ie completed in 21 or fewer time blocks after creation).

 

In the file of event requests, an event is either “SKIP”, or a list of requests in the form “x to y;”. “SKIP” is the event where no request was made. “x to y;” is the request go from floor x to floor y. Each line corresponds to the a time block, ie line 0 = time 0, line 1 = time 1 etc. In a single time block the requests for that block are made, then the elevators move in the direction they are travelling in, then the elevators service any requests at the floor they are now at. If an elevator is empty it can enter travel mode, where it will travel towards a selected request with the intention of servicing specifically that request (it can service others as long as they do not want to go past the selected request), as soon as it has picked up the specific request it travels in the direction needed for that request and resumes normal mode.

 

An elevator can only move up 1 floor, down 1 floor or remain at the same floor during each time block.

 

There is a building containing elevators which is 10 stories high, with each floor numbered 0 through to 9 (ie. 0 is the ground floor). Users request the elevator by pushing a button on the floor they are currently at, indicating the floor they are going to.

 

An elevator’s initial configuration is that it is idling at level 0. Individual elevators follow the following protocol:

 

Elevators can be in 2 modes: Normal mode and Travel mode

Normal mode:

1 currentFloor = currentFloor + direction //as long as this won’t place the elevator out of the building

2 let people out of the elevator if they are in it and this is their floor

3 if no one is in the elevator, then direction = 0 //ie we are idling

4 if anyone is waiting at currentFloor and would like to travel in the same direction as the elevator (or the elevator is idling) then they get on and we go to the floor they requested, if we were idling then we go in the direction for that floor. We always let the people who have been waiting the longest on first.

 

Travel mode:

1 currentFloor = currentFloor + direction //as long as this won’t place the elevator out of the building

2 let people out of the elevator if they are in it and this is their floor

3 if anyone is waiting at currentFloor and would like to travel between targetFloor and currentFloor then they get on

4 if currentFloor = targetFloor then let anyone on who would like to go in targetDestination direction and set direction to be towards targetDestination

5 switch to Normal mode

 

An elevator will switch into Travel mode if at the end of part 4 of normal mode it does not contain any passengers. When it switches into travel mode, it will take a request (x to y) which isn’t being acted upon by another elevator and travel to targetFloor (x), doing as much transporting as it can on the way, then will travel towards targetDestination (y). When it is travelling towards targetDestination it has switched back into Normal mode.

 

If there are [0..N] elevators the system acts in the following manner:

1 todo = <read in request events happening on this time block (if there are any)>

2 for i = 0 to N do

3    execute elevator i’s protocol once, removing any request events from todo which it can immediately handle

4 for i = 0 to N do

5    if elevator i is in Normal mode and empty, and todo is not empty then

6          take the request which has been waiting longest (x to y) from todo, and switch elevator i into Travel mode with targetFloor = x and targetDestination = y

7 advance the time by 1 and go back to step 1

 

One request is determined to be waiting longer than another if it was generated before the other. If they were generated at the same time, then the request before the other in the list defining them in the requests.txt file is the one that has been waiting longer.

 

Answers can be submitted to http://compsoc.dartoxia.com/answer/<num of elevators><final floor of elevator 0><final floor of elevator 1><etc..> (obviously without the brackets, ie just a string of numbers). Whilst the solution to this challenge may seem to favour using methods taught in 2nd year CompSci, it can clearly be solved without using any of that fanciness.

 

An example runthrough and solution can be found at http://compsoc.dartoxia.com/example.txt.

 

As a clue to help you solve it, 6 elevators are required to service all of the requests in time. A second clue is that none of the lifts end up in positions 0, 2, 4, 6 or 9. A final third clue is that the first elevator finishes at floor 1. That is now a reasonable amount of information to just brute force it against my vps.

 

Anyone (with a .ox.ac.uk email address) can sign up to the competition through the http://compsoc.dartoxia.com website, but only members can receive prizes.

 

Compsoc.dartoxia.com isn't connected to the compsoc network, and so you will need to make a new account to participate.

 

For more details about the competition see http://compsoc.net/technology_competition or contact committee@ox.compsoc.net if you have questions about this round.

 

------------------------------------------------------------------------

 

Technology Competition:

Week 6 result:

 

No one solved the challenge!

 

------------------------------------------------------------------------

 

CompSoc Jobs Mailing list

 

The society receives a number of advertisements each week from companies and individuals interested in employing our members. The jobs range from graduate positions, to a bit of help with another societies website.

 

If you would like to receive these emails just email compsoc-jobs-request@lists.ox.compsoc.net with 'subscribe' in the subject line.