realbasic-nug
[Top] [All Lists]

Re: Custom format (If that's your game Eric)

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Custom format (If that's your game Eric)
From: Norman Palardy <npalardy at great-white-software dot com>
Date: Wed, 16 May 2007 20:16:27 -0600
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <464B5122 dot 5090504 at earthlink dot net> <D44A42A1-D2C8-4562-9D83-C48708D85975 at satx dot rr dot com> <464B6574 dot 6040302 at earthlink dot net> <464B87D3 dot 6070104 at rpgportland dot com> <464B9D86 dot 2080705 at earthlink dot net> <F31572A7-794D-4961-A3E1-7362B77B2D0E at mac dot com> <464BAFB7 dot 9070400 at earthlink dot net>
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>


<Prev in Thread] Current Thread [Next in Thread>