Thursday, July 23, 2009

Live and collaborative coding in Croquet


Open Croquet and Cobalt SDK are built on top of the Squeak self-exploratory environment, where everything could be modified/inspected in real time. It means that the environment is just created for live coding and interactive programming in SmallTalk.

Everything is OK, when you use just one computer with only one running vm/image on it (default for Squeak programming model).
But, Croquet/Cobalt were built for creating replicated 3D environments, which are distributed over the network, and several vm's/images running at the same time define the Island.
And so, for saving the identity of replicas of the shared Island, nobody from the participants couldn't change anything in the code in the local images. They are allowed just modify parameters had been programed earlier, or update their images using changeSets, Monticello etc. or just copy/paste the whole image.
But, if we want to program on the Island in all replicas at the same time?
For example it is often needed, when you have already run several images defining Island, but need to modify something in code, without stopping everything.
Or for collaborative coding between several programmers at the same time, forming one image, but working on it's replicas, being at different places.

The feature is missed in the current Croquet SDK (may be XPForums project for collaborative programming using Croquet will solve this, but it is closed yet).

So, as proof of "live coding" concept in Croquet we could do the following:

1. Create the new TObject or TFrame subclass, with instance method like:

TLiveCode>> compileMethod: aCodeString inClass: aClassName

Utilities authorInitialsPerSe isEmpty ifTrue:[ Utilities setAuthorInitials: 'sn'].
aClassName compile: aCodeString.


2. Add this object into the existed island (or register during initialization):

liveCodeFrame := self harness activeIsland future new: TLiveCode.
liveCodeFrame future registerGlobal: #liveCoding.

3. Then add instance method to the used harness class, like:

CroquetHarness>> makeMethodInFuture: aCodeString inClass: aClassName

| liveCodeFrame|

liveCodeFrame := self activeIsland future at: #liveCode.
liveCodeFrame whenResolved:[
liveCodeFrame futureDo: #compileMethod:inClass: at:0 args: {aCodeString. aClassName}
].

The calling of this method on any participant will leads to the equal modification of the source code in all connected Island replicas.

This proof of concept code for Croquet/Cobalt image can be downloaded here.
Experimental Seaside based ClassBrowser with support for live coding in Croquet island directly from web-browser is here (the Croquet-Seaside 2.9 imge and above code is needed to run).

Next steps could be the development of corresponding tools using existed SystemBrowser or OmniBrowser for full support of live coding/collaborative programming in the shared Islands.

8 comments:

Anonymous said...

If you're dealing with pimples, reconsider your diet plan. By eating a great deal of fried and greasy foods, your epidermis could end up creating additional oil responding. Add more new vegatables and fruits in what you eat. Attempt getting rid of packaged sugars located in sweets night clubs. For those who have any food items allergy symptoms, avoid foods that cause them! [url=http://www.xxxw12woo.info]Unu44ysed[/url]

oakleyses said...

roshe run, lululemon outlet, celine handbags, nfl jerseys, ugg, asics shoes, insanity workout, giuseppe zanotti, hollister, nike huarache, longchamp, ugg outlet, ugg soldes, uggs outlet, canada goose outlet, mont blanc pens, babyliss pro, canada goose outlet, canada goose, p90x workout, ghd, instyler ionic styler, marc jacobs outlet, beats headphones, chi flat iron, vans outlet, jimmy choo shoes, ugg boots, birkin bag, soccer jerseys, ferragamo shoes, abercrombie and fitch, valentino shoes, mcm handbags, new balance outlet, mac cosmetics, reebok shoes, nike trainers, bottega veneta, soccer shoes, canada goose outlet, north face jackets, herve leger, wedding dresses, rolex watches, uggs on sale, north face outlet

oakleyses said...

timberland shoes, ugg, ralph lauren, supra shoes, wedding dress, parajumpers outlet, uggs canada, louboutin, converse, moncler, vans, canada goose, lancel, toms outlet, coach outlet, hollister canada, moncler, links of london uk, moncler outlet, swarovski jewelry, pandora uk, juicy couture outlet, karen millen, iphone 6 case, pandora charms, canada goose uk, hollister clothing, nike air max, ray ban, air max, gucci, montre femme, thomas sabo uk, canada goose, baseball bats, hollister, moncler, louis vuitton canada, pandora jewelry, canada goose pas cher, moncler, juicy couture outlet, moncler, replica watches, swarovski uk, oakley, moncler, converse shoes

Unknown said...

1599meiqing
louboutin femme
louis vuitton handbags
ralph lauren outlet
adidas originals
tory burch outlet online
louis vuitton handbags
louis vuitton outlet
michael kors outlet
polo ralph lauren
jordan 13
nike sb
michael kors handbags
nike running shoes for women
michael kors outlet online
nike trainers uk
louis vuitton
uggs on sale
louis vuitton
ray bans
cheap jerseys
oakley sunglasses
toms outlet
swarovski jewelry
coach factory outlet
ugg sale
michael kors
burberry outlet
jordan 4
true religion
jordan concords

oakleyses said...

iphone 6s plus cases, nike trainers uk, mont blanc pens, herve leger, new balance shoes, chi flat iron, nike huaraches, bottega veneta, soccer jerseys, iphone 6 plus cases, p90x workout, oakley, wedding dresses, lululemon, timberland boots, mcm handbags, louboutin, vans outlet, instyler, ralph lauren, north face outlet, hollister clothing, abercrombie and fitch, asics running shoes, iphone 6s cases, iphone cases, mac cosmetics, babyliss, iphone 5s cases, valentino shoes, nfl jerseys, jimmy choo outlet, soccer shoes, north face outlet, longchamp uk, giuseppe zanotti outlet, hermes belt, iphone 6 cases, baseball bats, insanity workout, reebok outlet, s6 case, ipad cases, celine handbags, hollister, beats by dre, ghd hair, nike roshe run, ferragamo shoes, nike air max

Unknown said...

Coming Nike Air Max 2015 Shoes off a Super Bowl loss, the Carolina Panthers were about salary-cap discipline. General manager Dave Gettleman preached patience and measure. And when it came to making roster decisions – like letting All-Pro cornerback Josh Norman walk Nike Free Run away – everything was about the overall financial design. “You have to balance the needs of the team now with the needs of the team in cheap nfl jerseys a couple of years,” Gettleman told Yahoo Sports in June. “You have to plan. I’m very wholesale nfl jerseys methodical Nike Roshe Run and intentional about what I do [and] nfl jerseys store about the decisions we make. You have to be that NFL Jerseys way with the salary cap, because Nike Air Max 90 it’s going to cost you.”

Unknown said...

49ers jersey
ugg boots
oakley sunglasses
ralph lauren
ugg outlet
jordan 8
air max 90
los angeles lakers
nike blazer
coach outlet

mumtaz arts cotton suits said...

But, Croquet/Cobalt were built for creating replicated 3D environments, which are distributed over the network, and several vm's/images running at the same time define the Island.