Skip to content

Instantly share code, notes, and snippets.

@lazywithclass
Last active March 21, 2017 04:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lazywithclass/4ce0b0b44f48c0406a63c6ffb71dc07d to your computer and use it in GitHub Desktop.
Save lazywithclass/4ce0b0b44f48c0406a63c6ffb71dc07d to your computer and use it in GitHub Desktop.
[RC Diary] Good progress and activism (-84)

[RC Diary] Good progress and activism (-84)

Project lamp

We moved to Jekyll and used plugins to programmatically paste the feedback areas after the code examples:

module Jekyll
  class ReplOnly < Liquid::Tag

    def initialize(tag_name, text, tokens)
      # need to parse through text, so we can fix below
      super
      @text   = text.split('#')
      @id     = @text[0]
      @editor = @text[1...@text.length]
    end

    def render(context)
      [
        '<div class="js-editor" data-identifier="',
        @id,
        '" style="width: auto; height:150px;">',
        @editor,
        '</div>',
        '<p><input class="js-console"><button class="js-go">REPL</button></p>',
        '<p>Your answer: <code class="js-results quicksort"></code>',
        '<code class="blinking-cursor">|</code></p>',
        '<p class="js-errors ',
        @id,
        '"></p>'
      ].join('')
    end
  end
end

Liquid::Template.register_tag('repl_only', Jekyll::ReplOnly)

it might require some more work but for now it will help us save a lot of time.

Cerebro

Next goals:

  • should mutate only covered source (but assume 100% code coverage for now)
  • data structures could be simplified
  • variable declaration duplicated

Had a look at this video to understand about defrecord and deftype, as in the code I am using

(defrecord Candidate [path code])

to describe an object candidate for mutation, composed of the path to the corresponding file and the code (be it in string representation or AST representation)... aaand I'm not sure I am using it properly.

Programming democracy

It's no use following Noam Chomsky and not taking actions, so I thought about joining the above group to help as I can.

Turns out there is still need to scrape scientific data and in general for developer, we've found a few resources that seem to be useful:

  • envirodatagov.org
  • ppehlab.org
  • resistancemanual.org/Resistance_Manual_Home

Plans

  • videos from Chomsky - find which ones are the best and get them
  • "check that parens are balanced" exercise
  • still need some attention needed for timsort, radix sort
  • chapter 3 of the little schemer in Clojure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment