SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 36 of 36
  1. #26
    SitePoint Guru
    Join Date
    Nov 2002
    Posts
    841
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  2. #27
    ********* Victim lastcraft's Avatar
    Join Date
    Apr 2003
    Location
    London
    Posts
    2,423
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi...

    Already on it !

    yours, Marcus
    Marcus Baker
    Testing: SimpleTest, Cgreen, Fakemail
    Other: Phemto dependency injector
    Books: PHP in Action, 97 things

  3. #28
    SitePoint Zealot ZangBunny's Avatar
    Join Date
    Jul 2003
    Location
    Mainz, Germany
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by lastcraft
    What's the module name?
    duploc :-)

  4. #29
    ********* Victim lastcraft's Avatar
    Join Date
    Apr 2003
    Location
    London
    Posts
    2,423
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi Guys.

    I had some trouble porting Jonathan's version into mine on large code bases. Doing the comparison matches in the loop slows it right down. I think the way to get graduated output is to have several degrees of canonical forms cached in the source representation. That way it does a simple ladder of exact comparisons in the _isMatch() function.

    Beyond that I am a bit clueless. The PHP tokeniser seems fast enough, but unpicking all of those possible constants slows it right down.

    Anyway, I'll clean up the current sourceforge version and hand over to someone else for a bit.

    yours, Marcus
    Marcus Baker
    Testing: SimpleTest, Cgreen, Fakemail
    Other: Phemto dependency injector
    Books: PHP in Action, 97 things

  5. #30
    SitePoint Enthusiast
    Join Date
    Aug 2003
    Location
    Watford, UK
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Quote Originally Posted by lastcraft
    I had some trouble porting Jonathan's version into mine on large code bases. Doing the comparison matches in the loop slows it right down.
    Ah, yes. I was kind of adding things as I thought of them, (or noticed false positives - a handy use for the viewer ), w/o a real plan... and focusing just on file vs. itself or one other file. It may be useful to work on the basis of different comparisons at different scales - only dealing with strong positives at a macro level.

    Quote Originally Posted by lastcraft
    I think the way to get graduated output is to have several degrees of canonical forms cached in the source representation. That way it does a simple ladder of exact comparisons in the _isMatch() function.
    That sounds like a good plan.

    Quote Originally Posted by lastcraft
    The PHP tokeniser seems fast enough, but unpicking all of those possible constants slows it right down.
    From a very brief glance the tokenizer certainly seems to open up a few possibilities.

    The mention led me to PhpDoctor, a tokenizer based apidoc generator - it seems pretty fast, but I haven't compared it to PHPDocumentor yet.

    Quote Originally Posted by lastcraft
    Anyway, I'll clean up the current sourceforge version and hand over to someone else for a bit.
    Cool, I'm looking forward to seeing what you've been up to.

    Cheers,

    Jon

  6. #31
    ********* Victim lastcraft's Avatar
    Join Date
    Apr 2003
    Location
    London
    Posts
    2,423
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi...

    Quote Originally Posted by JonR
    Cool, I'm looking forward to seeing what you've been up to.
    Expect to be underwhelmed! I had knackered my play version when Jochen set the project up so I had to do a kind of hand merge on the earlier one. I left out any fancy stuff until the source normalisation settles down.

    Don't run the metric display on a large file set. There is no caching of the source objects and it runs like a dog ! I also had the squares colour coded at one point, but seem to have lost the code .

    I have finished for the moment as I have other things to do. Could you get it so that the CanonicalSource class keeps the filesize the same? If uninteresting lines are set to empty lines and an empty check is the first rung on the _isMatch() ladder then it shouldn't do any harm. It's just that you understand the string matches better than me!

    yours, Marcus
    Marcus Baker
    Testing: SimpleTest, Cgreen, Fakemail
    Other: Phemto dependency injector
    Books: PHP in Action, 97 things

  7. #32
    SitePoint Enthusiast
    Join Date
    Aug 2003
    Location
    Watford, UK
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Quote Originally Posted by lastcraft
    Could you get it so that the CanonicalSource class keeps the filesize the same? If uninteresting lines are set to empty lines and an empty check is the first rung on the _isMatch() ladder then it shouldn't do any harm.
    I'll have a go, but I'm not going to get the time till at least tomorrow evening .

    I'm currently on something that I've been promising WACT for ages - I've finally got round to doing a CruiseControl type continuous integration thing that I've been wanting to do for a while. Unfortunately I'm having a little grief right at (one of) the last hurdles.

    W/r/t that, and meandering slightly OT, I've been meaning to ask...

    Quote Originally Posted by lastcraft
    as it could be built into the testing/release mechanism.
    ...what kind of mechanism it is that you use at the minute?

    Cheers,

    Jon

  8. #33
    ********* Victim lastcraft's Avatar
    Join Date
    Apr 2003
    Location
    London
    Posts
    2,423
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi Jon

    Quote Originally Posted by JonR
    ...what kind of mechanism it is that you use at the minute?
    You'll have to give me a little more to go on. What was the context? If you mean a server roll-out script then it is tied to the test suite. It simply rolls everything back if there was a problem.

    yours, Marcus
    Marcus Baker
    Testing: SimpleTest, Cgreen, Fakemail
    Other: Phemto dependency injector
    Books: PHP in Action, 97 things

  9. #34
    SitePoint Enthusiast
    Join Date
    Aug 2003
    Location
    Watford, UK
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Quote Originally Posted by lastcraft
    Could you get it so that the CanonicalSource class keeps the filesize the same? If uninteresting lines are set to empty lines and an empty check is the first rung on the _isMatch() ladder then it shouldn't do any harm.
    I've just checked in modifications to the normalize function - I think everything makes sense . It's reduced the number of hits quite dramatically though, so I may be over-egging it. I'm also not too sure how it'll have affected performance.

    Quote Originally Posted by lastcraft
    There is no caching of the source objects and it runs like a dog !
    I was thinking about this a bit earlier - in one of the papers on the site mentioned above they show a bit of the code for what they do - they start off with a 2-d array representation (presumably dealing w/ output a bit later) - I think this might be a good way to move.

    Cheers,

    Jon

  10. #35
    SitePoint Enthusiast
    Join Date
    Aug 2003
    Location
    Watford, UK
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Quote Originally Posted by lastcraft
    You'll have to give me a little more to go on. What was the context? If you mean a server roll-out script then it is tied to the test suite. It simply rolls everything back if there was a problem.
    Yeah, that was basically it - a script to do something based on test success (tag, release, copy somewhere essentially). I just tracked down where you covered your roll-out script in another thread. Consider my query answered.

    Cheers,

    Jon

  11. #36
    SitePoint Zealot ZangBunny's Avatar
    Join Date
    Jul 2003
    Location
    Mainz, Germany
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Further discussions on Sourceforge

    Since things here are starting to get technical, discussion of the PHP::Duploc tool will be carried on in the Sourceforge Forums for that project.

    Everybody is welcome to take part in Open Discussion or ask questions in the Help Forum. If you want to keep up to date, use the "monitor" feature on those forums, and you'll get all new posts in your email.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •