Writing an OS in a custom language

Programming, for all ages and all languages.
User avatar
crazygray
Member
Member
Posts: 73
Joined: Sat Nov 03, 2007 10:17 am
Location: Toky,Japan

Post by crazygray »

Boil Baking Soda it makes you crazy seriously. LOL
Edit: Nah, I'm just half asleep and not thinking straight.(talking just to make sure I'm alive) :shock:
Imagine if a creature came from a 4 dimensional world, would he think you to be flat?
User avatar
AndrewAPrice
Member
Member
Posts: 2299
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Post by AndrewAPrice »

You could try to do a sort of high-level English language like:

Code: Select all

Send 5 to port 21.
Write "Hello" to screen.
Store 5 plus 3 in A.
Each word is a keyword.
e.g.
"Send 5 to port 21."
Send - tell the language we're ending something
5 - the number to end
to - we're sending "to" a location
port - the location is a port.
21 - the number of the port.

"Write "Hello" to screen"
Write - A function in screen
"Hello" - The string to seen to screen
to - we're sending "to" a location
screen - an instance of our screen object.

There could be different sorts of function calls:

"x _ to" functions with parameter
"x _ and _ and _ to" for multiple parameters
"get x from _ and store in _" - get a variable
"get x and y from _ and store in _ and _" - get multiple variable
"tell _ to x" - run a function called x
My OS is Perception.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Post by AJ »

MessiahAndrw wrote:to - we're sending "to" a location
Doesn't "Send" imply that?
"Write "Hello" to screen"
How about "Send "Hello" to screen" - perhaps without the "to" :wink:
"get x from _ and store in _" - get a variable
If "to" is redundant, "from" and "in" probably are as well :twisted:

Cheers,
Adam
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

I recall from logic classes that english was horribly ambiguous. :(
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
babernat
Member
Member
Posts: 42
Joined: Tue Jul 03, 2007 6:53 am
Location: Colorado USA

Post by babernat »

Combuster wrote:I recall from logic classes that english was horribly ambiguous. :(
A class in anthropological linguistics taught me that all human language is.
Thanks for all the fish.
Post Reply