Open main menu

CDOT Wiki β

Changes

User:Sdowne/summer 2010 worklog may

7,003 bytes added, 16:33, 4 June 2010
no edit summary
* In [https://processing-js.lighthouseapp.com/projects/41284/tickets/664-remove-this-from-parsed-class-variables-and-go-with-thisgettersetter 664] what I'm doing is taking what I learned from [https://processing-js.lighthouseapp.com/projects/41284/tickets/232-test-removal-of-with-p removing with] and improving what was done ages ago with the first with removal, which I hope can also solve my inheritance problems, which currently has three open tickets for inheritance [https://processing-js.lighthouseapp.com/projects/41284/tickets/554-override-not-working-as-expected 554] [https://processing-js.lighthouseapp.com/projects/41284/tickets/643-inheritance-problems-with-variables 643] and [https://processing-js.lighthouseapp.com/projects/41284/tickets/641-bug-in-the-handling-of-polymorphism-08-09 647] These all are very specific examples, but the problem is more general, and I hope by rewriting class parsing in this way, I can get inheritance just right, including super() and super. methods, which I'm going to solve by creating a super object within the scope of the sub class, and it'll be a copy of the base class, so by calling super.variableName, it will work without having to parse super., or without having to create a super function. Also static will need to be rewritten.
* I actually got very far on my class rewrite, and hope to have the first draft for peer review some time tomorrow after an evening of testing.
 
Saturday May 22nd<br />
* Continued work on [https://processing-js.lighthouseapp.com/projects/41284/tickets/664-remove-this-from-parsed-class-variables-and-go-with-thisgettersetter 664] and got quite far, removing about 90 lines of code, but there is a hude problem. I lose control of inheritance. I need to, at the time a function is created, control which class, child or parent, uses it. I do this by using this. for functions, and public. for variables. This will call the parent variable, as public is a frozen copy of this refering to the class that crated it, and this.'s meaning changes when it is called, refering to the current class that is calling it, most likely the child. No way I can remove this functionality and keep the specifics of inheritance. I have decided to better spend my time working on perfecting inheritance.
* Started work on [https://processing-js.lighthouseapp.com/projects/41284/tickets/643-inheritance-problems-with-variables inheritance].
* The main things I want to accomplish is super() constructor calls, super. variable calls, and functions and variables called from their proper parent/child.
* Got an initial trial patch, and got Pomax, a user from irc to break it, which he did, pointing out that inheritance can have infinite levels in the tree, and I only accounted for two. Back to the drawing board.
 
Sunday May 23rd<br />
* I created an inheritance tree. I already keep an array of objects, one for each class, and add classes to it as I go. The class contains a name property, a string of variables names, seperated by a | and an array of function names. In order for multiple inheritance to work, I must continue to add all parent properties to the list of the child, and keep adding as a new child is found. This is recursive and works wonders while testing the values, but the example Pomax sent me isn't quite right.
* super() constructors, I've decided to keep a local object inside the child called super, which will be an instance of the parent. allowing calls like super. to not need any parsing, as they will just refer to the super object. Perfect. One problem, super() is not how you call constructors in JavaScript. I need to parse that into "super = new className();" Passing in any possible parameters. I must do this inside the constructors, and if there is no constructors, a default super constructor call is implied.
* Filed [https://processing-js.lighthouseapp.com/projects/41284/tickets/614-syntax-parsing-error-with-void-setup ticket 614] as a duplicate.
* Resolved [https://processing-js.lighthouseapp.com/projects/41284/tickets/102-move-functions-outside-of-buildprocessing-so-they-can-be-re-used ticket 102].
* Resolved [https://processing-js.lighthouseapp.com/projects/41284/tickets/553-constructor-odd-behavior-mistakes-on-parsing-but-java-parser-is-fine ticket 553].
 
Monday May 24th<br />
 
Tuesday May 25th<br />
* Did some finishing touches to [https://processing-js.lighthouseapp.com/projects/41284/tickets/643-inheritance-problems-with-variables inheritance], and Pomax was not able to break my patch, submitted it for review that afternoon.
* Had a meeting with Dave about my progress.
* I did some further research on my tickets, to assess how possible, and difficult they would be, and started to think and test solutions for some of the more difficult ones, like [https://processing-js.lighthouseapp.com/projects/41284/tickets/671-using-this-for-constructors 671], [https://processing-js.lighthouseapp.com/projects/41284/tickets/642-name-of-parameters-in-constructor-cause-collisions-in-the-class-methods 642], [https://processing-js.lighthouseapp.com/projects/41284/tickets/648-using-class-variables-outside-ctor-and-functions-doesnt-exist 648] and [https://processing-js.lighthouseapp.com/projects/41284/tickets/648-using-class-variables-outside-ctor-and-functions-doesnt-exist 648].
 
Wednesday May 26th<br />
* Completed a few smaller tickets. [https://processing-js.lighthouseapp.com/projects/41284/tickets/636-support-float-literals-with-f-vs-f 636], [https://processing-js.lighthouseapp.com/projects/41284/tickets/651-framerate-not-always-parsed-correctly 651] and one larger ticket [https://processing-js.lighthouseapp.com/projects/41284/tickets/671-using-this-for-constructors 671].
 
Thursday May 27th<br />
* Completed [https://processing-js.lighthouseapp.com/projects/41284/tickets/648-using-class-variables-outside-ctor-and-functions-doesnt-exist 648], [https://processing-js.lighthouseapp.com/projects/41284/tickets/600-check-on-work-boundaries-during-regex-parsing 600] and [https://processing-js.lighthouseapp.com/projects/41284/tickets/625-parse-error-with-the-following-code 625].
 
Friday May 28th<br />
* Had a good day and completed [https://processing-js.lighthouseapp.com/projects/41284/tickets/681-processingdebug-is-broken 681], [https://processing-js.lighthouseapp.com/projects/41284/tickets/665-running-js-through-the-parser 665], [https://processing-js.lighthouseapp.com/projects/41284/tickets/683-last-line-in-processingjs 683], [https://processing-js.lighthouseapp.com/projects/41284/tickets/611-handle-sketch-code-pixels-new-color 611] and [https://processing-js.lighthouseapp.com/projects/41284/tickets/642-name-of-parameters-in-constructor-cause-collisions-in-the-class-methods 642]
 
Saturday May 29th<br />
* Resolved other inheritance tickets that [https://processing-js.lighthouseapp.com/projects/41284/tickets/643-inheritance-problems-with-variables 643] fixed.
Sunday May 30th<br />
* Resolved ticket [https://processing-js.lighthouseapp.com/projects/41284/tickets/613-error-when-calling-method-in-for-loop 613] which has been fixed in [https://processing-js.lighthouseapp.com/projects/41284/tickets/643 643] because of general cleaning.
* Moved [https://processing-js.lighthouseapp.com/projects/41284/tickets/595-parser-barfs-on-object-literals 595] out of 0.9.3 into 1.1.
 
Monday May 31st<br />
* Today we met about video.js.
* Moved three tickets out of 0.9.3 [https://processing-js.lighthouseapp.com/projects/41284/tickets/664-remove-this-from-parsed-class-variables-and-go-with-thisgettersetter 664], [https://processing-js.lighthouseapp.com/projects/41284/tickets/477-class-and-method-overloading-with-same-number-of-arguments 477] and [https://processing-js.lighthouseapp.com/projects/41284/tickets/441-parsing-indifferent-to-regex-content 441]. I moved them because of how difficult, and how trivial they are at the moment.
* I got started on video.js. I will be adding a feature to be able to tag people in a video, using xml elements. I played with the current example and hacked something up. This won't be hard to complete compared to the processing.js parser. I actually enjoyed writing JavaScript without the constraints of Java like syntax again :).
* I also researched, got help from others, brainstormed ideas for [https://processing-js.lighthouseapp.com/projects/41284/tickets/677-getting-a-reference-to-a-processing-object 677] and finished it later that evening.
1
edit