Friday, December 28, 2012

History of Mercury

I've been converting the Mercury CVS repository to Git.  Here is the final report by cvs2git with some interesting statistics.
Note that cvs2git sometimes calls itself cvs2svn.

cvs2svn Statistics:
------------------
Total CVS Files:              8224
Total CVS Revisions:        101243
Total CVS Branches:          84055
Total CVS Tags:            1956649
Total Unique Tags:             661
Total Unique Branches:          65
CVS Repos Size in KB:       465766
Total SVN Commits:           19206
First Revision Date:    Thu Oct 14 09:57:46 1993
Last Revision Date:     Mon Dec 24 08:37:31 2012
------------------
Timings (seconds):
------------------
 625   pass1    CollectRevsPass
   1   pass2    CleanMetadataPass
   0   pass3    CollateSymbolsPass
  85   pass4    FilterSymbolsPass
   0   pass5    SortRevisionSummaryPass
   2   pass6    SortSymbolSummaryPass
  80   pass7    InitializeChangesetsPass
  16   pass8    BreakRevisionChangesetCyclesPass
  16   pass9    RevisionTopologicalSortPass
  45   pass10   BreakSymbolChangesetCyclesPass
  67   pass11   BreakAllChangesetCyclesPass
  62   pass12   TopologicalSortPass
  53   pass13   CreateRevsPass
   3   pass14   SortSymbolsPass
   3   pass15   IndexSymbolsPass
  89   pass16   OutputPass
1149   total
Then I import it into git with git fastimport:
git-fast-import statistics:
---------------------------------------------------------------------
Alloc'd objects:     155000
Total objects:       151932 (     78357 duplicates                  )
      blobs  :        81245 (     15332 duplicates      70383 deltas)
      trees  :        51602 (     63025 duplicates      44099 deltas)
      commits:        19085 (         0 duplicates          0 deltas)
      tags   :            0 (         0 duplicates          0 deltas)
Total branches:         728 (       238 loads     )
      marks:     1073741824 (    115662 unique    )
      atoms:           6930
Memory total:         11001 KiB
       pools:          3735 KiB
     objects:          7265 KiB
---------------------------------------------------------------------
pack_report: getpagesize()            =       4096
pack_report: core.packedGitWindowSize = 1073741824
pack_report: core.packedGitLimit      = 8589934592
pack_report: pack_used_ctr            =      10379
pack_report: pack_mmap_calls          =        944
pack_report: pack_open_windows        =          1 /          1
pack_report: pack_mapped              =  144052290 /  144052290
---------------------------------------------------------------------

Thursday, September 27, 2012

No photos yet.

Currently in Venice and loving it. No photos yet as our camera is not
my phone and there fore can't get wifi in the hotel's restaurant.
Every thing is good, sitar the highlight for me is Venice. Rome was
nice too.

Friday, September 14, 2012

Interruptions

Lately I've been writing, writing and correcting.  I'm at 79K words and I'm about to crack 150 pages.  It's tedious and so I have not felt like doing any other form of writing such as this blog. Therefore, for this entry, I will mainly refer to other's work.

The other day, The Joel Test came up in conversation, so I looked it up.  The infamous Joel Spolsky wrote about 12 checks for a software development team.  I've always been interested in interruptions and how they affect one's productivity (such as stopping to write a blog article), so when I saw items 2 and 8 in the joel test I found it interesting.  I've long known that a 30 second interruption can cost you 15 minutes of productivity, Joel however cites this as the minimum loss of productivity.  He also links this phenomenon to working memory.

Working memory is the set of things your thinking of right now.  If you want a computer analogy think of the registers in a CPU, (RAM being short term memory and disk being long term memory).  Most people can remember roughly 7 plus-or-minus 2 things (if I remember correctly).  When you're interrupted you forget everything out of your working memory so that you can help your colleague with his spelling, even though it only takes you 30 seconds to remember how to spell something, you spend the next 15 minutes trying to get back into the zone.  Had your colleague used a dictionary it would have cost him a little more time, and would not have cost you that 15 minute minimum.

