Re: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling to vanilla Javascript

2015-06-01 Thread Michael Schmalle
Yeah I pretty much figured that. What I can't figure out is if a d.ts
definition is actually TS or some sub type that has special rules. I looked
through the TS parser and compiler code and didn't see anything specific to
a d.ts file so I am assuming it's TS.

The problem here is two fold, one trying to create a scanner for TS and two
the language is still greek to me as far as quickly understanding how to
map a d.ts AST to actionscript.

As I said early, forking the TS compiler and then emitting as from it was a
first consideration but looking at the code, that ain't going to happen. :)

So in the end it's write an antlr grammar(not going to happen), create a
tokenizer by hand that uses characters and state transitions or using some
type of regexp to scan things as you parse each line thus putting the
scanner in states to save some type of simple AST that we can then
walk/visit and emit actionscript.

First the as spec for d.as files needs to be documented, then the tool
can be thought about. We need to think about exactly what and how this
stuff translates back to javascript during compilation (from the SWC
definition).

Mike


On Mon, Jun 1, 2015 at 12:44 AM, Alex Harui aha...@adobe.com wrote:



 On 5/31/15, 6:02 PM, OmPrakash Muppirala bigosma...@gmail.com wrote:

 On May 31, 2015 9:41 AM, Michael Schmalle teotigraphix...@gmail.com
 wrote:
 
  Now, I wish I had an answer of how to create a d.ts parser without using
  100's of dev time hours. :)

 Mike, have you checked out Microsoft’s TypeScript compiler?  It seems to
 be on GitHub at [1].
 I’d guess that [2] is their parser/scanner.  It looks like the scanning is
 done in TS itself which is probably why you couldn’t find a grammar.

 -Alex

 [1] https://github.com/Microsoft/TypeScript
 [2]
 https://github.com/Microsoft/TypeScript/blob/270a149571b106dcfbbaee53897074
 61e8fedcb9/src/compiler/scanner.ts




Re: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling to vanilla Javascript

2015-05-31 Thread Josh Tynjala
On May 29, 2015 1:36 PM, Michael Schmalle teotigraphix...@gmail.com
wrote:


 The fact Josh is still highly interested in ActionScript leads me to
 believe if we offer up real solutions to former AS devs, they might
 actually be overjoyed to see and use it because they know we are not
trying
 to solve world hunger here, just offer tooling that is mature.

 Mike

Some extra motivation for you, Mike. :)

https://twitter.com/walpolea/status/604855031423107074


Re: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling to vanilla Javascript

2015-05-31 Thread Josh Tynjala
The native keyword might be useful for creating classes that provide APIs
for JavaScript libraries:

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/statements.html#native

It's meant for APIs that are defined as native code in the runtime. I
suspect that this is part of how playerglobal.swc is created. The
documentation says that it cannot be used in your own code. However, I
just did a quick test, and the compiler accepts it. The Flash runtime
throws an error when you try to run the SWF, but for our purposes, it's
just the compiler that matters.

- Josh



On Sun, May 31, 2015 at 6:02 PM, OmPrakash Muppirala bigosma...@gmail.com
wrote:

 On May 31, 2015 9:41 AM, Michael Schmalle teotigraphix...@gmail.com
 wrote:
 
  Nice, actually I am highly motivated right now. I know how much joy I had
  when getting back into it using Feathers. I think I have told you like 5
  times in the last 3 months. :)
 
  Now, I wish I had an answer of how to create a d.ts parser without using
  100's of dev time hours. :)

 Do you have an idea of how the input vs. output would look like?  Are you
 planning on creating a d.as file which has all the class and function
 definitions?

 Perhaps we can start with hand coding a simple example?  I can help with
 that.

 Thanks,
 Om

 
  Mike
 
  On Sun, May 31, 2015 at 12:36 PM, Josh Tynjala joshtynj...@gmail.com
  wrote:
 
   On May 29, 2015 1:36 PM, Michael Schmalle teotigraphix...@gmail.com
 
   wrote:
   
  
The fact Josh is still highly interested in ActionScript leads me to
believe if we offer up real solutions to former AS devs, they might
actually be overjoyed to see and use it because they know we are not
   trying
to solve world hunger here, just offer tooling that is mature.
   
Mike
  
   Some extra motivation for you, Mike. :)
  
   https://twitter.com/walpolea/status/604855031423107074
  



Re: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling to vanilla Javascript

2015-05-31 Thread OmPrakash Muppirala
On May 31, 2015 9:41 AM, Michael Schmalle teotigraphix...@gmail.com
wrote:

 Nice, actually I am highly motivated right now. I know how much joy I had
 when getting back into it using Feathers. I think I have told you like 5
 times in the last 3 months. :)

 Now, I wish I had an answer of how to create a d.ts parser without using
 100's of dev time hours. :)

Do you have an idea of how the input vs. output would look like?  Are you
planning on creating a d.as file which has all the class and function
definitions?

Perhaps we can start with hand coding a simple example?  I can help with
that.

Thanks,
Om


 Mike

 On Sun, May 31, 2015 at 12:36 PM, Josh Tynjala joshtynj...@gmail.com
 wrote:

  On May 29, 2015 1:36 PM, Michael Schmalle teotigraphix...@gmail.com
  wrote:
  
 
   The fact Josh is still highly interested in ActionScript leads me to
   believe if we offer up real solutions to former AS devs, they might
   actually be overjoyed to see and use it because they know we are not
  trying
   to solve world hunger here, just offer tooling that is mature.
  
   Mike
 
  Some extra motivation for you, Mike. :)
 
  https://twitter.com/walpolea/status/604855031423107074
 


Re: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling to vanilla Javascript

2015-05-31 Thread Alex Harui


On 5/31/15, 6:02 PM, OmPrakash Muppirala bigosma...@gmail.com wrote:

On May 31, 2015 9:41 AM, Michael Schmalle teotigraphix...@gmail.com
wrote:

 Now, I wish I had an answer of how to create a d.ts parser without using
 100's of dev time hours. :)

