ROBERT-MCDOWELL / Flash

Open Source Flash Actionscript Next Generation with Rust
GNU Affero General Public License v3.0
2 stars 0 forks source link

Vegey #3

Open ghost opened 5 years ago

ghost commented 5 years ago

I said I couldn't program, mostly because I can't properly install SDKs and these alike things in my Android phone. The issue arises, in first place, because I can't install Android SDK and thus I'm unable to generate APK using tools like android-rs-glue and even Haxe tools. The unique alternative I know of is generating Dalvik bytecode or arch code (arm-androideabi, x64 etc.) and wrapping these in APKs manually with a language compiler.

Since Node.js is popular, there's much to help generating APK. I'll check things out...

Now I've finished vegeyparse's parser. It took a week apparently. I've not done any proper testing, just passed some expressions and directives to vegeyparse.parse(), fixing a lot of strangerisms. It reports errors very nicely!

Now is needed a verifier (a.k.a. symbol solver). I had a partial one for DollScript, but I wanna plan it better. It's the last step to get writting vegeyc, the comliler that generates Vegey bytecode.

ROBERT-MCDOWELL commented 5 years ago

Sounds good!, keep it going, tell me when you have a working version of the compiler

ROBERT-MCDOWELL commented 5 years ago

everything in time, take your time, the most important is to be strict with every piece of code.

ROBERT-MCDOWELL commented 5 years ago

just keep in mind that more it will be like Actionscript, more you will get developers from.... ;)

ROBERT-MCDOWELL commented 5 years ago
ghost commented 5 years ago

I'm enjoying working in Vegey though. ¯_(ツ)_/¯ ... But when I unfortunately hear bad sound from house's exterior I don't focus well on what I'm doing.

I overloaded city's carnaval sound with Dragon's Curse. Carnaval and neighbours sound is

ROBERT-MCDOWELL commented 5 years ago

I'm always working, sleeping with this https://ch.iherb.com/pr/Hearos-Ear-Plugs-Sleep-Pretty-in-Pink-14-Pair/71061?gclid=Cj0KCQiAk-7jBRD9ARIsAEy8mh5Erff2UAcdTyXKeZKSKFRDsW-IDyr-e5YMs9_28Ja2JC6vKmS5jokaAuImEALw_wcB&gclsrc=aw.ds with those I don't care what's outside...

ghost commented 5 years ago

Destructuring patterns:

Vegey has no tuples (like (x, y, z) in Rust or Python), but it supports structs ([Data] classes) and ES-like recursive destructuring.

I could add them, but there's no perf. benefit and would cluster up semantics. The syntax would be boring too.

Tuples (those in Rust, Cone or Python) are immutable arrays with mixed types (e.g. (Type1, RandType, float), where members aren't named and thus you do vec.0 to access x-coord in vec = (x, y, z), or you use destructuring:

for (x, _, _) in locations {
    println!("{}", x);
}

In Vegey it'd be like:

for each (var {x, _, _} in locations)
  trace(x)

So it looks good, yeah? ActionScript-like, super-efficient.

ROBERT-MCDOWELL commented 5 years ago

LGTM, nice job!, the most important now is once you have all tests and components done a good article on your git hub with a good and clear example thus to attract other developers and create a team.

ROBERT-MCDOWELL commented 5 years ago

interesting syntax :)

On 3/15/2019 7:08 PM, hydroper wrote:

It was looking like that:

Imgur https://i.imgur.com/ckOyrR9.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ROBERT-MCDOWELL/Flash/issues/3#issuecomment-473489777, or mute the thread https://github.com/notifications/unsubscribe-auth/AChr8EeJ_h5DUMNZWcSIagwgoshFQPdOks5vXFIagaJpZM4bW_94.

ROBERT-MCDOWELL commented 5 years ago

yeah good! rome didn't build in one day :)

On 3/15/2019 6:59 PM, hydroper wrote:

Being aware of contests, it'll be worthier to study. Well, if something needs help in the technology's future, I may continue work in Vegey and brings some _Math_ier expressions (proper ranges and few symbols...).

Good, yeah? Btw...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ROBERT-MCDOWELL/Flash/issues/3#issuecomment-473489072, or mute the thread https://github.com/notifications/unsubscribe-auth/AChr8KN_-x7J4aY8n0a1jCn0ZoLPPADdks5vXE__gaJpZM4bW_94.

ROBERT-MCDOWELL commented 5 years ago

is this https://github.com/jedisct1/wasmonkey can be an inspiration?

ghost commented 5 years ago

Replacing native functions? A biiit

ROBERT-MCDOWELL commented 5 years ago

https://github.com/jedisct1 has good projects with rust,....

ghost commented 5 years ago

Rust is good too, but just the APK development is vague :/

android-rs-glue depends in NDK/SDK and I can't have it in my phone to build and test apps.

I hope one day I can use Rust :| I just wanted to write my gfx lib, but right before a APK generator? No interest on doing that :v

ghost commented 5 years ago

You're settled to watch all subsequent repos in alien.as, hmmm...

ghost commented 5 years ago

astro new and astro init commands are already working, heheheh.

$ git clone https://github.com/alien-as/astro
$ cd astro
$ npm link

Now:

$ astro new particle-control
$ ls -a || dir

Anyway, I don't know if I can work on this framework. I live with my mother and 3 siblings and they keep saying I do nothing, but that's not it. I should finish some projects, be them in AS3-AIR.

