Experimental v78g now up! [MONKEY NEWS]

Monkey Forums/Monkey Programming/Experimental v78g now up! [MONKEY NEWS]

marksibly(Posted 2014) [#1]
Hi,

Just uploading v78g - nothing too spectacular, just a few fixes 'n' tweaks...


XNA MOJO_AUTO_SUSPEND_ENABLED forced to false for non-windows builds.

Updated Ted so bmk src file arg is quoted, ie: you can use rebuildall.bmx in a monkey install with spaces in the path!

Fixed XNA/WinRT async surface loading bugs.

Kludged transcc to fix issue with xcode not recognizing changed data files. Maybe. Works here anyway.

Fixed winrt music volume bug.

Trailing ';' removed from Content-Type headers in MServer. MServer version bumped to 1.1 - has worked pretty well!

Made FirstNode, LastNode public in Map.




Xaron(Posted 2014) [#2]
Thanks Mark, great! :)


paulscottrobson(Posted 2014) [#3]
Good stuff :)

I am a bit puzzled what 'First Node' and 'Last Node' would mean in respect of a Map. I'm still a newbie to Monkey, this is a Hashtable isn't it ?


computercoder(Posted 2014) [#4]
Thanks for the updates Mark :)


Nobuyuki(Posted 2014) [#5]
hmmmmm, I wonder if having access to the map nodes will let us write extensions to the map that let us traverse (or sort) it using alternative methods....


AdamRedwoods(Posted 2014) [#6]
re: map nodes.
when using maps and iterating over the map.Values() i was getting high execution costs when profiling on android. this was due to a double-loop around the map.Values iterator. well, the object enumerator was creating and calling 2 constructors per loop, so pulling the node outside of the double-loop helped reduce those costs.


Sammy(Posted 2014) [#7]
So this will basically allow for an alternative map iteration method without the need of an object enumerator?


Samah(Posted 2014) [#8]
@paulscottrobson: I am a bit puzzled what 'First Node' and 'Last Node' would mean in respect of a Map. I'm still a newbie to Monkey, this is a Hashtable isn't it ?

The nodes in a Monkey Map are stored as a sorted binary tree based on the key.


ziggy(Posted 2014) [#9]
How do you compare the key? Does it have to implement any interface like "comparable" or anything?


Samah(Posted 2014) [#10]
@ziggy: How do you compare the key? Does it have to implement any interface like "comparable" or anything?

Extend the Map class and override the Compare method.

Edit: To be honest, I think this is a terrible change, because it exposes the implementation. The developer shouldn't care about nodes, and if they do, they should really be rethinking their own code.


marksibly(Posted 2014) [#11]
Hi,

> Edit: To be honest, I think this is a terrible change, because it exposes the implementation. The developer shouldn't care about nodes, and if they do, they should really be rethinking their own code.

I'm not 100% thrilled with it myself, but it only involved making 2 methods public, (next and prev were already public, added first and last) and, on Android at least, I think it's a valid request to be able to iterate through any container without having to use 'new'.


CopperCircle(Posted 2014) [#12]
Hi, I have just tried 78g and xcode is still not recognizing changed data files... :(


golomp(Posted 2014) [#13]
Thank you Mark !


marksibly(Posted 2014) [#14]
> Hi, I have just tried 78g and xcode is still not recognizing changed data files... :(

[edit]
Actually, just retested this and it appears to be working fine.

How are you building? I'm using 'F8' in Monkey IDE, and then switching to xcode to build/run the app.

How are you updating files? I'm just 'touching' the bouncyaliens.data/alien1.png with a paint app.

Also, just noticed you are using 10.8 - any chance you can upgrade to 10.9/latest xcode? Yes, it's a pain, but stuff changes very quickly on the Mac.

Can anyone else confirm this is broken/working?
[/edit]


marksibly(Posted 2014) [#15]
> I am a bit puzzled what 'First Node' and 'Last Node' would mean in respect of a Map.

Check the docs!

> I'm still a newbie to Monkey, this is a Hashtable isn't it ?

No, it's a balanced binary tree - ie: it's sorted.


CopperCircle(Posted 2014) [#16]
Hi, I am also just compiling in Monkey IDE and then I build/run in xcode, the project I am currently working on uses lots of .json files, so I updated one of them built and run and it did not update in the xcode project. As soon as I delete the build and start fresh its fine.


marksibly(Posted 2014) [#17]
> I updated one of them built and run and it did not update in the xcode project.

Not sure what to suggest - it's all working fine here now after 78g update. I added a little test.json file to bouncyaliens and xcode recognizes changes to it fine (as long as I hit F8 in Monkey IDE *after* changing the json file and *before* switching to xcode of course).

IMO this is really an xcode bug, as tests indicate transcc *was* updating the data file (and timestamp appeared to be updated too) but xcode wasn't recognizing it. I 'fixed' this by making transcc delete the existing file before copying the latest version.

Can you verify this is happening on your machine too? ie: after a file edit and F8 update, the xcode project data dir should contain the same file as the monkey project data dir. File timestamp should also be updated.

I also strongly recommend upgrading to OS 10.9, as it's possible my fix may only work on 10.9.

I could revert the entire 'update data dir' fix I guess (or for xcode only at least), but I'd like to at least be able to reproduce the issue first before doing something so drastic, and right now I can't.

Again: can anyone else confirm this is broken/fixed?


CopperCircle(Posted 2014) [#18]
I have a stupid sealed MacBook Air with a tiny 60Gb drive, I can't upgrade to 10.9 at the moment as there is not enough free space! I will try and clean it up to free some space and install the update ASAP. Thanks.


Difference(Posted 2014) [#19]
Again: can anyone else confirm this is broken/fixed?

I'm on Maverics, using v78g and latest xcode.
My XML files does not get updated when I edit them.
If I delete the .buildv78g/ios/data folder, and then press F8 in TED, then compile in xCode, all is good.


marksibly(Posted 2014) [#20]
> My XML files does not get updated when I edit them.

Argh, I give up! Will add a #SYNC_PROJECT_DATA var.


Difference(Posted 2014) [#21]
Argh, I give up! Will add a #SYNC_PROJECT_DATA var.

Hugs



CopperCircle(Posted 2014) [#22]
Thanks Mark :)


marksibly(Posted 2014) [#23]
> Hugs

Awww, thank you!

I just uploaded v78h. This has the new 'data sync' feature disabled and you will need to use: #FAST_SYNC_PROJECT_DATA=True to enable it. But you probably shouldn't for ios projects. But it works for me. Anyway, 'off by default' is probably the way I should have done it in the first place.

Can you guys confirm that ios builds work again with v78h?


CopperCircle(Posted 2014) [#24]
Great, v78h is working fine now on my mac. Cheers :)


Difference(Posted 2014) [#25]
Fix confirmed , thank you!

Details:
If I enable #FAST_SYNC_PROJECT_DATA=True , edit a svg from my data folder in Adobe Illustrator, press [F8] in Ted, change is not detected.
If I don't enable #FAST_SYNC_PROJECT_DATA, the change is detected.