Mike, have you checked out Microsoft’s TypeScript compiler?  It seems to
be on GitHub at [1].
I’d guess that [2] is their parser/scanner.  It looks like the scanning is
done in TS itself which is probably why you couldn’t find a grammar.

-Alex

[1] https://github.com/Microsoft/TypeScript
[2] 
https://github.com/Microsoft/TypeScript/blob/270a149571b106dcfbbaee53897074
61e8fedcb9/src/compiler/scanner.ts



Re: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling to vanilla Javascript

2015-05-31 Thread Michael Schmalle
Nice, actually I am highly motivated right now. I know how much joy I had
when getting back into it using Feathers. I think I have told you like 5
times in the last 3 months. :)

Now, I wish I had an answer of how to create a d.ts parser without using
100's of dev time hours. :)

Mike

On Sun, May 31, 2015 at 12:36 PM, Josh Tynjala joshtynj...@gmail.com
wrote:

 On May 29, 2015 1:36 PM, Michael Schmalle teotigraphix...@gmail.com
 wrote:
 

  The fact Josh is still highly interested in ActionScript leads me to
  believe if we offer up real solutions to former AS devs, they might
  actually be overjoyed to see and use it because they know we are not
 trying
  to solve world hunger here, just offer tooling that is mature.
 
  Mike

 Some extra motivation for you, Mike. :)

 https://twitter.com/walpolea/status/604855031423107074



Re: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling to vanilla Javascript

2015-05-30 Thread Michael Schmalle
Alex,

Well I have been tinkering today and have come to the conclusion it's
easier to refactor FlexJS emitter into components and abstract static
utilities etc.

Since it works good, it's the best place to start. I have started to
refactor already. I was thinking about a branch but I am running the tests
and really what I am doing is reorganizing so I will be a ble to implement
the JXEmitter with overrides of FllexJS instead of the sort of subclass
hell we are in with FlexJS and Goog, I am going to fix this.

So my plan is just commit, test push, commit, test, push.

Thoughts?



On Sat, May 30, 2015 at 12:15 AM, Alex Harui aha...@adobe.com wrote:

 Please don’t worry.  The root ‘data’ for the two swcs come from
 Adobe/Tamarin and W3C.  A solution will be found.  The issues Justin
 brings up don’t always turn out to be issues.

 -Alex

 On 5/29/15, 4:08 PM, Michael Schmalle teotigraphix...@gmail.com wrote:

 Ok, I am putting this little project on hold until we figure out what is
 going on regarding how to create swcs for the builtin and dom, Justin is
 raising enough red flags that it worries me.
 
 I don't want to spend all this time and then we find out we are up a creek
 without these really important items.
 
 I will commence when a resolution is found.
 
 Mike
 
 On Fri, May 29, 2015 at 5:38 PM, Michael Schmalle
 teotigraphix...@gmail.com
  wrote:
 
  Alex, don't get me wrong, I like your framework with it's composition
 and
  if Om and I can get SVG working with your components I totally see that
 as
  a valid Flash/HTML route that I would contribute to.
 
  Mike
 
  On Fri, May 29, 2015 at 5:01 PM, Alex Harui aha...@adobe.com wrote:
 
 
 
  On 5/29/15, 1:36 PM, Michael Schmalle teotigraphix...@gmail.com
  wrote:
 
  
  The fact Josh is still highly interested in ActionScript leads me to
  believe if we offer up real solutions to former AS devs, they might
  actually be overjoyed to see and use it because they know we are not
  trying
  to solve world hunger here, just offer tooling that is mature.
 
  Peter and I are interested as well.  Every time I start writing JS I go
  “Ugh” because I know I’m going to type a lot of silly mistakes.
 
  I hope to try it once I get out of BURM hell.  Oh, did I mention?  I’m
 in
  BURM hell ;-)
 
  -Alex
 
 
 




Re: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling to vanilla Javascript

2015-05-30 Thread Michael Schmalle
haha... no I mean test, commit then push. :)

Mike

On Sat, May 30, 2015 at 4:39 PM, Michael Schmalle teotigraphix...@gmail.com
 wrote:

 Alex,

 Well I have been tinkering today and have come to the conclusion it's
 easier to refactor FlexJS emitter into components and abstract static
 utilities etc.

 Since it works good, it's the best place to start. I have started to
 refactor already. I was thinking about a branch but I am running the tests
 and really what I am doing is reorganizing so I will be a ble to implement
 the JXEmitter with overrides of FllexJS instead of the sort of subclass
 hell we are in with FlexJS and Goog, I am going to fix this.

 So my plan is just commit, test push, commit, test, push.

 Thoughts?



 On Sat, May 30, 2015 at 12:15 AM, Alex Harui aha...@adobe.com wrote:

 Please don’t worry.  The root ‘data’ for the two swcs come from
 Adobe/Tamarin and W3C.  A solution will be found.  The issues Justin
 brings up don’t always turn out to be issues.

 -Alex

 On 5/29/15, 4:08 PM, Michael Schmalle teotigraphix...@gmail.com
 wrote:

 Ok, I am putting this little project on hold until we figure out what is
 going on regarding how to create swcs for the builtin and dom, Justin is
 raising enough red flags that it worries me.
 
 I don't want to spend all this time and then we find out we are up a
 creek
 without these really important items.
 
 I will commence when a resolution is found.
 
 Mike
 
 On Fri, May 29, 2015 at 5:38 PM, Michael Schmalle
 teotigraphix...@gmail.com
  wrote:
 
  Alex, don't get me wrong, I like your framework with it's composition
 and
  if Om and I can get SVG working with your components I totally see that
 as
  a valid Flash/HTML route that I would contribute to.
 
  Mike
 
  On Fri, May 29, 2015 at 5:01 PM, Alex Harui aha...@adobe.com wrote:
 
 
 
  On 5/29/15, 1:36 PM, Michael Schmalle teotigraphix...@gmail.com
  wrote:
 
  
  The fact Josh is still highly interested in ActionScript leads me to
  believe if we offer up real solutions to former AS devs, they might
  actually be overjoyed to see and use it because they know we are not
  trying
  to solve world hunger here, just offer tooling that is mature.
 
  Peter and I are interested as well.  Every time I start writing JS I
 go
  “Ugh” because I know I’m going to type a lot of silly mistakes.
 
  I hope to try it once I get out of BURM hell.  Oh, did I mention?  I’m
 in
  BURM hell ;-)
 
  -Alex
 
 
 





