Showing posts with label news. Show all posts
Showing posts with label news. Show all posts

Thursday, January 3, 2008

ASiddur project still alive

Despite the appearances on the blog and on the project web page, I haven't given up working on ASiddur. I've mostly gotten through a very busy period at work, and in the meantime, added to the size of my family, both of which diverted my attention temporarily from the project.

In the short term, I'm going to concentrate on fixing a couple of small bugs (V'Sein Tal Umattar appearing a year early and some very minor text issues), and releasing a newer stable version with the reminder ticker and full-screen support.

Once that's done, I plan on writing some unit tests for the automatic test calculation code. (The reason that there aren't existing unit tests is that I could never seem to make it run for the J2ME parts of the project. But at least the encoding is done in J2SE and can be tested separately. There could easily be mistakes that I missed when looking at the hex dump of the resulting output.)

Tuesday, February 27, 2007

Cleaned up nikud (UPDATED)

Just a quick post to note that I cleaned up the nikud processing. On to figure out why the dynamic text block is getting truncated.

UPDATE: I also just fixed that bug. I was calculating the size of each block by subtracting the position of the previous block from the position of the current block. That does give the size, but the size of the previous block, not the current. Also, it can't work for the last block. Now the size is calculated when encountering the text block ending marker. Next up is to start actually parsing the text on the reading side, which may lead to some refactoring. Stay tuned.

Monday, January 29, 2007

Java primitive data types

First, I have to apologize for the slow pace recently, but I've been busy at work. This situation will likely continue for another few months, but I'll do my best to progress. (Of course, by the time this is over, I'm sure something else will be competing for time, but that's life for you.) It's a little frustrating to have lots of ideas and (what at least appear at the time to be) clean designs, but not have the time to actually get them down and make them work. Well, I'll do what I can. In the meantime, back to griping about Java and explaining what I've been up to...

Just what does Java have against unsigned data types, anyway? I just finished debugging a problem that was caused by my assuming that a byte was unsigned. After all, if you're specifically choosing your data type to be a physical item, wouldn't you want it unsigned anyway? (A byte is defined in terms of the size, as opposed to int or character, where the type represents a logical item.) Well, that at least made sense to me before I wrote the code. Now I have to take each byte, and deal with casting it to a char, and then or'ing it with 0x00FF just to keep it positive. Ugh. There's gotta be a better way.

The upshot of this is that I can now see the (beginning of the) first block of a tefilla in the daavening view. Check out the dynamic Ma'ariv (last on the list). The only remaining major issue (other than actually parsing the markup to select tefillah text and include other blocks as needed) is to remove the nikud(*). In the current (e.g. legacy) setup, it was done when the file was read in, for efficiency reasons - you only need to do it once, and not every time text is shown. That doesn't work in the new model, since that will affect the distance to other characters and throw off things like if/then/else block lengths. On the other hand, I'd rather not have to
pull it out each time a line is shown. And in any case, that will be slower, and storing the extra (unneeded) characters/nikud means needing about 30% more buffer room.

(*) This was true when the post was originally written, but I've since noticed that the entire block doesn't come through. I'll be looking into that.

I don't yet have a good answer to this; at the moment, processing is done when reading in the block to transform all unwanted nikud into null bytes, which are later pulled out. But now I do twice as much work as before, so that's not a good long-term solution. But right now, I at least want to get something out that works, and then clean it up. I don't know why only part of the text block is coming through; I'll have to investigate that later. Native fonts with nikud not shown is probably broken at this point (since my emulator doesn't have native Hebrew fonts, I'm not yet testing that functionality). And I know that it is very incomplete, so don't bother filing bugs for it quite yet.