Stax: patch

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Stax: patch

interaction-designer
Hi John and other Stax committers (&List),

If I have found a bug, or I have some code for reviewing then you probably also like to recieve a patch. I never used patching tools. What cross platform tools should/could I use?  

Thanks in advance for the attention, I look forward to your responses :)

Cordially, Simon

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Stax: patch

laurence taylor
If you use git, you can download the repository, commit your changes, then diff HEAD with your version and email it. Haven't done this myself, but here is a description.

regards
Laurence

On Wed, Sep 22, 2010 at 12:59 PM, <[hidden email]> wrote:
Hi John and other Stax committers (&List),

If I have found a bug, or I have some code for reviewing then you probably also like to recieve a patch. I never used patching tools. What cross platform tools should/could I use?

Thanks in advance for the attention, I look forward to your responses :)

Cordially, Simon

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Stax: patch

John A. De Goes
In reply to this post by interaction-designer

Hi Simon,

Thanks for your contributions to Stax! The first thing you should do is fork the official Stax repository, which is located here:


Once you fork the repository, you can create a special branch which is designed to hold your fix or enhancement. Then send me the link to your repository and the branch name. I can pull directly from your fork/branch.

The most difficult thing is setting up your github account (including public keys for signing your code). Github has some good tutorials on that. 

Let me know if you have any more questions!

Regards,

John A. De Goes
Twitter: @jdegoes 
LinkedIn: http://linkedin.com/in/jdegoes

On Sep 22, 2010, at 4:59 AM, [hidden email] wrote:

Hi John and other Stax committers (&List),

If I have found a bug, or I have some code for reviewing then you probably also like to recieve a patch. I never used patching tools. What cross platform tools should/could I use?   

Thanks in advance for the attention, I look forward to your responses :)

Cordially, Simon

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Stax: patch

interaction-designer
In reply to this post by interaction-designer
Hi John,

I have just set up my account and forked Stax. Not added stuff yet, also not yet to the wiki. I have not contributed anything (at least not that I know of), but that will soon change I hope :). This is my account at git: http://github.com/usablebydesign

I expect to put the groupBy you provided me into haxe/functional/FoldableExtensions, accompanied with a unit test (testGroupBy in FoldableExtensionsTestCase.hx). I am now figuring how to do reactional programming using Stax, so this will probably my first tutorial on your wiki.

Simon
Usable by Design



----- Oorspronkelijk bericht -----
Van: "John A. De Goes" <[hidden email]>
Aan: "The haXe compiler list" <[hidden email]>
Verzonden: Woensdag 22 september 2010 19:35:13 GMT +01:00 Amsterdam / Berlijn / Bern / Rome / Stockholm / Wenen
Onderwerp: Re: [haXe] Stax: patch





Hi Simon,


Thanks for your contributions to Stax! The first thing you should do is fork the official Stax repository, which is located here:


http://github.com/jdegoes/stax 


Once you fork the repository, you can create a special branch which is designed to hold your fix or enhancement. Then send me the link to your repository and the branch name. I can pull directly from your fork/branch.


The most difficult thing is setting up your github account (including public keys for signing your code). Github has some good tutorials on that.


Let me know if you have any more questions!









Regards,


John A. De Goes
Twitter: @jdegoes
LinkedIn: http://linkedin.com/in/jdegoes 


On Sep 22, 2010, at 4:59 AM, [hidden email] wrote:



Hi John and other Stax committers (&List),

If I have found a bug, or I have some code for reviewing then you probably also like to recieve a patch. I never used patching tools. What cross platform tools should/could I use?

Thanks in advance for the attention, I look forward to your responses :)

Cordially, Simon

--
haXe - an open source web programming language
http://haxe.org 


--
haXe - an open source web programming language
http://haxe.org

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Stax: patch

MarcWeber
Hi Simon,

Also consider removing all the trailing text at the end of mails
you no longer refer to.

Mails are linked by mail ids to each other. So finding the whole thread
and looking it up is easy.

shift-ctl-end entf is all you have to do.

Marc Weber

[ > here was a lot of text I do no longer refer to. So I cut it off ]

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Stax: patch

interaction-designer
In reply to this post by interaction-designer
Hi John,

