Good day.
I’d like to announce the completion of the gem2arch script to the 1.0 feature set. This script has several interesting features:
gem2arch sup && gem2arch -dq sup | grep -Ev "list|of|dependencies|to|ignore" | while read dependency; do gem2arch ${dependency}; doneAnyway, you can get the script here: gem2arch-1.0.tar.gz. Alternatively, you can get a git clone: git clone git://git.mercenariesguild.net/gem2arch-garoth.git
In general, the focus of this program was clear code and very simple usefulness. There is another gem2arch script on the web that predates this script, but the code was somewhat unpleasant and the old script required more work to use. This gem2arch’s in no part uses the old gem2arch’s code — it is a fresh rewrite.
I must massively credit David “davekong” Campbell for his work on this gem2arch script. I started working on this script many months ago, but lost interest (as I am apt to do…). Recently, he came along and wrote me many patches that improved the code and fixed up the rough parts. He also very graciously helped me in creating all of the side things that I was lazy with such as man pages and so forth. I also very much appreciate him beating me with a stick and forcing me to drop some of the crazier features that my original script had or planned to have. I can only do him the honour of calling him a co-author, but really, this wouldn’t have been pushed through the finish line without him. What a great guy he is to help a stranger randomly, eh?
Some of you will recall that in the past I have mentioned my work on a program called Veranda. This is an update that showcases the more-or-less complete version. Naturally, due to the nature of coding, this is already outdated… But close enough. Here is a tour.
This is the starting look. When Veranda starts up, she connects to Versaplex which gives her access to an initial database. From this database, she automatically fetches the items that go into the sidebar.
Then, if you open up a section of the sidebar and click on a row, she will attempt to do something with that row. For tables, she opens a new tab and types a query for you. I believe this query is then also automatically run.
A note, if you click on the green arrows symbol, Veranda will change the view type for you. So far, she can show the data as a proper table, a textual table, or as raw data from Dbus. More views are easily addable — things like csv may be available in the future.
Here is what the Dbus data Veranda gets looks like. Not pretty, eh? At least I already organized it for you in the other views.
If you click on a Procedure in the sidebar (or something similar to a procedure), Veranda will once again load it in a new tab. The keyword “CREATE” is automatically converted to “ALTER.” Note that this set of commands is not automatically run — the output on the bottom is from the previous slide.
And as a finishing touch, Veranda also sports a nice regular expression based, progressive sidebar search. By progressive, I mean that she searches as you type, narrowing down the list for you. Regular expressions (regex) are a programmer’s way to create a pattern that may match many different strings. In the example, Veranda is matching a table that has a name which starts with “spt,” followed by at least one other character, then an underscore, and then any amount of characters at the end. I suppose the “any amount of characters at the end” is redundant though, because that is generally implied. Oh well. Also notice that the non-regex table/ prefix helps you select which categories you want to search in. Naturally, you can regex the categories as well.
Don’t worry though. If you don’t want to learn regex, you don’t have to use it! Just typing any part of the name of the sidebar item will find it for you.
Well, thanks for looking at my program. I’ve spent a fair bit of effort on her, and I think she’s pretty nice. Some other notes: * The bottom statusbar informs you about what is happening, and in a more current version tells you whether the command you ran has succeeded. Errors from Versaplex appear there also. * All the top keys have bindings using Control. This is explained in the README. * I’ve also now added a way to go to the next and previous tab using new buttons/keybindings in a more recent version.
Hope you like it, cheers.
Hello,
Recently, I have been learning to write Vim scripts. I have some products. Read the rest of this entry »
So it seems I’m back in action, doing many things at once. Most recently, Risujin approached me with the desire to do an innovative Real Time Strategy game. Well, needless to say this is something I’ve wanted to do for a while. I’ve collected a couple friends of mine to help out, and we’re off to a good start just three days into the project.
What is Plutocracy about? We’ve been having some ideas.
General ideas: * You play as a wealthy merchant. * The game would be mapped onto a miniature planet (a sphere). You will be able to rotate the sphere pretty freely. * A balance between wealth based domination, territory based domination, and warfare based domination. Expect bribery. * You only rent land, and you can only rent land that is adjacent to land you currently control (or your ships). Expect bidding wars. * War is not declared by the player, but rather by the player’s nation on some other nation. * There are not individual land units available. The only kinds of units (thus far) are a variety of ships and perhaps an airship.
Specific ideas: * You build on shorelines using settler ships. From this, you can sprawl inwards (but remember that you can only rent adjacent land). * Nations will mostly be divided into Enemies or Neutral. Part of the game will be being able to bribe nations into wars (or stopping wars). * Design your own ships * Commodity trading & producing goods * Naval Warfare * Taking over town centers (which must be attached to docks) constitutes defeating another merchant’s town/city (and taking it over) * Expect Pirates.
Engine level: * We are building our own game engine to facilitate most of these fairly uncommon ideas. * The engine will likely have some pretty good graphics, but not tremendously fantastic physics (we don’t need them).
Development Infrastructure: * We have an IRC channel: #Plutocracy on freenode. * We have set up a code repository + wiki via googlecode: plutocracy.googlecode.com. * We will eventually have a forum probably. Remember that we’re just starting out, though. Our focus is building the game, not so much community building and fending off rabid people.
Development Status: * We’ve decided that it’ll be in C with a scripting language on top later. * We’ve completely mastered a small part of the naming conventions and agreed on a coding style. * I hear we even have a blank window open for a second or so.
Anyway, I’ll keep you updated, my sparse faithful. We don’t have anything really to show except that top image. My main responsibilities in this project will be the web stuff, organization, art, documentation, marketing, publicity, etc. You know how it is. I can do those things and have done them a lot. Besides, someone to do this kind of stuff (especially when the project is still very technical and hard to understand for “mere mortals”) is rare. I think my skills as an artist are more valuable here than my coding skills. I don’t mind, really. I like doing art-related things.
Hello,
One of the things that I have been putting a fair bit of work into recently is a new program I’m writing called Veranda. Veranda’s purpose is, in short, to provide a simple interface to using Versaplex. I’ll start from the beginning.
Versaplex is a middleware layer that is designed to provide abstraction in dealing with databases. So, for example, imagine that you are a big bank. You have a lot of software that you have purchased/created and you do not want to part with it. All your software is using a database for storage, for example MS SQL. This is what you have set up and integrated, so this is all you want to use in terms of a database. Now pretend that you are a small company that is trying to make software for banks. You don’t know what database they will be running ahead of time, and just picking one is not a good strategy. This is where Versaplex comes in — it lets you write your program to talk to Versaplex over Dbus, and then Versaplex can handle all the details. (Note, Versaplex comes with Dbus in case I hear you shouting “well, then it’s only good on Linux.”)
I realize that there are other solutions, such as database abstraction libraries. There are many issue with that approach that I will not cover here. Versaplex is unique in that it uses a standard Dbus protocol instead. (As a little side-benefit, a lot of programs that use databases let you pick a custom ODBC driver, at which point you can sneak in the one that uses Dbus/Versaplex and actually make closed-source programs abstract nicely as well.)
Another result of Versaplex is that even small time programmers are able to quickly write up a program that is capable of speaking to any database that Versaplex supports (at this moment, sadly, only MSSQL).
For more information on Versaplex (and to get its code), see versaplex.googlecode.com. The Veranda source is distributed with Versaplex at the moment.
Anyway, hopefully that was not overly confusing. Back to my project: Veranda. Veranda is a simple(ish) program that is able to use Dbus/Versaplex in order to send data to (and parse data from) any database that Versaplex supports. I’ve been working on it for about a week now, and am ready to show off some features. Probably the following screenshots will help you understand what I was talking about above also.
Here is Veranda after it just started up, with a first SQL query already in. I would like to mention that Versaplex figures out who the originating user is and what database they are configured to use, so you don’t have to do any of that. It even manages passwords.
Note: the right side would be a table listing, but it is incomplete.
Here is Veranda with a result to the above query. I have implemented a Dbus message parser that is able to organize the data in a table. A note about tabs: for the moment, I have it so that one at the top correlates with one at the bottom, which is why both would be labeled “0″.
Here it is again, this time in the “Dbus View” — this is what the data looked like before I parsed it.
Here I am showing Veranda’s “Text Table View.” This is pretty nifty for copy-paste stuff. As a benefit, it also cuts off strings that are too long, so it is good for an overview.
And finally, here is Veranda with multiple tabs open.
So, the project is going well. Assuming that Versaplex continues to be developed (extremely likely), one day Veranda could be the end-all database query tool. Cheers.
Technical stuff (if you know, you know): gtk, python, dbus, gtksourceview, inkscape (icons not in yet), and a lot of Vim.
I hereby promise that any code that I release will… Read the rest of this entry »