Re: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling to vanilla Javascript

2015-05-30 Thread Alex Harui
Sounds ok to me


Sent from my LG G3, an ATT 4G LTE smartphone


-- Original message--

From: Michael Schmalle

Date: Sat, May 30, 2015 1:42 PM

To: dev@flex.apache.org;

Subject:Re: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling 
to vanilla Javascript


haha... no I mean test, commit then push. :)

Mike

On Sat, May 30, 2015 at 4:39 PM, Michael Schmalle teotigraphix...@gmail.com
 wrote:

 Alex,

 Well I have been tinkering today and have come to the conclusion it's
 easier to refactor FlexJS emitter into components and abstract static
 utilities etc.

 Since it works good, it's the best place to start. I have started to
 refactor already. I was thinking about a branch but I am running the tests
 and really what I am doing is reorganizing so I will be a ble to implement
 the JXEmitter with overrides of FllexJS instead of the sort of subclass
 hell we are in with FlexJS and Goog, I am going to fix this.

 So my plan is just commit, test push, commit, test, push.

 Thoughts?



 On Sat, May 30, 2015 at 12:15 AM, Alex Harui aha...@adobe.com wrote:

 Please don’t worry.  The root ‘data’ for the two swcs come from
 Adobe/Tamarin and W3C.  A solution will be found.  The issues Justin
 brings up don’t always turn out to be issues.

 -Alex

 On 5/29/15, 4:08 PM, Michael Schmalle teotigraphix...@gmail.com
 wrote:

 Ok, I am putting this little project on hold until we figure out what is
 going on regarding how to create swcs for the builtin and dom, Justin is
 raising enough red flags that it worries me.
 
 I don't want to spend all this time and then we find out we are up a
 creek
 without these really important items.
 
 I will commence when a resolution is found.
 
 Mike
 
 On Fri, May 29, 2015 at 5:38 PM, Michael Schmalle
 teotigraphix...@gmail.com
  wrote:
 
  Alex, don't get me wrong, I like your framework with it's composition
 and
  if Om and I can get SVG working with your components I totally see that
 as
  a valid Flash/HTML route that I would contribute to.
 
  Mike
 
  On Fri, May 29, 2015 at 5:01 PM, Alex Harui aha...@adobe.com wrote:
 
 
 
  On 5/29/15, 1:36 PM, Michael Schmalle teotigraphix...@gmail.com
  wrote:
 
  
  The fact Josh is still highly interested in ActionScript leads me to
  believe if we offer up real solutions to former AS devs, they might
  actually be overjoyed to see and use it because they know we are not
  trying
  to solve world hunger here, just offer tooling that is mature.
 
  Peter and I are interested as well.  Every time I start writing JS I
 go
  “Ugh” because I know I’m going to type a lot of silly mistakes.
 
  I hope to try it once I get out of BURM hell.  Oh, did I mention?  I’m
 in
  BURM hell ;-)
 
  -Alex
 
 
 





Re: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling to vanilla Javascript

2015-05-29 Thread Alex Harui
You da man!  Great stuff!

-Alex

On 5/29/15, 9:25 AM, Michael Schmalle teotigraphix...@gmail.com wrote:

Hi,

Well using some of the 100's of hours I had into development of a
different compiler, out of the shear joy of reusing time I lived I have
the following compiling with FalconJX and the JXEmitter.

I have the builtin.swc and HTMLCoreLib.swc loaded in FalconJX when
compiling, no playerglobal.swc.

I also have full code completion in IntelliJ using no SDK just the
builtin.swc and HTMLCoreLib.swc.

Window.document and Window. automatically get boiled down into global in
the emitter, pretty neat, it just majically works on the JS side.

Not bad for a days work. :)

--
Using this html;
--

!DOCTYPE html
html
head
script type=text/javascript src=Greeter.js/script
/head

body

script type=text/javascript
Greeter.start();
/script

/body
/html


*We get the screenshot of;*

http://snag.gy/Mtiln.jpg

--
Greeter.as
--

package
{
public class Greeter
{
public var greeting:String;

public function Greeter(greeting:String)
{
this.greeting = greeting;
}

public function greet():String
{
return Hello,  + greeting;
}

public static function start():void
{
var greeter:Greeter = new Greeter(how are you FalconJX?);

var button:Element = Window.document.createElement(button);
button.textContent = Say Hello;
button.onclick = function ():void
{
Window.alert(greeter.greet());
};
Window.document.body.appendChild(button);
}
}
}

*Cross compiled to Javascript;*

--
Greeter.js
--

function Greeter(greeting) {
this.greeting = greeting;
}

Greeter.prototype.greet = function() {
return Hello,  + this.greeting;
};

Greeter.start = function() {
var greeter = new Greeter(how are you FalconJX?);
var button = document.createElement(button);
button.textContent = Say Hello!;
button.onclick = function() {
alert(greeter.greet());
};
document.body.appendChild(button);
};

Mike



RE: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling to vanilla Javascript

2015-05-29 Thread OmPrakash Muppirala
This is pretty cool!

What happens when you run the AS version?

