February 2007

You are currently browsing the monthly archive for February 2007.

oculus

The generous Pavig Lok has provided me with a copy of the "oculus v8" spectacles - knowing that my eyesight is not getting any better, I very much appreciate the ocular enhancement. If two lenses are good, surely umpteen must be better!

In other news, Twitter is not responding to the TwitterBox in any sort of reliable way at this moment, and so development has been a little curtailed. Ah well.

The TwitterBox is now present for your delectation on SLExchange and SLBoutique (the latter was giving me gyp last night, but seems to be behaving itself properly today).

As always, the latest versions of everything are available from my main TwitterBox page.

I have also now posted the source code for my PHP Intermediary Server Thing:

twitter-control-0.1.phps

This will not I expect be of interest to the casual Twitterer, but if you were wondering precisely what it was that the Thing did, well, do go ahead and read,and it may enlighten you to at least some small degree. There are a number of comments in the code, but, in short, it reads in the contents of the POST that is sent by the TwitterBox to it, which should be of the form

user email
password
action
status

then evaluates the “action” parameter. There is a generic function to send a request to Twitter using curl, which returns the JSON data that it receives parsed into an array. (I wish more online services would agree to return data in the JSON format.)

Notes On The Process Of Obtaining The Owner’s Proper Twitter Identity

The script makes it easier for users by only requiring them to enter their email address, which Twitter requires for the login procedure. Knowing the Screen Name of the owner is very handy for the TwitterBox, though, and in future I hope to use the ID number as well for nefarious and disgraceful purposes.

The TwitterBox gets round this by exploiting the two following facts:

  1. Upon an update, Twitter sends back information regarding the last post made by the user, including username and user ID number;
  2. Twitter will not post an empty update, but will still send information back.

Therefore, when it receives a “get id” action, the control script tries to make a blank update, which does nothing except returns information about the last post made. The script then takes the user’s screen name and ID number and sends them back to the TwitterBox, which remembers them. Thinking about it now, I suspect that if the person has actually not made any tweets at all, this may not work. Hmm.

Notes On The Process Of Updating (or “Twittering”)

As mentioned above, updating with either a blank or real entry returns information on the last post, including the time that it was created. The control script checks this - if it is before the time that it sent the request, it assumes that there was a failure to post and says so. Otherwise it says “OK”.

Notes On The Process Of Checking For Tweets

When checking for recent updates, the script pulls together all of the tweets that it receives into the format:

screen_name
text
relative_created_at (this is the “about 4 hours ago” part)
created_at (converted into UNIX timestamp format)

up to a limit of 1500 characters, which is about all that LSL will accept as the body. (The http_request event will allegedly accept 2049 bytes, but the header seems to take up a lot of this.) Note that it will not include a partial tweet if the length goes over the limit. It then sends the compiled tweets back to the TwitterBox. Actually, even restricting the number of tweets sent to 1500 characters, one still does get a satisfactory number of tweets.

If you read the LSL script for the TwitterBox itself, and you understand LSL of course, you will see that it is the box itself which actually decides which tweets to announce, if any, filtering them on the criteria “must not be posted by the owner’s screen name” and “must be after the last tweet that I announced”. The PHP script does not store any screen names or requests or any such thing, and it would have to make two requests to Twitter to be able to filter on screen name, which would be an extravagance. The TwitterBox itself is quite capable of doing this.

I actually find the way that the TwitterBox operates when displaying updates more convenient than using an External Instant Messaging Client, as the latter won’t tell one what nonsense one’s twittering friends have been blithering whilst one has been away - whereas upon entering SL now, I am immediately (or at least quickly) brought up to speed with the latest trivialities. Hah! What say you to that, Corporate IM Giants? Stop blubbering, Yahoo, it really is unseemly, stiff upper lip chaps.

Things For The Future

The next version of the TwitterBox will hopefully possess a few new features:

  • option to automatically post a SLurl for the user’s location after every tweet (in tinyurl format, of course, SLurls can take up the whole of the tweet by themselves);
  • automatic notification of other TwitterBox users in the vicinity, and the option to add them to one’s friend list (this one might cause a little difficulty in practice, though I have a few ideas, and is probably going to be entirely useless anyway, so is the least likely to happen);
  • an easier method of entering the username and password and generally configuring the TwitterBox;
  • changing the sound and adding a more visual alert;
  • the option of automatic updates on certain events (e.g. an automatic “has logged in” tweet on entering SL);
  • anything else that isn’t too difficult.

Do bear in mind that all of these things are “coming very soon/in the next update” in the Linden Lab sense i.e. may or may not appear at all.

Right. After a frustrating evening of trying to deal with all sorts of issues relating to Second Life, mine own Hosts and Twitter itself, it seems that the TwitterBox version 0.1 is now ready for release, and I have placed an open copy in my freebie box - available in the usual place.

I have put up a permanent Twitter-related page from which you should always be able to get the latest version and/or news. It also contains a link to the TwitterBox Basic, an LSL-only client that can only post, not receive tweets.

