Difference between revisions of "User:Babbage Linden/Office Hours/2010 05 19"

From Second Life Wiki
Jump to navigation Jump to search
(Created page with 'Transcript of Babbage Linden's office hours: {| <span id="chat1"></span> |- style="vertical-align:top;color:#996666;background-color:#FCFCFC;" | [[#chat1...')
 
(No difference)

Latest revision as of 05:17, 19 May 2010

Transcript of Babbage Linden's office hours:

[18:59] Kaluura Boa: Good morning! :P

[19:00] Babbage Linden: let's give people a few minutes to turn up, then start

[19:00] Stickman Ingmann: roar

[19:00] Kaluura Boa: Splash!

[19:01] Stickman Ingmann: Been a long time since I've been able to attend any office hour, let alone Babbage.

[19:02] ZenMondo Wormser: Good Morning

[19:02] Imaze Rhiano: hi

[19:02] DrFran Babcock: Halllooooo

[19:03] Morgaine Dinova: H Babbage :-)

[19:03] Morgaine Dinova: Hiya Imaze, how goes? :-)

[19:03] Morgaine Dinova: Hi Gayathri :-)

[19:04] Gayathri Linden: hello! :)

[19:04] Imaze Rhiano: pretty good - just eating lunch same time

[19:04] Morgaine Dinova: Oh, a new one --- hi Irie, welcome to Babs' OHs :-)

[19:04] Babbage Linden: ok, let's get started

[19:05] Babbage Linden: irie's here as we were talking about bringing some of the simulator under unit test before the office hour

[19:05] Babbage Linden: but, would you like to introduce yourself irie?

[19:05] Gayathri Linden: hey irie! its late in your neck of the woods

[19:06] Irie Linden: Hi everyone, I'm Irie, a simulator developer working in SIngapore. I've been with LL since February, so I'm still new & learning the ropes

[19:06] Stickman Ingmann: Welcome, Irie. :)

[19:06] Morgaine Dinova: Greetings, Irie :-)

[19:06] Babbage Linden: but already writing unit tests, hooray!

[19:06] Imaze Rhiano: welcome to SL

[19:06] Babbage Linden: \o/

[19:06] Irie Linden: haha thanks everyone :) and it's only 6pm here, not too late

[19:07] * Gayathri Linden knows how early irie has to get up

[19:07] * Irie Linden <3 timezones

[19:07] Gayathri Linden: :) I have th epleasure of getting to work with him on another project, he's been completely awesome

[19:07] Morgaine Dinova: Are you part of Enus's pair of test-related teams, Irie?

[19:08] Irie Linden: Morgaine: no, I write code, and unit tests are often best written by the developers who write the code

[19:08] Babbage Linden: +10

[19:09] Babbage Linden: all software engineers should be test related :-D

[19:09] Babbage Linden: ...and we're getting there

[19:09] Babbage Linden: ok, what would people like to talk about today?

[19:09] Morgaine Dinova: That's odd, because the prevailing wisdom is that the unit tests are best written by anyone EXCEPT the devs who write the code :P

[19:10] Babbage Linden: i don't think that's the prevailling wisdom morgaine

[19:10] Irie Linden: Morgaine: that holds UNLESS the tests are written first :P

[19:10] Imaze Rhiano: C# when we can see API specs? :)

[19:10] Babbage Linden: development should be test driven

[19:11] Babbage Linden: it's useful having qa defining tests too

[19:11] Imaze Rhiano: well.. you can't write flawless code - so at some point you need to stop testing and just let it go :)

[19:11] Leia Lulu: I dont think tests should ever stop

[19:11] Babbage Linden: but TDD makes sure that tests can be defined

[19:11] Babbage Linden: that the code is testable

[19:12] Babbage Linden: the difficulty with legacy code is that it's not designed to be testable

[19:12] Babbage Linden: so, it's hard to bring it under test when you want to change it without breaking it

[19:12] Morgaine Dinova: Babbage: Irie pointed out the key difference, ie. whether the tests are written first or not. If they're written AFTER then the prevailing wisdom is that the developers is the worst person to write them, since they'll just reflect the parts he knows he's addressed. But not in TDD, as Irie says :-)

[19:12] Babbage Linden: that's what irie and i were discussing earlier

[19:13] Babbage Linden: right, so irie is changing some functionality

[19:13] Babbage Linden: so, can write tests that characterise the current behaviour

[19:13] Babbage Linden: then new tests that fail that test the new behaviour