Thanks,
Om
On May 29, 2015 10:05 AM, Frédéric THOMAS webdoubl...@hotmail.com wrote:

 Cool stuff, very promising :-)

 Frédéric THOMAS

  Date: Fri, 29 May 2015 12:25:25 -0400
  Subject: [FalconJX JXEmitter] Hello Greeter! working :: AS cross
 compiling to vanilla Javascript
  From: teotigraphix...@gmail.com
  To: dev@flex.apache.org
 
  Hi,
 
  Well using some of the 100's of hours I had into development of a
  different compiler, out of the shear joy of reusing time I lived I have
  the following compiling with FalconJX and the JXEmitter.
 
  I have the builtin.swc and HTMLCoreLib.swc loaded in FalconJX when
  compiling, no playerglobal.swc.
 
  I also have full code completion in IntelliJ using no SDK just the
  builtin.swc and HTMLCoreLib.swc.
 
  Window.document and Window. automatically get boiled down into global in
  the emitter, pretty neat, it just majically works on the JS side.
 
  Not bad for a days work. :)
 
  --
  Using this html;
  --
 
  !DOCTYPE html
  html
  head
  script type=text/javascript src=Greeter.js/script
  /head
 
  body
 
  script type=text/javascript
  Greeter.start();
  /script
 
  /body
  /html
 
 
  *We get the screenshot of;*
 
  http://snag.gy/Mtiln.jpg
 
  --
  Greeter.as
  --
 
  package
  {
  public class Greeter
  {
  public var greeting:String;
 
  public function Greeter(greeting:String)
  {
  this.greeting = greeting;
  }
 
  public function greet():String
  {
  return Hello,  + greeting;
  }
 
  public static function start():void
  {
  var greeter:Greeter = new Greeter(how are you FalconJX?);
 
  var button:Element = Window.document.createElement(button);
  button.textContent = Say Hello;
  button.onclick = function ():void
  {
  Window.alert(greeter.greet());
  };
  Window.document.body.appendChild(button);
  }
  }
  }
 
  *Cross compiled to Javascript;*
 
  --
  Greeter.js
  --
 
  function Greeter(greeting) {
  this.greeting = greeting;
  }
 
  Greeter.prototype.greet = function() {
  return Hello,  + this.greeting;
  };
 
  Greeter.start = function() {
  var greeter = new Greeter(how are you FalconJX?);
  var button = document.createElement(button);
  button.textContent = Say Hello!;
  button.onclick = function() {
  alert(greeter.greet());
  };
  document.body.appendChild(button);
  };
 
  Mike



RE: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling to vanilla Javascript

2015-05-29 Thread Frédéric THOMAS
Cool stuff, very promising :-)

Frédéric THOMAS

 Date: Fri, 29 May 2015 12:25:25 -0400
 Subject: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling to 
 vanilla Javascript
 From: teotigraphix...@gmail.com
 To: dev@flex.apache.org
 
 Hi,
 
 Well using some of the 100's of hours I had into development of a
 different compiler, out of the shear joy of reusing time I lived I have
 the following compiling with FalconJX and the JXEmitter.
 
 I have the builtin.swc and HTMLCoreLib.swc loaded in FalconJX when
 compiling, no playerglobal.swc.
 
 I also have full code completion in IntelliJ using no SDK just the
 builtin.swc and HTMLCoreLib.swc.
 
 Window.document and Window. automatically get boiled down into global in
 the emitter, pretty neat, it just majically works on the JS side.
 
 Not bad for a days work. :)
 
 --
 Using this html;
 --
 
 !DOCTYPE html
 html
 head
 script type=text/javascript src=Greeter.js/script
 /head
 
 body
 
 script type=text/javascript
 Greeter.start();
 /script
 
 /body
 /html
 
 
 *We get the screenshot of;*
 
 http://snag.gy/Mtiln.jpg
 
 --
 Greeter.as
 --
 
 package
 {
 public class Greeter
 {
 public var greeting:String;
 
 public function Greeter(greeting:String)
 {
 this.greeting = greeting;
 }
 
 public function greet():String
 {
 return Hello,  + greeting;
 }
 
 public static function start():void
 {
 var greeter:Greeter = new Greeter(how are you FalconJX?);
 
 var button:Element = Window.document.createElement(button);
 button.textContent = Say Hello;
 button.onclick = function ():void
 {
 Window.alert(greeter.greet());
 };
 Window.document.body.appendChild(button);
 }
 }
 }
 
 *Cross compiled to Javascript;*
 
 --
 Greeter.js
 --
 
 function Greeter(greeting) {
 this.greeting = greeting;
 }
 
 Greeter.prototype.greet = function() {
 return Hello,  + this.greeting;
 };
 
 Greeter.start = function() {
 var greeter = new Greeter(how are you FalconJX?);
 var button = document.createElement(button);
 button.textContent = Say Hello!;
 button.onclick = function() {
 alert(greeter.greet());
 };
 document.body.appendChild(button);
 };
 
 Mike
  

Re: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling to vanilla Javascript

2015-05-29 Thread Alex Harui
Please don’t worry.  The root ‘data’ for the two swcs come from
Adobe/Tamarin and W3C.  A solution will be found.  The issues Justin
brings up don’t always turn out to be issues.

-Alex 

On 5/29/15, 4:08 PM, Michael Schmalle teotigraphix...@gmail.com wrote:

Ok, I am putting this little project on hold until we figure out what is
going on regarding how to create swcs for the builtin and dom, Justin is
raising enough red flags that it worries me.

I don't want to spend all this time and then we find out we are up a creek
without these really important items.

I will commence when a resolution is found.

Mike

On Fri, May 29, 2015 at 5:38 PM, Michael Schmalle
teotigraphix...@gmail.com
 wrote:

 Alex, don't get me wrong, I like your framework with it's composition
and
 if Om and I can get SVG working with your components I totally see that
as
 a valid Flash/HTML route that I would contribute to.

 Mike

 On Fri, May 29, 2015 at 5:01 PM, Alex Harui aha...@adobe.com wrote:



 On 5/29/15, 1:36 PM, Michael Schmalle teotigraphix...@gmail.com
 wrote:

 
 The fact Josh is still highly interested in ActionScript leads me to
 believe if we offer up real solutions to former AS devs, they might
 actually be overjoyed to see and use it because they know we are not
 trying
 to solve world hunger here, just offer tooling that is mature.

 Peter and I are interested as well.  Every time I start writing JS I go
 “Ugh” because I know I’m going to type a lot of silly mistakes.

 I hope to try it once I get out of BURM hell.  Oh, did I mention?  I’m