I have forked you respository and added groupBy to both haxe.functional.FoldableExtensions as to haxe.functional.FoldableExtensionsTestCase. I have tested with the latest flashplayers latest haxe build and stable. But I get all kinds of FlashDevelop bugs if I use the current haxe.test stuff. So I tested it with haxe.unit and then something else was very perculier:

This is the test code:

class FoldableExtensionsTestCase extends TestCase {
    public function testGroupBy() {
      var foos:List<Foo> = List.create();
      foos = foos.add( { barProp1:0 , barProp2:['test1','test2'] } );
      foos = foos.add( { barProp1:0 , barProp2:['test2', 'test3'] } );
      var grouper = function (f:Foo):Array<String> {
        return f.barProp2;
      }
      var grouped = foos.groupBy(grouper);
      assertEquals(grouped.toString(),'Map ([test1, test2] -> List [{barProp1:0,barProp2:[test1, test2]}], [test2, test3] -> List [{barProp1:0,barProp2:[test2, test3]}])');
    }
}
typedef Foo = {
    var barProp1:Int;
    var barProp2:Array<String>;
}

These are the results

* run1
Class: tests.TestFoldableExtensions .
OK 1 tests, 0 failed, 1 success

* run2
Class: tests.TestFoldableExtensions .
OK 1 tests, 0 failed, 1 success

* run3
Class: tests.TestFoldableExtensions F
* tests.TestFoldableExtensions::testGroupBy()
ERR: TestFoldableExtensions.hx:19(tests.TestFoldableExtensions.testGroupBy) - expected 'Map ([test1, test2] -> List [{barProp2:[test1, test2],barProp1:0}], [test2, test3] -> List [{barProp2:[test2, test3],barProp1:0}])' but was 'Map ([test1, test2] -> List [{barProp1:0,barProp2:[test1, test2]}], [test2, test3] -> List [{barProp1:0,barProp2:[test2, test3]}])'
FAILED 1 tests, 1 failed, 0 success

* run4
Class: tests.TestFoldableExtensions .
OK 1 tests, 0 failed, 1 success


Sometimes is reverses the way properties are traversed en then the assertion says boo, somehow. There doesn't seem to be a pattern in it, which is really puzzling me.
And that's kind of hairy, don't you think? It should always run false or always run true, this is madness. And don't forget to add FoldableExtensionsTestCase to StaxTestSuite.hx!! It isn't in there yet. I didn't change that file.  

Cordially, Simon

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Stax: patch

Franco Ponticelli
Hi Simon,
I've taken your code and I have added it to stax. I've made just some tiny changes so that the collection type in the returned Map is the same as the source. I've also added the method to haxe.data.collections.ArrayExtensions/IterableExtensions.

Thank you for your contribution,

Franco.

On Thu, Sep 23, 2010 at 7:50 AM, <[hidden email]> wrote:
Hi John,

I have forked you respository and added groupBy to both haxe.functional.FoldableExtensions as to haxe.functional.FoldableExtensionsTestCase. I have tested with the latest flashplayers latest haxe build and stable. But I get all kinds of FlashDevelop bugs if I use the current haxe.test stuff. So I tested it with haxe.unit and then something else was very perculier:

This is the test code:

class FoldableExtensionsTestCase extends TestCase {
   public function testGroupBy() {
     var foos:List<Foo> = List.create();
     foos = foos.add( { barProp1:0 , barProp2:['test1','test2'] } );
     foos = foos.add( { barProp1:0 , barProp2:['test2', 'test3'] } );
     var grouper = function (f:Foo):Array<String> {
       return f.barProp2;
     }
     var grouped = foos.groupBy(grouper);
     assertEquals(grouped.toString(),'Map ([test1, test2] -> List [{barProp1:0,barProp2:[test1, test2]}], [test2, test3] -> List [{barProp1:0,barProp2:[test2, test3]}])');
   }
}
typedef Foo = {
   var barProp1:Int;
   var barProp2:Array<String>;
}

These are the results

* run1
Class: tests.TestFoldableExtensions .
OK 1 tests, 0 failed, 1 success

* run2
Class: tests.TestFoldableExtensions .
OK 1 tests, 0 failed, 1 success

