Posted
over 16 years
ago
GSoC Mentors Summit in all glory, but all sessions and no hack made drax and me dull boys… enter Skidbladnir to bring joy to life!
After a day of slow sessions, me hacking on Abraca, while drax hacking on a new web 2.0 client we decided that enough
... [More]
was enough, time to get some collaboration going.
I actually came up with the idea a really long time ago, while Service Clients was just an vague idea in the minds of drax, theefer, and the wanderers.
As I live in Sweden, home of the fast Internets, I know that a whole lot of people would be very happy if their favorite music player had easy access to, everyones favorite, The Pirate Bay for getting more content.
A typical scenario would be that I was playing some song by Timbuktu, and my music player would automagically notice that I’m missing that new single that Timbuktu, one of Swedens most popular artists, officially released first to the world on The Pirate Bay *hint hint hint all other artists* and then present a link to that torrent for me to click on, and download using my favorite torrent client.
This feature is so hot that ALL XMMS2 clients should have it, thus we wanted to do this as a Service Client.
So late saturday afternoon just before we left Googleplex I started to update the xmmsclient python bindings to match the Service Client branch my student had written during GSoC. Meanwhile drax was working on getting his webclient ready and some helpers to count string distance between Freebase data and some mock Pirate Bay torrent names. Due to jetlag my evening ended early for me, but when waking up somewhere around 3AM I had a great message from The Pirate Bay waiting for me about getting early access to their upcomming webservice API. The rest of the sunday was spent frantically hacking the python bindings so that we could have a running demo before I had to leave for the airport and it worked! Around 2.45PM we made the first working request from the service client and I ran to the bus.
So to summarize what this client does:
Register as a service client that accepts an artist (string) as argument.
Accept request.
Find albums by artist in medialibrary.
Find albums by artist in Freebase.
Find albums by artist in The Pirate Bay.
Subtracts the albums in medialibrary from the albums returned by Freebase.
Calculates string distance from what’s left of Freebase result with The Pirate Bay result to get good names pointing to correct but crappy torrent names.
Return a list of albums missing in the medialibrary by some artist, with links to download.
Right.. and the name Skidbladnir refers to the ship of Freyr that sails the Scandinavian intern^H waters with fair wind, and folds easily into ones pocket.
[Less]
|
Posted
over 16 years
ago
It’s time again for the annual Hackaton where a heap of creative people meat up and bash their heads against their keyboards until something cool comes out. Be there, write the code, spread the source…
Details can be found at the official page here.
|
Posted
over 16 years
ago
PTSD, I miss google…
I want to go back…
I want to hack…
take me back…
|
Posted
over 16 years
ago
Got a new laptop at work yesterday, the long awaited ThinkPad X200.
Hands down best laptop ever. Everyone should throw away their old crappy laptops and get this one, or the X200s. I’ve started writing a page over at ThinkWiki on how to install Debian on it.
|
Posted
over 16 years
ago
I’m still waiting for nesciens’ conclusion notes about his very successful project, Collections 2.0, but he’s been busy with his starting university so it will take a few more days.
In the meantime, I wanted to write a wrap-up post about this year’s
... [More]
mildly successful Google Summer of Code with XMMS2. Out of 6 projects, we’ve had 3 successful projects and 3 failed ones. That’s a pretty high and disappointing failure rate to be honest. You always have to be prepared to face unplanned obstacles, but it got a bit out of hand this time.
It is especially frustrating as the projects were all pretty sexy or important, or both.
The long-awaited Generic IPC project seems to be one of those cursed projects that nobody manages to get done. We ran that project last year but it was not finished in time, so Leonid Evdokimov (darkk) took over this year, but he wasn’t able to complete it either.
We had been lucky to get an extra slot to run the S4 project, an experimental new backend for the medialib optimized (in structure, space and performance) for the specific semantics of our data (basically, short property strings attached to objects). Unfortunately, Tobias Bengtsson (ydo) got more busy than expected with his master thesis and a major hardware failure put an end to his hopes of completing S4.
The last failing project was probably the most original/experimental: cloudstream, or a smart blend of xmms2 local music playing and last.fm’s social & semantic information, allowing to play “local radios” of your tracks using a sexy graphical cloud interface. We were especially excited as it had come as a spontaneous suggestion by the student, Arpith Siromoney. Sadly, only little code was produced; we hope that the idea will live on and end up being implemented in one way or the other!
On the brighter side of things, the three other projects were a great success and we hope to include them in the -devel tree and the main release ASAP.
Daniel Chokola (puzzles) worked on getting Ning Shi (zeegeek)’s Service clients (which I mentored for GSoC ‘07) ready for merge. He reworked the concept a bit (operations involved, atomicity of registration, etc), gave the API a refresh and rebased the tree onto the latest -devel releases. From early on, it had also become clear that it would all be nicer with the result/value-split refactoring that had been discussed for some time. Nobody had time to hack it up so I did, and I worked closely with puzzles to update service clients to use the new code and giving him a hand cleaning up the server-side and IPC layer. It’s now a good showcase of the cool new xmmsv_t API!
The first project I mentored was nycli, also referred to as “the new korving CLI”, a new CLI client for XMMS2 in C that I had started to take over from my previous C client, nyello. I had run out of time to work on nycli but Igor Ribeiro de Assis (greafine) did a great job taking over the code, improving it and completing all the missing features and adding some of his own: commands to interact with the playlist, collections and server actions, support for subcommands, file path globbing, interactive status command, and the super cool aliases!
The second student I mentored, Erik Massop (nesciens), hacked heaps of new features into Collections (my GSoC ‘06 project): new operators (incl. Order, Limit, generic comparison, Token, etc.), server-side source preferences, support for medialists (ordered collections), new query mechanisms allowing aggregates, functions on values and more complex results, conversion of all values to strings, optimized prefix matching, etc. Here come Collections 2.0!
As an organization, we acknowledge our failure at choosing students able to complete their projects in full and in time. We had a much better success ratio in the previous editions, so I guess this year is a combination of bad luck and small defects on the part of mentors and students.
Next year, I’d like us to improve communication between mentor and student, and also between the GSoC participants and the XMMS2 community. Status updates on the planet, clearer project descriptions, better linking throughout the wiki, etc. I’d also like to focus on working on a stricter list of objectives, roadmap and deadlines with the student, to help us keep track of progress more formally. I think we already had a pretty good selection process, but that might be improved too.
Nevertheless, I’m very happy with the students I mentored (nesciens, greafine, and puzzles unofficially): they all showed dedication and genuine interest in their projects, they were very open to criticism but also ready to provide arguments and new ideas to make solutions more elegant.
I look forward to seeing the GSoC code merged in official releases; it has sometimes taken longer than we would have liked in the past, but nycli and service clients should make it to your Git tree in the near future. Collections 2.0 still need review and tests, but the possibilities are already quite exciting!
Congratulations to all the successful students, thanks to Google for sponsoring this program, and let’s make it even more successful next year! [Less]
|
Posted
over 16 years
ago
Here is the conclusion post by Igor Ribeiro de Assis (AKA greafine) about his nycli project (new command-line XMMS2 client) which I mentored for this year’s Google Summer of Code, with XMMS2 of course!
As Google Summer of Code is finishing I would
... [More]
like summarize my experience working on the NyCLI for XMMS2.
Looking what have been done and comparing with my application I would say things went pretty well. Most FIXMEs have been fixed (well some new appeared too :-|), collections and server commands implemented and subcommands help done.
Now come the coolest things (to implement and to use), new status mode is a simple player with basic controls, configuration file support and last but not least and in my opinion the coolest, alias support. It’s really rewarding when you write ‘stop ; playlist clear ; add $@ ; sort ; play‘ and it works. Let’s call this alias ’scap’ then to change the current playlist and start play something new I just do:
In nycli-shell:
nycli> scap artist:The\ Gaslight\ Anthem AND album:"The '59 Sound"
Or
$ nyxmms2 scap artist:The\ Gaslight\ Anthem AND album:"The '59 Sound"
And it’ll clear the playlist and start playing songs by The Gaslight Anthem ordered first by year then album then track number as ’sort’ is an alias for ‘playlist sort -o artist,date,album,tracknr‘.
My mentor (theefer) was really great in helping me: answering my questions, reviewing my code, finding bugs and making me focus on doing things with high priority first. I would like to thank all the xmms2 community too.
Some things I’ve learned are: the xmms2 api, glib, git, that code review is good and
The bad thing is that GSoC is over, the good thing is that I can continue coding, to quote my application "From this project I expect ... to dive in the open-source community ... continue to contribute/stay in the xmms2-community", and this really happened, now I'm more motivated to keep coding as there are still cool things to be done: virtual paths, collparser extensions, auto-complete, service clients support, etc.
To finish, I would say the current version of nycli is in a good state to substitute current CLI, and that all this experience was NICE!
--
Igor Ribeiro de Assis / 2008-08-25
I’d like to add my own congratulations to greafine, whose project was very successful!
Gonna write my own wrap-up post about this year’s GSoC soon, but I first want to publish the summary of the other project I mentored, “Collections 2.0″, by nesciens/Erik Massop. RSN. [Less]
|
Well, it's not really over, but yesterday, the 18th, was the last day of coding for Google Summer of Code students. Service clients are 90% done as of this writing, and it shouldn't be hard to get the other 10% done in a day or two, plus some
... [More]
bugfixes. But deadline or no deadline, service clients are a sugary-sweet feature that XMMS2 really needs, and I will be hacking on them for a long time to come.SoC certainly solidified a few lessons about the real world for me. Most importantly, in my humble opinion, is that money changes things. When you're coding for money, you're coding under a deadline, and it's incredibly easy to fall behind. The result/value split code that service clients depended on was supposed to be completed and merged before SoC even began. It's only now that SoC is over that the result/value split is "done" and it's still unmerged. The API for my project changed half a dozen times before I wrote a line of its code. And a myriad of personal issues took days and days of quality hacking time away from me. Lucky for me my mentor(s) were great in helping me sort out issues with the design and code, and reestablishing goals to fit the program into the summer. Thank you, nano and theefer!A sure bonus is I now have a jumpstart on understanding the result/value split code and all that it brings. Since it is a pervasive change to both the client library and server-side, there's no getting anywhere without knowing how to work with it. Plus, as a member of the XMMS2 team, I'll be there after SoC to help merge, document, and answer questions.Now with the finish line in sight, the thought of the upcoming mergefest and eventually, users using service clients has me more motivated than ever before. And I'm filled with a sense of great pride that I stuck it out through the summer and created something I feel is worth being proud of. But for now, I'm going to play a quick round of DDR with my little sister and get back to work. [Less]
|
Well, the client-side of things is mostly done for now, so it's time I turned my attention to the remaining items. The server side of things needs to be updated/fixed and the service client manager (SCM) needs updating. The server is fairly
... [More]
straightforward, but I have some concerns about the SCM.Does the SCM record clients in its configuration when they are run? Probably not. How would it record the executable path, for example? We should find a way to make this more automatic.Provide methods to read/write SCM configuration.service_client --register #registers its configuration using above methodsThe above command can be called by waf during build to eliminate user intervention. The clients are already registered and ready for use upon installation!Can we rename the SCM's shutdown function to "kill" (and perhaps redefine its functionality) or something that can't be confused with xmmsc_service_shutdown?Can we change the default value of the "monitor" option (to check the configuration directory for updates) to true? This seems to cooperate much better with user expectations.Can we get rid of the "timeout" option (to wait before killing a service client after a shutdown request is received)? If we rename the method to "kill" its intentions will be a lot more obvious--take down the client now. [Less]
|
I've been really bad about updating this blog, I just noticed. So here's some fresh, tasty meat to dangle in front of your snapping jaws. The past several weeks were met with real life issues and coding issues, but not a lot of real code. But very
... [More]
recently I started working on the new API, and it's looking exciting!Here's the vision so far. A service client (SC) creates a new service, stored in a service_t. The SC then can add methods by giving it a name, description, and arguments, each with a name and type. There is a variadic version of this which lets one add a method at a time, and a more primitive version to add a method, then one argument at a time. This makes it easy for C programmers and binding authors alike.Here's what the data structures look like:service_t: char *name; char *desc; uint32_t major; uint32_t minor; x_list_t *methods; uint32_t ref;service_method_t char *name; char *desc; void *udata; xmmsc_service_notifier_t func; xmmsc_user_data_free_func_t ufree; xmms_value_type_t rettype; xmms_value_t *args;The data is held in value_ts whenever possible because these are the new universal type being introduced with the result/value split code. A value_t can contain any of several basic types and can be serialized and deserialized automatically. Its representation and usage is effectively the same on the client and server. Because a service_method_t must contain function pointers and user data, it has to be a struct. (How could you send a function pointer over IPC?)The next step is for the SC to call service_register and register its service with the server. Internally, service_register handles the conversion from service_t and service_method_t to representative value_ts, then sends them off to the server.A client can request any information about the service from the server using service_describe. Since the data is already conveniently encapsulated in value_t form, it is just shipped off to the client. The client can then see everything except the actual function pointers, udata, and refcount (why would it want these anyway?).Said client can use this data to figure out, say, the version of the service is within its own supported range. So the client queries a method. Let's make this more interesting with an example. We'll make a client LlamaGUI that implements support for counting llamas using the LlamaCount service.void llamagui_llama_count_get (connection_t *xc){ value_t *farms = list_new("llama_farm_a", "llama_farm_b"); value_t *args = dict_new("farmlist", farms); res = service_query(xc, "LlamaCount", "count_get", args); service_notifier_set(xc, res, llamagui_llama_count_callback);}This request is sent to the server using the provided connection xc. The server simply looks up the "LlamaCount" service and shoves the request right along to the sc. Back in the sc, the request is checked for well-formedness. Are all the required arguments there? Are they the correct types? If not, a value_t containing an error is sent back through the server to the requesting client. If so, the notifier method is called, processing the request:value_t *llamacount_get (connection_t *xc, service_method_t *method, value_t *args, void *udata){ int count = 0; value_t *farmlist; farmlist = value_dict_get (args, "farmlist"); for(; value_list_valid(farmlist); value_list_next(farmlist)) { count = llama_farm_count (value_int_get (farmlist)); } return value_new_int(count);}This starts the return trip through the server and back to the requesting client. There is one more check performed to see that the return type indeed matches the type given at registration. A service method may always send back a value_t containing an error. If the types do not match, however, an error will be returned instead of the original value_t.void llamagui_llama_count_callback (value_t *ret){ if (value_type(ret) == VALUE_TYPE_ERROR) { llamagui_error_set("Oh no! A llamacaust occurred. Error %s", value_error_get(ret)); return; } llamagui_llama_count_set(value_int_get(ret));}The LlamaGUI user gets her llama count right next to the XMMS2 playback controls and playlist of llama-friendly songs. Everyone is happy. [Less]
|
Good evening, Clarice.Finally a new XMMS2 release has arrived. This time it contains even finer meat, such as a whole bunch of new plugins and support for ruby 1.9. The XMMS2 Team would like to extend a big THANK YOU to all who have helped out with
... [More]
this release. Hope you will have as good time eating it as we had cooking it!You can obtain XMMS2 here:Release notes: http://wiki.xmms2.xmms.se/wiki/Release:DrLecterSource: http://sourceforge.net/projects/xmms2 [Less]
|