in
 BURM hell ;-)

 -Alex






Re: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling to vanilla Javascript

2015-05-29 Thread Josh Tynjala
That's great!

- Josh

On Fri, May 29, 2015 at 9:25 AM, Michael Schmalle teotigraphix...@gmail.com
 wrote:

 Hi,

 Well using some of the 100's of hours I had into development of a
 different compiler, out of the shear joy of reusing time I lived I have
 the following compiling with FalconJX and the JXEmitter.

 I have the builtin.swc and HTMLCoreLib.swc loaded in FalconJX when
 compiling, no playerglobal.swc.

 I also have full code completion in IntelliJ using no SDK just the
 builtin.swc and HTMLCoreLib.swc.

 Window.document and Window. automatically get boiled down into global in
 the emitter, pretty neat, it just majically works on the JS side.

 Not bad for a days work. :)

 --
 Using this html;
 --

 !DOCTYPE html
 html
 head
 script type=text/javascript src=Greeter.js/script
 /head

 body

 script type=text/javascript
 Greeter.start();
 /script

 /body
 /html


 *We get the screenshot of;*

 http://snag.gy/Mtiln.jpg

 --
 Greeter.as
 --

 package
 {
 public class Greeter
 {
 public var greeting:String;

 public function Greeter(greeting:String)
 {
 this.greeting = greeting;
 }

 public function greet():String
 {
 return Hello,  + greeting;
 }

 public static function start():void
 {
 var greeter:Greeter = new Greeter(how are you FalconJX?);

 var button:Element = Window.document.createElement(button);
 button.textContent = Say Hello;
 button.onclick = function ():void
 {
 Window.alert(greeter.greet());
 };
 Window.document.body.appendChild(button);
 }
 }
 }

 *Cross compiled to Javascript;*

 --
 Greeter.js
 --

 function Greeter(greeting) {
 this.greeting = greeting;
 }

 Greeter.prototype.greet = function() {
 return Hello,  + this.greeting;
 };

 Greeter.start = function() {
 var greeter = new Greeter(how are you FalconJX?);
 var button = document.createElement(button);
 button.textContent = Say Hello!;
 button.onclick = function() {
 alert(greeter.greet());
 };
 document.body.appendChild(button);
 };

 Mike



Re: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling to vanilla Javascript

2015-05-29 Thread Michael Schmalle
On Fri, May 29, 2015 at 3:18 PM, Erik de Bruin e...@ixsoftware.nl wrote:

  Correct. It's been a dream of mine for years. Why? I don't know, it's
 fun.

 That's the best (and only?) reason. When my current project completes,
 in a few months time, I want me to have some fun again. Please don't
 kill VFJS in the mean time ;-)



You wanna know the real reason, mainly Josh. If he can create a UI
framework like his feathers in AS that transpiles to JS and I can use it
for my mobile apps. I could see bridging the gap of his components into
FlexJS's MXML/Application and I ... would ... be ... in ... heaven.

I am NOT knocking all the work Alex etal are doing with FlexJS's
uicomponents just that I have always programed UI with code and some MXML.
It's the way  I think and Josh's Feathers just clicked for me and I became
100% more productive with my mobile apps then in my 2 year stint with Java
and opengl frameworks.

Plus, I don't know and really don't want to learn all the fancy foot work
of the JS ui frameworks( I would if I had to).

Mike




 EdB



 --
 Ix Multimedia Software

 Jan Luykenstraat 27
 3521 VB Utrecht

 T. 06-51952295
 I. www.ixsoftware.nl



Re: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling to vanilla Javascript

2015-05-29 Thread OmPrakash Muppirala
The more I think about it, the more awesome it looks :-)

Okay, so does code completion work with Window, document, body etc.
elements?

And, if we have a mechanism to consume d.ts files, we can pretty quickly
add native AS3 support to libraries like jquery, d3, etc., right?

Thanks,
Om

On Fri, May 29, 2015 at 12:34 PM, Michael Schmalle 
teotigraphix...@gmail.com wrote:

 On Fri, May 29, 2015 at 3:18 PM, Erik de Bruin e...@ixsoftware.nl wrote:

   Correct. It's been a dream of mine for years. Why? I don't know, it's
  fun.
 
  That's the best (and only?) reason. When my current project completes,
  in a few months time, I want me to have some fun again. Please don't
  kill VFJS in the mean time ;-)
 


 You wanna know the real reason, mainly Josh. If he can create a UI
 framework like his feathers in AS that transpiles to JS and I can use it
 for my mobile apps. I could see bridging the gap of his components into
 FlexJS's MXML/Application and I ... would ... be ... in ... heaven.

 I am NOT knocking all the work Alex etal are doing with FlexJS's
 uicomponents just that I have always programed UI with code and some MXML.
 It's the way  I think and Josh's Feathers just clicked for me and I became
 100% more productive with my mobile apps then in my 2 year stint with Java
 and opengl frameworks.

 Plus, I don't know and really don't want to learn all the fancy foot work
 of the JS ui frameworks( I would if I had to).

 Mike



 
  EdB
 
 
 
  --
  Ix Multimedia Software
 
  Jan Luykenstraat 27
  3521 VB Utrecht
 
  T. 06-51952295
  I. www.ixsoftware.nl
 



Re: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling to vanilla Javascript

2015-05-29 Thread Erik de Bruin
Unless I'm mistaken, the idea is to use AS instead of JS to code for
the web. That would bring AS on par with the other 'higher level'
languages (CoffeeScript, TypeScript, Dart, and the rest: [1]) that
compile down to JS, using JS basically as the Assembly for the web.

EdB

1: 
https://github.com/jashkenas/coffeescript/wiki/List-of-languages-that-compile-to-JS



