Author Topic: Helping  (Read 4422 times)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7714
    • View Profile
Re: Helping
« Reply #30 on: April 20, 2013, 04:58:21 PM »
What do you mean exactly by visualization?

There isn't a DB3.exe you can run right now.  I'm still building all the pieces individually and haven't put them all together yet.

If you mean how you'd view a SVG file, you'd open it in Chrome or Firefox (Chrome seems to have the best support).

...

For DB2, I think there's a iesara.vbp file, or something like that.  It's in VB6, so you'd need to find a copy of the Visual Basic 6 IDE.

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Re: Helping
« Reply #31 on: April 20, 2013, 05:08:36 PM »
I mean, what do I need to run to generate those SVG files.
Oh my god, who the hell cares.

Offline rwill128

  • Bot Builder
  • **
  • Posts: 67
    • View Profile
Re: Helping
« Reply #32 on: April 20, 2013, 05:42:47 PM »
So I'll check out the changes you checked in recently, but also I have a few questions about the AzimuthUnitTests.

I've been running a few to watch the code work, but I noticed that the first few times I ran the debugger on Azimuth.UnitTests, it tested a few chunks of code in Azimuth.

Now it doesn't seem to be doing so. As soon as the Main() method of Azimuth.UnitTests.Program passes control to UnitTestSharp by calling UnitTestSharp.TestRunner.RunAllTests(), it seems to never get back into the Azimuth code.

So now I've got the UnitTestSharp code and the Azimuth code in the same VS solution, and I can watch the code go from Azimuth.UnitTests.Program.Main into the UnitTestSharp code.

I've also browsed the TestsForUnitTestSharp code, and it appears most of UnitTestSharp is untested, according to a few TODO comments in the code. Does that explain why UnitTestSharp.TestRunner.RunAllTests() does not, in fact, appear to be running all the tests?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7714
    • View Profile
Re: Helping
« Reply #33 on: April 20, 2013, 05:55:23 PM »
@Peter: Oh, there's some SVG files getting generated for failing tests as part of Annulus.  Look at CheckSimilarity in StriaghtSkeletonBuilderTests.cs.  Right now all the tests are passing and I don't think any files are getting generated.  But if you comment out the if (oldFailedChecks != this.internals.FailedChecks) check, it will always generate them.

@rwill: UnitTestSharp works by searching through the given assembly and finding all the tests using runtime reflection.  There's never a place where it will explicitly call any methods in Azimuth.  Instead, they're called indirectly.  And in fact, the actual test methods are wrapped in worker threads, so you can't even really walk it up the callstack.

Your best bet is to set breakpoints inside individual tests in Azimuth.UnitTests if you want to watch them run.  Then make sure Azimuth.UnitTests is the "startup process" by right clicking on the project in Visual Studio and finding that option in the right click menu.  Then Debug->Start Debugging, and your breakpoints should hit.

As for TestsForUnitTestSharp, most everything is tested except for some super high level code, just because it's awkward to do. :/

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Re: Helping
« Reply #34 on: April 20, 2013, 07:18:14 PM »
I actually have some tests failing. But they didn't generate SVG files. I do get SVG files if I uncomment that line.

