Home Home > Programming
Sign up | Login

Deprecation notice: openSUSE Lizards user blog platform is deprecated, and will remain read only for the time being. Learn more...

Archive for the ‘Programming’ Category

Javascript tools in openSUSE round 1: JSHint

July 2nd, 2014 by

Node.js is not getting as much attention in openSUSE community as it’s gaining foot in development world.  Node.js is not just fancy buzz word that I just to be couple years back. There is plethora of libraries and tools that you can use for Node.js development or web-coding. I have been in this Nnode.js dependency hell (ok you can use npm if you like but if you like to make RPM-files you are in trouble) for a while but now I figured out most troubles and start using new tools! I copied most Node.js packaging stuff from Fedora as like Java Javascript is first class citizen of their ecosystem. I also added packages that were missing and updated and added and updated. (more…)

Emscripten and openSUSE: Hands on.. Hands up!

March 24th, 2014 by

Emscripten logo
I can code with javascript and I’m fairly good at it (not marvelous just brialiant!). If you have read some of my resent blog post I think in C/C++/Perl or Bash. I also have some kind of a hobby to help out with UnReal world RPG game. Mostly my part is to make it work with *nix platform (mainly Linux and Mac OS X).
As we have seen world is moving fast forward towards web. It’s the-place-to-be for everyone. There is huge potential for players just wandering around and yelling for pleasure to play UrW! So I thought let’s see if we could port SDL to javascript/Flash or something straight from same source. after tiny amount of searching I popped up Emscripten. (more…)

Is my server alive and how good is my connection

March 10th, 2014 by

If you have time to setup real solution and need something reliable test Zabbix (http://zabbix.com). Zabbix is wonderful all in one solutions for monitoring network and your hosts (servers). If you are in need of knowing how good you Internet/(W)LAN connections is then things are getting complicated. (more…)

Some news from the trenches

February 7th, 2014 by

As you might know, we are focusing our development efforts in two fronts, namely openQA and staging projects. As we just started we don’t have fireworks for you (yet) but we did some solid ground work that we are going to build upon.

Working on openQA

We are organizing our daily job in openQA into highly focused sprints of two weeks. The focus of the first sprint was clear: cleanup the current codebase to empower future development and lower the entry barrier for casual contributors, which can be translated as “cleaning our own mess”. We created some tasks in progress, grouped in a version with a surprising and catchy name: Sprint 01.

Got my mojo workin’

Up to now, openQA web interface was written using just a bunch of custom CGI scripts and some configuration directives in Apache. We missed a convenient way to access to all the bell and whistles of modern web development and some tools to make the code more readable, reliable and easier to extend and test. In short, we missed a proper web development framework. We evaluated the most popular Perl-based alternatives and we finally decided to go for Mojolicious for several reasons:

  • It provides all the functionality we demand from a web framework while being lightweight and unbloated.
  • It’s stated as a “real time framework” which, buzzwords apart, means that is designed from the ground to fully support Comet (long-polling), EventSource and WebSockets. Very handy technologies for implementing some features in openQA.
  • It really “feels” very close to Sinatra, which makes Ruby on Rails developers feel like at home. And we have quite some Rails developers hanging around, don’t we? Just think about OBS, software.o.o, WebYast, progress.o.o, OSEM, the TSP app…
  • Mojolicious motto is “web development can be fun again”. Who could resist to that?

We’ve now reached the end of the sprint and we already have something that looks exactly the same than what we had before, but using Mojolicious internally. We are very happy with the framework and we are pretty confident that future development of openQA will be easier and faster than ever. OpenQA has mojo!

The database layer in openQA

Another part that we worked on during first sprint was the database layer. The user interface part of openQA use a SQLite database to store the jobs and workers registered in the system. The connection between the code and the database was expressed directly in SQL using a simple API.

We have replaced this layer with another equivalent that uses an ORM (Object-relational mapping) in Perl (DBIx::Class). Every data model in openQA is now a true object that can be created, copied and moved between the different layers of the application. Quite handy.

To make sure we don’t forget anything, we created a bunch of tests covering the whole functionality of the original code, running this test suite after each step of the migration. In this way we have achieved two goals: we now have a simple way to share and update information through the whole system and we can migrate very easily to a different database engine (something that we plan to do in the future).

What to do with staging

Over the time, coolo had accumulated quite some scripts that helped him with Factory. Most of them are actually related to something we are doing right now: the staging projects. So in the end we basically migrated all relevant ones to github and one by one we are merging their functionality to staging plugin. We also experimented with test frameworks that we could use to test the plugin itself, selected few and we even have a first test! The final plan is to have the whole plugin functionality covered with a proper test suite, so we will know when something breaks. Currently, there is a lot of mess in our repo and the plugin itself need big cleanup, but we are working on it.

Contributions are welcome

If you want to help but wonder where to start, we identified tasks that are good to dive into the topic and named them “easy hacks”: mostly self contained tasks we expect to have little effort but we lack the time to do right now. Just jump over the list for openQA or staging projects.

For grabbing the code related to staging project, you only need to clone the already mentioned repository. The openQA code is spread in several repositories (one, two, three and four), but setting up your own instance to play and hack is a piece of cake using the packages available in OBS (built automatically for every git push).

If you simply want to see what we are doing in more detail, take a look at progress.o.o, we have both openQA and Staging projects there.

We are having a lot of fun, and we encourage you to join us!

openSUSE and GCC part 10: Distributing to other distributions than openSUSE with OBS

January 7th, 2014 by

Last time I talked about OBS and how to compile your application that you have developed with GCC. OBS is much more than just a tool for compiling openSUSE additional packages. You can also compile Debian, Ubuntu, Arch and Fedora (and couple more) but why on earth you want to do that? Short answer: because you can! Little bit longer answer: because you can and freedom is two way road. You can’t guess what Linux distribution or OS your user wants to use but you can make sure that you application is first class citizen in that Linux distribution. (more…)

Enter UnReal World RPG

December 19th, 2013 by

When I was kid Commodore 64 was big thing and I played ‘Gateway to Apshai‘ hour after hour. It really hit me. Others liked Ultimas but ‘Gateway to Apshai’ was THE thing to me. Years after C64 was gone with the wind I found world of Rogue, Omega and Nethack. Sweetest of them was Omega. Omega’s World map was big and you could do what ever you like and wander around and you didn’t have to fight all the time. As this was a long, long time ago none of those games are no more in active development but Sami Maaranen is still developing unique northern hemisphere survival game called UnReal World RPG.
UnReal World RPG 3.18beta3 start screenUnReal World RPG 3.18beta3
See bigger pictures at IndieDB
(more…)

Announcing openSUSE Education Li-f-e 13.1

December 17th, 2013 by

Get Li-f-e from here : Direct Download | Torrents | Metalinks | md5sum

openSUSE Education community is proud to bring you an early Christmas and New Year’s present: openSUSE Education Li-f-e. It is based on the recently released openSUSE 13.1 with all the official online updates applied.

We have put together a nice set of tools for everyone including teachers, students, parents and IT administrators.  It covers quite a lot of territory: from chemistry, mathematics to astronomy and Geography. Whether you are into software development or just someone looking for Linux distribution that comes with everything working out of the box, your search ends here.

Edit: We now also have x86_64 version supporting UEFI boot available for download.

(more…)

Continuing Opening YaST

December 16th, 2013 by

YaST switched to the GPL license back in 2004, but there were still a lot of obstacles to easy contributions to the project. There was a bunch of changes in the past to improve contribution to the project, like switching from the openSUSE subversion server to GitHub, generating documentation to doc.opensuse.org or having public IRC. But we are not satisfied and do even more steps to make it easy to contribute to YaST.

The most visible action in the last year was the conversion from YCP to Ruby. We found that having a special language just for YaST made some sense in the past, but now becomes useless and makes obstacles for newcomers which must at first learn a language before they can change anything. Ruby is a well known language with a nice ecosystem around including benchmarking, profiling, debugging or testing frameworks. The latest mentioned testing framework is quite important, because good test coverage allows reducing of fear from changes. For tests we chose the well known framework RSpec, so people coming from the Ruby world know it and others find it intuitive.

Related to tests are also continuous integration that tests code after each code change and automatically sends new packages to the devel project and to Factory if needed. We make our CI node publicly visible on the openSUSE CI server, so everyone can see if build succeeded and what is the reason if it failed.

We also decided to help newcomers with a quick introductory documentation. One page recently updated to reflect the current state is about code organization which helps newcomers to orient in current YaST modules. The content is a bit terse and a minority of pages links to some old tutorials and documentation, but we take care to quickly react to questions and suggestions.

Another change is deletion of the internal YaST IRC channel and now all communication happens on the #yast Freenode channel. This change really increases the chance that you catch YaST developers on IRC. Others ways are the YaST mailing list, Bugzilla, GitHub or openSUSE feature tracker.

So let’s start hacking YaST and if you find any obstacle, contact us, so we can remove it.

openSUSE and GCC part 8: RPMs and how to write them

December 3rd, 2013 by

It seems this it’s already 8 of this 10 part series of using GCC with openSUSE. This time topic is: RPM. RPM started as Redhat Package Manager and then it involved to RPM package manager (self explaining acronym like GNU). RPM packages are just files containing all the needed stuff to install application, font or something else in to openSUSE system. (more…)

We are the robots

November 26th, 2013 by

‘Welcome to Central Industrial, “We are the future”‘ is a quote from Blade Runner and now we are entering at last to future with anual European Robotics Week. When Blade Runner world is just around the corner it’s time to reveal small Robotics pet project with openSUSE and OpenCV. (more…)