[19:13] Babbage Linden: then change the code to make the new tests pass without the old tests failing

[19:14] Babbage Linden: but, there are a lot of subtleties involved when the current behaviour is not under test

[19:14] Babbage Linden: and so the current code hasn't been explicitly written to be testable

[19:15] Babbage Linden: bringing legacy code under test is a very interesting engineering challenge

[19:15] Babbage Linden: as often you have to make some changes to bring it under test

[19:15] Babbage Linden: which you don't want to do without having tests in place

[19:15] Babbage Linden: so, there are some interesting catch 22 situations there

[19:15] Morgaine Dinova: That's an interesting observation Babbage.

[19:16] Babbage Linden: anyway, what did we want to talk about today?

[19:16] Babbage Linden: the C# API documentation was one thing

[19:16] Stickman Ingmann: C# was mentioned.

[19:16] Babbage Linden: anything else?

[19:16] Babbage Linden: I can talk about our C# demo development if you like

[19:17] Imaze Rhiano: what things have you done in last week? status update about scripting issues :)

[19:17] Morgaine Dinova: Not sure if today, but I'm going to corner you on interop, one day Babbage. Because I'm getting seriously worried that your corner (scripted objects) is going to become the main barrier to VW interop.

[19:17] Leia Lulu: I have come to ask if you have an upper limit for the memory usage of a region. I have read that 300mb is an ok upper limit.

[19:18] Babbage Linden: ok, that's a pile of things to talk about

[19:18] Babbage Linden: Rand is working on it currently

[19:18] Morgaine Dinova: \o/

[19:18] Babbage Linden: so, first up the C# documentation is still planned for this quarter

[19:19] Babbage Linden: we had hoped to be able to try it out during our demo development

[19:19] Babbage Linden: and did

[19:19] Babbage Linden: but not as much as I had hoped as Kelly know's the scripting API too well, so most people just asked him questions :-D

[19:19] Stickman Ingmann: Leia, I had that as a good script memory target too for some reason. Not sure where I got it from.

[19:19] Babbage Linden: and andres knows C# well, so people were asking him about C#

[19:19] Leia Lulu: its in teh wiki

[19:20] Kelly Linden: sorry. ;)

[19:20] Stickman Ingmann: That would explain that.

[19:20] Babbage Linden: np kelly, you've been ossm!

[19:20] Babbage Linden: \o/

[19:20] Leia Lulu: but I am not sure it is official

[19:20] Babbage Linden: so, anyway, we're going to have some explicit tasks to work on the C# documentation in the next sprint

[19:20] Object: Hello, Avatar!

[19:20] Babbage Linden: to help Rand fill in the blanks

[19:20] * Gayathri Linden is too embarassed to ask kelly or andres for help, so has some insights for rand. :)

[19:21] Babbage Linden: and then will be releasing it at the end of the quarter

[19:21] Babbage Linden: yay! go gayathri

[19:21] Stickman Ingmann: When is "end of the quarter?"

[19:21] Babbage Linden: building demos last week gave us some valuable insights in to the current API

[19:21] Morgaine Dinova: How do "sprints" work in LL?

[19:21] Babbage Linden: for example, C# uses doubles internally by default

[19:22] Babbage Linden: and casting to floats all over the place to pass to the LSL API was painful

[19:22] Babbage Linden: so, that's some API feedback we already know about

[19:22] Babbage Linden: hopefully we'll get lots more when we release the API

[19:22] Irie Linden: end of the quarter should be sometime early July?

[19:23] Babbage Linden: by the end of June is what we're hoping for

[19:23] Babbage Linden: next up, status update

[19:23] Babbage Linden: we spent last week building C# demos to test the API, documentation and sandbox

[19:24] Babbage Linden: and have some excellent demos to show people and learned a lot

[19:24] Babbage Linden: want to talk about the current performance numbers kelly?

[19:25] * Imaze Rhiano tickles Kelly

[19:26] Kelly Linden: sorry

[19:26] Morgaine Dinova: Irie: do any of your tests deal with performance?

[19:26] Kelly Linden: one of our tests is a bit too good for C#

[19:26] Kelly Linden: taking 9s to do 100k iterations where LSL takes 13s to do 100 iterations

[19:26] Kelly Linden: so we are trying to figure out why

[19:26] Irie Linden: Morgaine: nope, just functionality

[19:26] Kelly Linden: since that is a bit suspicous

[19:27] Kelly Linden: Our best test so far is NSieve prime number finding

[19:27] Kelly Linden: it has the right amount of lists / array optimisation to really show off what C# helps with

[19:27] Kelly Linden: The test in C# takes about 0.22s and 344 bytes of memory to find prims up to 2048

[19:28] Kelly Linden: In LSL we see either 18.0s and 16k of memory for the lists or a memory optimized version that only uses 8k memory but takes 160s to complete

[19:28] Morgaine Dinova: Irie: better get some perf tests added too. Babbage is currently fighting attachment rez/derez performance issues, and I'm sure Babbage would have loved perf tests to have shown the problem internally before the residents reported them.

[19:28] ZenMondo Wormser: Is this LSL on the LSI or Mono compiled?

[19:29] Kelly Linden: LSL on Mono vs. C#

[19:29] Imaze Rhiano: pretty awesome :P

[19:29] * Xugu Madison can almost believe those numbers Kelly. LSL is a nightmare for doing stuff efficiently in, with all the lists created every change...

[19:29] Kelly Linden: The tests LSL versions are on Babbage's user page on the wiki

[19:30] Babbage Linden: thanks kelly

[19:30] Kelly Linden: I'll see what we can do about getting the C# versions out as well when we release the api docs

[19:30] Morgaine Dinova: Babbage: is there a low-cost way of getting the current time with microsecond resolution in scripts or in the VM?

[19:31] Imaze Rhiano: you might also want to performance test changing primitive properties, sending chat messages (and listening/parsing them) and (de)rezz objects with C# :)

[19:31] Babbage Linden: Imaze, most of that will be the same in C#

[19:31] Kelly Linden: parsing is faster using C#'s libraries (instead of LLs) but most will be the same as it isn't the scripting itself that is the bottleneck

[19:31] Babbage Linden: as it's just calling through to the same unmanaged functions that LSL uses

[19:32] Babbage Linden: some of Kelly's speedups were down to using managed .NET implementations of methods

[19:32] Babbage Linden: instead of the LSL calls

[19:32] Morgaine Dinova: Kelly: numbers needed for all these things. It's not enough to just "know it's faster".

[19:32] Kelly Linden: Right - using Math instead of ll functions for sin/cos/pow for example is a big win

[19:32] Morgaine Dinova: What you don't measure you don't really know, even when you think you do.

[19:32] Babbage Linden: which require marshalling data across the managed unmanaged boundary

[19:32] Kelly Linden: Morgaine I have numbers

[19:33] Kelly Linden: I gave numbers.

[19:33] Babbage Linden: morgaine at the moment these demos and numbers are for internal consumption

[19:33] Kelly Linden: but I have tables for all the tests.

[19:33] Babbage Linden: we'll be talking with people to decide what we want to make public and when

[19:33] Babbage Linden: so, the next area we wanted to show off was code reuse

[19:34] Morgaine Dinova: Babbage: yeah, I know. But what I'm after is some way for users to obtain high-resolution time in their own unit tests.

[19:34] Babbage Linden: to show that you could take existing C# code and reuse it in SL

[19:34] Babbage Linden: as Johnny isn't here I'll talk a bit about that

[19:34] Babbage Linden: it was a very informative excercise

[19:35] Babbage Linden: you might remember that Johnny was looking at the google doc API last week

[19:35] Babbage Linden: that looked promising as there was a C# 1.0 version of it

[19:35] Babbage Linden: but, it turned out that that version wasn't being maintained

[19:35] Babbage Linden: and nearly all other libraries we looked at required C# 2.0

[19:36] Babbage Linden: which is an interesting data point and is feeding in to our discussion as to which version we should support

[19:36] Babbage Linden: C# 1.0 is a huge improvement over LSL

[19:36] Babbage Linden: but to enable code reuse and take advantage of the C# ecosystem it looks like we really want to support C#2.0

[19:37] Morgaine Dinova: That's going to be universal, methinks. If you find C# 1.0 code out there, it'll be 1.0 because it's unmaintained.

[19:37] Babbage Linden: so, no decisions on that yet, but more discussion definitely

[19:37] Babbage Linden: another interesting discovery is that the required libraries make a big difference

[19:37] Imaze Rhiano: C# 2.0 generics are really super useful

[19:38] Babbage Linden: a lot of C# libraries require parts of the .NET framework that aren't in silverlight

[19:38] * Faust Vollmar forgot today was wednesday. >.<

[19:39] Babbage Linden: so, although you can port them to SL it's not currently as painless as I'd like it to be

[19:39] Babbage Linden: so, more discussion required there

[19:39] Babbage Linden: but, Johnny and Byron did manage to find a library that they could get working in SL

[19:39] Babbage Linden: the silverlight chess demo that microsoft developed a few years ago

[19:40] Babbage Linden: they were able to take the C# chess engine and get it running inside SL

[19:40] Babbage Linden: then wire it up to a handsome chess set they found on xstreet and build a chess game in SL that reuses an exisiting C# chess engine

[19:40] Babbage Linden: it's a very nice demo

[19:40] * Xugu Madison can hear the screams from everyone who figured out chess in LSL, already!

[19:41] Morgaine Dinova: That's cool Babbage

[19:41] Xugu Madison: that is very cool

[19:41] Babbage Linden: it's a nice demo of both AI, which is hard in SL

[19:41] Babbage Linden: and code reuse

[19:41] Morgaine Dinova: Xugu: Luddites live to scream about progress, it's the basis of their belief system

[19:42] Babbage Linden: the last demos we built show off C# language features to build development tools

[19:42] Babbage Linden: the first uses the delegate based event dispatch to build event handler profilers and event loggers that can be dropped in to scripts

[19:43] Babbage Linden: which allows tools which work like decorators in python or aspect oriented programming

[19:43] * Xugu Madison nods to Morgaine

[19:43] Imaze Rhiano: are you planning to allow reflection with C# code?

[19:43] Morgaine Dinova: Babbage: that's cool. Wasn't sure delegates were going to be usable in 1.0

[19:43] Babbage Linden: and the second uses reflection to introspect arbitrary C# code and visualize it in 3D using a physics system

[19:44] Babbage Linden: we use media on a prim to show class interfaces on prims

[19:44] Babbage Linden: then model the relationships between them as springs and use physics to lay the classes out

[19:45] Babbage Linden: then draw the relationships using particle systems between the springs

[19:45] Imaze Rhiano: OOoo....

[19:45] Babbage Linden: prims, even

[19:45] Babbage Linden: it's a very neat demo

[19:45] Babbage Linden: of reflection, C# and media

[19:46] Morgaine Dinova: Looking forward to playing with that, sounds very cool

[19:46] Babbage Linden: they're all now working and we're moving on to making videos and writing up the demos

[19:46] Babbage Linden: which again, will be internal to start with, but hopefully public later

[19:47] Babbage Linden: it's been lots of fun and we've learned a lot

[19:47] Babbage Linden: so, definitely worthwhile

[19:47] Babbage Linden: the team has been amazing

[19:47] Babbage Linden: so, that's what we've been up to this week

[19:47] Babbage Linden: the next thing was interop

[19:48] Morgaine Dinova: Babbage: a way to request high resolution time is going to be needed.

[19:48] Babbage Linden: ok, high resolution time first

[19:48] Babbage Linden: for kelly's demos we were using llGetTime

[19:48] Babbage Linden: which I think is pretty high resolution

[19:49] Babbage Linden: i'd have to check the implementation

[19:49] Babbage Linden: but I think it calls through to gettimeofday

[19:49] Babbage Linden: which is as high resolution timer as we use in the sim

[19:50] Babbage Linden: do you know kelly?

[19:51] Babbage Linden: we can look it up

[19:51] Kelly Linden: we can look it up

[19:52] Imaze Rhiano: Stopwatch.GetTimestamp() - is way to get high resolution timer in mono

[19:52] Irie Linden: i did, and you're right babbage, we end up calling gettimeofday

[19:52] Kelly Linden: we used it primarily because it is about all that is availble to LSL and it wouldn't be fair to use a different timing mechanism between anguages

[19:52] Babbage Linden: thanks irie

[19:53] Babbage Linden: so, what we have is as high resolution timing as we use on the sim

[19:53] Mojito Sorbet: Would not be fair to whom?

[19:53] Kelly Linden: sorry, I'm not doign a good job keeping up - what babbage and irie say better answers the question

[19:54] Babbage Linden: it turns out that llGetTime is a reasonable way of comparing performance

[19:54] Morgaine Dinova: Are user scripts going to be able to call Stopwatch.GetTimestamp() ?

[19:54] Babbage Linden: especially if you make your benchmark to enough iterations that it takes both versions significant time

[19:55] Babbage Linden: Morgaine, if it's in the BCL, then yes

[19:55] Babbage Linden: and available in silverlight

[19:55] Babbage Linden: ok, we have 5 minutes left

[19:55] Babbage Linden: and interop is the last thing to talk about

[19:55] Morgaine Dinova: Well on interop ...

[19:55] Morgaine Dinova: On interop, I don't really have a well-formed question to ask as yet. However, in thinking about VWRAP and where interop is going, I keep hitting my head against the fact that SL's scripting+physics environment and microthreaded VM is rather unique, non-portable, and even non-specifiable. Opensim does some basic emulation of what SL does, but is never going to provide seamless scripting interop. So I see a problem ahead for interop in your area.

[19:56] Imaze Rhiano: Stopwatch is part of system framework - introduced in .NET 2.0

[19:56] Imaze Rhiano: system namespace... :P

[19:56] Babbage Linden: imaze, look in the ECMA BCL docs

[19:56] Babbage Linden: if it's there (and not restricted by silverlight CoreCLR) you'll be able to use it

[19:57] Babbage Linden: morgaine, yes, moving scripts is going to be hard

[19:57] Babbage Linden: there isn't an obvious standard for migrating running code between servers

[19:57] Babbage Linden: if there was, we'd be using it

[19:57] * Morgaine Dinova nods

[19:58] Morgaine Dinova: It worries me

[19:58] Mojito Sorbet: Might be easier to have scripts running outside.

[19:58] Babbage Linden: we have a solution that works for SL

[19:58] Babbage Linden: and supports LSL on Mono

[19:58] Babbage Linden: our implementation isn't yet complete

[19:58] Imaze Rhiano: Mono is implement more than BCL from .NET

[19:58] Babbage Linden: it only supports the subset of CIL used by LSL

[19:59] Babbage Linden: a large part of the work required to support C# is going to be extending it

[19:59] Morgaine Dinova: The LSL and LSL emulation and the C# machinery isn't really the problem, as those bits are specifiable. But the environment has so many wrinkles, and interacts with Havok is so many "interesting" ways, that really that's forever bound to SL.

[19:59] Babbage Linden: one option would be to open source it and complete it with help from OpenSim and anyone else wanting microthreading for C#

[20:00] Babbage Linden: another option would be to keep it closed source and finish it internally

[20:00] Babbage Linden: that is a business decision

[20:00] Babbage Linden: that largely hinges on how much we want interop

[20:00] Morgaine Dinova: Babbage: that would indeed offer a solution.

[20:00] Babbage Linden: and how much help we'd get completing out microthread injector

[20:01] Xugu Madison: occurs, any indications whether the efficient scripting functions are helping reduce load yet?

[20:01] Babbage Linden: I will be outlining both options to those in a position to make the call

[20:01] Babbage Linden: but it's not my call to make

[20:01] Mojito Sorbet: OpenSim project has this funny rule about working on OpenSim after having looked at Linden code.

[20:02] Faust Vollmar: Thats a fairly standard clause if you mean what I think you mean.

[20:02] Mojito Sorbet: Well, it would make cooperative developemnt difficult

[20:02] Babbage Linden: ok, we're out of time

[20:02] Leia Lulu: Babbage, may you please address the 300mb upper limit for a region found in the wiki or when the limits will be announced?

[20:03] Morgaine Dinova: Babbage: that's very good to hear. Although I'm of the tech school that believes in giving business management only limited, forward-looking options. :-)

[20:03] Xugu Madison: thanks for hosting Babbage et. al.

[20:03] Babbage Linden: leia, I'm not sure, you should ask jack as that's his call

[20:03] Babbage Linden: ok, time's up

[20:04] Babbage Linden: thanks for coming everyone

[20:04] Faust Vollmar: Heh yeah the buisness suits are pretty much oppositely aligned to the tech geeks.

[20:04] Morgaine Dinova: Interesting chat, thanks Lindens, and everyone

[20:04] Babbage Linden: see you all next time

[20:04] Faust Vollmar: Thanks for having us Babbage & Co.

[20:04] Imaze Rhiano: thanks babbie

[20:04] Imaze Rhiano: and other lindens

[20:05] Stickman Ingmann: Thanks Babbage.

[20:05] Morgaine Dinova: Need wildcards, * Linden :-)

[20:05] Ardy Lay: % Linden

[20:05] Stickman Ingmann: It's nice to see so many Lindens at an office hour, though. Get information from a lot of sources with various expertise.

[20:06] Imaze Rhiano: [a-wA-W] Linden