The thing is that Rust doesn't still have a good library like Flash's display. Just that... If I touch inheritance etc. in Rust, then I'll delay again with my things.

ROBERT-MCDOWELL commented 5 years ago
ROBERT-MCDOWELL commented 5 years ago

know this? https://github.com/glium/glium

ROBERT-MCDOWELL commented 5 years ago

cannot use npm on my server, fedora 28 did not update npm with openssl 1.1 :(

ghost commented 5 years ago

Did you try npm i -g npm? I don't know exactly openssl... But it looks to be on all Linuxes.

ROBERT-MCDOWELL commented 5 years ago

error while loading shared libraries: libcrypto.so.10: cannot open shared object file: No such file or directory if I recall nodejs is still stuck with openssl-1.0.x and Fedora 28 removed it for 1.1.x. I'm super busy for now... :(

ghost commented 5 years ago

These kinds of system dependencies are silly... Unfortunately :\/

ROBERT-MCDOWELL commented 5 years ago

A good article from 2011, maybe mature today https://promethe.io/2013/09/23/from-actionscript-3-to-c-2011/

ghost commented 5 years ago

But I think in that case one can just target ANE from C++ code and invoke a native entry function from AS.

Developing Native Extensions for Adobe AIR

ghost commented 5 years ago

Wohow, static const flash.utils.ByteArrays are thread-unsafe.

ROBERT-MCDOWELL commented 5 years ago

bytearray is be design shared :) mutex can manage the threads runninng https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/concurrent/Mutex.html

ROBERT-MCDOWELL commented 5 years ago
ghost commented 5 years ago

@ROBERT-MCDOWELL But in case I needed non-stream operations on ByteArray, so that I'd not need thread-locks, e.g.: ba.readUnsignedInt(i) rather than just ba.readUnsignedInt(). The parsers I'm building could be rant simultaneously because they don't touch each other.

ROBERT-MCDOWELL commented 5 years ago

ha ok :)

ghost commented 5 years ago

That's another downside of Adobe AIR. But I weren't supposed to multi-thread, because I usually don't.

Wait, I forget workers are isolated... So I won't re-use my lib between threads and I'll also not multi-thread for now.

ROBERT-MCDOWELL commented 5 years ago

there still are workers, a kind of pseudo multithread...

ghost commented 5 years ago

I mean, workers can't re-use same objects easily. It'd be like hacking AIR runtime.

ROBERT-MCDOWELL commented 5 years ago

only one way, reverse engineering so :)

ROBERT-MCDOWELL commented 5 years ago

btw, there is no true multithread available on web development, because it's unsafe

ghost commented 5 years ago

Yep. Fortunately low-level APIs are possible in any language!

This is from this year: WebAssembly Threads ready to try in Chrome 70

I think they're unsafe for developer 'pitchfalls'. E.g., when nullying weak references in collections threads may overdo something in a internal race condition... Something so, but they'll never corrupt the browser as they're sandboxed.

ghost commented 5 years ago

Again I just got an idea and AS-N (actual language name) will easily support multi-threading. It's very fun... Types will be either atomic or solo-threaded.

In Rust you've some Arc (atomic reference counters), sync::Weak (weak version of Arc) and some functions that implement Sync + Send traits. In case I'm planning to just have a IAtomic interface in the unnamed package ;)

ROBERT-MCDOWELL commented 5 years ago

Great idea, I like AS-N too!. if you succeed real multithread for a web language so most of developers will find a great interest to it. But I still not catch if the browser is the limit or not

ghost commented 5 years ago

Adobe AIR would be more important as a first target, because people will be able to directly take the compiler and produce apps with it (probably with some package manager).

ROBERT-MCDOWELL commented 5 years ago

ok anyhow there will be always bridge between air and web app.

ROBERT-MCDOWELL commented 5 years ago

here a nice blog about code optimization https://jacksondunstan.com/

ghost commented 5 years ago

My new parser is getting quite easier to understand. I'm using combinating methods, which touch a error stack, that's in turn moved to individual script's error stack thru a final parse method.

While I was thinking on multi-threading, I solved to strip unique_ptr programming, because it messed up the language's ideas, and instead can be done with addressof plus a system-level API (if one needs to use ActionScript as if it were C++).

Overall it'll look like Swift, but based on ActionScript 3.0. E4X changes will be kinda cool.

ROBERT-MCDOWELL commented 4 years ago

more and more companies start to wakeup about the 2020 Flash deadline and most of them start to panic since they sell/use/share since 10 years and more their applications. So if you are conscious to build also a converter that will convert transparently Actionscript2/3 to Vegey and are really strong to write a consequent language manual focusing syntax diferences between As and Vegey so your language will have a chance to survive. It appears that now most of language teams are targeting Wasm, Wat and derivative as embedded container for web, non web to replace all downloadable app for mobiles and plugins for web browsers on pc like.

ROBERT-MCDOWELL commented 4 years ago

My suggestion: fork ruffl and create a new module called As3 native so you will be free to have an already big community with high interests. The only thing you should respect is the As3 language, and for sure add new write options. This way the language itself will be able to add new classes and functions.

ROBERT-MCDOWELL commented 4 years ago

Maybe you can ask the question to the ASC2 git project? I'm sure they will answer quickly.

ROBERT-MCDOWELL commented 4 years ago

it's an alternative yes, just never forget, the most simple to do is usually harder than to do complex in an easy way.

ROBERT-MCDOWELL commented 1 year ago

@ghost how are you? long time didn't hear you!