Friday, April 24, 2009

Some Seed updates

I haven’t blogged much recently, but I put a lot of work in to Seed this weekend and thought I would discuss some of the changes. New imports system First I should note that the design of this is pretty much lifted from gjs, and the two implementations should be compatible. I do however think, it’s a very cool system, even if a bit unorthodox. People who have used Seed would recognize that the two primary methods of importing things are Seed.import_namespace("Gtk") For importing libraries and native modules and Seed.include("bla.js") for importing files. This however was pretty ridden with problems, notably: Importing GI namespaces had no sort of cache, so multiple files including eachother can’t all import the namespaces they need, one central file would have to import them all and the others rely on that No search path for native modules The including files, was merely evaluating the file in the context which was called, which could create a lot of scope issues, in particular when you have a lot of complex interdependencies in what files need from what. So the new imports system works like this, and remedies most of these problems. There is a toplevel imports object, which itself has a “gi” property (the imports.gi object) which handles importing libraries handled by introspection, and has a pretty simple set of semantics, notably the first attempt to access imports.gi.NameSpace will return the module object for that library, and subsequent attempts will return the same object. You can set imports.gi.versions.Namespace to a value to force GI to require that version of the library, so importing a library might now look like. imports.gi.Versions.Clutter = "0.8"; Clutter = imports.gi.Clutter; Gtk = imports.gi.Gtk; The exciting part is really the handling of native modules and files, there is an imports.searchPath property which is set to an array of directories used to search for files/modules. An attempt to access imports.name will now look for “name.*” in search path, and behave as follows: If the found file is a native module, import it and return the module object If the found file is a regular file, attempt to evaluate it as a JavaScript file in a new context, and return the global object for that context. Unless the file has already been imported, then return the global object from the last import If the found file is a folder, return a special object which works like the “imports” object for that folder So, importing files is now much nicer, i.e. BrowserView = imports.browser.BrowserView and then you could access the toplevel contents of the file “browser/BrowserView.js”, through the BrowserView object. This has a lot of advantages, notably any file that needs anything in BrowserView can do this, without having to worry about scope, or overlap with other files that might include it. All in all I think this is a really big improvement to the maintainability of large programs, and makes it feel like there is much more of a real module system. In addition this should make it pretty possible to port GNOME Shell to Seed, and this is something I will be looking in to. OS module There are a lot of low level unix functions not provided by GLib, which might still be useful under Seed, and to that account I’ve taken to reimplementing a large subset of the python “os” module, attempting to preserve semantics where it makes sense, for familiarity purposes. This should be nice for increasing the scope of where Seed is useful, but it’s really boring work…which should hopefully be finished over the next week or so. Canvas The canvas module has a pretty large subset of canvas implemented now, and properly handles saving/restoring state. I’m hoping to implement gradients and a few other missing things within the next few days. DBus I am still working on DBus bindings, this is slow work, and will be done eventually :P. A lot of work got done recently though, and hopefully should be ready to go in GIT soon. New Release After these changes, the goal is to put out a release within the next few days, as soon as someone can find time to update documentation, all the examples, etc… On top of this there have been all the usual bugfixes, optimizations, and small features, so I definitely encourage anyone interested and using the last release to start investigating GIT. There will be a lot more reorganization of the builtin functions (on the Seed global object) over the next few days, with the goal of eliminating (or eliminating for most code) the requirement of this object, and I suppose this will break most code out there, but I think it’s definitely necessary changes for presenting a more “mature” interface in a sense.

" in crowd" to feel cool?

Most of the time becoming popular is very important especially to the young generations today, popularity is very important to them. becoming popular means fitting in the current "in crowd" is cool. many people think that being part of that particular crowd or doing what you see a lot of other people doing makes you cool. definitely its not true. because what is cool to you may not cool to others. be yourself all the time because pretending or imitating someone else is not good and not comfortable.

Wired

Connectomics aims to map the atlas of the brainWHEN last years Nobel prize for chemistry was awarded to the discoverers of green fluorescent protein, the pages of newspapers (this one included) lit up with photographs of brainbows. Jeff Lichtman, the neurobiologist who created those pictures, had used the discovery to invent a way to tag nerve cells with genes whose products fluoresce green, red and blue. By mixing these three hues in different proportions he was able to paint the cells in question in more than a hundred different colours. Besides looking pretty, the resulting pictures allow the numerous protrusions of individual nerve cells that connect those cells together to be followed through the labyrinth that constitutes the average brain. Dr Lichtman hopes to use his brainbow mice to answer questions about neurological development, such as why the nerve cells of babies have far more connections than do those of adults. That could shed light on what happens when the wiring gets connected wrongly and, as it were, blows a neurological fuse. Such faulty wiringconnectopathies, in the jargonmay be the underlying explanation of such disorders as autism and schizophrenia.

Monday, April 20, 2009

Short Fiction on the Undergraduate Experience

Continuing the ideas from my last post: the following is an excerpt from a project I did for an undergraduate "writing for teenagers" course. Our assignment was to write the first chapter of a book (not the book itself, mind you) which could be marketed to high-school students.My first chapter, incidentally, was determined to be too "complex" for teenagers to understand, and was judged to contain "too many references."I'll let the story speak for itself. (It speaks best in Firefox; it'll look all jumbled in IE.)******************** When Miriam had been in sixth grade, her parents had let her attend a camp for young gifted students. At the time, Miri had loved it; even the goofiness of the icebreakers and the other organized events like Pie Fight and Pajama Day. Now, however, she felt ridiculous. She had just finished writing in her journal about Orientation Week, the oddly-chosen name for the four days before classes officially began in which first-year students were subjected to all kinds of team-building torture inbetween mini-seminars on important details such as How to Use the Library. The 120 residents of Bryson Hall had all had to run through an obstacle course, sing the Name Game Song, and then sit quietly while a university staff member explained to them how their meal plan worked. Miri hadn’t known exactly what to expect, but she hadn’t expected this. She had, she supposed, expected something along the lines of Dead Poets’ Society, where intimidatingly charming professors engaged bright young intellectuals in stimulating discourse about life, truth, and the hidden secrets of literature. Of course, Dead Poets’ Society was actually about a prep school. This, however, had never appeared in any movie or book about college life that Miri could remember – the experience of being told how to do everything, from using an online card catalog (with which Miri was already rather familiar) to making new friends (Risa had already divided the third floor into clusters, and at the end of each day the clusters met for a few moments to talk about their experiences and play more goofy games). In the meanwhile, there seemed to be continual candy. The RAs were practically plying them with candy. In cluster meetings, every time a resident was able to call anyone else by her correct name, Risa threw that person a Tootsie Pop or a Mini-Snickers. Candy and ice cream and freezer pops – it was still much too warm in the un-airconditioned dormitory. Miri was baffled, and more than disappointed. She had applied to college, but found herself back in summer camp.(Yes, before anyone asks, she's got the same name as my cat.

Saturday, April 18, 2009

The shape of chocolate's future

Many of us grew up on Cadbury's chocolate and are familiar with the story of Willy Wonka and his chocolate factory. However, it is a little known fact that Cadbury's own early years were not unlike Wonka's in that they had a highly sensitive factory where no workers ever entered and only the most gorgeous chocolates came out. Even more surprising is the fact that the factory is still there and continuing to produce a very limited supply of chocolate exclusively for the most elite members of our society. Due to continuous inbreeding the factory is now seeking new blood. Eight men and women, four of each sex, will be allowed into the factory to work in a breeding programme to try to inject new life into what is now a very tired workforce. The quality of the chocolate produced has slipped and it is said the Her Majesty The Queen of England herself has visited the factory to see what has gone wrong. The lucky people selected, in exchange for their use in the programme, will live a life of luxury and ease, with the finest chocolate literally on tap.

The nationality of those that join the programme is not important. Just as deep love of chocolate in all its many forms and a willingness to breed more chocolate workers. Would you be interested in applying for one of the 8 posts? Are you a fertile chocaholic? This is a one day only opportunity so get your applications in.

Where's the bookcase?

When I go into someone's house I always look to see if they have a bookcase or at least some books lying around. I am finding that this is a rarer sight these days. 52' plasma screens, racks of DVDs, but few books. Of course they may have them hidden where I don't see them. But I wonder. Do you have books in your house. Do you read?

The Grammys - And We Don't Care

I remember back around 1980 or so, The Go Go's were nominated for a Grammy Award. None of my punk rock friends nor I really cared about this dubious mainstream honor, but at the same time, it was an indication that lots of people out there noticed what you were doing.Belinda Carlisle is pictured above standing next to a cardboard cut out of Elvis Costello, one of two punk rock era artists to actually win a Grammy Award. EC however won his Grammy in 1998, a good 20 years after the punk rock fact and he won it for Best Pop Collaboration With Vocals for a recording he did with classic pop master Burt Bacharach.Needless to say, although I believed that perhaps the Go Gos were one of punk's Grammy winners, a search of the Grammy website for past winners turns up ZERO for notable punk rockers, many of whom are in the Rock n Roll Hall of Fame and museum of discarded leather pants.I remember the Go Gos Grammy thing pretty vividly because a few weeks later, at one of my annual April Fools Parties (for those of us born in that month), Plimsoul Peter Case, (an April Fool himself) who was at the time dating Go Gos guitarist Charlotte Caffey described to me the whole hanging backstage at the Grammys experience which included a chance meeting with The Killer, Jerry Lee Lewis who had recently recovered from open heart surgery and was there downing beers like water.That brings me to remind you that last year, Peter Case was nominated for a Grammy in the FOLK category for his fantastic album Let Us Now Praise Sleepy John. Peter also is recovering from recent open heart surgery (he wrote about it in his own blog on petercase.com, so I'm not revealing a secret, and if you'd like to send him your well wishes, you should drop by his blog and leave a note)Blondie were nominated early on - the track "X Offender" from their debut eponymous album received a nod but not the statue. I also could have sworn that "Call Me" won some kind of Grammy... but perhaps it too was just a nominee.Much to my surprise, platinum selling artists Joan Jett and Billy Idol are also absent from the Grammy winners list! And so are the Ramones who are however in the Hall of Fame.Another Hall of Fame punk rock artist that doesn't show up in the Grammy winners list:The PretendersIt boggles the mind. Well, my mind at any rate.The Clash long form video "Westway to the World," directed by Don Letts, who was Mick Jones's partner in Big Audio Dynamite and an important figure in UK punk rock was a 2002 "Best Long Form Music Video" winner. But that award went to Letts, who for all the great work he's done, including the documentary Punk Attitude, seems to ignore the contributions of California punk rock, or at least think of us as an afterthought.Green Day, who wear their admiration for the Ramones on their collective sleeves, have won three Grammys - in 1994, 2004 and 2005... in dubiously important big categories. Well, good for them... but... but... but... what about the artists who influenced them, and moreover, made the airwaves safe for the Green Days of the world?No respect I tell ya! But it really really doesn't matter and I don't care. I don't think anyone should care either. Who wants acknowledgment from a body of people whose taste you don't agree with?I will not be watching the Grammy Awards tonight. Whatever you do tonight, have fun.

Thursday, April 16, 2009

Punk + Elks Lodge Doesn't Always ="Riot"

A full year before the notorious and legendary Elks Lodge Riot, there were indeed completely successful punk rock gigs held at downtown LA's Elk Lodge -- and by successful, I mean no police interruptions.One such set of gigs include the February 24 and 25 benefits for The Masque at the Elks Lodge.Many of the artists who performed are featured in today's photos (none of these pix are from the Elks Lodge show, however).F-Word's Rik L Rik and Darby CrashThe DilsBlack Randy and Dickies guitarist Stan Lee (both bands performed)Dianne Chai of the Alley CatsPatricia Morrison aka Pat Bag, of The BagsJohn Doe and Exene of XThe success of 1978's Elks Lodge shows compared to the bloody battle between punk rockers and cops a year later is a hint at why I think that 1979 was a bad year for punk rock, despite everything cool that was happening... getting on the radar definitely had its down side...

Wednesday, April 8, 2009

Legs Weight Loss

If you want to workout your legs you have to do it right. Doing it right also means doing the right exercises. Think of your legs as your foundation. If they are weak your ability to walk, run, jog, hike and so on will be limited. By strengthening them you increase your abilities to do all of those things.

There are so many leg exercises you can choose from but my two favorites are squats and lunges. Either exercise can be performed with dumbbells or straight bars, the choice is yours, but I find there is less stress on my back when I use dumbbells.

The squat routine is very popular among all who workout with weights and the exercise is performed just as it sounds. You squat down by bending at your knees until the tops of your thighs are parallel with the floor and then you slowly lift yourself back up to a standing position. If you are doing this exercise with dumbbells you will hold one of equal value in each hand. In other words one hand should not have twenty pounds while the other hand is holding thirty pounds, and both hands should always be holding weights.

With the weights in hand perform the squat just as described above, slowly lowering yourself by bending at the knees and then slowly raising yourself up back to the standing starting position. Never do more weight than you can handle and always perform the exercise to failure, meaning your body could not possibly do one more repetition of the exercise.

If you would rather use a straight bar the exercise is done exactly the same way except you place the bar behind your head and on your shoulders. If you use this method make sure you use a spotter (someone that watches you and helps you if something should go wrong). One way is not better than the other in regards to muscle development, it is more or a preference.

If you would rather do lunges to build your legs then you would be choosing another excellent routine. The way a lunge works is you alternate each leg lunging forward. Again I use dumbbells for this exercise but you can choose either method of dumbbells or straight bar.


As with any weight training exercise you do, you should start off slow to prevent injury, always move slow during all the movements and have a spotter near by to give you a hand when necessary.

Saturday, April 4, 2009

zyoh

zhonyin,oh ,oh