I may write further on the matter but for now I must retire.

Update: Now available on SLExchange.

Update: and SLBoutique too.

Updated: versions of the TwitterBox are now available for public consumption - see the main TwitterBox page, or subsequent journal entries.

I mentioned in my last entry the subject of using HTTP Basic Authentication in LSL. (For those of you not familiar, this is a simple and not very secure method of restricting access to a web page via a username and password.)

From further investigation I have come to the conclusion that “using Basic Authentication in LSL” would be a very short article, because the fact is that one does not seem to be able to do it at all. It is quite simple to send the username/password in an external request, all one has to do is send the following header as part of it:

Authorization: Basic user_pass_base64

where user_pass_base64 is the base64 encoding of “username:password”. However, the LSL function llHTTPRequest does not appear to allow one to add new headers, and prefers to do them all itself; Authorization (dratted Colonial spelling) is not one that it provides a hook to.

Why was it that I was interested in this? Well, I have had some recent experience of an Aethernet Service known as Twitter, a very simple system for distributing short messages about what you are doing at the moment (or about anything, really) and also, of course, for reading other people’s updates. Think of it as the most minimal sort of “blogging” system imaginable. Updates can be made and read not only on the Web, but also via or sent to one’s Portable Telephone (for free I might add) or on out-of-SL Instant Message systems.

As well as simply the challenge of implementing this inside Second Life, I am interested by the potential that exists for this to be used as a system of automatic communication. Say, for example, one has a security device which instead of informing you via IM or email when it has expelled an intruder. Twitter will keep an archive of all of these notifications, and if you wish one might subscribe to it, as could any interested party; one could monitor it on the Aethernet or via Telephone or through any other mechanisms developed in the future.

(This sort of thing is often termed a “mashup”, a word which makes me think of some sort of brewing procedure, but I prefer the old-fashioned term “laziness”. It is far easier to have other people do the hard work of setting up a system, providing phone access and so on, than it is to do everything oneself - and being lazy in this case also benefits others who might wish to do similar things to you, as long as you make your methods known. Socially-beneficial idleness, well, things do not get much better than that, surely.)

Anyway: Twitter requires that one authenticate any requests to it via Basic Auth, and I was unable to do that in plain LSL, so I simply created an intermediary - a PHP script which could receive username, password and command from somewhere else, and send it on to Twitter, returning appropriate data formatted for use in SL. This has certain privacy implications, but at the moment anyone wishing to use this will have to trust that I am not saving their email address and password. I can guarantee that it only stores the information for a tiny fraction of a second, but if you do not trust the security of my site, well, I suppose you could host the script yourself, or just not use it.

At the present time, Twitterbox 0.1 posts and receives new friend post notifications adequately. Saying an entry on channel 282 (”too-whit-too-whoo”, a rather pathetic construction but sort of memorable) sends a message, and it checks every minute for updates. I shall release the full script and PHP intermediary when I have put in some of the other functions that I am interested in, for example, a system whereby anyone coming nearby within SL wearing the Twitterbox HUD announces their user ID to your Twitterbox, giving you the option to add them as a friend. Perhaps something to automatically send SLurls to Twitter. Or similar.

For the meantime, anyone wishing to read my pointless twitterings can add ordinal to their own list. If anyone would like to help me test the above-mentioned social functions I would be obliged if they would let me know.

hare, dormouse, hatter and teapot
Above: Lindens move the asset database to a new server

Yesterday it was certainly the case that sim crossings and the simple and time-honoured practice of “moving about” were causing much consternation. I spent some time trying to fix multiple occurrences of trams in Caledon, so as not to overly offend a distinguished visitor.

‘Once upon a time there were three little sisters,’ the Dormouse began in a great hurry; ‘and their names were Elsie, Lacie, and Tillie; and they lived at the bottom of a well–’

‘What did they live on?’ said Alice, who always took a great interest in questions of eating and drinking.

‘They lived on treacle,’ said the Dormouse, after thinking a minute or two.

‘They couldn’t have done that, you know,’ Alice gently remarked; ‘they’d have been ill.’

‘So they were,’ said the Dormouse; ‘VERY ill.’

I must warn all users and purchasers of devices such as the .45 Shansi that there is an issue currently with llParticleSystem, that it does not reliably turn on and off. The muzzle flash in automatic fire for the Shansi, for instance, will not turn off when the trigger is released. I am sorry for this. It was not predictable and will certainly be fine very soon, I am sure. For that matter, even simple particle-turning-on scripts do not appear to work properly, though I am told that the First Look client is not so vulnerable.

Alice did not quite know what to say to this: so she helped herself to some tea and bread-and-butter, and then turned to the Dormouse, and repeated her question. ‘Why did they live at the bottom of a well?’

The Dormouse again took a minute or two to think about it, and then said, ‘It was a treacle-well.’

I dare say that, given that my last attempt resulted in my actually being kicked out of the world, I will not be conducting lengthy experiments, but patience, as always, will no doubt serve one well.

‘At any rate I’ll never go THERE again!’ said Alice as she picked her way through the wood. ‘It’s the stupidest tea-party I ever was at in all my life!’

“How to use HTTP Basic Authentication via LSL” will have to wait, I am afraid.

Rawa9B4092F9Ecd5Cf4A5E395Db92A3B24C I have very little to report in terms of Progress at this time, but I can say that those of you wishing for whatever reason to observe me wittering on at even greater length than usual may be interested in reading this extremely patient interview with my good self by Miller Copeland, who writes the always-worth-reading Aethernet Periodical “In The Grid“. The subjects of my discourse are slightly different to those I usually propound upon here, which may make a refreshing change, and the piece includes an image of myself, unusually enough, not appearing to be dying of consumption. Honestly, I am completely unable to obtain such pictures myself; clearly it requires a better photographic eye than I possess.

teapot Oh honestly, what a lot of self-indulgent rot I do write at times. Do buck up, Ordinal. When Second Life hands one lemons, one makes, well, a pot of Earl Grey, and has several cups and a small slice of lemon with each. And maybe a scone. Though not one scone per cup, which would be greedy and probably result in crumbs going everywhere, and not too much clotted cream either, you little piggy.

Anyway, stiff upper lip in the face of adversity, and so on. If vehicles and things-that-move-about are not working very well, it is clearly time to concentrate on things-which-do-not-move-about for the moment. On this note I shall leave the transport airships upon which I was working (they will not go stale) and instead continue to work, when I have the time, on the holsterable version of the .455 Webley which continues to be demanded; it does actually exist, but unfortunately I am having a terrible time creating an appropriate holster for the thing, and I am too much of a perfectionist to have it simply be a bundle of prims. I wonder if I should just provide a couple of attachable versions of the undrawn pistol - a full one, one with just the grip, and so on - modifiable so that they can be added to existing outfits. It is also an appropriate time to add any other modifications I suppose.

Oh yes, and the dratted swordstick, I should finish that as well for release. I was also working on some animations for a sabre based on Hungarian sabre drills, though that proved to be a bit of a challenge.

(I hope that nobody felt I was fishing for compliments or any such. It is just that sometimes, and I am sure that I am not alone in this, one does feel that one’s problems and experiences are swept under by whatever Grand Plan exists for the World, and some poor soul’s tinkering is of little importance compared to Difference Engine manufacturers coming in and holding conferences and whatnot. I draw some comfort at least from the fact that everyone will be experiencing the same and having the same concerns, prince to pauper, and also doubtless expressing them.)

(I also hope that nobody felt that I was criticising landowners for lack of prim parsimony. In my experience, everyone that I have spoken to has been very kind and enthusiastic to ease the passage of the Tram. Sometimes getting hold of them within an “avoiding Ordinal frustration” span of time can be a challenge, but if I will live in such a timezone I must expect such things.)

…that I am not the World’s greatest Complainer. God forbid.

I am sorely dissatisfied with the current state of the Universe, though. I have been absent for a little while due to OtherWorldly pressures, and I see that, on my return, everything is appalling.

Perhaps if all that one does is walk about in a small area and maybe teleport occasionally or trigger off the odd poseball or two, things are all right. I, myself, am hardly the habitual traveller. However, it takes very little to terminally disturb anyone using a vehicle. I am sitting here composing this piece on my Automated Dirigible, which takes a tour around Caledon, and every movement that it makes is jerky and awkward. Even though it is a regular physics-powered vehicle moving fairly slowly, it bumps forward at a rate of once per second, like a child’s cart kicked by the child’s friends.

This is not what I became an inventrix in Second Life to explore. When the Master of Balloon-Related Transport on the Grid, Cubey Terra (and all scripters and designers should acknowledge their debt to he and Apotheus Silverman - thank you Illyria for the correction) declares that he is grounding all of his automatic vehicles, things have gone seriously wrong.

I will be keeping up my automatic vehicles, but, you know… I grow tired. I grow tired of having to chivvy landowners to spare a few prims for the passage of the tram, gawdblessya, I won’t spend it on drink, honest to goodness. In previous ages, this was not an issue; nothing has been proposed to return this functionality, regardless of how many times I have mentioned it.

I grow tired of having my Instant Message box filled with nonsense reports from my automatic vehicles telling me how they are unable to enter a certain parcel. I grow tired of not knowing that even the simplest movement script will continue to work after I have left it.

I grow tired. And sooner or later I will fall asleep completely. I am sure that nobody will notice.

Sleep

I hereby promise to spend the time that I usually spend on reading and replying to various Journal entries across the Aethernet actually engaging in activities upon the Grid, or updating this humble effort. As much as is humanly possible, anyway.

There is a point at which one feels that endlessly arguing about things means that one in fact becomes left behind from them, becomes a commentator rather than a participant. In any case, Explosive Cuckoo Clocks will not make themselves.

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.