On Fri, May 29, 2015 at 8:51 PM, OmPrakash Muppirala
bigosma...@gmail.com wrote:
 This is pretty cool!

 What happens when you run the AS version?

 Thanks,
 Om
 On May 29, 2015 10:05 AM, Frédéric THOMAS webdoubl...@hotmail.com wrote:

 Cool stuff, very promising :-)

 Frédéric THOMAS

  Date: Fri, 29 May 2015 12:25:25 -0400
  Subject: [FalconJX JXEmitter] Hello Greeter! working :: AS cross
 compiling to vanilla Javascript
  From: teotigraphix...@gmail.com
  To: dev@flex.apache.org
 
  Hi,
 
  Well using some of the 100's of hours I had into development of a
  different compiler, out of the shear joy of reusing time I lived I have
  the following compiling with FalconJX and the JXEmitter.
 
  I have the builtin.swc and HTMLCoreLib.swc loaded in FalconJX when
  compiling, no playerglobal.swc.
 
  I also have full code completion in IntelliJ using no SDK just the
  builtin.swc and HTMLCoreLib.swc.
 
  Window.document and Window. automatically get boiled down into global in
  the emitter, pretty neat, it just majically works on the JS side.
 
  Not bad for a days work. :)
 
  --
  Using this html;
  --
 
  !DOCTYPE html
  html
  head
  script type=text/javascript src=Greeter.js/script
  /head
 
  body
 
  script type=text/javascript
  Greeter.start();
  /script
 
  /body
  /html
 
 
  *We get the screenshot of;*
 
  http://snag.gy/Mtiln.jpg
 
  --
  Greeter.as
  --
 
  package
  {
  public class Greeter
  {
  public var greeting:String;
 
  public function Greeter(greeting:String)
  {
  this.greeting = greeting;
  }
 
  public function greet():String
  {
  return Hello,  + greeting;
  }
 
  public static function start():void
  {
  var greeter:Greeter = new Greeter(how are you FalconJX?);
 
  var button:Element = Window.document.createElement(button);
  button.textContent = Say Hello;
  button.onclick = function ():void
  {
  Window.alert(greeter.greet());
  };
  Window.document.body.appendChild(button);
  }
  }
  }
 
  *Cross compiled to Javascript;*
 
  --
  Greeter.js
  --
 
  function Greeter(greeting) {
  this.greeting = greeting;
  }
 
  Greeter.prototype.greet = function() {
  return Hello,  + this.greeting;
  };
 
  Greeter.start = function() {
  var greeter = new Greeter(how are you FalconJX?);
  var button = document.createElement(button);
  button.textContent = Say Hello!;
  button.onclick = function() {
  alert(greeter.greet());
  };
  document.body.appendChild(button);
  };
 
  Mike




-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl


Re: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling to vanilla Javascript

2015-05-29 Thread Erik de Bruin
 Correct. It's been a dream of mine for years. Why? I don't know, it's fun.

That's the best (and only?) reason. When my current project completes,
in a few months time, I want me to have some fun again. Please don't
kill VFJS in the mean time ;-)

EdB



-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl


Re: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling to vanilla Javascript

2015-05-29 Thread Alex Harui


On 5/29/15, 1:36 PM, Michael Schmalle teotigraphix...@gmail.com wrote:


The fact Josh is still highly interested in ActionScript leads me to
believe if we offer up real solutions to former AS devs, they might
actually be overjoyed to see and use it because they know we are not
trying
to solve world hunger here, just offer tooling that is mature.

Peter and I are interested as well.  Every time I start writing JS I go
“Ugh” because I know I’m going to type a lot of silly mistakes.

I hope to try it once I get out of BURM hell.  Oh, did I mention?  I’m in
BURM hell ;-)

-Alex



Re: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling to vanilla Javascript

2015-05-29 Thread Alex Harui


On 5/29/15, 12:34 PM, Michael Schmalle teotigraphix...@gmail.com wrote:


You wanna know the real reason, mainly Josh. If he can create a UI
framework like his feathers in AS that transpiles to JS and I can use it
for my mobile apps. I could see bridging the gap of his components into
FlexJS's MXML/Application and I ... would ... be ... in ... heaven.

I know Josh is quite far on MXMLC and Feathers, but I sure wish I could
convince him to try to get Falcon/FalconJX working with Feathers and align
the efforts.  Then when he wraps up some JS framework to map to Feathers
it will all work in this tool chain.  And now he can do his wrapping by
writing AS and have it transpile to JS.


I am NOT knocking all the work Alex etal are doing with FlexJS's
uicomponents just that I have always programed UI with code and some MXML.
It's the way  I think and Josh's Feathers just clicked for me and I became
100% more productive with my mobile apps then in my 2 year stint with Java
and opengl frameworks.

I don’t see it as a competition.  I think we want to make sure that the
tool chain is agnostic about the component sets involved.  I am building
out a UI component set and SWF tooling that:

1) I think will give you faster edit/compile/test cycles
2) Leverages the runtime’s verifier that should help you when your code
becomes more dynamic.
3) Generates a SWF that is potentially usable in older browsers.
3) Should provide re-usable pieces for mocking or emulating these other JS
UI component sets in SWF form.

If it turns out that folks don’t need these pieces, that will be a bit of
a bummer, but I’m betting on #2 being important as your apps get bigger
and bigger and more dynamic.

-Alex



Re: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling to vanilla Javascript

2015-05-29 Thread Michael Schmalle
On Fri, May 29, 2015 at 2:51 PM, OmPrakash Muppirala bigosma...@gmail.com
wrote:

 This is pretty cool!

 What happens when you run the AS version?


Nothing. :) The HTMLCoreLib is just class stubs for code completion and
documentation asdocs. (it could be something if it was implemented I guess.)

