Re: [FALCONJX][FLEXJS] "as" keyword handling

2016-01-07 Thread Alex Harui
Way back in the day, I was told that "Function" casting was faster, and
you'll see almost as much of it as "as" casting in the Flex SDK source.  I
ran a test on my Mac using FP20 standalone and for 5,000,000 iterations
"function" casting is only 14ms slower than "as" casting so I'm not sure
it really matters what we use for a SWF.  I don’t know what testing
conditions were in the articles linked in this thread that found a greater
difference.

But, IMO, for FlexJS, what really matters is what should happen in the JS
output, and the essence of this thread is that in many cases, we can
optimize away the call to Language.as.  In the past, we always generated
the call and you could suppress it with @flexjsignorecoercion, but I'm
considering pushing the change where we default to not generating the call
and you have to opt-in with @flexjsemitcoercion.  But when you opt-in, we
do want to cause the same behavior that you will get in a SWF.

Right now, "function" casting also results in a Language.as call with a
flag that throws an error if "as" fails.  I think we can optimize out a
lot of these calls as well.  Maybe someday, we can get the compiler to do
code-flow analysis and determine if we can optimize out these calls to
Language.as, but for now, not having these calls makes the code smaller,
and reduces some of the dependencies/goog.requires which reduces the
likelihood the Closure Compiler will find a circular dependency.

-Alex

On 1/7/16, 8:30 PM, "Josh Tynjala"  wrote:

>Interesting side note. As I understand it, try-catch is no longer
>expensive
>in the case where no error is thrown. I explained to someone why I didn't
>want to use a try-catch in some performance critical code, and I cited
>Jackson Dunstan's article. They ran the benchmark from the article in a
>newer runtime, and the big performance difference was gone. I was able to
>confirm on my machine.
>
>Regardless, I would never wrap a function-style cast in a try-catch. Not
>my
>style. If I expect it might fail, I check with "is" first, or, sometimes,
>use an as-style cast instead and check for null.
>
>To be honest, my memory of the performance difference between casting
>styles is from 6-8 years ago, so my knowledge may be as out of date as the
>try-catch thing. Or maybe I'm completely misremembering after so many
>years. I've had a few cases where that's true, like the whole toString()
>thing the other day.
>
>- Josh
>On Jan 7, 2016 8:07 PM, "Andy Dufilie"  wrote:
>
>> On Thu, Jan 7, 2016 at 10:54 PM, Josh Tynjala 
>> wrote:
>>
>> > That's odd. I swear I remember someone from Adobe once explaining that
>> > function-style casting is faster than as-style casting (with the
>> exception
>> > of primitive types that have a top level function that makes
>> function-style
>> > casting impossible, as you mentioned in 1). I've tried to avoid
>>as-style
>> > casting for years, based on this knowledge.
>> >
>> > - Josh
>> >
>>
>> See this stack overflow answer and the articles it links:
>> http://stackoverflow.com/a/14268394
>>
>> *EDIT:* concerning performance, using as is reported to be faster than
>>the
>> > function call style casting in various articles: [1
>> > ] [2
>> > 
>>]
>> [
>> > 3
>> > <
>> 
>>http://gamedevjuice.wordpress.com/2008/02/15/seven-tips-about-performance
>>-optimization-in-actionscript-3/
>> >].
>> > The first article cited looks at the performance differences in depth
>>and
>> > reports that as is 4x-4.5x faster.
>> >
>> > *EDIT 2:* Not only is as 4x-4.5x faster in the normal best case, but
>>when
>> > you wrap the (cast) style conversion in a try-catch block, and an
>>error
>> > actually ends up being thrown, it's more like 30x - 230x faster. In
>>AS3,
>> if
>> > you think you're going to do something exceptional (in that it could
>> throw
>> > an error) then it's clear that you should always look before you leap.
>> > Never use try/catch unless forced to by the API, and indeed that
>>means to
>> > never (cast) It also is instructive to look at the performance
>> > implications of try/catch even when no exception is thrown. There's a
>> > performance penalty to setting up a try/catch block even in the happy
>> case
>> > that nothing goes wrong.
>> >
>> >
>>



Re: [FALCONJX][FLEXJS] "as" keyword handling

2016-01-07 Thread Josh Tynjala
Interesting side note. As I understand it, try-catch is no longer expensive
in the case where no error is thrown. I explained to someone why I didn't
want to use a try-catch in some performance critical code, and I cited
Jackson Dunstan's article. They ran the benchmark from the article in a
newer runtime, and the big performance difference was gone. I was able to
confirm on my machine.

Regardless, I would never wrap a function-style cast in a try-catch. Not my
style. If I expect it might fail, I check with "is" first, or, sometimes,
use an as-style cast instead and check for null.

To be honest, my memory of the performance difference between casting
styles is from 6-8 years ago, so my knowledge may be as out of date as the
try-catch thing. Or maybe I'm completely misremembering after so many
years. I've had a few cases where that's true, like the whole toString()
thing the other day.

- Josh
On Jan 7, 2016 8:07 PM, "Andy Dufilie"  wrote:

> On Thu, Jan 7, 2016 at 10:54 PM, Josh Tynjala 
> wrote:
>
> > That's odd. I swear I remember someone from Adobe once explaining that
> > function-style casting is faster than as-style casting (with the
> exception
> > of primitive types that have a top level function that makes
> function-style
> > casting impossible, as you mentioned in 1). I've tried to avoid as-style
> > casting for years, based on this knowledge.
> >
> > - Josh
> >
>
> See this stack overflow answer and the articles it links:
> http://stackoverflow.com/a/14268394
>
> *EDIT:* concerning performance, using as is reported to be faster than the
> > function call style casting in various articles: [1
> > ] [2
> > ]
> [
> > 3
> > <
> http://gamedevjuice.wordpress.com/2008/02/15/seven-tips-about-performance-optimization-in-actionscript-3/
> >].
> > The first article cited looks at the performance differences in depth and
> > reports that as is 4x-4.5x faster.
> >
> > *EDIT 2:* Not only is as 4x-4.5x faster in the normal best case, but when
> > you wrap the (cast) style conversion in a try-catch block, and an error
> > actually ends up being thrown, it's more like 30x - 230x faster. In AS3,
> if
> > you think you're going to do something exceptional (in that it could
> throw
> > an error) then it's clear that you should always look before you leap.
> > Never use try/catch unless forced to by the API, and indeed that means to
> > never (cast) It also is instructive to look at the performance
> > implications of try/catch even when no exception is thrown. There's a
> > performance penalty to setting up a try/catch block even in the happy
> case
> > that nothing goes wrong.
> >
> >
>


Re: [FALCONJX][FLEXJS] "as" keyword handling

2016-01-07 Thread Andy Dufilie
On Thu, Jan 7, 2016 at 10:54 PM, Josh Tynjala  wrote:

> That's odd. I swear I remember someone from Adobe once explaining that
> function-style casting is faster than as-style casting (with the exception
> of primitive types that have a top level function that makes function-style
> casting impossible, as you mentioned in 1). I've tried to avoid as-style
> casting for years, based on this knowledge.
>
> - Josh
>

See this stack overflow answer and the articles it links:
http://stackoverflow.com/a/14268394

*EDIT:* concerning performance, using as is reported to be faster than the
> function call style casting in various articles: [1
> ] [2
> ] [
> 3
> ].
> The first article cited looks at the performance differences in depth and
> reports that as is 4x-4.5x faster.
>
> *EDIT 2:* Not only is as 4x-4.5x faster in the normal best case, but when
> you wrap the (cast) style conversion in a try-catch block, and an error
> actually ends up being thrown, it's more like 30x - 230x faster. In AS3, if
> you think you're going to do something exceptional (in that it could throw
> an error) then it's clear that you should always look before you leap.
> Never use try/catch unless forced to by the API, and indeed that means to
> never (cast) It also is instructive to look at the performance
> implications of try/catch even when no exception is thrown. There's a
> performance penalty to setting up a try/catch block even in the happy case
> that nothing goes wrong.
>
>


Re: [FALCONJX][FLEXJS] "as" keyword handling

2016-01-07 Thread Josh Tynjala
That's odd. I swear I remember someone from Adobe once explaining that
function-style casting is faster than as-style casting (with the exception
of primitive types that have a top level function that makes function-style
casting impossible, as you mentioned in 1). I've tried to avoid as-style
casting for years, based on this knowledge.

