On 16-May-07, at 7:28 PM, Eric Richards wrote: > > > Tom Benson wrote: > >> If that is your only goal, store the images as a binary BLOB entry in >> a local SQLite database, then load them as you need them. >> >> It's pretty simple to write the images to a binary string, and >> storing them in a DB is very easy. >> >> This also allows you to package all of you resources into a single >> file. >> >> - Tom >> >> > Well, no goal in mind, just gave an example. > > I was just wondering if one wanted to, how. > > I've got lots of questions like that. > Like if I was to make a compiler (which is way above me) how do you > actually compile code ?
You get this book <http://www.amazon.com/Compilers-Principles- Techniques-Tools-2nd/dp/0321486811> Study it deeply and then realize that doing this is nuts :) (Just kidding - well not really. I did my stint in compiler writing and it's not for me) Or you convert code to a language that already has a compiler (ie/ translate RB into C++ and then use gcc to compile or convert RB into Java and the use javac compiler) That lets you leverage other good compilers as though they were your own BUT limits you to what you can support if the underlying language you translate TO does not make it easy to support something. > How do you make an OS ? Apparently you pay someone $50,000 for it, sell it to IBM and get filthy rich. People then call you a genius :) > How would one make there own Database format and Query language ? Study trees structures (for indexes and fast data access), disk IO programming ( so you never lose anything) database techniques for synchronization and serialization of readers and writers, and lots of other "fiddly bits" (as Slartybartfast would say) A query language is kind of like a compiler, it just does not chunk out an executable like gcc or rb does. You still have to define the language ( the semantics and the syntax ) and do a lot of translation so that you can figure out WHAT was asked for and HOW to get it. SQL is like that. You tell it what to get, and even sort of how to figure out what you asked for. What you don't tell it is the exact steps to get it. I liked this part of compilers way better than chunking out the executable code. I even got to write an SQ front end + parser for a very old accounting system that had no such front end. That was actually fun ! _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
