Hi, as many of you know, in January 2013 we started a project which played with an idea to automatically translate YCP portion of YaST codebase into Ruby. Me and Josef Reidinger worked on this and before Hack Week 9 [1] we reached a state where we were able to completely translate and run the "sysconfig" YaST module. During the Hack Week we decided to push for more. We assembled a team of 5 people (me, jreidinger, mvidner, lslezak, vmoravec) and tried to translate as much modules as possible. At the end of the Hack Week almost 60% of YaST's 150+ modules either compile to Ruby successfully, or we determined they don't need to be compiled at all (e.g. because they don't contain any runnable YCP code). I consider this a huge success. We also packaged some translated modules (e.g. "proxy" or "runlevel"). You can test them by downloading from our testing project: https://build.opensuse.org/project/show?project=YaST%3AHead%3Aruby For more details, see a video about our Hack Week project and its wiki page: http://www.youtube.com/watch?v=Bzgs1lmSKCw http://bit.ly/YPBW2Q ----- So far, the project to kill YCP was entirely unofficial. I'd like to use this opportunity to start a discussion about making it official and getting rid of YCP in openSUSE 13.1 timeframe (yes, I am that ambitious :-) From what I see, YCP is very simple and inflexible language. It doesn't support many useful concepts like OOP or exception handling, code written in it is hard to test, there are some annoying features (like a tendency to be "robust", which really means hiding errors) and YaST developers universally hate it (at least all the ones I talked to). More importantly, YCP is a language used only by YaST. This means the cost of its development and maintenance lies purely on SUSE/openSUSE. In practice, its development stagnated. There is also no community around the language and no external tools & libraries developed. As a result, every bit of code needs to be written by us and the tooling is weak. All this combined makes the cost (both financial and mental) of YaST development higher than if any other suitable high-level language was used, which limits YaST potential. Translating the code into Ruby would negate most of these disadvantages. We would be able to rely on a healthy ecosystem of tools and libraries (which are getting only better over time). There is a great pool of accumulated knowledge we can use. We would be also able to share code more efficiently with other SUSE/openSUSE projects written in Ruby, like WebYaST or SUSE Studio. We will have more flexibility in where to take YaST next. Last but not least, YaST developers would hate their jobs less :-) I think that rewriting YaST into Ruby makes sense. The Hack Week proved this is indeed doable and viable project, and my estimate is that it can be done in few months if we'll work hard enough (I can elaborate on this if needed). What do you think? ----- For the curious, the tool called "YCP Killer", which manages the translation, is available here: https://github.com/yast/ycp-killer The tool uses Y2R, a YCP -> Ruby transpiler: https://github.com/yast/y2r You can get the idea about what and how we translate from the spec (take this with a grain of salt, we want to improve the generated code *a lot* in the next weeks/months): https://github.com/yast/y2r/blob/master/spec/y2r_spec.md All this is very much work in progress, so please forgive any rough edges and lack of polish. -- David Majda SUSE Studio developer http://susestudio.com/ -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org