flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Schmalle <apa...@teotigraphix.com>
Subject Re: FalconJS "Demo" checked in
Date Wed, 28 Nov 2012 18:48:30 GMT
Thanks for the information.

I'm not afraid of the compiler for sure, it was the reducer and abc  
stuff that confused me. After reading what you wrote about the reducer  
I just went back to the code and looked at it again with a fresh  
perspective and see it's basically the visitor pattern that most cross  
compilers use.

My point was that there will be people creating components and there  
will be people developing Falcon and FalconJS. I will be in the latter  
camp, developing the compiler and emitter.

So, my first impression was man, I don't understand this. Which just  
meant I want to work on it but it seems to technical dealing with ABC.  
Now that I read what you wrote my dyslexia turned around and I finally  
grasped what it's doing.

My thought about the SWC had to do with the above misinterpretation of  
what FalconJS was doing. I understand it's for linking basically.

I think you can pretty much throw away about 1/2 of my thoughts below  
based in my misunderstanding of the emitter stage. I wanted a visitor  
pattern, it's being used in the JSEmitter.

I really need to write some notes on the wiki...


Quoting Alex Harui <aharui@adobe.com>:

> On 11/28/12 3:01 AM, "Michael Schmalle" <apache@teotigraphix.com> wrote:
>> Very interesting Alex. I like this quote:
>> "The initial versions will be relatively feature-poor compared to
>> Flex, but the hope is that the architecture is small enough and
>> modular enough to allow Apache Flex community members, many who are
>> participating in their spare time, to participate without having to be
>> immersed in the internals of the framework."
>> Seems to be the only way out of the forest.
>> So since you actually have a working prototype, what do you see the
>> priorities of action here and the levels of contribution?
> My priority, after finishing the wiki writeup, is to get Falcon working
> better and figure out how to do MXML to JS.  Folks are more than welcome to
> help here or try to write new components based on agreed upon goals.
>> I looked at FalconJS. The problem with me is the lowlevel nature of
>> the SWF format being involved in the cross compilation.
> I'm not sure what you mean by that.  I don't recall running into any SWF
> related restrictions in getting this demo up.  FalconJS does know how to
> consume a SWF in order to process SWCs so that it can resolve symbols when
> compiling your AS files, but I didn't run into anything else, and I am using
> the fact that it does not try to generate JS from the SWCs to my advantage.
> All references to symbols in the SWC are to be replaced by JS that fulfills
> those API contracts.
> I'm not an expert on Falcon or FalconJS, but what I think I see is the
> AS/JSCompilation unit creates the AST, then a Reducer gets called to reduce
> it to output format.  For a SWF, that is an ABCReducer, for FalconJS it is
> the JSReducer.  The Reducers seem to use Emitters to create
> InstructionLists.  For a SWF the instruction lists are ABC code, for JS, it
> appears that each instruction list is one instruction long but that
> instruction is a string of JS.  All of those instruction lists are
> concatenated then a Writer writes them out.  For a SWF it writes ABC blocks
> and I think manages constant pools.  For JS I have it wired to write out
> separate JS files, but there is code in there that tries to aggregate them
> and push them through the Closure compiler to get optimized/minified.
>> In a way I
>> understand why the engineer chose this route but... are we going to
>> shot oursevles in the foot because we have "one more layer" that
>> community members would have to be proficient in to work on it?
> I think Falcon and FalconJS are well-written enough that there is separation
> of concerns.  Folks in the community who don't want to know about the
> compiler won't have to know.  This will be especially true once I change
> Falcon to generate data structures instead of code. Then folks who only want
> to write AS code can contribute components or parts of components, and those
> of us who can do compiler work can.  But my hope is that the compiler work
> gets done in a way that the main emphasis is on writing AS code, which we
> have more community members who are good at that.
>> Also, I haven't put much time into this thought but, since I have now
>> read your "Non-Goals" and "Pay as You Go", I would venture to guess at
>> least exploring a simple implementation using straight AST/IDefinition
>> would be worth checking out with FlaconJS.
> I'm not sure what that means either, but maybe Gordon can offer an opinion.
>> My problem is we have Flacon which is a huge parser/compiler, MXML
>> which is another animal and then FlaconJS which using block code just
>> makes this project insanely complicated for the casual developer.
> If we want to own/control the language we need folks who are not afraid to
> touch the compiler.  At least with Falcon I'm happy with the basic way the
> code works.  It has not taken me long to be successful in it, compared to
> MXMLC.  And it was modular enough to allow FalconJS to happen, and it didn't
> take me too long to get a feel for FalconJS.
> But I want to hide all of that from the casual developer, who I expect will
> contribute on the AS/JS side and not ever look at a java file.
>> he other problem is I have really no knowledge with the latest and
>> greatest JS techs, so I am seeing what people are saying to even get a
>> clue as to what the output would be.
> Yup, I have no idea what the best output code is.  For now, it is working
> and enables me to keep on plugging.
>> Well, a ramble but my post should just say, Should we try a cross
>> compilation impl that only uses the IDefinition/AST Nodes API to keep
>> it simple?
>> Using the proto FalconJS we are STILL tied to Adobe and the SWF/SWC
>> spec, to my knowledge that is not considered ActionScript correct?
> FalconJS is using SWCs but Apache Flex "own" the code that generates SWCs so
> IMO, we are not tied to Adobe.  We can change anything we want there as long
> as the Flash runtime can understand it, or doesn't need to run it.
>> Mike
>> Quoting Alex Harui <aharui@adobe.com>:
>>> Hi,
>>> I finally got permission to check in a demo that uses FalconJS into my
>>> whiteboard at [1].
>>> I started a writeup on it on the wiki that I will try to complete tomorrow
>>> at [2].
>>> [1] http://svn.apache.org/viewvc/incubator/flex/whiteboard/aharui/flexjs
>>> [2]  
>>> https://cwiki.apache.org/confluence/display/FLEX/Alex's+FlexJS+Prototype
>>> Thanks,
>>> --
>>> Alex Harui
>>> Flex SDK Team
>>> Adobe Systems, Inc.
>>> http://blogs.adobe.com/aharui
> --
> Alex Harui
> Flex SDK Team
> Adobe Systems, Inc.
> http://blogs.adobe.com/aharui

Michael Schmalle - Teoti Graphix, LLC

View raw message