Mike




 Thanks,
 Om
 On May 29, 2015 10:05 AM, Frédéric THOMAS webdoubl...@hotmail.com
 wrote:

  Cool stuff, very promising :-)
 
  Frédéric THOMAS
 
   Date: Fri, 29 May 2015 12:25:25 -0400
   Subject: [FalconJX JXEmitter] Hello Greeter! working :: AS cross
  compiling to vanilla Javascript
   From: teotigraphix...@gmail.com
   To: dev@flex.apache.org
  
   Hi,
  
   Well using some of the 100's of hours I had into development of a
   different compiler, out of the shear joy of reusing time I lived I
 have
   the following compiling with FalconJX and the JXEmitter.
  
   I have the builtin.swc and HTMLCoreLib.swc loaded in FalconJX when
   compiling, no playerglobal.swc.
  
   I also have full code completion in IntelliJ using no SDK just the
   builtin.swc and HTMLCoreLib.swc.
  
   Window.document and Window. automatically get boiled down into global
 in
   the emitter, pretty neat, it just majically works on the JS side.
  
   Not bad for a days work. :)
  
   --
   Using this html;
   --
  
   !DOCTYPE html
   html
   head
   script type=text/javascript src=Greeter.js/script
   /head
  
   body
  
   script type=text/javascript
   Greeter.start();
   /script
  
   /body
   /html
  
  
   *We get the screenshot of;*
  
   http://snag.gy/Mtiln.jpg
  
   --
   Greeter.as
   --
  
   package
   {
   public class Greeter
   {
   public var greeting:String;
  
   public function Greeter(greeting:String)
   {
   this.greeting = greeting;
   }
  
   public function greet():String
   {
   return Hello,  + greeting;
   }
  
   public static function start():void
   {
   var greeter:Greeter = new Greeter(how are you FalconJX?);
  
   var button:Element = Window.document.createElement(button);
   button.textContent = Say Hello;
   button.onclick = function ():void
   {
   Window.alert(greeter.greet());
   };
   Window.document.body.appendChild(button);
   }
   }
   }
  
   *Cross compiled to Javascript;*
  
   --
   Greeter.js
   --
  
   function Greeter(greeting) {
   this.greeting = greeting;
   }
  
   Greeter.prototype.greet = function() {
   return Hello,  + this.greeting;
   };
  
   Greeter.start = function() {
   var greeter = new Greeter(how are you FalconJX?);
   var button = document.createElement(button);
   button.textContent = Say Hello!;
   button.onclick = function() {
   alert(greeter.greet());
   };
   document.body.appendChild(button);
   };
  
   Mike
 



Re: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling to vanilla Javascript

2015-05-29 Thread Michael Schmalle
On Fri, May 29, 2015 at 3:00 PM, Erik de Bruin e...@ixsoftware.nl wrote:

 Unless I'm mistaken, the idea is to use AS instead of JS to code for
 the web. That would bring AS on par with the other 'higher level'
 languages (CoffeeScript, TypeScript, Dart, and the rest: [1]) that
 compile down to JS, using JS basically as the Assembly for the web.

 EdB


Correct. It's been a dream of mine for years. Why? I don't know, it's fun.
:) Also, like Josj could implement Feathers like UI frameworks in AS that
target Canvas or WebGL.

Mike




 1:
 https://github.com/jashkenas/coffeescript/wiki/List-of-languages-that-compile-to-JS



 On Fri, May 29, 2015 at 8:51 PM, OmPrakash Muppirala
 bigosma...@gmail.com wrote:
  This is pretty cool!
 
  What happens when you run the AS version?
 
  Thanks,
  Om
  On May 29, 2015 10:05 AM, Frédéric THOMAS webdoubl...@hotmail.com
 wrote:
 
  Cool stuff, very promising :-)
 
  Frédéric THOMAS
 
   Date: Fri, 29 May 2015 12:25:25 -0400
   Subject: [FalconJX JXEmitter] Hello Greeter! working :: AS cross
  compiling to vanilla Javascript
   From: teotigraphix...@gmail.com
   To: dev@flex.apache.org
  
   Hi,
  
   Well using some of the 100's of hours I had into development of a
   different compiler, out of the shear joy of reusing time I lived I
 have
   the following compiling with FalconJX and the JXEmitter.
  
   I have the builtin.swc and HTMLCoreLib.swc loaded in FalconJX when
   compiling, no playerglobal.swc.
  
   I also have full code completion in IntelliJ using no SDK just the
   builtin.swc and HTMLCoreLib.swc.
  
   Window.document and Window. automatically get boiled down into global
 in
   the emitter, pretty neat, it just majically works on the JS side.
  
   Not bad for a days work. :)
  
   --
   Using this html;
   --
  
   !DOCTYPE html
   html
   head
   script type=text/javascript src=Greeter.js/script
   /head
  
   body
  
   script type=text/javascript
   Greeter.start();
   /script
  
   /body
   /html
  
  
   *We get the screenshot of;*
  
   http://snag.gy/Mtiln.jpg
  
   --
   Greeter.as
   --
  
   package
   {
   public class Greeter
   {
   public var greeting:String;
  
   public function Greeter(greeting:String)
   {
   this.greeting = greeting;
   }
  
   public function greet():String
   {
   return Hello,  + greeting;
   }
  
   public static function start():void
   {
   var greeter:Greeter = new Greeter(how are you FalconJX?);
  
   var button:Element = Window.document.createElement(button);
   button.textContent = Say Hello;
   button.onclick = function ():void
   {
   Window.alert(greeter.greet());
   };
   Window.document.body.appendChild(button);
   }
   }
   }
  
   *Cross compiled to Javascript;*
  
   --
   Greeter.js
   --
  
   function Greeter(greeting) {
   this.greeting = greeting;
   }
  
   Greeter.prototype.greet = function() {
   return Hello,  + this.greeting;
   };
  
   Greeter.start = function() {
   var greeter = new Greeter(how are you FalconJX?);
   var button = document.createElement(button);
   button.textContent = Say Hello!;
   button.onclick = function() {
   alert(greeter.greet());
   };
   document.body.appendChild(button);
   };
  
   Mike
 



 --
 Ix Multimedia Software

 Jan Luykenstraat 27
 3521 VB Utrecht

 T. 06-51952295
 I. www.ixsoftware.nl