- Josh
On Jan 7, 2016 7:24 PM, "Andy Dufilie"  wrote:

> On Thu, Jan 7, 2016 at 8:27 PM, Alex Harui  wrote:
>
> > If "SomeType(somevar)" is not in a try/catch it will throw an exception.
> > How often are you relying on that vs just trying to make the compiler
> > happy?
> >
>
> "function" casting is slower than "as" in ActionScript, so I have stayed
> away from it.  When I do use it, there are two cases:
>
> 1. If coercing to a primitive type, it actually tries to convert the value
> to that type. With String(value) I expect it to give me a String via
> toString().  With Number(value) I expect it to converting Strings to
> Numbers and undefined -> NaN. I expect it to throw an error if the value
> cannot be converted to a Number. Really I would rather have it return NaN
> instead of throwing an error, but we can't change that behavior because
> that's part of ECMAScript.
>
> 2. When coercing to a non-primitive, I mostly use it to get compiler
> checking for the member variables or functions I access, but I would still
> want it to throw an error even in JavaScript if it is not of the correct
> type, because that's what it does in ActionScript and I expect the
> cross-compiler to faithfully preserve the behavior.
>
>
> On Thu, Jan 7, 2016 at 8:32 PM, Alex Harui  wrote:
>
> >
> > On 1/7/16, 5:24 PM, "Andy Dufilie"  wrote:
> > >if (obj is Thing1)
> > >(obj as Thing1).foo(a,b);
> > >else if (obj is Thing2)
> > >(obj as Thing2).bar(x,y);
> >
> > There are no plans to change "is", just "as".  Are you using "as" as a
> > test or just "is".  In the example above, you are using "as" just to make
> > the compiler happy.
> >
> >
> It's used above to get compiler checking in case I misspelled foo() or
> bar(), or if I pass in bad variable types to either function. In the next
> example, I'm relying on "as" to change the value to null without throwing
> an exception if it is not of the correct type. The code will break if that
> behavior is not preserved:
>
> var thing1:Thing1 = obj as Thing1;
> var thing2:Thing2 = obj as Thing2;
> if (thing1)
> thing1.foo(a,b);
> if (thing2)
> thing2.bar(x,y);
>
> Here is similar real-world code relying on this behavior and it will break
> if "as" is removed by the cross-compiler:
>
>
> https://github.com/WeaveTeam/Weave/blob/13f98136a8cfd8dc4662f6014abcd5aa87baa56d/WeaveJS/src/weavejs/core/SessionManager.as#L335
>
>
>
> > >I see "is" and "as" as highly useful features, and I think it would be a
> > >mistake to make the code cross-compile into something that behaves
> > >differently by default.  IMO if cross-compiled code behaves differently
> > >than the original then it's being mangled and can't be trusted.
> >
> > That's the root of my question: how many folks us "as" to actually
> convert
> > data vs just make the compiler happy.  Again, no plans to change "is".
> >
>
>
> This is not just about making the compiler "happy." It's about getting the
> benefit of compiler checking to alert you when you've typed the wrong
> member variable / function name, or giving the wrong parameter types. If I
> was only concerned about making the compiler happy (preventing it from
> yelling at me), I could just use Object(value).whatever() or use untyped
> variables everywhere. I may as well use plain JavaScript at that point.
>
> We shouldn't be planning to change anything that would cause the
> cross-compiled to code to behave differently than the original source.
> This is not something that should require a vote - it is an error to change
> the behavior of code during cross-compilation.  If such an option is added
> to omit portions of code by default, then the compiler should give you a
> warning for every place that occurs so the user knows exactly what is
> happening.  Otherwise the cross-compiler cannot be trusted.
>
>
>
> > >
> > >A related issue is when setting a typed variable or passing in a
> parameter
> > >to a function, it will do type coercion automatically in AS but that
> > >behavior is lost when cross-compiling to JS.  For example, I have
> > >situations like this where I now have to add manual type casting, and I
> > >wish the compiler would do that automatically:
> > >
> > >var str:String = value_which_may_be_a_number;
> >
> > What error are you getting?  I thought the auto-conversion worked for
> both
> > JS and AS.
> >
> > -Alex
> >
> >
> Auto-conversion is currently not done for function parameters or variable
> assignment.
>
> AS input:
> public function testfunc(a:String, b:String):Array {
> var c:String = a;
> var d:String = b;
> return [typeof a, typeof b, typeof c, typeof d];
> }
>
> JS ou

Re: [FALCONJX][FLEXJS] "as" keyword handling

2016-01-07 Thread Andy Dufilie
On Thu, Jan 7, 2016 at 8:27 PM, Alex Harui  wrote:

> If "SomeType(somevar)" is not in a try/catch it will throw an exception.
> How often are you relying on that vs just trying to make the compiler
> happy?
>

"function" casting is slower than "as" in ActionScript, so I have stayed
away from it.  When I do use it, there are two cases:

1. If coercing to a primitive type, it actually tries to convert the value
to that type. With String(value) I expect it to give me a String via
toString().  With Number(value) I expect it to converting Strings to
Numbers and undefined -> NaN. I expect it to throw an error if the value
cannot be converted to a Number. Really I would rather have it return NaN
instead of throwing an error, but we can't change that behavior because
that's part of ECMAScript.

2. When coercing to a non-primitive, I mostly use it to get compiler
checking for the member variables or functions I access, but I would still
want it to throw an error even in JavaScript if it is not of the correct
type, because that's what it does in ActionScript and I expect the
cross-compiler to faithfully preserve the behavior.


On Thu, Jan 7, 2016 at 8:32 PM, Alex Harui  wrote:

>
> On 1/7/16, 5:24 PM, "Andy Dufilie"  wrote:
> >if (obj is Thing1)
> >(obj as Thing1).foo(a,b);
> >else if (obj is Thing2)
> >(obj as Thing2).bar(x,y);
>
> There are no plans to change "is", just "as".  Are you using "as" as a
> test or just "is".  In the example above, you are using "as" just to make
> the compiler happy.
>
>
It's used above to get compiler checking in case I misspelled foo() or
bar(), or if I pass in bad variable types to either function. In the next
example, I'm relying on "as" to change the value to null without throwing
an exception if it is not of the correct type. The code will break if that
behavior is not preserved:

var thing1:Thing1 = obj as Thing1;
var thing2:Thing2 = obj as Thing2;
if (thing1)
thing1.foo(a,b);
if (thing2)
thing2.bar(x,y);

Here is similar real-world code relying on this behavior and it will break
if "as" is removed by the cross-compiler:

https://github.com/WeaveTeam/Weave/blob/13f98136a8cfd8dc4662f6014abcd5aa87baa56d/WeaveJS/src/weavejs/core/SessionManager.as#L335



> >I see "is" and "as" as highly useful features, and I think it would be a
> >mistake to make the code cross-compile into something that behaves
> >differently by default.  IMO if cross-compiled code behaves differently
> >than the original then it's being mangled and can't be trusted.
>
> That's the root of my question: how many folks us "as" to actually convert
> data vs just make the compiler happy.  Again, no plans to change "is".
>


This is not just about making the compiler "happy." It's about getting the
benefit of compiler checking to alert you when you've typed the wrong
member variable / function name, or giving the wrong parameter types. If I
was only concerned about making the compiler happy (preventing it from
yelling at me), I could just use Object(value).whatever() or use untyped
variables everywhere. I may as well use plain JavaScript at that point.

We shouldn't be planning to change anything that would cause the
cross-compiled to code to behave differently than the original source.
This is not something that should require a vote - it is an error to change
the behavior of code during cross-compilation.  If such an option is added
to omit portions of code by default, then the compiler should give you a
warning for every place that occurs so the user knows exactly what is
happening.  Otherwise the cross-compiler cannot be trusted.



> >
> >A related issue is when setting a typed variable or passing in a parameter
> >to a function, it will do type coercion automatically in AS but that
> >behavior is lost when cross-compiling to JS.  For example, I have
> >situations like this where I now have to add manual type casting, and I
> >wish the compiler would do that automatically:
> >
> >var str:String = value_which_may_be_a_number;
>
> What error are you getting?  I thought the auto-conversion worked for both
> JS and AS.
>
> -Alex
>
>
Auto-conversion is currently not done for function parameters or variable
assignment.

