Page 47 of 138

Re: Progress

Posted: Thu Jan 06, 2011 7:45 pm
by DaddyHoggy
Praise be the removal of Wonkiness!

Oddly enough, I think some of what you said made sense too - although not uniquely from a JS point of view...

Re: Progress

Posted: Thu Jan 06, 2011 10:17 pm
by JensAyton
Somebody on Twitter wrote a tool for mapping the dependencies between Objective-C code modules, so now we have a handy map of the source code to help us orient ourselves. This should make things much easier!

Re: Progress

Posted: Thu Jan 06, 2011 10:52 pm
by DaddyHoggy
Ahruman wrote:
Somebody on Twitter wrote a tool for mapping the dependencies between Objective-C code modules, so now we have a handy map of the source code to help us orient ourselves. This should make things much easier!
:shock: :roll: :) Your idea of much easier and mine are somewhat different - that's spaghetti junction on an acid trip!

Re: Progress

Posted: Thu Jan 06, 2011 11:06 pm
by JensAyton
I particularly like the arc that kinks off in a random direction and then doubles back on itself near the top left. I think GraphViz just gave up after ten minutes.

Re: Progress

Posted: Fri Jan 07, 2011 7:22 am
by Killer Wolf
well i just get a blank pdf so i've no idea what you're talking about :-/

Re: Progress

Posted: Fri Jan 07, 2011 8:38 am
by Eric Walch
Ahruman wrote:
I particularly like the arc that kinks off in a random direction and then doubles back.
Or the OOJSQuaternion that is placed in the center to show its 'importance'. There are a lot of lines heading to it from the east and suddenly they see "Quaternion", get a headache and decide to bypass that station.

PS. I had to zoom in quite far to even recognise there was text written on the picture. I probably need a monitor as used in football arenas to get the whole picture. :wink:

Re: Progress

Posted: Fri Jan 07, 2011 11:10 am
by JensAyton
Ahruman wrote:
…an end to the terrible plague of wonkiness.
I forgot to mention a semi-practical consequence of this: the instanceof operator now works properly. The various isFoo entity properties cover most cases where this would be needed, but there it is.

Re: Progress

Posted: Fri Jan 07, 2011 11:19 am
by JensAyton
Killer Wolf wrote:
well i just get a blank pdf so i've no idea what you're talking about :-/
Here it is as a JPEG zoomed out to 6 % – 3116×607 pixels.

Re: Progress

Posted: Fri Jan 07, 2011 12:10 pm
by Zieman
Eric Walch wrote:
Ahruman wrote:
I particularly like the arc that kinks off in a random direction and then doubles back.
Or the OOJSQuaternion that is placed in the center to show its 'importance'. There are a lot ow lines heading to it from the east and suddenly they see "Quaternion", get a headache and decide to bypass that station.
Didn't spot that back-doubling arc, but another one, a little left of OOJSQuaternion caught my eye.
Tried to follow the arc to both ends, and to me it looks like the start point is RingEntity and destination ShipEntityScriptMethods. But as the brilliant NoGrip slogan goes: "It's not the destination, but the drive there", this arc looks like it really is a ring racer in a race - starts with swerwing around OOSelfDrawingEntity and OOShaderProgram, continues wobbling between OOJSQuaternion, OOJSCall and OOJSVector (barely missing OOJSCall), then changes its direction ~90 degrees (seems to sober up at the same time) by executing a tight loop before continuing relatively straight to ShipEntityScriptMethods. :)

EDIT: P.S hope the Cthulhu reference is only for the .PDF - wouldn't want the ultimate horror creeping in Oolite... :shock:

Re: Progress

Posted: Fri Jan 07, 2011 5:00 pm
by Kaks
Ahruman wrote:
  • Kaks “made fuel price slightly more variable”, I’m not sure what that’s about.
I know, I know! :)

"In trunk the fuel price has been affected by the ship's mass for a while. The formula that calculates the actual price has been tweaked to be more proportional to the ship's mass."

Re: Progress

Posted: Fri Jan 07, 2011 5:02 pm
by JensAyton
It turns out that the prototype chain fix has a less esoteric effect: previously, you could call methods on the constructor of a singleton instead of the singleton instance itself, which no longer works.

Huh?

Examples of this are PlayerShip vs. player.ship and System vs. system. There is never a valid reason to refer to PlayerShip in code, and in 1.75 it won’t work. Don’t use PlayerShip.dockedStation, use player.ship.dockedStation. For System, the correct usage is (and always has been) that you use system to refer to the current system, and System to call methods dealing with other systems – specifically the three methods listed under “Static Methods” on the [EliteWiki] System reference page.

Code that gets this wrong has always been incorrect, and in 1.75 it won’t work.

Re: Progress

Posted: Fri Jan 07, 2011 5:04 pm
by DaddyHoggy
Did I detect a silent stamping of a foot there? :)

Re: Progress

Posted: Fri Jan 07, 2011 5:13 pm
by JensAyton
DaddyHoggy wrote:
Did I detect a silent stamping of a foot there? :)
No, not really. I just wanted to be absolutely clear that it’s everyone else’s fault and not mine. :-)

Part of the problem is that there’s no good terminology for referring to methods on instances vs. methods on constructors in JavaScript. Strictly speaking, methods you can call on a vector, say, are methods of Vector3D.prototype, while methods you call on Vector3D itself are methods of Vector3D, and properties of ships are really accessor-backed properties of Ship.prototype and Entity.prototype. This makes perfect sense if you understand JavaScript’s object model, but it’s a bit of a barrier to entry.

Re: Progress

Posted: Wed Jan 12, 2011 2:43 pm
by JensAyton
One wafer-thin deprecation… the Ship property roleProbabilities will be renamed roleWeights.

Re: Progress

Posted: Wed Jan 12, 2011 8:58 pm
by JensAyton
It turns out that confusion of System with system and Player with player is rampant, so I’ve added compatibility methods which print warnings much like deprecation handlers. These will be removed in 1.75.1.

Exception: because constructors are functions, they have a non-configurable “name” property already. System.name is “System” and Player.name is “Player”.