This phase involved a lot of coding and saying “fuck it” to all the problems and just moving on to present some work.

The problem of type3 settings [*]

Ok so unsuccessfull on adding value checks to bear parameters by just using

type annotations More Reference, I just maintained a yaml file for now categorizing settings, adding settting names as key and their default values / acceptable values as values to those keys.

List of tasks accomplished:

  • Added QuickstartBear
  • Made a mechanism to launch bears with all possible combinations of settings to determine the perfectly green ones for now.
  • Created a multiprocessing environment for launching these bears in parallel.

Tried to preserve the generators by calling its next() function inside a multiprocessing environment but encountered this error,

TypeError: can't pickle generator objects

Ok so there were two wierd things about this error,

  1. What the heck is pickling?
  2. Why and where am I pickling generators?

On researching I found out pickling is converting any object in memory to a byte stream (think of file read write operations). But the probelem was I wasn’t doing anything like that over there. So I resorted to StackOverflow for that and the answer came that I was actually pickling. This was happenning implicitly because of multiprocessing and memory objects are converted to a byte stream due to the inter-process communication, they are written to the memory and re-read again and again by each of the spawned processes and this is one of the overhead of using multiprocessing.

Currently trying to develop a function which emits out generator values a little number at a time as I only need to check for the emptyness of the generator for now. Later I might be using ignore to create SourceRange objects to actually ignore that part of the code or the entire file, and if there are a lot of inconsistencies in a file, converting that entire generator to a list is an overhead that brute force can’t bear at the moment.

[*] Refer to my cEP over here, for newbies to the blog, more about what is a cEP over here