AS input:
public function testfunc(a:String, b:String):Array {
var c:String = a;
var d:String = b;
return [typeof a, typeof b, typeof c, typeof d];
}

JS output:
testfunc = function(a, b) {
var /** @type {string} */ c = a;
var /** @type {string} */ d = b;
return [typeof(a), typeof(b), typeof(c), typeof(d)];
};

This code:
var foo = testfunc;
return foo(1,2)
will return ['string', 'string', 'string', 'string'] in ActionScript, but
['number', 'number', 'number', 'number'] in JavaScript.


Re: [FALCONJX][FLEXJS] "as" keyword handling

2016-01-07 Thread Josh Tynjala
I was referring function casting when I talked about the runtime error that
occurs when it fails. I use that type of casting very frequently.

- Josh
On Jan 7, 2016 5:27 PM, "Alex Harui"  wrote:

>
>
> On 1/7/16, 2:11 PM, "Josh Tynjala"  wrote:
>
> >There are times when I consider it convenient to use "as" for casting and
> >check for null, but it's not frequently. Usually, I use "is" instead. Most
> >of the time, I use the other form of casting that results in a runtime
> >error when the cast fails. I hope that runtime error won't be removed. Or
> >at least could be turned on globally during debugging.
>
> Not sure which runtime error you are referring to.
>
> >
> >In regards to 2, is it not possible to walk the prototype chain of any
> >JavaScript object? Or am I misunderstanding?
>
> IIRC, instanceof was recently added to Language.is/as, but I think it
> won't work for interfaces.
>
> Another related question:  How many of you use "function" casting and
> expect it to fail?  As in:
>
>   var foo:SomeType = SomeType(somevar);
>
> Or
>
>   var bar:String = SomeType(somevar).someStringProperty;
>
> This also gets used to make the compiler happy and seems more readable
> than:
>
>   var bar:String = (somevar as SomeType).someStringProperty;
>
> If "SomeType(somevar)" is not in a try/catch it will throw an exception.
> How often are you relying on that vs just trying to make the compiler
> happy?
>
>
> -Alex
>
>


Re: [VOTE] Release Apache Flex SDK 4.15 RC1

2016-01-07 Thread Mark Kessler
+1 binding


-Successful build from source.
-Successfully compiled small test applications.
-README, RELEASE_NOTES, NOTICE and LICENSE fine.

OS: Win7 64bit
Java: 1.8 64bit.
IDE: FlashDevelop 5.0.2
Flash Player: 20


-


-Mark

On Thu, Jan 7, 2016 at 8:04 PM, OmPrakash Muppirala 
wrote:

> +1 Binding
>
> Tested the source kits on Windows 7, 64 Bit, Java version "1.8.0_65"
> MD5 checksum matches
> Good signature
> Source kit build successful
> Ran ant -f installer.xml -Dair.sdk.version=19.0 and ant frameworks-rsls.
> Build successful.
> Flash Builder likes the new SDK.
> Recompiled existing large Flex web application, everything runs fine
> Recompiled exisiting large Flex mobile application, everything runs fine
>
> (App seems to be running faster.  What did we do??)
>
> Thanks,
> Om
>
> On Thu, Jan 7, 2016 at 12:24 PM, OmPrakash Muppirala  >
> wrote:
>
> > +0 Binding
> >
> > Testing the source kits on Windows 7, 64 Bit, Java version "1.8.0_65"
> > MD5 checksum matches
> > Good signature
> > Source kit build successful
> > Ran ant -f installer.xml -Dair.sdk.version=19.0.  Reports 'build
> > successful,  C:\temp\4.15.0_test is now an IDE compatible folder', but
> > Flash Builder complains saying 'Directory does not contain a Flex SDK'
> and
> > AIR version 16.0 was downloaded.
> >
> > Thanks,
> > Om
> >
> >
> > On Mon, Jan 4, 2016 at 2:16 PM, Alex Harui  wrote:
> >
> >> +1
> >> Package
> >>
> >>
> https://dist.apache.org/repos/dist/dev/flex/sdk/4.15.0/rc1/apache-flex-sdk-
> >> 4.15.0-src.tar.gz
> >> Java 1.7
> >> OS: Mac OS X x86_64 10.9.5
> >> Source kit signatures match: y
> >> Source kit builds: y
> >> README is ok: y
> >> RELEASE_NOTES is ok: y
> >> NOTICE is ok: y
> >> LICENSE is ok: y
> >> No unapproved licenses or archives: y
> >> No unapproved binaries: y
> >>
> >> Package
> >>
> >>
> https://dist.apache.org/repos/dist/dev/flex/sdk/4.15.0/rc1/binaries/apache-
> >> flex-sdk-4.15.0-bin.tar.gz
> >> <
> https://dist.apache.org/repos/dist/dev/flex/sdk/4.15.0/rc1/binaries/apache-flex-sdk-4.15.0-bin.tar.gz
> >
> >> Binary kit signatures match: y
> >> NOTICE is ok: y
> >> LICENSE is ok: y
> >> No unapproved licenses or files in jars: y
> >> No unapproved licenses or archives in binary package: y
> >> No unapproved binaries in binary package: y
> >>
> >> Thanks for being the RM.
> >>
> >> -Alex
> >>
> >> On 1/4/16, 1:14 PM, "Justin Mclean"  wrote:
> >>
> >> >Hi,
> >> >
> >> >This is a  Apache Flex 4.15 release candidate 1. Please see the
> >> >RELEASE_NOTES and the README.
> >> >
> >> >The release candidate can be found here;
> >> >https://dist.apache.org/repos/dist/dev/flex/sdk/4.15.0/rc1/
> >> >
> >> >
> >> >Before voting please review the section,"What are the ASF requirements
> on
> >> >approving a release?", at:
> >> >http://www.apache.org/dev/release.html#approving-a-release
> >> >
> >> >
> >> >At a minimum you would be expected to check that:
> >> >- MD5 and signed packages are correct
> >> >- README, RELEASE_NOTES, NOTICE and LICENSE files are all fine
> >> >- That you can compile from source package
> >> >- That the SDK can be used in your IDE of choice
> >> >- That the SDK can be used to make a mobile, desktop and browser
> >> >application
> >> >
> >> >Please vote to approve this release:
> >> >+1 Approve the release
> >> >-1 Don’t approve the release (please provide specific comments to why)
> >> >
> >> >This vote will be open for 72 hours or until a result can be called.
> >> >
> >> >The vote passes if there is:
> >> >- At least 3 +1 votes from the PMC
> >> >- More positive votes than negative votes
> >> >
> >> >If you find an issue with the release that's a "show stopper" please
> >> don't
> >> >hold off voting -1. If someone votes -1 please continue testing we want
> >> to
> >> >try and catch as many issues as we can and cut down on the number of
> >> >release candidates. Remember existing voters can change their vote
> during
> >> >the voting process.
> >> >
> >> >People who are not in PMC are also encouraged to test out the release
> and
> >> >vote, although their votes will not be binding, they can influence how
> >> the
> >> >PMC votes.
> >> >
> >> >When voting please indicate what OS, IDE, Flash Player version and AIR
> >> >version you tested the SDK with.
> >> >
> >> >Please put all discussion about this release in the DISCUSSION thread
> not
> >> >this VOTE thread.
> >> >
> >> >Thanks,
> >> >Justin
> >>
> >>
> >
>


[4.15.0] # Apache Flex SDK 4.15.0 nightly build 160: Successful

2016-01-07 Thread flex . ci . builds
flex-sdk_release-candidate - Build #160 - Successful

Changes since last build:
No changes

For more information, check the console output at 
http://apacheflexbuild.cloudapp.net:8080/job/flex-sdk_release-candidate/160/.

Re: [FALCONJX][FLEXJS] "as" keyword handling

2016-01-07 Thread Alex Harui


On 1/7/16, 5:24 PM, "Andy Dufilie"  wrote:

>On Thu, Jan 7, 2016 at 4:55 PM, Alex Harui  wrote:
>
>> How many of you use the "as" keyword as part of a test?
>
>
>I have a huge code base and I use "as" / "is" everywhere (
>https://github.com/WeaveTeam/Weave). My code depends on it behaving the
>same way it does in ActionScript.  IMO, being able to easily check if an
>object extends or implements a class/interface is a huge advantage AS has
>over JS.
>
>
>> The reason I'm asking is because the use of "as" as become a negative
>> factor in several cases:
>> 1) In JS, it results in a function call
>>
>
>Yes. In ActionScript, using "as" actually sped up the code in certain
>situations, but in JS it is a performance hit.  This is a very common
>pattern in my code:
>
>if (obj is Thing1)
>(obj as Thing1).foo(a,b);
>else if (obj is Thing2)
>(obj as Thing2).bar(x,y);


There are no plans to change "is", just "as".  Are you using "as" as a
test or just "is".  In the example above, you are using "as" just to make
the compiler happy.


>I see "is" and "as" as highly useful features, and I think it would be a
>mistake to make the code cross-compile into something that behaves
>differently by default.  IMO if cross-compiled code behaves differently
>than the original then it's being mangled and can't be trusted.

That's the root of my question: how many folks us "as" to actually convert
data vs just make the compiler happy.  Again, no plans to change "is".

>
>A related issue is when setting a typed variable or passing in a parameter
>to a function, it will do type coercion automatically in AS but that
>behavior is lost when cross-compiling to JS.  For example, I have
>situations like this where I now have to add manual type casting, and I
>wish the compiler would do that automatically:
>
>var str:String = value_which_may_be_a_number;

What error are you getting?  I thought the auto-conversion worked for both
JS and AS.

-Alex



Re: [FALCONJX][FLEXJS] "as" keyword handling

2016-01-07 Thread Alex Harui


On 1/7/16, 2:11 PM, "Josh Tynjala"  wrote:

>There are times when I consider it convenient to use "as" for casting and
>check for null, but it's not frequently. Usually, I use "is" instead. Most
>of the time, I use the other form of casting that results in a runtime
>error when the cast fails. I hope that runtime error won't be removed. Or
>at least could be turned on globally during debugging.

Not sure which runtime error you are referring to.

>
>In regards to 2, is it not possible to walk the prototype chain of any
>JavaScript object? Or am I misunderstanding?

IIRC, instanceof was recently added to Language.is/as, but I think it
won't work for interfaces.

Another related question:  How many of you use "function" casting and
expect it to fail?  As in:

  var foo:SomeType = SomeType(somevar);

Or
 
  var bar:String = SomeType(somevar).someStringProperty;

This also gets used to make the compiler happy and seems more readable
than:

  var bar:String = (somevar as SomeType).someStringProperty;

If "SomeType(somevar)" is not in a try/catch it will throw an exception.
How often are you relying on that vs just trying to make the compiler
happy?


-Alex



Re: [FALCONJX][FLEXJS] "as" keyword handling

2016-01-07 Thread Andy Dufilie
On Thu, Jan 7, 2016 at 4:55 PM, Alex Harui  wrote:

> How many of you use the "as" keyword as part of a test?


I have a huge code base and I use "as" / "is" everywhere (
https://github.com/WeaveTeam/Weave). My code depends on it behaving the
same way it does in ActionScript.  IMO, being able to easily check if an
object extends or implements a class/interface is a huge advantage AS has
over JS.


> The reason I'm asking is because the use of "as" as become a negative
> factor in several cases:
> 1) In JS, it results in a function call
>

Yes. In ActionScript, using "as" actually sped up the code in certain
situations, but in JS it is a performance hit.  This is a very common
pattern in my code:

if (obj is Thing1)
(obj as Thing1).foo(a,b);
else if (obj is Thing2)
(obj as Thing2).bar(x,y);

Each pair of is/as results in redundant processing since Language.as()
calls Language.is() internally, so I've been changing my code like this to
improve performance:

var thing1:Thing1 = obj as Thing1;
var thing2:Thing2 = obj as Thing2;
if (thing1)
thing1.foo(a,b);
else if (thing2)
thing2.bar(x,y);


> 2) As Om noted yesterday, it doesn't work for Native JS types
>

It does work with native types:

org.apache.flex.utils.Language.is(document.createElement('button'),
HTMLButtonElement)
-> true


> 3) It causes unnecessary class dependencies which complicates the
> goog.requires list
>

The class dependency is necessary if you need the "as" keyword to behave
the same way it does in ActionScript (like I do).


>
> Currently there is an @flexjsignorecoercion hack you can use to tell
> FalconJX to skip code-generation for an "as" operation.  However, we are
> adding more and more of these, and they are more frequently the cause of
> something not working, so I am thinking about flipping the logic and not
> generating code for any "as" operation unless you specifically ask for it
> via @flexjsgeneratecoercion or something like that.
>
> Thoughts?
> -Alex
>
>
I see "is" and "as" as highly useful features, and I think it would be a
mistake to make the code cross-compile into something that behaves
differently by default.  IMO if cross-compiled code behaves differently
than the original then it's being mangled and can't be trusted.

A related issue is when setting a typed variable or passing in a parameter
to a function, it will do type coercion automatically in AS but that
behavior is lost when cross-compiling to JS.  For example, I have
situations like this where I now have to add manual type casting, and I
wish the compiler would do that automatically:

var str:String = value_which_may_be_a_number;


Re: [VOTE] Release Apache Flex SDK 4.15 RC1

2016-01-07 Thread Alex Harui
TLF Rendering speed was improved.

On 1/7/16, 5:04 PM, "omup...@gmail.com on behalf of OmPrakash Muppirala"
 wrote:

>+1 Binding
>
>Tested the source kits on Windows 7, 64 Bit, Java version "1.8.0_65"
>MD5 checksum matches
>Good signature
>Source kit build successful
>Ran ant -f installer.xml -Dair.sdk.version=19.0 and ant frameworks-rsls.
>Build successful.
>Flash Builder likes the new SDK.
>Recompiled existing large Flex web application, everything runs fine
>Recompiled exisiting large Flex mobile application, everything runs fine
>
>(App seems to be running faster.  What did we do??)
>
>Thanks,
>Om
>
>On Thu, Jan 7, 2016 at 12:24 PM, OmPrakash Muppirala
>
>wrote:
>
>> +0 Binding
>>
>> Testing the source kits on Windows 7, 64 Bit, Java version "1.8.0_65"
>> MD5 checksum matches
>> Good signature
>> Source kit build successful
>> Ran ant -f installer.xml -Dair.sdk.version=19.0.  Reports 'build
>> successful,  C:\temp\4.15.0_test is now an IDE compatible folder', but
>> Flash Builder complains saying 'Directory does not contain a Flex SDK'
>>and
>> AIR version 16.0 was downloaded.
>>
>> Thanks,
>> Om
>>
>>
>> On Mon, Jan 4, 2016 at 2:16 PM, Alex Harui  wrote:
>>
>>> +1
>>> Package
>>>
>>> 
>>>https://dist.apache.org/repos/dist/dev/flex/sdk/4.15.0/rc1/apache-flex-s
>>>dk-
>>> 4.15.0-src.tar.gz
>>> Java 1.7
>>> OS: Mac OS X x86_64 10.9.5
>>> Source kit signatures match: y
>>> Source kit builds: y
>>> README is ok: y
>>> RELEASE_NOTES is ok: y
>>> NOTICE is ok: y
>>> LICENSE is ok: y
>>> No unapproved licenses or archives: y
>>> No unapproved binaries: y
>>>
>>> Package
>>>
>>> 
>>>https://dist.apache.org/repos/dist/dev/flex/sdk/4.15.0/rc1/binaries/apac
>>>he-
>>> flex-sdk-4.15.0-bin.tar.gz
>>> 
>>>>>che-flex-sdk-4.15.0-bin.tar.gz>
>>> Binary kit signatures match: y
>>> NOTICE is ok: y
>>> LICENSE is ok: y
>>> No unapproved licenses or files in jars: y
>>> No unapproved licenses or archives in binary package: y
>>> No unapproved binaries in binary package: y
>>>
>>> Thanks for being the RM.
>>>
>>> -Alex
>>>
>>> On 1/4/16, 1:14 PM, "Justin Mclean"  wrote:
>>>
>>> >Hi,
>>> >
>>> >This is a  Apache Flex 4.15 release candidate 1. Please see the
>>> >RELEASE_NOTES and the README.
>>> >
>>> >The release candidate can be found here;
>>> >https://dist.apache.org/repos/dist/dev/flex/sdk/4.15.0/rc1/
>>> >
>>> >
>>> >Before voting please review the section,"What are the ASF
>>>requirements on
>>> >approving a release?", at:
>>> >http://www.apache.org/dev/release.html#approving-a-release
>>> >
>>> >
>>> >At a minimum you would be expected to check that:
>>> >- MD5 and signed packages are correct
>>> >- README, RELEASE_NOTES, NOTICE and LICENSE files are all fine
>>> >- That you can compile from source package
>>> >- That the SDK can be used in your IDE of choice
>>> >- That the SDK can be used to make a mobile, desktop and browser
>>> >application
>>> >
>>> >Please vote to approve this release:
>>> >+1 Approve the release
>>> >-1 Don’t approve the release (please provide specific comments to why)
>>> >
>>> >This vote will be open for 72 hours or until a result can be called.
>>> >
>>> >The vote passes if there is:
>>> >- At least 3 +1 votes from the PMC
>>> >- More positive votes than negative votes
>>> >
>>> >If you find an issue with the release that's a "show stopper" please
>>> don't
>>> >hold off voting -1. If someone votes -1 please continue testing we
>>>want
>>> to
>>> >try and catch as many issues as we can and cut down on the number of
>>> >release candidates. Remember existing voters can change their vote
>>>during
>>> >the voting process.
>>> >
>>> >People who are not in PMC are also encouraged to test out the release
>>>and
>>> >vote, although their votes will not be binding, they can influence how
>>> the
>>> >PMC votes.
>>> >
>>> >When voting please indicate what OS, IDE, Flash Player version and AIR
>>> >version you tested the SDK with.
>>> >
>>> >Please put all discussion about this release in the DISCUSSION thread
>>>not
>>> >this VOTE thread.
>>> >
>>> >Thanks,
>>> >Justin
>>>
>>>
>>



Re: [VOTE] Release Apache Flex SDK 4.15 RC1

2016-01-07 Thread OmPrakash Muppirala
+1 Binding

Tested the source kits on Windows 7, 64 Bit, Java version "1.8.0_65"
MD5 checksum matches
Good signature
Source kit build successful
Ran ant -f installer.xml -Dair.sdk.version=19.0 and ant frameworks-rsls.
Build successful.
Flash Builder likes the new SDK.
Recompiled existing large Flex web application, everything runs fine
Recompiled exisiting large Flex mobile application, everything runs fine

(App seems to be running faster.  What did we do??)

Thanks,
Om

On Thu, Jan 7, 2016 at 12:24 PM, OmPrakash Muppirala 
wrote:

> +0 Binding
>
> Testing the source kits on Windows 7, 64 Bit, Java version "1.8.0_65"
> MD5 checksum matches
> Good signature
> Source kit build successful
> Ran ant -f installer.xml -Dair.sdk.version=19.0.  Reports 'build
> successful,  C:\temp\4.15.0_test is now an IDE compatible folder', but
> Flash Builder complains saying 'Directory does not contain a Flex SDK' and
> AIR version 16.0 was downloaded.
>
> Thanks,
> Om
>
>
> On Mon, Jan 4, 2016 at 2:16 PM, Alex Harui  wrote:
>
>> +1
>> Package
>>
>> https://dist.apache.org/repos/dist/dev/flex/sdk/4.15.0/rc1/apache-flex-sdk-
>> 4.15.0-src.tar.gz
>> Java 1.7
>> OS: Mac OS X x86_64 10.9.5
>> Source kit signatures match: y
>> Source kit builds: y
>> README is ok: y
>> RELEASE_NOTES is ok: y
>> NOTICE is ok: y
>> LICENSE is ok: y
>> No unapproved licenses or archives: y
>> No unapproved binaries: y
>>
>> Package
>>
>> https://dist.apache.org/repos/dist/dev/flex/sdk/4.15.0/rc1/binaries/apache-
>> flex-sdk-4.15.0-bin.tar.gz
>> 
>> Binary kit signatures match: y
>> NOTICE is ok: y
>> LICENSE is ok: y
>> No unapproved licenses or files in jars: y
>> No unapproved licenses or archives in binary package: y
>> No unapproved binaries in binary package: y
>>
>> Thanks for being the RM.
>>
>> -Alex
>>
>> On 1/4/16, 1:14 PM, "Justin Mclean"  wrote:
>>
>> >Hi,
>> >
>> >This is a  Apache Flex 4.15 release candidate 1. Please see the
>> >RELEASE_NOTES and the README.
>> >
>> >The release candidate can be found here;
>> >https://dist.apache.org/repos/dist/dev/flex/sdk/4.15.0/rc1/
>> >
>> >
>> >Before voting please review the section,"What are the ASF requirements on
>> >approving a release?", at:
>> >http://www.apache.org/dev/release.html#approving-a-release
>> >
>> >
>> >At a minimum you would be expected to check that:
>> >- MD5 and signed packages are correct
>> >- README, RELEASE_NOTES, NOTICE and LICENSE files are all fine
>> >- That you can compile from source package
>> >- That the SDK can be used in your IDE of choice
>> >- That the SDK can be used to make a mobile, desktop and browser
>> >application
>> >
>> >Please vote to approve this release:
>> >+1 Approve the release
>> >-1 Don’t approve the release (please provide specific comments to why)
>> >
>> >This vote will be open for 72 hours or until a result can be called.
>> >
>> >The vote passes if there is:
>> >- At least 3 +1 votes from the PMC
>> >- More positive votes than negative votes
>> >
>> >If you find an issue with the release that's a "show stopper" please
>> don't
>> >hold off voting -1. If someone votes -1 please continue testing we want
>> to
>> >try and catch as many issues as we can and cut down on the number of
>> >release candidates. Remember existing voters can change their vote during
>> >the voting process.
>> >
>> >People who are not in PMC are also encouraged to test out the release and
>> >vote, although their votes will not be binding, they can influence how
>> the
>> >PMC votes.
>> >
>> >When voting please indicate what OS, IDE, Flash Player version and AIR
>> >version you tested the SDK with.
>> >
>> >Please put all discussion about this release in the DISCUSSION thread not
>> >this VOTE thread.
>> >
>> >Thanks,
>> >Justin
>>
>>
>


Re: [ApacheCon NA] Whose going and what topics?

2016-01-07 Thread OmPrakash Muppirala
On Thu, Jan 7, 2016 at 3:51 PM, Alex Harui  wrote:

>
>
> On 1/7/16, 3:46 PM, "omup...@gmail.com on behalf of OmPrakash Muppirala"
>  wrote:
>
> >I would like to propose something on FlexJS or Flex Mobile, depending on
> >what others are doing.
> >
> >Should we ask for a Flex track here as well?
>
> Don't we have to have a track to get Flex sessions accepted at all?
>

Not necessarily.  If we have a track, there is a better chance of Flex
talks being accepted.  If we don't, then it is up in the air as to which
ones get selected.  At least, that's the impression I got from the
ApacheCon EU selection process.


>
> You seem a bit more interested in the JS.swc usage.  Do you want to do a
> session on that?
>

Sure, that would be fun.  We need to come up with a cool name for 'JS.swc
usage'.  We have been lumping everything under FlexJS, which seems wrong.

It would be nice if someone else did a talk on Flex Mobile.  Any takers?
You don't have to be a committer or a PMC member to give a talk.

Thanks,
Om


>
> -Alex
>
>


Re: [ApacheCon NA] Whose going and what topics?

2016-01-07 Thread Alex Harui


On 1/7/16, 3:46 PM, "omup...@gmail.com on behalf of OmPrakash Muppirala"
 wrote:

>I would like to propose something on FlexJS or Flex Mobile, depending on
>what others are doing.
>
>Should we ask for a Flex track here as well?

Don't we have to have a track to get Flex sessions accepted at all?

You seem a bit more interested in the JS.swc usage.  Do you want to do a
session on that?

-Alex



Re: [ApacheCon NA] Whose going and what topics?

2016-01-07 Thread OmPrakash Muppirala
I would like to propose something on FlexJS or Flex Mobile, depending on
what others are doing.

Should we ask for a Flex track here as well?

Thanks,
Om

On Thu, Jan 7, 2016 at 6:16 AM, Christofer Dutz 
wrote:

> Hi,
>
> Well I'm currently building a little robot. On that I'll be running
> BlazeDS to communicate with a Mobile App ... hopefully I'll be finished
> with the hardware part in a Week or so. As soon as that's done I'll submit
> some Mobile, IoT related talk to the "ApacheCon NA - Core". If that talk is
> accepted, I'll be going. If not it would be hard for me to get that request
> past my employer ;-)
>
> Chris
>
> 
> Von: Alex Harui 
> Gesendet: Mittwoch, 6. Januar 2016 18:19
> An: dev@flex.apache.org
> Betreff: [ApacheCon NA] Whose going and what topics?
>
> Hi,
>
> There is one month to go to submit presentations for ApacheCon North
> America (in Vancouver, British Columbia May 12-13, 2016).
>
> I can do a FlexJS overview or deep-dive or something like that.  What have
> other's submitted in the Flex arena (or are planning to submit)?
>
> Thanks,
> -Alex
>
>


Re: [Non-DoD Source] [DISCUSSION] Apache Flex SDK 4.15 release candidate 1

2016-01-07 Thread OmPrakash Muppirala
On Thu, Jan 7, 2016 at 1:06 PM, Alex Harui  wrote:

>
>
> On 1/7/16, 12:56 PM, "omup...@gmail.com on behalf of OmPrakash Muppirala"
>  wrote:
> >>
> >> I recall this seeing something similar before (previous version) and I
> >> think the issue was that the using an OS X made SDK on Windows. The
> >>scripts
> >> only downloads the version of AIR for a single platform. Perhaps the
> >> installer is grabbing the OS X version of AIR??
> >>
> >
> >How would I check and confirm if this is indeed the casel?
> >
>
> Post the Ant output somewhere.
>
> I just tried it on Mac and it worked fine.  Don't forget to follow the
> README instructions and run "ant frameworks-rsls" otherwise FB won't
> recognize the folder as a Flex SDK.
>

You are right, it was user error.  I did not run ant frameworks-rsls.
That's why FB did not like this SDK.

I retried everything from scratch, the correct AIR SDK (19.0) is being
downloaded as well.

Changing my vote to +1.

Thanks,
Om


>
> -Alex
>
>


Re: [FALCONJX][FLEXJS] "as" keyword handling

2016-01-07 Thread Josh Tynjala
There are times when I consider it convenient to use "as" for casting and
check for null, but it's not frequently. Usually, I use "is" instead. Most
of the time, I use the other form of casting that results in a runtime
error when the cast fails. I hope that runtime error won't be removed. Or
at least could be turned on globally during debugging.

In regards to 2, is it not possible to walk the prototype chain of any
JavaScript object? Or am I misunderstanding?

- Josh

On Thu, Jan 7, 2016 at 1:55 PM, Alex Harui  wrote:

> How many of you use the "as" keyword as part of a test?  IOW things like:
>
>  var foo:SomeType = someVar as SomeType;
>  if (foo == null)
>
> IMO, I have yet to use "as" in this way in the FlexJS framework. I just
> use it to make the compiler happy.  IOW things like:
>
>  var foo:SomeType = someVar as SomeType;
>  foo.someProp
>
> If foo really isn't of SomeType, I am going to get an NPE, but I know it
> will never be null, I am just casting/coercing so the compiler will check
> that someProp really exists on SomeType.
>
> The reason I'm asking is because the use of "as" as become a negative
> factor in several cases:
> 1) In JS, it results in a function call
> 2) As Om noted yesterday, it doesn't work for Native JS types
> 3) It causes unnecessary class dependencies which complicates the
> goog.requires list
>
> Currently there is an @flexjsignorecoercion hack you can use to tell
> FalconJX to skip code-generation for an "as" operation.  However, we are
> adding more and more of these, and they are more frequently the cause of
> something not working, so I am thinking about flipping the logic and not
> generating code for any "as" operation unless you specifically ask for it
> via @flexjsgeneratecoercion or something like that.
>
> Thoughts?
> -Alex
>
>


Re: [FALCONJX][FLEXJS] "as" keyword handling

2016-01-07 Thread Harbs
I personally always use “is” for type-testing. I’ve always considered using 
“as” and null testing as counter-intuitive.

I only use “as” for type casting to make the compiler happy.

I’m fine with switching it if there’s reason to do so.

On Jan 7, 2016, at 11:55 PM, Alex Harui  wrote:

> How many of you use the "as" keyword as part of a test?  IOW things like:
> 
> var foo:SomeType = someVar as SomeType;
> if (foo == null)
> 
> IMO, I have yet to use "as" in this way in the FlexJS framework. I just
> use it to make the compiler happy.  IOW things like:
> 
> var foo:SomeType = someVar as SomeType;
> foo.someProp
> 
> If foo really isn't of SomeType, I am going to get an NPE, but I know it
> will never be null, I am just casting/coercing so the compiler will check
> that someProp really exists on SomeType.
> 
> The reason I'm asking is because the use of "as" as become a negative
> factor in several cases:
> 1) In JS, it results in a function call
> 2) As Om noted yesterday, it doesn't work for Native JS types
> 3) It causes unnecessary class dependencies which complicates the
> goog.requires list
> 
> Currently there is an @flexjsignorecoercion hack you can use to tell
> FalconJX to skip code-generation for an "as" operation.  However, we are
> adding more and more of these, and they are more frequently the cause of
> something not working, so I am thinking about flipping the logic and not
> generating code for any "as" operation unless you specifically ask for it
> via @flexjsgeneratecoercion or something like that.
> 
> Thoughts?
> -Alex
> 



[FALCONJX][FLEXJS] "as" keyword handling

2016-01-07 Thread Alex Harui
How many of you use the "as" keyword as part of a test?  IOW things like:

 var foo:SomeType = someVar as SomeType;
 if (foo == null)

IMO, I have yet to use "as" in this way in the FlexJS framework. I just
use it to make the compiler happy.  IOW things like:

 var foo:SomeType = someVar as SomeType;
 foo.someProp

If foo really isn't of SomeType, I am going to get an NPE, but I know it
will never be null, I am just casting/coercing so the compiler will check
that someProp really exists on SomeType.

The reason I'm asking is because the use of "as" as become a negative
factor in several cases:
1) In JS, it results in a function call
2) As Om noted yesterday, it doesn't work for Native JS types
3) It causes unnecessary class dependencies which complicates the
goog.requires list

Currently there is an @flexjsignorecoercion hack you can use to tell
FalconJX to skip code-generation for an "as" operation.  However, we are
adding more and more of these, and they are more frequently the cause of
something not working, so I am thinking about flipping the logic and not
generating code for any "as" operation unless you specifically ask for it
via @flexjsgeneratecoercion or something like that.

Thoughts?
-Alex



Re: [FALCONJX][FLEXJS] XML handling (was Re: [FlexJS] Back port)

2016-01-07 Thread Harbs
Next item:

I’m working on namespaces and QNames.

E4X allows the specification of default namespaces like this:

default xml namespace = "http://ns.adobe.com/mxml/2009”;

This causes all elements created after this statement to act as if they were 
declared like this:
http://ns.adobe.com/mxml/2009”/> (notice, no prefix)

I’m not sure how commonly used this feature is, but we should probably map this 
statement to some kind of static method. We can either attach it to XML, or 
Namespace.

(I’ve learned more than I care to know about E4X in the past few weeks. I have 
the E4X spec coming out of my ears…) ;-)

On Jan 5, 2016, at 7:12 PM, Alex Harui  wrote:

> 
> 
> On 1/5/16, 7:49 AM, "Harbs"  wrote:
> 
>> BTW, I’m not sure what we said about myXML.@foo = “baz” or myXML.@ba:foo
>> = “baz”.
>> 
>> Are we mapping that to myXML.setChild(“@foo”,”baz”) and
>> myXML.setChild(“@ba:foo”,”baz”), or are we creating a separate function
>> for attributes?
> 
> I tried it and got an exception.  So I just pushed a fix for that where it
> will call
> 
>   myXML.setAttribute(“foo”,”baz”)
> 
> 
> I'm going to spend some time on XML and the compiler today.
> 
> -Alex
> 



Re: [Non-DoD Source] [DISCUSSION] Apache Flex SDK 4.15 release candidate 1

2016-01-07 Thread Justin Mclean
Hi,

> How would I check and confirm if this is indeed the casel?

You’ll have bin/adl.exe and bin/adt.exe rather than bin/adl and bin/adt.

At a guess try:
ant thirdparty-clean
ant -f installer.xml air-download

And see which of the air download targets it runs. (air-setup-win or 
air-setup-mac)

Thanks,
Justin

Re: [Non-DoD Source] [DISCUSSION] Apache Flex SDK 4.15 release candidate 1

2016-01-07 Thread Alex Harui


On 1/7/16, 12:56 PM, "omup...@gmail.com on behalf of OmPrakash Muppirala"
 wrote:
>>
>> I recall this seeing something similar before (previous version) and I
>> think the issue was that the using an OS X made SDK on Windows. The
>>scripts
>> only downloads the version of AIR for a single platform. Perhaps the
>> installer is grabbing the OS X version of AIR??
>>
>
>How would I check and confirm if this is indeed the casel?
>

Post the Ant output somewhere.

I just tried it on Mac and it worked fine.  Don't forget to follow the
README instructions and run "ant frameworks-rsls" otherwise FB won't
recognize the folder as a Flex SDK.

-Alex



Re: [Non-DoD Source] [DISCUSSION] Apache Flex SDK 4.15 release candidate 1

2016-01-07 Thread OmPrakash Muppirala
On Thu, Jan 7, 2016 at 12:52 PM, Justin Mclean 
wrote:

> Hi,
>
> > As I mentioned in the VOTE thread, the build is successful.
> > But when I ran ant -f installer.xml -Dair.sdk.version=19.0.  Reports
> 'build
> > successful,  C:\temp\4.15.0_test is now an IDE compatible folder', but
> > Flash Builder complains saying 'Directory does not contain a Flex SDK'
> and
> > AIR version 16.0 was downloaded.
> >
> > Am I doing something wrong here?
>
> I assume you first compiled the src package before running ant -f
> installer.xml?
>

Yes, build on src package was successful.


>
> I recall this seeing something similar before (previous version) and I
> think the issue was that the using an OS X made SDK on Windows. The scripts
> only downloads the version of AIR for a single platform. Perhaps the
> installer is grabbing the OS X version of AIR??
>

How would I check and confirm if this is indeed the casel?


>
> Thanks,
> Justin


Re: [Non-DoD Source] [DISCUSSION] Apache Flex SDK 4.15 release candidate 1

2016-01-07 Thread Justin Mclean
Hi,

> As I mentioned in the VOTE thread, the build is successful.
> But when I ran ant -f installer.xml -Dair.sdk.version=19.0.  Reports 'build
> successful,  C:\temp\4.15.0_test is now an IDE compatible folder', but
> Flash Builder complains saying 'Directory does not contain a Flex SDK' and
> AIR version 16.0 was downloaded.
> 
> Am I doing something wrong here?

I assume you first compiled the src package before running ant -f installer.xml?

I recall this seeing something similar before (previous version) and I think 
the issue was that the using an OS X made SDK on Windows. The scripts only 
downloads the version of AIR for a single platform. Perhaps the installer is 
grabbing the OS X version of AIR??

Thanks,
Justin

Re: [DISCUSSION] Apache Flex SDK 4.15 release candidate 1

2016-01-07 Thread Justin Mclean
Hi,

> I'll be able to vote on it tonight,  one of dev boxes is down for the count.  
>  Has anything change since I looked at the 4.15 nightly?

There would of been couple of minor changes.

Thanks,
Justin

Re: [Non-DoD Source] Re: [DISCUSSION] Apache Flex SDK 4.15 release candidate 1

2016-01-07 Thread OmPrakash Muppirala
As I mentioned in the VOTE thread, the build is successful.
But when I ran ant -f installer.xml -Dair.sdk.version=19.0.  Reports 'build
successful,  C:\temp\4.15.0_test is now an IDE compatible folder', but
Flash Builder complains saying 'Directory does not contain a Flex SDK' and
AIR version 16.0 was downloaded.

Am I doing something wrong here?

Thanks,
Om

On Thu, Jan 7, 2016 at 3:26 AM, Kessler CTR Mark J <
mark.kessler@usmc.mil> wrote:

> I'll be able to vote on it tonight,  one of dev boxes is down for the
> count.   Has anything change since I looked at the 4.15 nightly?
>
> -Mark
>
> -Original Message-
> From: Justin Mclean [mailto:jus...@classsoftware.com]
> Sent: Thursday, January 07, 2016 12:54 AM
> To: dev@flex.apache.org
> Subject: [Non-DoD Source] Re: [DISCUSSION] Apache Flex SDK 4.15 release
> candidate 1
>
> Hi,
>
> Do any PMC members have time to look and vote on this release candidate?
>
> Thanks,
> Justin
>


Re: [VOTE] Release Apache Flex SDK 4.15 RC1

2016-01-07 Thread OmPrakash Muppirala
+0 Binding

Testing the source kits on Windows 7, 64 Bit, Java version "1.8.0_65"
MD5 checksum matches
Good signature
Source kit build successful
Ran ant -f installer.xml -Dair.sdk.version=19.0.  Reports 'build
successful,  C:\temp\4.15.0_test is now an IDE compatible folder', but
Flash Builder complains saying 'Directory does not contain a Flex SDK' and
AIR version 16.0 was downloaded.

Thanks,
Om


On Mon, Jan 4, 2016 at 2:16 PM, Alex Harui  wrote:

> +1
> Package
> https://dist.apache.org/repos/dist/dev/flex/sdk/4.15.0/rc1/apache-flex-sdk-
> 4.15.0-src.tar.gz
> Java 1.7
> OS: Mac OS X x86_64 10.9.5
> Source kit signatures match: y
> Source kit builds: y
> README is ok: y
> RELEASE_NOTES is ok: y
> NOTICE is ok: y
> LICENSE is ok: y
> No unapproved licenses or archives: y
> No unapproved binaries: y
>
> Package
> https://dist.apache.org/repos/dist/dev/flex/sdk/4.15.0/rc1/binaries/apache-
> flex-sdk-4.15.0-bin.tar.gz
> 
> Binary kit signatures match: y
> NOTICE is ok: y
> LICENSE is ok: y
> No unapproved licenses or files in jars: y
> No unapproved licenses or archives in binary package: y
> No unapproved binaries in binary package: y
>
> Thanks for being the RM.
>
> -Alex
>
> On 1/4/16, 1:14 PM, "Justin Mclean"  wrote:
>
> >Hi,
> >
> >This is a  Apache Flex 4.15 release candidate 1. Please see the
> >RELEASE_NOTES and the README.
> >
> >The release candidate can be found here;
> >https://dist.apache.org/repos/dist/dev/flex/sdk/4.15.0/rc1/
> >
> >
> >Before voting please review the section,"What are the ASF requirements on
> >approving a release?", at:
> >http://www.apache.org/dev/release.html#approving-a-release
> >
> >
> >At a minimum you would be expected to check that:
> >- MD5 and signed packages are correct
> >- README, RELEASE_NOTES, NOTICE and LICENSE files are all fine
> >- That you can compile from source package
> >- That the SDK can be used in your IDE of choice
> >- That the SDK can be used to make a mobile, desktop and browser
> >application
> >
> >Please vote to approve this release:
> >+1 Approve the release
> >-1 Don’t approve the release (please provide specific comments to why)
> >
> >This vote will be open for 72 hours or until a result can be called.
> >
> >The vote passes if there is:
> >- At least 3 +1 votes from the PMC
> >- More positive votes than negative votes
> >
> >If you find an issue with the release that's a "show stopper" please don't
> >hold off voting -1. If someone votes -1 please continue testing we want to
> >try and catch as many issues as we can and cut down on the number of
> >release candidates. Remember existing voters can change their vote during
> >the voting process.
> >
> >People who are not in PMC are also encouraged to test out the release and
> >vote, although their votes will not be binding, they can influence how the
> >PMC votes.
> >
> >When voting please indicate what OS, IDE, Flash Player version and AIR
> >version you tested the SDK with.
> >
> >Please put all discussion about this release in the DISCUSSION thread not
> >this VOTE thread.
> >
> >Thanks,
> >Justin
>
>


