Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Introduction to Linden Scripting Language

CmdrTaco posted more than 7 years ago | from the fad-or-fantastic dept.

139

prostoalex writes "Dr. Dobb's Journal runs a lengthy introduction to Linden Scripting Language, the language behind avatars and their interaction in Second Life: "LSL is a scripting language that runs server-side, on a piece of software called the simulator. The simulator does just what it's name implies — it simulates the virtual world of Second Life. Each simulator runs everything for 16 acres of virtual land — buildings, physics, and of course, scripts. While you manipulate the script text in a form that is somewhat easy to read, the actual code that runs on the simulator is compiled. A compiler is a piece of software that takes the text version of the script and converts it into something that can actually run. In the case of LSL, the compiler exists within the Second Life viewer itself. In the future, it is likely that the compiler will move from the viewer into the Second Life simulators, but where the code is compiled isn't very important. What matters is that the text is converted into a form that can run on the simulators.""

Sorry! There are no comments related to the filter you selected.

Another? (1)

Ramsees (1007423) | more than 7 years ago | (#18143934)

Great, just what the world needs, another scripting language.

Re:Another? (1)

MilenCent (219397) | more than 7 years ago | (#18144626)

Actually, there are reports that they're considering moving to a more standard language, and Mono for internal representation, in a future revision.

Re:Another? (1)

pooh666 (624584) | more than 7 years ago | (#18146096)

My first thought, OH GOD NO, PLEASE MAKE IT STOP!! ARRRRGGGHHHH!!! I wonder if it will replace other lang in popularity, but "not quite" have full support for things like prepared statements in its MySQL driver. Its small "but growing" list of modules and extensions is sure to have that feature soon, meanwhile we are working on an apache module to so we don't have to rely on CGI and.... No, I didn't read TFA and I am closing my eye to yet another attempt to do it all over again..

A Way For Closed Source Scripts? (5, Interesting)

excelblue (739986) | more than 7 years ago | (#18143944)

Is this a way for Linden Labs (and possibly for others) to provide closed source scripts and objects? This seems to be a very possible thing with such technology.

What if someone only made available a compiled copy of something? It'd be scary if you can't tell what's really going on with all the stuff.

Re:A Way For Closed Source Scripts? (1, Insightful)

Anonymous Coward | more than 7 years ago | (#18144016)

If you don't trust the person writing the script with only a compiled version, why are you trusting their script at all? Having the source code to something only means that you can probably find the malicious code, not that it doesn't exist.

Re:A Way For Closed Source Scripts? (2, Insightful)

ajlitt (19055) | more than 7 years ago | (#18144746)

Who cares? Linden owns the production systems, so you're not guaranteed that execution on the simulator is one-for-one with the game.

Re:A Way For Closed Source Scripts? (2, Informative)

Yetihehe (971185) | more than 7 years ago | (#18144076)

Yes. No. Well, sort of. You can just sell or give someone an object with compiled script. If he doesn't have rights to modify script, he don't see source code.

Re:A Way For Closed Source Scripts? (2, Interesting)

makomk (752139) | more than 7 years ago | (#18146688)

Yes. No. Well, sort of. You can just sell or give someone an object with compiled script. If he doesn't have rights to modify script, he don't see source code.

In fact, he can't even see the object code. (Actually, SL doesn't let you obtain the object code for scripts even if you do have the right to modify them. Combine this with the fact that compilation is currently client-side, and just inspecting the source of a script someone gave you isn't sufficient to ensure it's not malicious - you need to recompile it, and the only people who can tell if anyone's exploiting this are Linden Labs.)

This also makes Second Life a GPL-violater's paradise (no way to prove it) - and there's a lot of people in there who don't seem to understand or care about open source or the GPL. (A particularly egregarious example - one infamous indifidual, I think it was Prokofy Neva, claimed that if a script or object was set transfer-allowed, this gave anyone the right to set it no-modify, no-resale, and sell it en masse, no matter what the conditions given with it were. There have been many others... such as the "open source" window blind script that forbidded redistribution; in fact, most of the "open source" items I've seen aren't.)

Re:A Way For Closed Source Scripts? (1)

turrican (55223) | more than 7 years ago | (#18144182)

"What if someone only made available a compiled copy of something? It'd be scary if you can't tell what's really going on with all the stuff."

MIcrosoft is gonna be jazzed! The'll want to go this route when releasing a virtual copy of Windows for use within the SecondLife game...

Re:A Way For Closed Source Scripts? (1)

AndrewNeo (979708) | more than 7 years ago | (#18144322)

Well, Linden Labs is planning on using Mono for LSL, and possibly to provide other languages such as C#..

Python and Perl Can Compile (1)

plasticsquirrel (637166) | more than 7 years ago | (#18144352)

Compilation is also very possible with Python (Freeze, cx_Freeze, py2exe, and PyInstaller) and Perl (Perl2Exe, PerlBin). I'm not sure exactly why they're reinventing the wheel with this scripting language, because compilation is not a unique feature by any stretch of the imagination.

Re:Python and Perl Can Compile (1)

maxume (22995) | more than 7 years ago | (#18144672)

The python stuff you listed isn't really compilation, they all take script files and bundle them in a file with an interpreter(python scripts are compiled into an intermediate byte code before they are executed, but that happens whenever they are run). I think the Perl stuff is the same, but I am not sure.

They create independently executable files, but they aren't compiled in the same sense as C or whatever.

JIT do? (1)

DrSkwid (118965) | more than 7 years ago | (#18144878)

Re:A Way For Closed Source Scripts? (1, Interesting)

MilenCent (219397) | more than 7 years ago | (#18144668)

In fact, as people found out recently during the whole CopyBoy ruckus, using an outside client with the game allows people to copy almost any object in Second Life, but the scripts in objects were still safe. There is no known way to get the source code off an object for which it hasn't been provided, even through decompilation, since the object code, once on their servers, would seem to reside and run there entirely.

Re:A Way For Closed Source Scripts? (1)

Zekasu (1059298) | more than 7 years ago | (#18145200)

In the actual game, Second Life, which is Linden Labs' game that uses LSL, it does allow you (and more specifically, anybody) to create a script, and make it "close-sourced." Others are not able to view your script, nor are they able to edit it, if you so choose to set it taht way.

However, you can also make it a publicly viewable script. Most people don't do that, however, because they would rather have the script they worked on remain a unique work.

I can actually see the problem created by this, "what if someone creates a malicious script and hands it out to everyone?" To be truthful, I believe this HAS happened before. It has been Linden Labs' reponsibility to make srue the scritps are safe, for the most part, and that something horrendous doesn't happen in game because of someone scripting a malicious thing.

Credit where credit is due (5, Funny)

Chairboy (88841) | more than 7 years ago | (#18143952)

Credit where credit's due, it's important to note that LSL is the first scripting language to have furry [wikipedia.org] specific classes. This is an oft-overlooked aspect of modern languages.

Arf (1, Funny)

Anonymous Coward | more than 7 years ago | (#18144252)

Doesnt the C in C# stand for Canines? Everyone keeps saying its a language to sink your teeth into.

Re:Credit where credit is due (5, Interesting)

mrcdeckard (810717) | more than 7 years ago | (#18144318)


it's funny, i just checked out 2nd life last night -- first time since a year or two ago -- and i was pretty amazed -- the place is one big car lot or sex club. really. i guess there are two kinds of people in 2nd life now -- the people selling "sex", and the people trying to sell their objects to buy the "sex".

it really was a cool online social experiment -- it only ultimately confirmed what we knew all along -- the internet is good only for porn and consumerism.

now, think about this for a second. first, it's not real sex that is drawing people. it's not even imagery of real people having sex. it's interaction of poorly-rendered avatars in a virtual world. this is a testament to the power of the sexual drive in humans, and what we decide to do with our best technology..... just a friendly reminder that yes, we are doomed.

mr c

Re:Credit where credit is due (1)

tomhudson (43916) | more than 7 years ago | (#18144396)

... and of course, the language lacks a "redeemLindenDollarsForRealMoney()" function.

Even Linden Labs now admits (after the taxman commeth ... and the online gambling investigators ...) that Linden$$$ are just play tokens, with no relation to real-world currency.

Re:Credit where credit is due (1)

vadim_t (324782) | more than 7 years ago | (#18144602)

it's not in the language, but it's on the website:

https://secure-web7.secondlife.com/currency/sell.p hp [secondlife.com]

Re:Credit where credit is due (1)

tomhudson (43916) | more than 7 years ago | (#18147368)

... and every time someone tries to cash out any significant amount, the value drops several 100 percent - there's no real float, no "market makers". Plus, with the feds getting into the whole "you can't gamble on the intarweb", they either have to shut the virtual casinos down, or completely decouple Linden$ from the real world.

Re:Credit where credit is due (1)

Ash-Fox (726320) | more than 7 years ago | (#18147618)

and every time someone tries to cash out any significant amount, the value drops several 100 percent
It's not changed that considerably for me enough to increase/decrease prices on things I sell in Second Life to pay for things in first life that have fixed monthly prices.

Plus, with the feds getting into the whole "you can't gamble on the intarweb", they either have to shut the virtual casinos down, or completely decouple Linden$ from the real world.
I don't live in the States.

Re:Credit where credit is due (3, Insightful)

MilenCent (219397) | more than 7 years ago | (#18144798)

But what is real currency? All money is fake, on a basic, fundamental level. Online games simply use faker money than usual, but with real world transactions becoming increasingly virtual, the difference between the two is becoming much more uncertain over time.

It is in the best interest of any online world to convince the government that their money is fake, since that means they won't have to subject their servers and source code to government oversight, which would ultimately make the game much harder to implement. Most games are content to let it rest at that, since they see their money as play tokens themselves.

Linden Labs is one of the first companies to realize that there is a value in allowing the public, if not regulators, to think otherwise. All L$ cashouts are probably, technically, at LL's discretion; to give players a true, real-world legal right to convert money would mean the government would ultimately start taking a hard look at them, since from a real-world standpoint they would start looking like a bank at best, and a potential tax dodge at worst.

It is important to note, though, that Linden Labs' business requires that the illusion be maintained. If they actually did refuse to cash out L$, it would shake user faith in the system. Trading between real-and-virtual money may be ultimately by permission only, but to exercise that authority would be dangerous to their business, and they seem like they're in this some degree of foresight instead of hoping to make a quick buck, so L$ are still, practically, safe to buy and sell. Mostly.

Re:Credit where credit is due (0)

Anonymous Coward | more than 7 years ago | (#18145974)

... and of course, the language lacks a "redeemLindenDollarsForRealMoney()" function.

That doesn't mean you can't do it. It's built-in to the viewer, and you can do it from the Linden Labs website. You can cashout without even logging into the game.

Re:Credit where credit is due (1)

kahei (466208) | more than 7 years ago | (#18144434)


I agree with your above post except that I would insert 'not' before 'doomed' in the last line.

If we were incapable of finding channels for commerce and amusement in new environments, then yeah, we'd be doomed.

Having said that, if people really buy sex on 2nd life, that's kind of sad. Not because buying sex is sad but because it suggests it's a less positive environment than, say, FurryMUCK was in the last decade.

Re:Credit where credit is due (1)

Blakey Rat (99501) | more than 7 years ago | (#18144472)

You used to have to go to MUDs or MUCKs to have fake sex with your anthropomorphic wolf lover, but now you can do it in Second Life with graphical avatars and animations and everything! Please kill me now!

Re:Credit where credit is due (0)

Anonymous Coward | more than 7 years ago | (#18145044)

Please kill me now!
Why not wait until they combine SL with furry teledildonic attachments?

Re:Credit where credit is due (1)

DaleGlass (1068434) | more than 7 years ago | (#18145578)

Why not wait until they combine SL with furry teledildonic attachments?


Not sure about the furry part, but it already exists: http://www.slashdong.org/ [slashdong.org]

Re:Credit where credit is due (2, Interesting)

DaleGlass (1068434) | more than 7 years ago | (#18144774)

Nah, there are plenty of people in SL which aren't in it for the porn. A significant portion of the grid is PG. There are quite a few people who use it as a chat, or because they like scripting and building.

I don't have or do anything porn-related in there, and don't spend any significant amounts of money either. So far I'm getting more out of it than I spend.

Re:Credit where credit is due (1)

notthepainter (759494) | more than 7 years ago | (#18145904)

This is the kind of SecondLife positive message that needs to get out. It is so often true and so often unsaid.

Paul

Re:Credit where credit is due (1)

Ash-Fox (726320) | more than 7 years ago | (#18146948)

I confirm what the parent poster is saying.

Re:Credit where credit is due (0)

MilenCent (219397) | more than 7 years ago | (#18144824)

it really was a cool online social experiment -- it only ultimately confirmed what we knew all along -- the internet is good only for porn and consumerism.

If it is a cool online social experiment, then it is such regardless of what the evidence produced by that experiment is. A serious argument could be made that the division between sex and the rest of our lives has only arisen since the onset of Christianity, and that SL's focus on sex is part of a natural "repaganizing" of civilization.

Well, it's a thought at least.

Re:Credit where credit is due (1)

WilliamSChips (793741) | more than 7 years ago | (#18145658)

Are you seriously saying that SL's focus on sex is something new on Internet? Even though "The Internet Is For Porn" is the most annoying and evil song to ever swim from the dank bowels of Avenue Q, it has a kernel of truth.

Re:Credit where credit is due (4, Informative)

notthepainter (759494) | more than 7 years ago | (#18145860)

it's funny, i just checked out 2nd life last night -- first time since a year or two ago -- and i was pretty amazed -- the place is one big car lot or sex club. really. i guess there are two kinds of people in 2nd life now -- the people selling "sex", and the people trying to sell their objects to buy the "sex".
This is why I started my web site http://www.secondseeker.com/ [secondseeker.com] . The parent poster is mostly right and completely wrong.

All that is easy to find is sex.

There is a lot more out there, it is just hard to find. I've spent a lot of time sailboat racing in SL. I no longer have access to a boat and I really missed it. It it the same? Certainly not. Is it better, than nothing. You bet! When I raced sailboats I was on a big boat with others, now I'm at the helm. I couldn't afford to do that in the real world.

I hate to sound like spam but if you think sex is all that there is to SecondLife, just check out my web site, you might find something to do there that interests you. (Note, the site is supported by AdSense ads, if that offends you, please don't visit, or at least don't click on the ads!)

Paul aka Seeker Gray

Re:Credit where credit is due (1)

mapkinase (958129) | more than 7 years ago | (#18147238)

You are doomed if you see your life as a materialistic roller-coaster. Then there is no essential difference between you and animal.

If you do what you are created for with recognition of that fact, then you are filling the shoes of a Human.

Re:Credit where credit is due (1)

Linker3000 (626634) | more than 7 years ago | (#18144336)

Is that anything like fuzzy logic?

Re:Credit where credit is due (1)

AndroidCat (229562) | more than 7 years ago | (#18144452)

I thought that was already present in YIFF.

Re:Credit where credit is due (1)

vadim_t (324782) | more than 7 years ago | (#18144704)

LSL has no classes, and about the most furry thing about it is the ear attachment points. Tails go on the pelvis attachment point.

Makes me wonder where do the mature bits go when you have a tail, as there can be only one object attached to every point, but that's not something I intend to figure out.

Re:Credit where credit is due (1)

grimJester (890090) | more than 7 years ago | (#18146174)

Makes me wonder where do the mature bits go when you have a tail, as there can be only one object attached to every point, but that's not something I intend to figure out.

My first thought was that you could make tails and penises joined as single objects.
My second that you could make pluggable objects with an open API to make it possible to switch tails and penises independently.
My third thought - "Hey, this could be a business idea!"

I've been on the Internet too long. The most frightening thought is that the second step corresponds to the "Step 2: ???" meme. Was that the answer all along?

Re:Credit where credit is due (1)

Ash-Fox (726320) | more than 7 years ago | (#18146926)

People already do this on Second life.

Also people tend to attach their 'sex' to their stomach attachment point.

Duh! (0)

Anonymous Coward | more than 7 years ago | (#18143954)

Duh!

What happened to Mono? (4, Interesting)

IL-CSIXTY4 (801087) | more than 7 years ago | (#18144000)

There was talk about converting the server-side scripting engine to Mono, with huge (50x) performance gains. There was supposed to be a LSL->CIL compiler at first, then libraries for other .Net languages. Has anyone heard anything about this recently?

Re:What happened to Mono? (3, Informative)

Erbo (384) | more than 7 years ago | (#18146378)

It's still being worked on, and, in fact, there have been some recent developments that have moved this work forward significantly. See this entry [secondlife.com] by Babbage Linden on the Official Linden Blog from last month for more details. It involved finding a memory leak in the Mono runtime which would have caused memory usage in the simulator code to grow unacceptably over time. LL personnel like Babbage worked closely with Mono team members to resolve this.

Has anyone.. (0)

Anonymous Coward | more than 7 years ago | (#18144004)

Has anyone written a webserver in it yet?

Re:Has anyone.. (1)

Ash-Fox (726320) | more than 7 years ago | (#18146974)

Has anyone written a webserver in it yet?
There is no socket functions in LSL. You can however accept XML-RPC requests [lslwiki.org] in a script.

As clear as mud (3, Funny)

Linker3000 (626634) | more than 7 years ago | (#18144034)

"A compiler is a piece of software that takes the text version of the script and converts it into something that can actually run."

Glad that's all cleared up!

Re:As clear as mud (2, Funny)

StarfishOne (756076) | more than 7 years ago | (#18146006)

*Compiles Forrest*

*Done*

Run Forrest, Run! :D

what a strange summary (2)

aluser (771756) | more than 7 years ago | (#18144100)

The summary quote uses 108 words to explain that there exists a compiler for this language.

Re:what a strange summary (5, Informative)

jfengel (409917) | more than 7 years ago | (#18144166)

The article isn't much better. It spends a lot of time going over what most Slashdotters already know, like what an "integer" is, and very little on what's novel about a scripting language for an interactive world (or whatever you want to call Second Life.)

Re:what a strange summary (2, Insightful)

seaturnip (1068078) | more than 7 years ago | (#18144458)

Yeah, all I'm interested in hearing about is, why is it necessary to have a special-purpose language for Second Life in the first place? Is there a good reason or is it just Not-Invented-Here syndrome? Why not use Lua [wikipedia.org] (a simple, extensible language commonly used to script games) or something instead?

Re:what a strange summary (1)

Gorobei (127755) | more than 7 years ago | (#18145136)

Right. The scripting language seems like a typical home-made C clone: Lua, Python, etc, would do just as well with less cost to all involved.

I was hoping to see a langauge that really captured the concepts of virtual worlds and actors. LSL ain't it.

Re:what a strange summary (1)

Ash-Fox (726320) | more than 7 years ago | (#18146894)

Right. The scripting language seems like a typical home-made C clone: Lua, Python, etc, would do just as well with less cost to all involved.
I'm not too sure on the memory usage of other scripting languages. LSL was designed to be compiled in bytecode (like python) and then executed in virtual machines. The maximum amount of memory a script can use (including it's bytecode) on SL is 13kb. Are you sure the alternatives would be able todo the same LSL can do within the same memory constraints?

Anything I can look at to compare with?

Re:what a strange summary (1)

angel'o'sphere (80593) | more than 7 years ago | (#18145524)

LUA is not used to script games but to script UIs of games.

LUA is a pascal like imperative (procedural) language, while LSL is basically a state machine, aka special purpose programming language.

In an interactive object world, object states and their interaction events are far easier to map to a special purpose programming language, than it is, e.g. to register a LUA function for each event you are interested in.

And bottom line, except old fashioned /. ers, no one really wants to program in pure procedural languages except he really must. Code reuse via cut and paste simply sucks to much.

angel'o'sphere

Re:what a strange summary (1)

WilliamSChips (793741) | more than 7 years ago | (#18145606)

Actually, Lua(which isn't an acronym) is a dynamic enough language that you can use their "tables"(which are the same as dictionaries/maps/associative arrays/whatever else they're called) to make working object-orientation.

Re:what a strange summary (1)

Ash-Fox (726320) | more than 7 years ago | (#18146884)

LUA is not used to script games but to script UIs of games.
Oh nos! I wrote a MUD engine that used Lua for scripting rooms, objects, mobs etc.

Now it's going to implode on itself!

In an interactive object world, object states and their interaction events are far easier to map to a special purpose programming language, than it is, e.g. to register a LUA function for each event you are interested in.
Event handlers aren't hard to add in Lua in my opinion.

Re:what a strange summary (1)

elmedico27 (931070) | more than 7 years ago | (#18144588)

Yeah, no kidding, tell us something we don't know.

Like how to get laid.

Re:what a strange summary (1)

jfengel (409917) | more than 7 years ago | (#18145798)

Join a theater troupe. Works for me.

Re:what a strange summary (1)

UbuntuDupe (970646) | more than 7 years ago | (#18144788)

Yeah, when I played SL back in '03, it was rather easy to learn LSL. If you know C++, you're basically set.

First thing I did was make a listening bug to spy on people. Hope they've handled that problem since I left...

Re:what a strange summary (1)

angel'o'sphere (80593) | more than 7 years ago | (#18145484)

The article is quite oki imho, and yes it explains what your follow up is asking: Is there a good reason or is it just Not-Invented-Here syndrome?

And furthermore I doubt that many /. ers know what the special thing about LSL is.

In short: LSL is a state machine and event based program language.

Events are what are methods in an OO language. In game objects have various standard states and standard events like "touch" and you can script the behavior for events and state changes.

Actually its a quite nice language and I would love if parts would get incorporated into Java e.g.

angel'o'sphere

Re:what a strange summary (1)

jfengel (409917) | more than 7 years ago | (#18145622)

That's what I wanted the summary to say. And I wanted the article to say what kinds of events are unique to Second Life, how event processing in LSL is different from event processing in other languages, etc.

Be careful what you wish for in wishing to add features to languages. Java, for example, already has an event model. It's not as succinct as in a language designed explicitly for it, but when you add to much to a language it makes it hard to read and hard to get started in. That didn't stop Perl, but most language designers are much happier with a minimal set of constructs that do just the right things.

Re:what a strange summary (1)

MrJozef (524740) | more than 7 years ago | (#18144424)

The summary quote uses 108 words to explain that there exists a compiler for this language.
And then still calls it a scripting language :(

Re:what a strange summary (1)

MilenCent (219397) | more than 7 years ago | (#18144970)

Scripting languages run scripts, no matter what the nature of those scripts may be. Many such languages do some degree of compiling internally, these days.

The determiner of whether it is a scripting language is not its basis, but what it does, whether it orchestrates the behavior of other objects, things like files and programs, according to what looks like a "script."

Re:what a strange summary (3, Informative)

makomk (752139) | more than 7 years ago | (#18146806)

The summary quote uses 108 words to explain that there exists a compiler for this language.

The compiler sucks. For example, when you define a vector, it generates three "float literal" instructions rather than one "vector literal" instruction. This means that 2 instructions and 2 bytes more code than necessary are generated for each vector literal in the code (similarly with quaternons/rotations). (Remember, there's a 16Kb per script limit for code+data.) As a second example, there are two types of instruction for transferring data from the stack to local/global variables - store and pop (which is equivalent to a store, followed by a drop). For one, the compiler only ever seems to use the "pop" variant, whilst for the other it always uses a "store; pop" pair (despite this being inefficient) - I've never seen a lone "store".

Also, the goto is broken - due to a compiler bug/design error, only the last jump to a particualr label actually does anything. (The code for matching gotos to labels can only track one goto for each label.) This is a long-standing and well-known bug which I doubt would be difficult to fix, yet no-one's bothered.

There are also other useful instructions which are never used (such as various dups, an instruction for setting the instruction pointer directly - making jump tables/efficient switch statements possible - and an instruction for freeing arbitrary amounts of stack quickly). The compiler never optimises anything, either. It's why I don't hold out much hope for speed improvements from Mono (and indeed, the predicted improvements mostly vanished when they started running actual LSL scripts with it.)

I'm not so sure. (2, Insightful)

maxwell demon (590494) | more than 7 years ago | (#18144112)

In the future, it is likely that the compiler will move from the viewer into the Second Life simulators, but where the code is compiled isn't very important.

Well, if it is running on the simulators, the simulated humans might be given access to it, and thus being able to script their own lifes!
Well, maybe I should try if those scripts already work on our world! :-)

Re:I'm not so sure. (1)

StarfishOne (756076) | more than 7 years ago | (#18146032)

Well, maybe I should try if those scripts already work on our world! :-)

I would like to suggest to start your experiments by looking up suitable scripts at sites about "dating", "how to meet hot women", "NLP" and so on. ;-D

the summary: intro to computers (4, Funny)

mrcdeckard (810717) | more than 7 years ago | (#18144190)


hello class, this is a COM-PU-TER. computers run a set of instructions called a PROOOGRAAAM. programs are nothing but 1's and 0's. heheheh, but we don't program in 1's and 0's, we program in a language, such as linden script. another computer program, called a com-pi-ler, compiles the script into a format the computer can understand. ok, class, this is a DISK DRIVE . . .

sheesh, i thought this was /.

(actually, it must be -- even *I* am complaining about the summaries...)

mr c

Who is this Dr. Dobb? (2, Funny)

gandracu (951016) | more than 7 years ago | (#18144192)

And why is he allowed to publish his journal if he doesn't know when to use "it's" vs. "its"?

If it controls every aspect of (Second) Life... (0, Troll)

dws90 (1063948) | more than 7 years ago | (#18144216)

Can I use it to make me that father of Anna Nicole Smith's baby?

Re:If it controls every aspect of (Second) Life... (0, Offtopic)

gardyloo (512791) | more than 7 years ago | (#18145010)

Can I use it to make me that father of Anna Nicole Smith's baby?
I can't believe your posting got moderated as a "Troll". Especially since it's currently right below the posting mentioning flying penises. I sense a fortuitous collaboration!

Not a very good article... (4, Funny)

Cereal Box (4286) | more than 7 years ago | (#18144890)

I was expecting a tutorial on how to program an army of flying penises to interrupt a virtual press conference...

Re:Not a very good article... (0)

Anonymous Coward | more than 7 years ago | (#18145036)

I'd prefer a talking penis with a katana wired up to a nuclear bomb that delivers pizza...

SL scripting = teh suq (1)

jasonhamilton (673330) | more than 7 years ago | (#18146428)

While it's been a few months since I last used SL, the scripting language leaves much to be desired.

It is EASY for someone to write a script that bogs down the server. Also scripts can be automated and self replicating. There was a problem a while back (Not sure if it's still an issue) about someone writing scripts that fly around really high (higher than a normal user can go without scripting super powers into a worn object) scanning land blocks for land for sale. It then alerted the owner of the script if anyone mistakenly setup some land for sale really cheap. It would randomly lag everyone as it passed by. The flying object was not just set really high in the sky, but also invisible. Since it moved at such speed, it took a while for people to even come to the conclusion that they even existed.

Fun stuff.

I do a pretty good bit of LSL... (3, Informative)

FishWithAHammer (957772) | more than 7 years ago | (#18145048)

...or have done, really. The language is a bastard child of C, basically. Its major problem is its lack of arrays; you have a strange construct called a list that sort of does the same thing, but I really don't know why it's there instead of arrays. LSL is fairly underpowered. What I've taken to doing is using its HTTP system, though, to ping my web server, do something, and feed it back into the game. To do anything really impressive with LSL, it does seem to take an outside server to do the heavy lifting. It's kind of fun, though...

Re:I do a pretty good bit of LSL... (0)

Anonymous Coward | more than 7 years ago | (#18145490)

Its major problem is its lack of arrays; you have a strange construct called a list that sort of does the same thing
You crazy fool, they're both linear data structures that have similar interfaces. You lose random access with lists, but you gain the ability to add an arbitrary number of elements. One could easily rephrase your sentence as:

C's major problem is its lack of built-in lists; you have a strange construct called an array that sort of does the same thing.

Re:I do a pretty good bit of LSL... (1)

WilliamSChips (793741) | more than 7 years ago | (#18145640)

Linked lists are simple enough to add to C that you can add them basically as if they were builtin. Actually, arrays in C are just a simpler syntax for pointer arithmetic. Also: Python arrays have both random access and arbitrary addition. Quis ridet nunc?

Re:I do a pretty good bit of LSL... (1, Informative)

Anonymous Coward | more than 7 years ago | (#18145794)

Also: Python arrays have both random access and arbitrary addition.
You don't get both for O(1) though. The interface can have both but you're paying for one of them. Lists you pay O(n) for random access and arrays you pay O(n) for arbitrary insertion since you need to copy the whole thing.

Re:I do a pretty good bit of LSL... (2, Informative)

makomk (752139) | more than 7 years ago | (#18146572)

You crazy fool, they're both linear data structures that have similar interfaces. You lose random access with lists, but you gain the ability to add an arbitrary number of elements.

Actually, LSL's lists do have efficient random access. The main catches are that they're immutable, which means that every time you want to change anything you have to copy the list (which is, of course, limited by LSL's 16Kb memory limit), and that you can't have lists of lists. (Also, their implementation of lists isn't particularly space efficient - each entry has to have its own heap entry, complete with a 7-byte header, and the list is an array of 4-byte pointers to the heap, giving 13 bytes/entry total overhead.)

Re:I do a pretty good bit of LSL... (1)

Ash-Fox (726320) | more than 7 years ago | (#18146812)

and that you can't have lists of lists.
You can, but you need to improvise slightly.

<list name> += llDumpList2String(<list that should go into this list>,"|");

Re:I do a pretty good bit of LSL... (1)

makomk (752139) | more than 7 years ago | (#18147358)

<list name> += llDumpList2String(<list that should go into this list>,"|");

Yes, but that's not so much a list of lists as a list of pipe-deliminated strings. (BTW, I don't think it would be particularly difficult for them to implement lists-of-lists - they don't have to worry about circular references due to the aformentioned immutability, the design of lists makes it easy to add lists as an item data type, and the reference counting is probably mostly implemented already.)

Re:I do a pretty good bit of LSL... (1)

PostPhil (739179) | more than 7 years ago | (#18145648)

Linden Labs chose the familiar C/C++ style syntax to make things comfortable for the greatest majority of programmers. But scripting is a high-level task, so in some cases it is more practical to use some features of more dynamic languages. There is nothing exotic about a "list" (i.e. dynamic heterogenous arrays). Quite a few languages have it, and Python in particular actually calls their version a list and is also enclosed in brackets too. At the *high-level*, there is nothing an array offers over a list, although arrays have been around longer in lower level languages and will of course run faster.

But I definitely agree about the "bastard child" part. LSL seems to have made a laundry list of requirements and then plucked the features from other languages without making it all coherent. It tries to look like a traditional static language like C, but then adds dynamic-language features without having a clean way to manage them. Their "list" isn't very flexible compared to real languages that have them, string manipulation is a PITA, and retrieving data with XMLRPC seems to be the best way to actually store any data. Worst of all, the scripts don't always react to stimulus in a timely manner or at all. It's sometimes hard to tell whether the script is buggy, the function has been disabled by LL, or it just decided not to work, try again in 30 seconds.

Interregional physics (1)

fm6 (162816) | more than 7 years ago | (#18145088)

Each simulator runs everything for 16 acres of virtual land -- buildings, physics, and of course, scripts.

I've never done 2nd life. What happens if you stand at the border and throw a rock into the next region?

OK, I guess there's probably some handoff mechanism. But I have to say that I find the "physics" of 2nd life disappointing. In the real world, there's an enormous cost in time and energy in moving stuff from place to place. That's an important part of our economy. In 2nd life, they've gone to a lot of trouble to create a serious economic system — but you can still wave your hands and move around arbitrarily — even fly.

Re:Interregional physics (1)

DaleGlass (1068434) | more than 7 years ago | (#18145262)

Objects get frozen as they're transferred to the next region then resumed when they get there.

But I don't understand why would you want completely realistic physics. Some amount of physics is a good thing, as it allows for example creating realistic vehicles. But SL is its own world, there's no reason to impose limitations on it that don't have a reason to exist in it. The things that make the world more fun get added, the ones that don't, don't.

Re:Interregional physics (1)

fm6 (162816) | more than 7 years ago | (#18145772)

I'll say it again, then give up: having a cost to moving things in space and time has economic impact. Second life places a big emphasis on economics.

Re:Interregional physics (2, Insightful)

DaleGlass (1068434) | more than 7 years ago | (#18145878)

So?

SL has a service based economy. There isn't a shipping industry in SL because it isn't needed. But there are plenty services being offered. If you pay me enough L$ I could script something for you. There are people who will build custom objects, draw graphics, make custom avatars, etc.

RL physical constraints aren't needed in SL to have an economy. Time still is money. Skill still takes effort to develop.

The RL constraints gave us the RL economy, the SL constraints result in a slightly different one. There's no reason why the RL world is the only way of having an economy.

Re:Interregional physics (1)

edschurr (999028) | more than 7 years ago | (#18147310)

Well, that may be a good thing. I'd love a complex and familiar economy, but there is a potential problem in implementing such an economy into a computer game: the most boring thing in MMORPGs is the grind. If transporting goods is a grind then who needs it. But if such an activity were scriptable it might work. However, I don't know what sort of economy emerges when robots do all the boring stuff.

Never played Second Life, btw.

Re:Interregional physics (1)

swordgeek (112599) | more than 7 years ago | (#18147338)

You've made a good point, but now you're hanging onto it as if it is The Truth, without doubt.

The game is, in fact, a game. In many ways it's a simulation of real life, but not in all ways. Since there are no physical constraints, there are no 'essential' rules. Gravity? Optional. Shipping costs? There's nothing to ship, therefore no costs required.

Having a cost to move things in space and time DOES have economic impact. So does NOT having a cost to move things in time and space. You're deleting one real life modeling variable in your simulation. That makes it less authentic as a simulation, but may in fact lead to such things as the exploration of pure skill-based economies.

Think of it as experiment: What could things be like if we didn't have that constraint? It's worth playing with, even if just for
fun.

Re:Interregional physics (1)

Nappa48 (1041188) | more than 7 years ago | (#18145294)

ITS A FREAKIN GAME!
Its not meant to recreate the laws of physics exactly, if it did, it would never be as popular as it is (becoming).
We wouldn't be able to do all the neat things a "world with no boundaries" should allow if it was the same.

The matrix isn't for a little while yet, just be patient...i'm already taking the necessary steps >_>

Re:Interregional physics (1)

fm6 (162816) | more than 7 years ago | (#18145790)

ITS A FREAKIN GAME!

Gee, thanks for clearing that up. BTW, do you know who's buried in Grant's Tomb? That's always confused me.

Games have rules, and the choice of rules is what makes the game interesting or boring. By leaving an important economic factor out of an economic game, Second Life has made itself rather less interesting.

Holy crap what happened to DDJ? (1)

Tim Browse (9263) | more than 7 years ago | (#18145210)

I turn my back for a couple of years and they're publishing articles where the authors find it necessary to explain what types like integers and floats are?

Re:Holy crap what happened to DDJ? (1)

Bill, Shooter of Bul (629286) | more than 7 years ago | (#18145812)

Yeah, I was thinking about checking old DDj out to see if its worth subscribing again. Thanks for saving me the trouble slashdot!

Re:Holy crap what happened to DDJ? (1)

edschurr (999028) | more than 7 years ago | (#18147354)

This article doesn't seem to be in the print version of DDJ.

Using print publishing delays for web articles... (1)

sstamps (39313) | more than 7 years ago | (#18145252)

The LSL Wiki http://www.lslwiki.com/ [lslwiki.com] went down permanently in mid-January when a new, more stable wiki was started as a part of the official Linden Lab Wiki http://wiki.secondlife.com/ [secondlife.com] .

In its defense, it did say it was a "primer", targeted at beginners. Chances are, it was lifted from the SL book itself.

LSL has a lot of limitations, some of which can be gotten around. However, the biggest issue is that LL is constantly breaking crap in their futile effort to scale their unscalable grid design to support the "millions of new residents" brought in from all the hype.

Re:Using print publishing delays for web articles. (1)

Ash-Fox (726320) | more than 7 years ago | (#18146770)

However, the biggest issue is that LL is constantly breaking crap in their futile effort to scale their unscalable grid design to support the "millions of new residents" brought in from all the hype.
Only thing I've noticed they've broken is the online detection when you query the dataserver (which isn't something that's used in the majority of scripts anyway). Other than that -- I really can't think of anything else.

Care to enlighten me?

Frist p5ot (-1, Flamebait)

Anonymous Coward | more than 7 years ago | (#18145358)

want them there. REASONS WHY ANYoNE Need yEour help! playing so it's

I get it now (0)

Anonymous Coward | more than 7 years ago | (#18145546)


A compiler is a piece of software that takes the text version of the script and converts it into something that can actually run.



So that's what a compiler does\ldots

BTW, it is Linden Lab, not Linden Labs (1)

notthepainter (759494) | more than 7 years ago | (#18145944)

Really, there is no 's' in the name of the company that created Second Life.

It is Linden Lab not Linden Labs.

Pau aka Seeker Gray

yeah give SL access to your bank account... (1, Interesting)

Anonymous Coward | more than 7 years ago | (#18146302)

I just signed up with SL - I notice they want some heavy access if you are using paypal...

PAYPAL BILLING AGREEMENT FOR PREAPPROVED PAYMENTS

                  This Policy was last modified on August 1, 2006

1. General Agreement between Buyer and Merchant
A merchant with specific transactional needs may ask you to enroll in a PayPal Billing Agreement. When enrolling in any Billing Agreement with a Merchant, you are giving that Merchant permission to access funds from your PayPal account according to arrangements made between you and the Merchant. If you enroll, you are giving the Merchant the ability to charge your PayPal account on a one-time, sporadic, or recurring basis until you cancel the specific Billing Agreement from the PayPal website. PayPal facilitates the transaction between you and the Merchant, but does not enforce contractual obligations for payment from you or for delivery of goods or services by the Merchant. Any grievances may be addressed according to PayPal's Buyer Complaint Policy.

2. Waiver of Advance Notice
When a merchant charges your PayPal account, and PayPal withdraws funds from your bank account, you have the right to insist on 10 days' advance notice before the payment is pulled from your bank account. This is designed to protect you as a consumer from insufficient funds charges. By signing up for this Billing Agreement, you are agreeing to get this advance notice only when your total payments to a merchant exceed the billing limit. At any time, you may set another funding source as your preferred method of payment or you may disable your bank account entirely from all Billing Agreements. To do so, please click the 'Edit Funding Sources' link below or access your account profile.

3. Specific Billing Agreement
Each Merchant must secure your acceptance of the Billing Agreement independently. Each Billing Agreement is only effective for the single Merchant with whom it was entered into.

4. Funding Source Use
When the Merchant charges your PayPal Account, PayPal will always attempt to withdraw funds from your PayPal balance first. If funds in your balance are insufficient, PayPal will look for and attempt to charge a Preferred Funding Source that you have set up for a specific Billing Agreement. You will have the option to select a Preferred Funding Source during enrollment, and can update or deselect this Preferred Funding Source at any time through the PayPal website. If the Preferred Funding Source fails (for example, a credit card expires), then PayPal will use other available funding sources within your PayPal Account. You will have the ability to disable funding sources for use with all Billing Agreements, with the exception that if you have one or more credit or debit cards linked to your PayPal account, then at least one of those cards must be enabled for billing. You will be able to disable or enable funding sources for use with all Billing Agreements both within the enrollment flow, and from the Account Profile on the PayPal website.
                 

Second Life employs Leisure Suit Larry? (1)

Pluvius (734915) | more than 7 years ago | (#18146328)

And to do all of the world scripting, no less? No wonder that place is full of perverts!

Rob
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?