* run3
Class: tests.TestFoldableExtensions F
* tests.TestFoldableExtensions::testGroupBy()
ERR: TestFoldableExtensions.hx:19(tests.TestFoldableExtensions.testGroupBy) - expected 'Map ([test1, test2] -> List [{barProp2:[test1, test2],barProp1:0}], [test2, test3] -> List [{barProp2:[test2, test3],barProp1:0}])' but was 'Map ([test1, test2] -> List [{barProp1:0,barProp2:[test1, test2]}], [test2, test3] -> List [{barProp1:0,barProp2:[test2, test3]}])'
FAILED 1 tests, 1 failed, 0 success

* run4
Class: tests.TestFoldableExtensions .
OK 1 tests, 0 failed, 1 success


Sometimes is reverses the way properties are traversed en then the assertion says boo, somehow. There doesn't seem to be a pattern in it, which is really puzzling me.
And that's kind of hairy, don't you think? It should always run false or always run true, this is madness. And don't forget to add FoldableExtensionsTestCase to StaxTestSuite.hx!! It isn't in there yet. I didn't change that file.

Cordially, Simon

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Stax: patch

John A. De Goes

By the way, Simon, I suggest you always use haxe.test (Stax unit testing framework), not haxe.unit. Perhaps we can assist you with the FlashDevelop errors you have.

haxe.test equality is much superior to haxe.unit equality. Plus the framework supports asynchronous tests and is far more powerful than haxe.unit.

Regards,

John A. De Goes
Twitter: @jdegoes 
LinkedIn: http://linkedin.com/in/jdegoes

On Sep 24, 2010, at 11:18 AM, Franco Ponticelli wrote:

Hi Simon,
I've taken your code and I have added it to stax. I've made just some tiny changes so that the collection type in the returned Map is the same as the source. I've also added the method to haxe.data.collections.ArrayExtensions/IterableExtensions.

Thank you for your contribution,

Franco.

On Thu, Sep 23, 2010 at 7:50 AM, <[hidden email]> wrote:
Hi John,

I have forked you respository and added groupBy to both haxe.functional.FoldableExtensions as to haxe.functional.FoldableExtensionsTestCase. I have tested with the latest flashplayers latest haxe build and stable. But I get all kinds of FlashDevelop bugs if I use the current haxe.test stuff. So I tested it with haxe.unit and then something else was very perculier:

This is the test code:

class FoldableExtensionsTestCase extends TestCase {
   public function testGroupBy() {
     var foos:List<Foo> = List.create();
     foos = foos.add( { barProp1:0 , barProp2:['test1','test2'] } );
     foos = foos.add( { barProp1:0 , barProp2:['test2', 'test3'] } );
     var grouper = function (f:Foo):Array<String> {
       return f.barProp2;
     }
     var grouped = foos.groupBy(grouper);
     assertEquals(grouped.toString(),'Map ([test1, test2] -> List [{barProp1:0,barProp2:[test1, test2]}], [test2, test3] -> List [{barProp1:0,barProp2:[test2, test3]}])');
   }
}
typedef Foo = {
   var barProp1:Int;
   var barProp2:Array<String>;
}

These are the results

* run1
Class: tests.TestFoldableExtensions .
OK 1 tests, 0 failed, 1 success

* run2
Class: tests.TestFoldableExtensions .
OK 1 tests, 0 failed, 1 success

* run3
Class: tests.TestFoldableExtensions F
* tests.TestFoldableExtensions::testGroupBy()
ERR: TestFoldableExtensions.hx:19(tests.TestFoldableExtensions.testGroupBy) - expected 'Map ([test1, test2] -> List [{barProp2:[test1, test2],barProp1:0}], [test2, test3] -> List [{barProp2:[test2, test3],barProp1:0}])' but was 'Map ([test1, test2] -> List [{barProp1:0,barProp2:[test1, test2]}], [test2, test3] -> List [{barProp1:0,barProp2:[test2, test3]}])'
FAILED 1 tests, 1 failed, 0 success

* run4
Class: tests.TestFoldableExtensions .
OK 1 tests, 0 failed, 1 success


Sometimes is reverses the way properties are traversed en then the assertion says boo, somehow. There doesn't seem to be a pattern in it, which is really puzzling me.
And that's kind of hairy, don't you think? It should always run false or always run true, this is madness. And don't forget to add FoldableExtensionsTestCase to StaxTestSuite.hx!! It isn't in there yet. I didn't change that file.

Cordially, Simon

--
haXe - an open source web programming language
http://haxe.org

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org