[4.15.0] # Apache Flex SDK 4.15.0 nightly build 159: Successful

2016-01-07 Thread flex . ci . builds
flex-sdk_release-candidate - Build #159 - Successful

Changes since last build:
No changes

For more information, check the console output at 
http://apacheflexbuild.cloudapp.net:8080/job/flex-sdk_release-candidate/159/.

AW: Trademark issue

2016-01-07 Thread Christofer Dutz
Hi Josh

I agree ... that's totally not good .. and common': "tires and heaters" the 
company just selling anything they can get their hands on?

Chris


Von: Josh Tynjala 
Gesendet: Donnerstag, 7. Januar 2016 15:04
An: dev@flex.apache.org
Betreff: Re: Trademark issue

If you remove the www, it should load properly. They seem to using a
modified version of the Apache Flex logo with the "Apache" text removed.

- Josh
On Jan 7, 2016 5:51 AM, "Tom Chiverton"  wrote:

> That site does not load for me.
>
> Tom
>
> On 06/01/16 23:04, Igor Costa wrote:
>
>> I strongly think that this website www.flexeletro.com.br is infringing
>> our
>> trademark.
>>
>>
>> Best Regards
>>
>>
>> __
>> This email has been scanned by the Symantec Email Security.cloud service.
>> For more information please visit http://www.symanteccloud.com
>> __
>>
>
>


AW: [ApacheCon NA] Whose going and what topics?

2016-01-07 Thread Christofer Dutz
Hi,

Well I'm currently building a little robot. On that I'll be running BlazeDS to 
communicate with a Mobile App ... hopefully I'll be finished with the hardware 
part in a Week or so. As soon as that's done I'll submit some Mobile, IoT 
related talk to the "ApacheCon NA - Core". If that talk is accepted, I'll be 
going. If not it would be hard for me to get that request past my employer ;-)

Chris


Von: Alex Harui 
Gesendet: Mittwoch, 6. Januar 2016 18:19
An: dev@flex.apache.org
Betreff: [ApacheCon NA] Whose going and what topics?

Hi,

There is one month to go to submit presentations for ApacheCon North
America (in Vancouver, British Columbia May 12-13, 2016).

I can do a FlexJS overview or deep-dive or something like that.  What have
other's submitted in the Flex arena (or are planning to submit)?

Thanks,
-Alex



Re: Trademark issue

2016-01-07 Thread Josh Tynjala
If you remove the www, it should load properly. They seem to using a
modified version of the Apache Flex logo with the "Apache" text removed.

- Josh
On Jan 7, 2016 5:51 AM, "Tom Chiverton"  wrote:

> That site does not load for me.
>
> Tom
>
> On 06/01/16 23:04, Igor Costa wrote:
>
>> I strongly think that this website www.flexeletro.com.br is infringing
>> our
>> trademark.
>>
>>
>> Best Regards
>>
>>
>> __
>> This email has been scanned by the Symantec Email Security.cloud service.
>> For more information please visit http://www.symanteccloud.com
>> __
>>
>
>


Re: Trademark issue

2016-01-07 Thread Tom Chiverton

That site does not load for me.

Tom

On 06/01/16 23:04, Igor Costa wrote:

I strongly think that this website www.flexeletro.com.br is infringing our
trademark.


Best Regards


__
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
__




RE: [Non-DoD Source] NativeProcess is not exiting

2016-01-07 Thread Kessler CTR Mark J
If you are windows you could include a command line option for a taskkill [1] 
if you have any scripts running.

[1] taskkill /F /IM java.exe


-Mark

-Original Message-
From: dhwanishah85 [mailto:dhwanisha...@gmail.com] 
Sent: Thursday, January 07, 2016 7:02 AM
To: dev@flex.apache.org
Subject: [Non-DoD Source] NativeProcess is not exiting

Hi,

I am working on Developing an IDE for flex named "Moonshine". 
In order to make FDB work, I need to start 3 nativeprocesses. FDB itself is 
java process and thus it starts java.exe in system processes. 

When I build-debug my small flex application with intentionally changed AIR 
version number to wrong number and this will make runtime fail and throwing
- "error while loading initial content". Thus we catch this error and step by 
step making nativeprocess exit. But I can not able to make java.exe exit.
And this causes issues when i run application again after correcting the 
version number in app.xml file. 
In next run of the application i am getting message from fdb that "(fdb) 
Another Flash debugger is probably running; please close it. Details:
'Unrecognized Windows Sockets error: 0: JVM_Bind'."

Please suggest how to make java.exe exit.



--
View this message in context: 
http://apache-flex-development.247.n4.nabble.com/NativeProcess-is-not-exiting-tp51079.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.


Re: [FlexJS] Extending builtin HTML elements

2016-01-07 Thread OmPrakash Muppirala
On Wed, Jan 6, 2016 at 11:57 PM, Alex Harui  wrote:

>
>
> On 1/6/16, 11:36 PM, "omup...@gmail.com on behalf of OmPrakash Muppirala"
>  wrote:
>
> >>
> >> Add the following as the ASDoc for the WebProject1() method, then it
> >> should work:
> >>
> >> /**
> >>  * @flexjsignorecoercion MyButton
> >>  */
> >> >public function WebProject1() {
> >> >var button : MyButton = document.createElement("button") as MyButton;
> >> >button.innerHTML = "Press Me";
> >> >document.body.appendChild(button);
> >> >}
> >> >}
> >> >}
> >>
> >
> >That kind of worked.  Compiles fine and creates the button.  But
> >MyButton's
> >constructor does not get called.  Any code I write inside MyButton.as
> >seems
> >to be moot.
> >
> >I'm wondering if document.createElementNS might be useful here?
>
> Well, I doubt it.  IMO, you are trying to mix scripting APIs with
> object-oriented APIs.  Just like you wouldn't create a plain button by
> calling "new HTMLButtonElement()", you have to pick a pattern and stick
> with it.
>
> The FlexJS framework components internally call createElement for you and
> wrap the HTMLButtonElement since you can't actually subclass it and
> instantiate it.  If HTML had an extensible component/element API we
> probably wouldn't have bothered to create FlexJS.
>
> Then you can use all object-oriented APIs/patterns since that's what we're
> used to in ActionScript/Flash.  I suppose you could create another
> component set that even more thinly wraps HTMLButtonElement than we do
> already, and then make "new HTMLButtonElement()" work.  I've chosen to
> pack a bit more in org.apache.flex.html.Button so it can have more
> Flex-like APIs
>
> -Alex
>


Turns out that WebComponents provides exactly these kinds of APIs.  And
they seem to be working (almost) fine with FlexJS/Falcon :-)

Here is how I am making this work:

MyButton.as

package {
public class MyButton extends HTMLButtonElement {
public function MyButton(label) {
super();
}
public function createdCallback() {
var sr = this['createShadowRoot'](); //TODO:FIXME
HTMLElement.createShadowRoot is typed to be an Object instead of a Function
sr.innerHTML = 'Click M';
}
}
}

WebProject1.as

package {

public class WebProject1 {
public function WebProject1() {
var MyButtonClass = document['registerElement']('my-button', { //TODO:FIXME
HTMLElement.registerElement is typed to be an Object instead of a Function
 prototype: Object['create'](MyButton['prototype']), //TODO:FIXME
Object.create and Object.prototype is missing
 'extends': 'button'});

var button = new MyButtonClass();
button.addEventListener("click", button_clickListener,false);
document.body.appendChild(button);
}
private function button_clickListener(event : MouseEvent) : void {
alert("Hello World");
}
}
}

A few things to note:

1.  The extended component has a few lifecycle methods; createdCallback
being one.  All code that usually goes in the Constructor should go in
here.
2.  Before instantiating the new component, a call to
document.registerElement should be made.
3.  Works only one Chrome and Firefox (need to enable WebComponents in
chrome://flags/#enable-experimental-web-platform-features and Firefox:
about:config, dom.webcomponents.enabled)
4.  Seems like MS Edge and Safari will be supporting this soon:
http://caniuse.com/#feat=shadowdom

I don't know how useful all this is, but is very cool that we can support
WebComponents out of the box.

I am going to experiment more with this!

Thanks,
Om