These are the tests failing. Any idea why they fail for me? :(
Quote
Warning   1   "The triangulator needs to be able to handle non parallel edges." in "Annulus.UnitTests.CSG::TriangulationTests.FindSharedEdgesTests::Parallel"   c:\Users\Peter\Documents\Visual Studio 2012\Projects\Azimuth\Modules\Annulus\Annulus.UnitTests\CSG\TriangulationTests.cs   1207   Annulus.UnitTests
Warning   2   "CutEdgesWithNearbyVertices tests." in "Annulus.UnitTests.CSG::TriangulationTests.CutEdgesWithNearbyVerticesTests::Todo"   c:\Users\Peter\Documents\Visual Studio 2012\Projects\Azimuth\Modules\Annulus\Annulus.UnitTests\CSG\TriangulationTests.cs   1215   Annulus.UnitTests
Error   3   "Expected "SUCCESS" but was "BOUNDS_EXCEEDED"" in "Annulus.UnitTests.SweptCollisionDetection::RotatingCornervsRotatingSegmentTests.VertexVertex::LinearVelocity_Grinding_SolidHit"   c:\Users\Peter\Documents\Visual Studio 2012\Projects\Azimuth\Modules\Annulus\Annulus.UnitTests\SweptCollisionDetection\RotatingCornervsRotatingSegmentTests.cs   1639   Annulus.UnitTests
Error   4   "null" in "Annulus.UnitTests.SweptCollisionDetection::RotatingCornervsRotatingSegmentTests.VertexVertex::LinearVelocity_Grinding_SolidHit"   c:\Users\Peter\Documents\Visual Studio 2012\Projects\Azimuth\Modules\Annulus\Annulus.UnitTests\SweptCollisionDetection\RotatingCornervsRotatingSegmentTests.cs   1640   Annulus.UnitTests
Error   5   "Expected "SUCCESS" but was "BOUNDS_EXCEEDED"" in "Annulus.UnitTests.SweptCollisionDetection::RotatingSimplePolygonvsRotatingSimplePolygonTests::EdgeEdgeSolidHit"   c:\Users\Peter\Documents\Visual Studio 2012\Projects\Azimuth\Modules\Annulus\Annulus.UnitTests\SweptCollisionDetection\RotatingSimplePolygonvsRotatingSimplePolygonTests.cs   55   Annulus.UnitTests
Error   6   "Expected "4" but was "NaN"" in "Annulus.UnitTests.SweptCollisionDetection::RotatingSimplePolygonvsRotatingSimplePolygonTests::EdgeEdgeSolidHit"   c:\Users\Peter\Documents\Visual Studio 2012\Projects\Azimuth\Modules\Annulus\Annulus.UnitTests\SweptCollisionDetection\RotatingSimplePolygonvsRotatingSimplePolygonTests.cs   56   Annulus.UnitTests
Error   7   The command ""C:\Users\Peter\Documents\Visual Studio 2012\Projects\Azimuth\Junk\Annulus.UnitTests\Debug\Annulus.UnitTests.exe"" exited with code 2.   Annulus.UnitTests
Oh my god, who the hell cares.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7714
    • View Profile
Re: Helping
« Reply #35 on: April 20, 2013, 08:05:43 PM »
Those failing tests are for the continuous collision detection.  They fail because I haven't finished :)  I sometimes use failing tests as todo's when I want to work on something else for a while.  That way when I come back I have something I can work in immediately while I re-figure out the code and what I was trying to do.

Offline rwill128

  • Bot Builder
  • **
  • Posts: 67
    • View Profile
Re: Helping
« Reply #36 on: April 24, 2013, 03:49:06 PM »
Almost done with the copywriting -- gotta pay the bills, etc.

Anyway, I'll be gratefully jumping back into work I want to do (coding related work) at the end of the week, at latest.

Thanks for the information and sorry if it ended up being something you had to get done yourself.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7714
    • View Profile
Re: Helping
« Reply #37 on: April 24, 2013, 04:41:23 PM »
No worries.

I haven't started working on it myself.  It is super annoying without it, though, as the prebuild step takes about 5 or 6 seconds where Visual Studio seizes up. :/  Probably something I'm going to tackle if you don't in a week or two.

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Re: Helping
« Reply #38 on: April 24, 2013, 05:21:11 PM »
From experience getting into code can take quite some time. Especially if you can't play with it full time.
From the peek I did in the code it seems better organized then most projects though.

I might actually contribute at some point.  But I don't have seas of free time atm and the free time I have seems to magically disappear. :unsure:
Oh my god, who the hell cares.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7714
    • View Profile
Re: Helping
« Reply #39 on: April 24, 2013, 07:48:18 PM »
From experience getting into code can take quite some time. Especially if you can't play with it full time.

Yeah, this is very true.  At work my job is pretty much to find bugs in unfamiliar code bases and it is exhausting.

Quote
From the peek I did in the code it seems better organized then most projects though.

Thanks, I tried :)

