SushiHangover

PowerShell, Learn it or Perish ;-)

master nix
Gitter

Git tags and PlayScript

Seems I not found a way to update the ‘upstream’ master of PlayScript without actually push the tag directly to the repo.

So first I de-reference the tags to get the matching commit SHA for the tag I need to push:

git show-ref --tags --dereference | grep play
9e82533b52d5be2f10f8c0ddacff848810b8d736 refs/tags/play-3.10.0001
a317c758ea3136347c4bc2a360c34fbacfce6d34 refs/tags/play-3.2.7
a317c758ea3136347c4bc2a360c34fbacfce6d34 refs/tags/play-3.2.7001
e97e27071414fdafba9ce95d4b7ca6c0c6da2a3c refs/tags/play-3.4.1001
cfc55b6a587eba190042045e1a686388923310b0 refs/tags/play-3.6.1001
b509d6711135bfba5b32cf3f7e2090964c67daa0 refs/tags/play-3.8.1001

That is done on my fork of the PlayScript repo as I try to never work directly on the ‘upstream’ master.

So in the case of tag “play-3.10.0001” that is not in the upstream PlayScript repo, I need to add it to the repo.

I switch the PlayScriptRedux org’s PlayScript repo that I have a local clone of and update it.

First pull the latest changes, all done through pull-requests:

git pull origin playscript

Now I can add the new tag:

git tag play-3.10.0001 9e82533b52d5be2f10f8c0ddacff848810b8d736

And finally push it to the repo:

git push origin play-3.10.0001

Total 0 (delta 0), reused 0 (delta 0)
To https://github.com/PlayScriptRedux/playscript.git
 * [new tag]         play-3.10.0001 -> play-3.10.0001

I still want to know if this is available through pull-requests somehow.

PlayScript | Exception Filters

PlayScript (.play) now has Exception Filters like C# 6.0.

These are actually really cool and nice addition to ActionScript.

From the C# Frequently Asked Questions blog:

Exception filters are a CLR capability that is exposed in Visual Basic and F#, but hasn’t been in C# – until now. This is what they look like in C#:

try { … } 
catch (MyException e) if (myfilter(e)) 
{ 
     … 
}

New Features in C# 6

And here is what they look like in PlayScript:

play/test-ps-ex-filter-01.play

package {
    public class Foo {
        public static function Main():int {
        var x:int = 4;
        try {
            throw new Error("Throw");
        } catch (e:Error) if (x > 0) {
            trace("Catch");
            return 0;
        }
        return 1;
        }
    }
}

play/test-ps-ex-filter-02.play

package {
    public class Foo {
        public static function Main():int {
        var x:int = 4;
        try {
            x = 5;
            throw new Error("Throw");
        } catch (e:Error) if (x < 5) {
            trace("No Catch Please");
            return 0;
        } catch (myError:Error) {
            trace("Catch Here");
            return 0;
        }
        return 1;
        }
    }
}

If you have any problems with them, post an issue.

Git - Resetting a file back to its conflicted state

For some reason everytime I need to do this I forget the option. Maybe it is because the help for git checkout –help does not actually provide details for “-m” option.

git checkout -m <filename>

This restores the unresolved state, including all information about parent and merge base, which allows restarting the resolution.

There is of course the –theirs and –ours options available during a checkout if a merge is underway, but those options are explained in the help and the name of the option is self-explanatory, but -m does not stick in my head for some reason….

PlayScript | Away3d Fire Demo with Scout

This is the Away3d Fire example running via Mono and Xamarin Studio using the PlayScript compiler. Fork me on github.

Away3d example source code that is running in the demo

Using PlayScript Compiler 3.2.6002:

Xamarin Studio running the Away3d Basic Shading Demo using the PlayScript compiler Using PlayScript v3.2.6002 PlayScript @ http://playscriptredux.github.io PlayScript Source Code @ https://github.com/playscriptredux Blog @ http://sushihangover.github.io/ Royalty Free Background Music: - “Across The Land" by MuLexic - http://youtube.com/user/MuLexic

PlayScript | Linux based builds now available

I have cleaned up issues for the Linux builds and they are now working properly. See the Travis CI files in the CI directory and the .travis.yml file in the root of the PlayScript repo for details.

Travis CI has also enabled OS-X builds for the PlayScript repo. Very cool company, great support and amazing that they offer this service for free to open source projects. They have a great company blog also…

PlayScript | Away3d Fire Demo with Scout

This is the Away3d Fire example running via Mono and Xamarin Studio using the PlayScript compiler and using Adobe’s Scout to profile it. Fork me on github.

Using PlayScript 3.2.6001, the Actionscript compiler for Mono, to compile and run the Away3d core and Basic_Fire demo within Xamarin Studio 5.9.x. You can see the MonoMac app connecting to Adobe Scout and sending telemetry to profile the frames, traces, ActionScript events, etc... More work needs to be done to make using Scout fully featured in profiling a PlayScript app, but this is a good start. PlayScript @ http://playscriptredux.github.io PlayScript Source Code @ https://github.com/playscriptredux Blogging @ http://sushihangover.github.io/ Royalty Free Background Music: - “Fog Rays" by MuLexic - http://youtube.com/user/MuLexic

Away3d example source code that is running in the demo

PlayScript | Travis CI enabled for repo

I have enabled Travis CI on the PlayScript repo.

FYI: While the OS-X build is running fine, the linux build is failing as it has never really been tested (in the original Zngya release or The Redux version). This has been flagged as acceptable in Travis for now.

The CI builds are generously hosted and run on Travis

Git Branch Mac OS-X / Linux
playscript master nix

PlayScript | Away3d Particles with PlayScript logo

This demo uses the the Away3d Intermediate Particle Explosions example as a base, but I reworked it slightly to use the PlayScript logo. It is running via Mono and Xamarin Studio using the PlayScript compiler. Fork me on github.

Using PlayScript 3.2.3001, the Actionscript compiler for Mono, to compile and run the Away3d core and Intermediate_PlayScriptParticleExplosion­s within Xamarin Studio 5.9.x PlayScript @ http://playscriptredux.github.io PlayScript Source Code @ https://github.com/playscriptredux Blogging @ http://sushihangover.github.io/ Royalty Free Background Music: - “Fog Rays" by MuLexic - http://youtube.com/user/MuLexic

Away3d example source code that is running in the demo

Previous Away3d example: Play Script | Away3d World Global Example

PlayScript | Away3d Intermediate Particle Explosions

This is the Away3d Intermediate Particle Explosions example running via Mono and Xamarin Studio using the PlayScript compiler. Fork me on github.

Using PlayScript, the Actionscript compiler for Mono, to compile and run the Away3d core and Intermediate_ParticleExplosions within Xamarin Studio 5.9.x PlayScript @ http://playscriptredux.github.io PlayScript Source Code @ https://github.com/playscriptredux Blogging @ http://sushihangover.github.io/ Royalty Free Background Music: - "MuLexic & Nekihirst - Sapphire Shine" by MuLexic - http://youtube.com/user/MuLexic

Away3d example source code that is running in the demo

Previous Away3d example: Play Script | Away3d World Global Example

Xamarin | A company with a cool dev sense

Any company that has a little fun with comments buried in html on their corporate web site to promote their job openings is all right by me :)

    <!--


          _      _ _       _     _         _                _                             _
         | |    | (_)     | |   | |       | |              | |                           (_)
       __| | ___| |_  __ _| |__ | |_    __| | _____   _____| | ___  _ __   ___ _ __ ___   _ ___
      / _` |/ _ \ | |/ _` | '_ \| __|  / _` |/ _ \ \ / / _ \ |/ _ \| '_ \ / _ \ '__/ __| | / __|
     | (_| |  __/ | | (_| | | | | |_  | (_| |  __/\ V /  __/ | (_) | |_) |  __/ |  \__ \ | \__ \
      \__,_|\___|_|_|\__, |_| |_|\__|  \__,_|\___| \_/ \___|_|\___/| .__/ \___|_|  |___/ |_|___/
                      __/ |                    _                   | |
                     |___/                    | |                  |_|
       ___  _   _ _ __   _ __ ___   __ _ _ __ | |_ _ __ __ _      ___ ___  _ __ ___   ___
      / _ \| | | | '__| | '_ ` _ \ / _` | '_ \| __| '__/ _` |    / __/ _ \| '_ ` _ \ / _ \
     | (_) | |_| | |    | | | | | | (_| | | | | |_| | | (_| |_  | (_| (_) | | | | | |  __/
      \___/ \__,_|_|    |_| |_| |_|\__,_|_| |_|\__|_|  \__,_(_)  \___\___/|_| |_| |_|\___|
                        _ _              _ _   _
                       (_) |            (_) | | |
      ___  __ _ _   _   _| |_  __      ___| |_| |__    _   _ ___
     / __|/ _` | | | | | | __| \ \ /\ / / | __| '_ \  | | | / __|
     \__ \ (_| | |_| | | | |_   \ V  V /| | |_| | | | | |_| \__ \_
     |___/\__,_|\__, | |_|\__|   \_/\_/ |_|\__|_| |_|  \__,_|___(_)
                 __/ |
                |___/


     xamarin.com/jobs



    -->