You are viewing dj2

06 July 2006 @ 03:20 pm
Well I've finally done it and put the new everburning up. I'll be posting over there from now on so this blog is essentially dead.
06 July 2006 @ 09:54 am
As you may have noticed, I'm trying to get in the habit of updating this on a semi-regular basis (as opposed to my once every 1-3 month habit). We'll see how it goes.

Still working on everburning. I've got the quotes and the news sections done and could, and may, put them online. I'm currently working on the photo gallery which could be difficult depending on what I do. I still have to check that textdrive supports rmagick, and if they don't, if they'll install it. But, assuming I get some time, I should have something up relatively soon. Once it's up I'll move this blog over there. I just like controlling my own stuff I guess.

I've been trying to get back into EWL programming and to that end have done a couple of little cleanups/fixes in the code. Nothing major, my brain isn't ready to accept working on anything like ewl_tree2 or ewl_paned at the moment. I think it's coming back, just taking a while.

Nathan has some interesting plans in the works to abstract out the EWL graphics a step further. I've currently pulled out the window and canvas code into engines (it was already wrapped in #ifdef's just had to extract it out) but he's thinking of taking it a step further and abstracting out all the evas/edje related calls in the code. This would give us the flexibility of completely changing out backend. So, you could have a gtk/pango backend along side the Evas/Edje backend.

I've actually been spending a bunch of my time lately looking up information on D20 Future. I've owned this for a while and Anderson is currently running a campaign in it for a couple people but I'm toying with the idea of making my own campaign. So, I've been looking up other peoples ideas and other tools that might be useful for this kind of thing. If you've got any suggestions send me an email and let me know. Not sure if it'll pan out or not, I have a tendency to get bogged down in details (and with a whole galaxy to work with, that's a lot of details.

On a final note, the wedding plans seem to be coming together pretty well. We sent out the invitations the other day and they've started to arrive (I still have to get two addresses, I'm a bad man, heh). Other plans seem to be coalescing into something coherent as well. It should all be good. I hope.
Current Music: Red Right Hand - Nick Cave & The Bad Seeds
29 June 2006 @ 12:59 pm
Well, I finished up my last too presentations (one in Toronto and one in Montreal) earlier this week and I'm now on vacation. I had a hell of a time getting back from Montreal. Got a call from my boss at about 4pm telling me my 6pm flight had been canceled. Ok, fine, I was already on my way to the airport (I had actually fell asleep in the taxi as we drove to the airport, heh). I get there and manage to get on an earlier 5.30 flight. Which was then delayed till 6.15, then 6.30 then 6.45. We took off around 6.45 flew to Toronto and ended up burning about 30 minutes in the air waiting to land.

After landing the airport was under 'Red Alert' which means they can't allow any ground crew on the tarmac because of lightening (you know, large metallic airplanes, lightening, tiny people, understandable). So we sit there and get told it'll be 30 minutes, then get told it'll be 30 minutes, then get told we can't be told how long it will be as they don't know. Then get told it'll be 30 minutes, etc. After about 2.5 hrs we managed to get to the terminal and unloaded. So, my 1.5 hr flight ended up involving sitting on an airplane for about 4 hrs.

Was a long time, but I didn't really care as I just sat there and read my book. Was a bit hard on the knees, cramped into the tiny seats, but I'll survive.

Anyway, I'm back in Toronto now. With my presentations done I can back up my laptop and get Solaris 10 6/06 installed and start playing around with ZFS again, should be fun.

Not quite sure what I'm going to do on my vacation at this point (I'm off for five days). Probably heading up to Owen Sound on Saturday to visit some friends and quite possibly to Brampton on Friday to visit Stacys father and brother. Might try to fit in some Ewl programming, if I can get back into the grove. Don't really feel like playing warcraft at the moment. I booted it up, walked about 50 paces, turned around, walked back and logged off, heh. (I am in the processing of installing it in the Powerbook, just in case, heh).

Maybe I'll wander over to chapters to read for a while (although as I'm typing this it's just started to piss down rain and I can hear thunder in the background) so, maybe not.
Current Mood: relaxed
Current Music: Hm, yes, I should turn some on.
26 June 2006 @ 03:33 pm
Or, maybe that's just my drive to work on enlightenment stuff. I've been hit by a bit of a coding funk in relation to enlightenment lately. Just don't have any drive to work on code or deal with people. Doesn't seem worth it at the moment. Always seems like the negative response out-weights the positive.

I've been doing a bit of fiddling with Rails again, although I've run into a strange bug where using sqlite3 is giving my row an id of 1 while rails is giving it an id of 0 so when I save an image using that id it's numbered wrong. Hopefully it's just a sqlite3 thing and if I switch to MySQL it'll work itself out.

I bought Stacy a new MacBook and inherited her powerbook. She likes the smaller size and the keyboard on the macbook a lot better. I'm loving the 15" powerbook. It's quickly becoming my machine of choice. Using Textmate and quick silver make programming a breeze. I'm just learning Textmate so I know I'm still doing a lot of stuff the dumb way, but event still, it's swanky.

In a related operating system based note, Solaris 10 6/06 was released to day so I can't wait to get my sweaty hands on that one and stick it on the work laptop. Tho, I have to wait until at least Thursday as I have to do some presentations off of it in the interm, but, mmmmmm, zfs, yum

Other then that, I've been doing some traveling for work, playing World of Warcraft and reading. My readings been going in cycles lately. I'll pick up a book and either get sucked in or get stuck. If I get stuck I sit with that book for a month or so without reading a page until I drop it for another one. (Or, if I'm lucky I'll drop it right away and switch to a new one.) Maybe I'll use some of my e-free time to catch up on reading. (Heh, probably I'll just play Warcraft). But then, I'm getting to about the point where I get tired of Warcraft as well. I have yet to get a character over 30, my current high being this run to 28. I'm starting to get tried of the 'kill 2million monsters to get 8 pieces of horn' type quests where you just kill the same shit again, and again, and again, and again. We'll see how long it lasts.

Stacy's put up the next piece of 'Night in the Sun' over at which has served as a good diversion. Good reading, I can't wait for the next chapter. Shaping up to be a good story.

Anyway, that's enough for now, I may post some stuff on the books I've read recently (or am currently reading) we'll see how it all goes. (Or, I may end up moving this blog if I ever get the new everburning finished.)
28 March 2006 @ 11:08 am
Another chunk of info sent to the e mailing list that I'm copying here. If you're on the ml you can probably skip this.

I just wanted to give a quick update, and solicitation for help, on the EWL test application. We have just finished re-writing and porting the old tests over to the new framework. Hopefully this will make adding tests a lot easier.

Along with UI tests it is also possible to add unit tests and execute them through the UI. This should allow us to test a lot more of the code base without having to have complicated graphical tests.

The new framework also gives the benefit that if you have a widget that is outside the EWL tree (epdf for example) you can write tests and have them integrate into the ewl_test application. (All of the tests are dynamically loaded, you just have to implement one specific function.)

Each test can also have a tutorial attached to it. These tutorials will be displayed under the 'Tutorial' tab of the test app and will also be pulled into the generated doxygen documentation. It uses a limited subset of doxygen for rendering. (More doxy can be supported we just haven't needed it yet. There are a couple of tutorials in the test directory, if you feel like adding more please help out.

Ok, so you want to help, we need unit tests and tutorials. We have a few, and you can look at tests/ewl_text.c, tests/ewl_image.c or tests/ewl_widget.c to see how unit tests and tutorials are integrated into the files. (Or read below as I'll explain it.) We really need tests to cover all of the get/set methods and anything else that can be tested without a display. (Things like setting RGB and getting HSV back from the colour spectrum for example.) Corner cases, etc.

If you've got a widget you have out of the EWL tree and you want to write tests for it, here's the basic idea.

You'll need to include Ewl_Test.h which should be installed with your EWL headers.

You will need to implement the test_info function which takes an Ewl_Test struct. You then just fill in that struct with your module information. For example, from the Text test:

void test_info(Ewl_Test *test)
       test->name = "Text";
       test->tip = "Defines a class for multi-line text layout\n"
                   "and formatting.";
       test->filename = "ewl_text.c";
       test->func = create_test;
       test->type = EWL_TEST_TYPE_SIMPLE;
       test->unit_tests = text_unit_tests;

The test->type can be one of EWL_TEST_TYPE_SIMPLE, EWL_TEST_TYPE_ADVANCED, EWL_TEST_TYPE_CONTAINER, EWL_TEST_TYPE_MISC or EWL_TEST_TYPE_UNIT. If you use TYPE_UNIT you can leave test->func as NULL as it won't be used.

The test->func is a function pointer with a signature like:
static int create_test(Ewl_Container *box);

This function has to return 1 on completion for the test to run. (You can return 0 if your test fails to init for some reason.)

If you'd like to put some unit tests into your testing the you'll need to add a section similar to:

static Ewl_Unit_Test text_unit_tests[] = {
        {"text set/get", text_test_set_get},
        {NULL, NULL}

To the top of your file (above the test_info function). This array _must_ be {NULL, NULL} terminated. Each entry is the name of the unit test and the function to call to invoke the test.

The unit test functions have a signature like:
static int text_test_set_get(char *buf, int len);

This function will return 1 if the test passes or 0 otherwise. If the test fails you can write the reason into buf to have it displayed in the UI. buf is len bytes long.

Once you've setup your unit tests you just need to add:
test->unit_tests = text_unit_tests;

into your test_info function. (Chaning text_unit_tests to whatever you called the array in your file.)

If you have no GUI test you can leave the func NULL. If you have no unit_tests then leave the unit_tests pointer as NULL.

Compile this as a shared library and install it into PACKAGE_LIB_DIR/ewl/tests (which by default is /usr/local/lib/ewl/tests) and restart the test app. Your test should show up under the category that you assigned.

You can either run your test in the ewl_test application 'Execute' tab or if you call ewl_test and pass the name of your test as a parameter it will run your test in a separate window. (You can also use the -unit flag to ewl_test to run the unit tests for your widget on the command line.)

Tutorials are pretty simple to add. Just add a doxygen block at the top of your test file. You will put in an @addtogroup with the same group name as in the src/lib file. You can then use @section, @code, @endcode and @note to markup your documentation.

If you'd like to help please send either myself or Nathan an email if you've got any questions. As always, patches accepted.