I was talking with a friend about this, he suggested that the problem is not just working memory, but that it also applies to any creative work.  He said that humans seem to need 8 minutes of rest before they can be creative.  however, we do not have a citation for this statement and my friend isn't sure if he recalls it correctly.  We did find another interesting article on the topic of thinking time and reflection.

On a related note I found another article from Joel on a similar topic of 'context switching'.  Here he discusses that switching between multiple tasks can also be a problem for efficiencly.

Monday, May 21, 2012

I still exist!

So I've been busy. Since my last post I attended Multicore World 2012
in Wellington. It was good to go back there. We spent Easter with my
parents and I gave my completion seminar.

Now I'm spending most of my time writing. It is pretty tedious but I'm
making progress. I'm due to submit in about 6 weeks, I'm concerned
about how much I can get done before then, as there is still more
programming to do and experiments to run.

Tuesday, January 31, 2012

POPL Invited talks

POPL was the main conference running during the week. It ran from Wednesday to
Friday with 2 streams.

There were three invited talks, the first was an award, speech and interview.
I forget the name of the award but the purpose was to recognize a paper 40
years after it's publication based on that paper's impact in the last 40 years.
The recipient was Sir Charles Antony Richard Hoare for his paper An axiomatic
basis for computer programming. I'm sad to say that I wasn't aware of Sir
Hoare before POPL; now I'm very interested to read a few of his papers. The
interview referred to several of his papers during his career, and if I'm not
mistaken the interviewer was one of his students.

The second invited talk was given by Jennifer Rexford; this is probably the
invited talk that spoke the most to me. Jennifer had seen a problem in network
administration and operations. The problem is that each router has it's own
configuration and that this is fine if the network has a single router. But
once there are two or more routers the configurations have to agree about
certain things, and that the software that coordinates large networks doesn't
always do a good job - let alone ensure that the configurations are consistent.
Jenifier wrote a domain specific language to solve this problem. I like this
because it's a problem that many people have, and the solution is
straightforward (at least on the surface). And by providing such a solution
her work has a large impact.

The third invited talk was also very good. J Strother Moore demonstrated a
theorem prover. Moore is the same Moore as in the Boyer-Moore string search
algorithm, a very influential researcher. Theorem provers are increasing in
popularity. I felt like the only person in the room who hadn't used one (let
alone written one). So, for me it was good to see this used and demonstrated
in front of my eyes. The anecdotes of this talk where also very interesting;
for instance, AMD used Moore's theorem prover to check the soundness of
floating point division in the K5, after Intel were dealing with the famous
floating point division bug in the newly released Pentium.
(AMD have continued to use the theorem prover).

I still have more notes to write up.

Monday, January 30, 2012

The PADL Report

I arrived on Philadelphia on Thursday (2012-01-19) evening. This was,
deliberately, two days before POPL and it's co-located events where due to
start. Hopefully this would give me a couple of days to recover from jetlag
and the general tiredness associated with flying for 20+ hours across 8
timezones (actually over the pacific you cross 16 but 24-16=8 count towards
jetlag) This seemed like a good idea, I was outside during daylight hours where
light would reach my retinas and produce the right chemicals in my brain to
reset my body clock - this is how all humans work, it's not related to my poor
vision.

So on the Friday and Saturday (of which you can see many photos) I felt awake,
but on Sunday and Monday when the conference begun and I was sitting down
indoors; I found myself falling asleep in many of the presentations. Sadly I
don't remember any of the presentations from VMCAI on Sunday, I don't even
remember what VMCAI was about! I also felt unwell and had a sore thought, I
think I had caught a cold.

On Monday Practical Aspects of Declarative Languages (PADL) begun. While I
sometimes fell asleep in the presentations I remember some of my favorites:

Vincent St-Amour, Sam Tobin-Hochstadt, Matthew Flatt and Matthias Felleisen
Typing the Numeric Tower

This paper described how to use a strong type system such as Haskell's with a
numeric tower such as Scheme's. It may have been my favorite from PADL but
that's not a fair statement since PADL ran on Monday and Tuesday but I was too
sleepy on Monday to pay attention to the speakers. I have the book of
proceedings (which is how these things work) so I can read any of the papers.

Other papers that deserve a closer look are:

Pablo Chico De Guzm?n, Amadeo Casas, Manuel Carro and Manuel Hermenegildo
Segment-Swapping Approach for Executing Trapped Computations

This paper fixes a problem with and-parallelism in Prolog. As I understand it
the problem is caused because of Prolog's nondeterminism. As such this is a
solution to a problem that we don't have in Mercury - and I'm not concerned
with parallelism in Prolog.

Christian Theil Have and Henning Christiansen
Efficient tabling of structured data using indexing and program
transformation

Another Prolog paper. This paper showed that tabling can lead to quadratic
behaviour in linear-looking code (such as append/3). I spoke with the author
about the problem, and now understand it. The author noted that Mercury
doesn't have this problem and asked me to explain why, which was pretty
straight forward.

I'll write-up my notes from POPL and DAMP later.

Thursday, January 26, 2012

Very annoyed!

So POPL ran a student presentation session. This is much like an
elevator pitch session, these are normally good, this one was ran as a
competition and included a prize.

The catch? You were restricted to 12 slides and 20 seconds per slide,
a total of 4 minutes. A time limit is not normally a problem, but the
rest is just too restrictive. It gets worse you may not use prose or
billeted lists, just pictures.

This means using 12 pictures that are relevant, which is difficult.
While all this is bad it's not the worst part.

I fucking missed out on dinner. By the time the qualifying rounds were
over all the food at the reception had been eaten!! POPL! You owe me
a dinner!!

I'm tired of this patronizing attitude to student's effort! "hey you
student! Jump through this hoop and maybe you'll get a pat on the
head!". Seriously, is a small bag of pretezels and a ballpoint pen
adiquite compensation for this effort and missing out on dinner!?!

Sunday, January 22, 2012

Joan of Arc

Apparently this is the original and the coppy is in France. I'm taking
this with a grain of salt though.

The thinker

Snow!

I woke up this morning to find snow everywhere. The news was showing
trucks full of salt and plows ready to clear the roads. The footpaths
were also cleared, well most of them. A couple of times I crossed the
road to find no path on the other side. One time a police car pulled
up to tell me to cross back over, He assumed that I couldn't see that
the footpath was burried in snow and that I would find myself walking
in traffic instead.

Liberty bell

The liberty bell, originally the state house bell, became an important
symbol after becoming cracked. It's popularity further increased after
the American civil war.

Ink pot used to write declaration of independence

American history.

I learnt about history yesterday. Philadelphia was the capital is USA
in the country's early days. The declaration of independence was
signed in the room below.

Saturday, January 21, 2012

I'm in Philadelphia!

I'm here, and breakfast potatoes are great! In Australia we've only
just caught up on the USA's hash brown technology. But the Americans
have discovered a way to infuse more fried-goodness per volume of
potato! Also they can make bacon from turkey; I had to re-read that
entry on the menu to.check I wasn't mistaken.

As I predicted QF93 took off late and I missed my.connection at LAX,
it would have taken too long for me and my bags to change terminals.
The staff were very helpful, and booked me onto US796 - direct to PHL.
My bags were with me too since I had to collect them in LAX
for.customs.

But that's not all. US796 taxied to the runway and then waited for 20
minutes before the pilot said he'd drive us back to the terminal as we
had a broken air conditioner that we needed to maintain cabin
pressure. We left on the fixed plane about 1.5h late. I got info PHL
at the time I would have with my original non direct flights, so
really I shouldn't complain.

The hotel is very nice. It's -2c outside and time to check our some
local places/historic things.