require 'rosettacode'
require 'time'

module RosettaCode
  def self.get_unimplemented(lang)
    programming_tasks = []
    category_members() {|task| programming_tasks << task}

    lang_tasks = []
    category_members(lang) {|task| lang_tasks << task}

    lang_tasks_omit = []
    category_members() {|task| lang_tasks_omit << task}

    [programming_tasks - lang_tasks, lang_tasks_omit]
  end

  def self.created_time(title)
    url = get_api_url({
       => ,
       => title,
       => ,
       => 500,
       => ,
       => 
    })
    doc = REXML::Document.new open(url)
    REXML::XPath.each(doc, ).collect do |node| 
      Time.parse( node.attribute().value )
    end.min 
  end

end

puts Time.now
lang = ARGV[0] || 
unimplemented, omitted = RosettaCode.get_unimplemented(lang)
unimplemented.collect {|title| [title, RosettaCode.created_time(title)]} .
              sort_by {|e| e[1]} .
              each do |title, date|
                puts  % [
                  date.strftime(), 
                  omitted.include?(title)? :  ,
                  title
                ]
              end