Re: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling to vanilla Javascript

2015-05-29 Thread Michael Schmalle
On Fri, May 29, 2015 at 3:47 PM, OmPrakash Muppirala bigosma...@gmail.com
wrote:

 The more I think about it, the more awesome it looks :-)


It is awesome. I sat down this morning and said, I am going to get this to
work. So I went to TypeScript playground and grabbed their HelloWorld code.
I said I will write it an AS and get it to cross compile today. I started
on the emitter yesterday, I used a lot of my code from Randori, took out
the cruft.

In about 4 hours I got what you see above. The only thing I haven't written
is the ITarget for the actual compiler, I am using the testing hooks right
now.



 Okay, so does code completion work with Window, document, body etc.
 elements?



Oh yeah. :) And it has asdocs.

Screenshot; http://snag.gy/dheAK.jpg



 And, if we have a mechanism to consume d.ts files, we can pretty quickly
 add native AS3 support to libraries like jquery, d3, etc., right?


Yes, see the previous thread I wrote today about TypeScript def files.

Mike



 Thanks,
 Om

 On Fri, May 29, 2015 at 12:34 PM, Michael Schmalle 
 teotigraphix...@gmail.com wrote:

  On Fri, May 29, 2015 at 3:18 PM, Erik de Bruin e...@ixsoftware.nl
 wrote:
 
Correct. It's been a dream of mine for years. Why? I don't know, it's
   fun.
  
   That's the best (and only?) reason. When my current project completes,
   in a few months time, I want me to have some fun again. Please don't
   kill VFJS in the mean time ;-)
  
 
 
  You wanna know the real reason, mainly Josh. If he can create a UI
  framework like his feathers in AS that transpiles to JS and I can use it
  for my mobile apps. I could see bridging the gap of his components into
  FlexJS's MXML/Application and I ... would ... be ... in ... heaven.
 
  I am NOT knocking all the work Alex etal are doing with FlexJS's
  uicomponents just that I have always programed UI with code and some
 MXML.
  It's the way  I think and Josh's Feathers just clicked for me and I
 became
  100% more productive with my mobile apps then in my 2 year stint with
 Java
  and opengl frameworks.
 
  Plus, I don't know and really don't want to learn all the fancy foot work
  of the JS ui frameworks( I would if I had to).
 
  Mike
 
 
 
  
   EdB
  
  
  
   --
   Ix Multimedia Software
  
   Jan Luykenstraat 27
   3521 VB Utrecht
  
   T. 06-51952295
   I. www.ixsoftware.nl
  
 



Re: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling to vanilla Javascript

2015-05-29 Thread Michael Schmalle
Yeah, well right now it's to early to say anything about the future.

All I am trying to do is give a piece that I feel is missing from the tool
chain and that is something that has AS producing JS.

Maybe people will use it, maybe not. I figure I have nothing to loose and I
can possibly gain from a gamble.

The fact Josh is still highly interested in ActionScript leads me to
believe if we offer up real solutions to former AS devs, they might
actually be overjoyed to see and use it because they know we are not trying
to solve world hunger here, just offer tooling that is mature.

Mike

On Fri, May 29, 2015 at 4:29 PM, Alex Harui aha...@adobe.com wrote:



 On 5/29/15, 12:34 PM, Michael Schmalle teotigraphix...@gmail.com
 wrote:

 
 You wanna know the real reason, mainly Josh. If he can create a UI
 framework like his feathers in AS that transpiles to JS and I can use it
 for my mobile apps. I could see bridging the gap of his components into
 FlexJS's MXML/Application and I ... would ... be ... in ... heaven.

 I know Josh is quite far on MXMLC and Feathers, but I sure wish I could
 convince him to try to get Falcon/FalconJX working with Feathers and align
 the efforts.  Then when he wraps up some JS framework to map to Feathers
 it will all work in this tool chain.  And now he can do his wrapping by
 writing AS and have it transpile to JS.

 
 I am NOT knocking all the work Alex etal are doing with FlexJS's
 uicomponents just that I have always programed UI with code and some MXML.
 It's the way  I think and Josh's Feathers just clicked for me and I became
 100% more productive with my mobile apps then in my 2 year stint with Java
 and opengl frameworks.

 I don’t see it as a competition.  I think we want to make sure that the
 tool chain is agnostic about the component sets involved.  I am building
 out a UI component set and SWF tooling that:

 1) I think will give you faster edit/compile/test cycles
 2) Leverages the runtime’s verifier that should help you when your code
 becomes more dynamic.
 3) Generates a SWF that is potentially usable in older browsers.
 3) Should provide re-usable pieces for mocking or emulating these other JS
 UI component sets in SWF form.

 If it turns out that folks don’t need these pieces, that will be a bit of
 a bummer, but I’m betting on #2 being important as your apps get bigger
 and bigger and more dynamic.

 -Alex




Re: [FalconJX JXEmitter] Hello Greeter! working :: AS cross compiling to vanilla Javascript

2015-05-29 Thread Michael Schmalle
Alex, don't get me wrong, I like your framework with it's composition and
if Om and I can get SVG working with your components I totally see that as
a valid Flash/HTML route that I would contribute to.

Mike

On Fri, May 29, 2015 at 5:01 PM, Alex Harui aha...@adobe.com wrote:



 On 5/29/15, 1:36 PM, Michael Schmalle teotigraphix...@gmail.com wrote:

 
 The fact Josh is still highly interested in ActionScript leads me to
 believe if we offer up real solutions to former AS devs, they might
 actually be overjoyed to see and use it because they know we are not
 trying
 to solve world hunger here, just offer tooling that is mature.

 Peter and I are interested as well.  Every time I start writing JS I go
 “Ugh” because I know I’m going to type a lot of silly mistakes.

 I hope to try it once I get out of BURM hell.  Oh, did I mention?  I’m in
 BURM hell ;-)

 -Alex