Quote
I might actually contribute at some point.  But I don't have seas of free time atm and the free time I have seems to magically disappear. :unsure:

That would be cool.  There's still enough to do that it should be easy to find some small corner problem in some area you find interesting and work on it more or less oblivious to the rest of what's going on.  I've gone so deep in so many different areas that I imagine it would be hard for any one person to feel comfortable in all parts of the program at once.

...

Also, on introspection, my core coding philosophy is very slow and methodical, to the point of being nearly pedagogical.  I don't mind spending 4 or 5 months researching, implementing, and testing something even when there's an 80% solution that would probably suffice that someone could spit out in a few days.  That's pretty antithetical to how most video game programming is done (I guess I like the change of pace from work).  Many programmers I know in real life would chafe working under these sorts of conditions, so I recognize this might not be a project everyone would feel comfortable working on, even given the ability, interest and time to do so.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: Helping
« Reply #40 on: April 25, 2013, 09:24:52 AM »
Quote
I don't mind spending 4 or 5 months researching, implementing, and testing something even when there's an 80% solution that would probably suffice that someone could spit out in a few days. 

That is why I am afraid to touch the v3 source code.  :)
Also, I don't understand pointers really well. And I need to learn calc.

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Re: Helping
« Reply #41 on: April 25, 2013, 01:45:32 PM »
Also, on introspection, my core coding philosophy is very slow and methodical, to the point of being nearly pedagogical.  I don't mind spending 4 or 5 months researching, implementing, and testing something even when there's an 80% solution that would probably suffice that someone could spit out in a few days.  That's pretty antithetical to how most video game programming is done (I guess I like the change of pace from work).  Many programmers I know in real life would chafe working under these sorts of conditions, so I recognize this might not be a project everyone would feel comfortable working on, even given the ability, interest and time to do so.
If it suffices it suffices. What kind of maniac would waste 5 months just to get a optimal solution.  ;)
Oh my god, who the hell cares.

Offline rwill128

  • Bot Builder
  • **
  • Posts: 67
    • View Profile
Re: Helping
« Reply #42 on: April 30, 2013, 11:04:46 AM »
Hey Numsgil -- I've been messing around with the r930 version of Azimuth, and I know nothing about using a C Preprocessor in a C# VS Solution like this, nor have I used macros very much (though I read up on the MSDN and other tutorial sites about them last week), nor have I ever configured VSE to use any "pre-build steps" before...

... so I'm a long ways away from being able to deliver the custom tools you asked for last week. I can't even get it to build right now.

If I learn more about how to accomplish the pre-build steps that you mentioned by hand, and actually get DenseVectorPre.cs working the way it's supposed to -- even if it's the long and time-wasting way -- then I can probably help with the custom tool and scripts much more easily. At the very least I'll have learned something new.

Can you message me with detailed instructions on how to build it? I've got the UnitTestSharp.dll linked, which was causing most of the errors -- and the last error is a lengthy one. I'll copy it below -- though I doubt it's even necessary.

Code: [Select]
Error 4 The command "call C:\Darwinbots3\DarwinBots3.r930\Trunk\Modules.r930\Azimuth\..\..\3rdParty\mcpp\bin\release\mcpp C:\Darwinbots3\DarwinBots3.r930\Trunk\Modules.r930\Azimuth\Azimuth\DenseLinearAlgebra\DenseVectorPre.cs C:\Darwinbots3\DarwinBots3.r930\Trunk\Modules.r930\Azimuth\Azimuth\DenseLinearAlgebra\DenseVector.cs
call C:\Darwinbots3\DarwinBots3.r930\Trunk\Modules.r930\Azimuth\..\..\bin\release\Reformatter C:\Darwinbots3\DarwinBots3.r930\Trunk\Modules.r930\Azimuth\Azimuth\DenseLinearAlgebra\DenseVector.cs" exited with code 1. Azimuth