Thursday, April 28, 2011

Qt Native Client is running on the Internet

Finally, tonight, I placed the first poke at Native Client running on the Internet up on the Virtual Urantia Book site. Lots of problems though. Tomorrow is another day. First, the size of the window was wrong. Found out that you set the size of the client window in the HTML page code, not the C++ code itself. It's all very new. Also, even though, I am working with this same code on the desktop, it dies after a minute or two. I'll reduce the code till I can figure out where the problem is. Not sure how to debug the Native Client code yet.

Also, for some reason, I'm not getting anything to work on Windows XP or Windows 7. It downloads, runs for a minute and dies on Linux but at least it downloads and runs. The download stats on Windows OS show that Chrome isn't downloading it at all. Sounds like a Chrome problem on this one but I'm not sure.

Also, if your internet speed is 3 megabit, it takes 3 or 4 minutes to download and depending on the speed of your computer, another 10 seconds to 30 seconds to start. The good thing is, once it's downloaded in the background, you don't need to do it again unless the version changes and that's all automatic.

The real good news is that I know I can get it working. If you want to look at it, feel free to do so. I don't have an Apple but it might work right off the bat. Who knows at this time?

To run the Index, you need to install  the latest version of Google's Chrome browser.

http://www.google.com/chrome/intl/en/landing_chrome.html?hl=en&brand=CHMB&utm_campaign=en&utm_source=en-ha-na-us-sk&utm_medium=ha

After you do, type in 'about:flags' in the address line, scroll down to Native Client and enable it. Restart Chrome. Hopefully, you won't have to do that in Chrome version 12, it might be stable by then. You'll get a nag line at the top telling you that stability and security will suffer. That's normal, the option is there for us developers. There's no way it'll damage your computer though, these people at Native Client are really paranoid about security. I can't even access a file, for God's sake. After that, just visit the site and it'll download in the background and after a few minutes, it'll run.

http://www.virtualurantia.com/nacl/wiggly.htm

I left the name wiggly for now, even though this is the index to the Urantia Book. I used wiggly as a template. I'll change it all later.

Anyway, it's been an eventful day. Native Client is running, even though, in fits and starts. Next week, I'll be at the Embedded Convention in Silicon valley. You know, the place where the real geeks of the computer industry are heading to, if you didn't know it, now you do. Embedded computers will wipe out desktops completely. The average home has well over 300 embedded processors (computers) in their home and are almost oblivious to it. Remotes, watches, cell phone, satellite boxes, tv's, radios, mp3 players, car brakes, cameras, thermostats, computer screens, microwaves, refrigerators, alarms, dvd players all contain multiple processors now. Also, desktop computers usually have at least 20 built in. The average new car has well over 100.

It's a completely new world.

Pierre

Thursday, April 21, 2011

Separating and Querying the Papers

A persistent problem happens when a reference is double clicked or the index content tree is selected to show the entire book. It takes up to 30 seconds for the whole book to load into the viewing box. To handle this, I'm separating the book into it's papers and the viewing box will only show one paper at a time. This way, it'll be 195 times faster at loading the viewing results box.

This has higher priority than getting the Thesaurus up. The Thesaurus has a few leaps of programming for it to be done properly. The querying system is basically set up to handle 'AND' type of queries based on paragraphs. That is: When two words typed into the word box appear in any one paragraph, then that paragraph is shown in the reference list and the paragraph viewing window. 'OR' type of queries don't work yet. A Thesaurus is an 'OR' type of query. For example: When the word 'house' is selected and then the word 'abode' is selected into the word box from the Thesaurus list for 'home' then the query should say if this 'house' OR 'abode' appear in the same paragraph, then select that paragraph. Of course if an 'AND' word is added that will change the query and complicate it further. 

So the parser that determines the tests will have to work with one set of entries starting from the left of the word window entries and work towards the right side. If a parentheses is added to a set of 'AND' and 'OR' queries, then the those have to be determined first.

I never said it was easy and I never said I knew what I was doing!!!!


Wednesday, April 20, 2011

Thesaurus

The Thesaurus is created and the thesaurus window is open and it's setting the thesaurus words into it when a word is entered. Now I'll make it so that they can double click on the thesaurus word that they would like to add to the word window and then I'll add an 'OR' with parentheses around the word and it's thesaurus equivalent, then I can run through the book on an 'OR' instead of 'AND' on every paragraph. I'll also add an 'AND' when they click on words from the index word list on the right. If they type in directly, then I'll add the 'AND' automatically. 

Also have to create a help file. Probably be an HTML file created with some HTML document creator and that way they can read the help file. Maybe some Youtube videos showing how to do it.

It's coming along.

This coming week, I'll be attempting to place the index system on the Internet with Native Client's latest release. That should be interesing.


In this picture the top left window is the window you type in. The bottom left list window shows the thesaurus list relating to the current word being typed in. The word list to the right shows all the words in the Urantia Book. This is a view on a Nokia N900 phone. This will be available across all computers if I can get it up with Native Client.




Thursday, April 14, 2011

Indexing some more

Lots of work completed this week. First, the windows had to be reduced in size to fit cell phones. Next I had to remove the database and just create files that we're directly inserted into the program because Native Client won't allow files to be used at this time. All done and working. It takes 20 seconds to initialize on a 600 mhz phone. Nothing to be done about that. All the phones that we're released this year should initialize in about 10 seconds. Reasonable for a program like this.

Completed the thesaurus but didn't get to use it in the program. That's next. Then, Native Client. I really don't know what I'm up against since the last time I created a simple program a month ago that ran in Native Client. Here's hoping that'll go easy and all machines will have the index in a week or two.

Step by step by step by step.

Tuesday, April 12, 2011

Urantia Book Index coming up

A few more bugs and the Urantia Book Index will be ready. It loads a lot faster, works with a thesaurus. This week I imagine it'll be working. Next week, I'll try it with Native Client on the net. At the very least, it works on my phone.

Sunday, April 10, 2011

Indexing Plans

It took 45 seconds to start the index program on my n900 cell phone. It's just too slow starting up. Runs really well once it's started though. I have to do better and I can. The database is 45 megabyte with the thesaurus stuff. And the program loads most of it when it starts. It's obvious that is the problem.

Theres a better and faster way. First I don't need a sqlite database to store the index info as the book is static and doesn't need to change which is why I would need a database engine. So I'll keep the info in a file. In this way, I can keep all the pointer math in short integers and many other things can be done. I believe I can shorten by at least 3/4. Maybe more.

Also, I can store the index directly into the program. That's really exciting because Native Client will work without loading files so if it's built in, no file needs opening. I believe I can be up and running now. Wow.! That's just unbelievably exciting. The next few days will tell the tale. Maybe, if all goes well, in a couple of weeks.

Of course, there's a tale of the best laid plans of mice and men. Anyway......

Friday, April 8, 2011

Reprogramming The Index Program

Well I didn't seem to notice that the last iteration of the indexing system was missing a lot of text and papers we're jumbled or missing. So I'm rewriting the engine that reads each paper and indexes it. I don't like the algorithm as it stands. The thesaurus, though, looks good and works well with the blocks that exist in the database so I should be done with the index when this new algorithm is rewritten. An added benefit is that it should index the other languages also.