1. NightShade Vs. Euphoria++

Hmmm..
Before I can start coding on U4IA++ again, I should
know what syntax to use...
Euphoria's, or Gothic NightShade's?

If I'd opt for NightShade, the package will be 'Gothic
NightShade' and not U4IA++.
NightShade being a totally new language closely
releated to Euphoria (read: it *is* Euphoria, just
with other datatypes).

So I'll need *you* to tell me wich one to go for.
Remember, I can get a NightShade To C and C To
NightShade translator out there even before the Beta-1
release of RDS' E2C.

You will have to choose now.
To let you pick, below are two graphics programs, one
written in Gothic NightShade, and one written in
U4IA++.
Both come with the benchmark results after being
translated to C.

---------------U4IA++ program-------------------------
include image.e
include graphics.e

sequence bmp
bmp = read_bitmap("test.bmp")

if graphics_mode(get_mode(640,480,16)) = -1 then end
if

atom t, cnt
cnt = 0
t = time()
while t+10 > time() do
   display_image({0,0},bmp[2])
   cnt+=1
end while
printf(1,"%d blits per second",cnt/5)

if wait_key() then end if

-------------Gothic NightShade Program----------------
include image.e
include graphics.e

integer array bmp
bmp = read_bitmap("test.bmp")

if graphics_mode(get_mode(640,480,16)) = -1 then end
if

atom t, cnt
cnt = 0
t = time()
while t+10 > time() do
   display_image({0,0},bmp[2])
   cnt+=1
end while
printf(1,"%d blits per second",cnt/5)

if wait_key() then end if

U4IA++ Version: 218 Blits Per Second
NightShade Version: 312 Blits Per Second


I gave this example bvecause it illustrates the speed
of NightShade datatypes over Euphoria datatypes.
The only difference between U4IA++ and NightShade are
the datatypes.
These are:
integer
atom
object
string

Ofwich each can be decalerd as follows:
integer a
a = 10
integer array as
as = {10,50,60,{20,30,40},40}

atom f
f = 3.14
atom array f
f = {2.5,3.14,{1.0,2.3}}

object o
o = "YOU SUCK!"
o = {3.14,3.14*2}
object array os
os = {"YOU SUCK!!!",3.14,2}

string s
s = "MTS RULES!"
string array ss
ss = {"MTS RULES!","RDS SUCKS!"}

That's it!
For the rest, the syntax and library routines are
exactly the same as U4IA++.
This means that you have OOP support in the form;

type myclass()
integer age
string name
procedure doshit()
   puts(1,sprintf("%s is %d!!",{name,age})
end procedure
end type

myclass test
test.age = 17
test.name = "MTS"
test.doshit()


The only thing NightShade doesn't handle very
effectivly (due to speed issues) is object arrays.
Each object is fairly large and complex.
Therefore you shouldn't use arrays of objects too much
if you'd like to hang onto memory.

I, or any lamer with half a brain, can code a Euphoria
To Gothic NightShade translator. All that has to be
changed is 
'sequence' into 'object array'.


Wich language do you find the best?


Mike The Spike
PS. Knowing that Gothic NightShade is the fastest.

new topic     » topic index » view message » categorize

2. Re: NightShade Vs. Euphoria++

Note that 'cnt/5' is not an error.
time() (right now) returns results in 500
milliseconds, aka 0.5 seconds.

This is one of the reasons I make mistakes when coding
benchmarks in Euphoria :)

BTW, to help you out even more, this is what I mean
with objects being big in G NightShade. They are
declared as follows;

typedef struct
{
    integer_array intarray;
    string_array stringarray;
    atom_array atomarray;
    char type;
} object;

I can easily do it like this;
typedef struct
{
     void *data;
     char type;
} object;

But that requires a lot of mallocs and reallocs on
'data', making things obfuscated and slow.
Allthough garbage collection is better.
But hell, if you run out of memory you run out of
memeory, and that's it.
With virtual memory, you can eat up your entire drive
untill you run out.

Mike The Spike
PS. Maybe I should just change 'object array' into
'sequence' in G NightShade and call it U4IA++..

--- mtsreborn at yahoo.com wrote:
> Hmmm..
> Before I can start coding on U4IA++ again, I should
> know what syntax to use...
> Euphoria's, or Gothic NightShade's?
> 
> If I'd opt for NightShade, the package will be
> 'Gothic
> NightShade' and not U4IA++.
> NightShade being a totally new language closely
> releated to Euphoria (read: it *is* Euphoria, just
> with other datatypes).
> 
> So I'll need *you* to tell me wich one to go for.
> Remember, I can get a NightShade To C and C To
> NightShade translator out there even before the
> Beta-1
> release of RDS' E2C.
> 
> You will have to choose now.
> To let you pick, below are two graphics programs,
> one
> written in Gothic NightShade, and one written in
> U4IA++.
> Both come with the benchmark results after being
> translated to C.
> 
> ---------------U4IA++
> program-------------------------
> include image.e
> include graphics.e
> 
> sequence bmp
> bmp = read_bitmap("test.bmp")
> 
> if graphics_mode(get_mode(640,480,16)) = -1 then end
> if
> 
> atom t, cnt
> cnt = 0
> t = time()
> while t+10 > time() do
>    display_image({0,0},bmp[2])
>    cnt+=1
> end while
> printf(1,"%d blits per second",cnt/5)
> 
> if wait_key() then end if
> 
> -------------Gothic NightShade
> Program----------------
> include image.e
> include graphics.e
> 
> integer array bmp
> bmp = read_bitmap("test.bmp")
> 
> if graphics_mode(get_mode(640,480,16)) = -1 then end
> if
> 
> atom t, cnt
> cnt = 0
> t = time()
> while t+10 > time() do
>    display_image({0,0},bmp[2])
>    cnt+=1
> end while
> printf(1,"%d blits per second",cnt/5)
> 
> if wait_key() then end if
> 
> U4IA++ Version: 218 Blits Per Second
> NightShade Version: 312 Blits Per Second
> 
> 
> I gave this example bvecause it illustrates the
> speed
> of NightShade datatypes over Euphoria datatypes.
> The only difference between U4IA++ and NightShade
> are
> the datatypes.
> These are:
> integer
> atom
> object
> string
> 
> Ofwich each can be decalerd as follows:
> integer a
> a = 10
> integer array as
> as = {10,50,60,{20,30,40},40}
> 
> atom f
> f = 3.14
> atom array f
> f = {2.5,3.14,{1.0,2.3}}
> 
> object o
> o = "YOU SUCK!"
> o = {3.14,3.14*2}
> object array os
> os = {"YOU SUCK!!!",3.14,2}
> 
> string s
> s = "MTS RULES!"
> string array ss
> ss = {"MTS RULES!","RDS SUCKS!"}
> 
> That's it!
> For the rest, the syntax and library routines are
> exactly the same as U4IA++.
> This means that you have OOP support in the form;
> 
> type myclass()
> integer age
> string name
> procedure doshit()
>    puts(1,sprintf("%s is %d!!",{name,age})
> end procedure
> end type
> 
> myclass test
> test.age = 17
> test.name = "MTS"
> test.doshit()
> 
> 
> The only thing NightShade doesn't handle very
> effectivly (due to speed issues) is object arrays.
> Each object is fairly large and complex.
> Therefore you shouldn't use arrays of objects too
> much
> if you'd like to hang onto memory.
> 
> I, or any lamer with half a brain, can code a
> Euphoria
> To Gothic NightShade translator. All that has to be
> changed is 
> 'sequence' into 'object array'.
> 
> 
> Wich language do you find the best?
> 
> 
> Mike The Spike
> PS. Knowing that Gothic NightShade is the fastest.
> 
> 
>

new topic     » goto parent     » topic index » view message » categorize

3. Re: NightShade Vs. Euphoria++

That's one for NightShade, 0 for Euphoria++.
Thanks for the input, CK!

BTW, Gothic NightShade stands for;
'Game Oriented Technologically Highlevel Imperative
Compiler' = GOTHIC
'Natively Invoked Garbage-collecting Highlevel
Translator for System Handled Application Direct
Execution' = NIGHTSHADE.

Mike The Spike
PS. I like NightShade better too. It works and sounds
cooler. (tip: 'NightShade' is a poisonous herb)

--- CK Lester <cklester at yahoo.com> wrote:
> Nightshade.
> 
> ----- Original Message ----- 
> From: <mtsreborn at yahoo.com>
> To: "EUforum" <EUforum at topica.com>
> Sent: Thursday, February 08, 2001 3:09 PM
> Subject: NightShade Vs. Euphoria++
> 
> 
> > Witch language do you find the best?
> > 
> > 
> > Mike The Spike
> > PS. Knowing that Gothic NightShade is the fastest.
> 
> 
> 
> 
>
> 
>

new topic     » goto parent     » topic index » view message » categorize

4. Re: NightShade Vs. Euphoria++

Nightshade.

----- Original Message ----- 
From: <mtsreborn at yahoo.com>
To: "EUforum" <EUforum at topica.com>
Sent: Thursday, February 08, 2001 3:09 PM
Subject: NightShade Vs. Euphoria++


> Witch language do you find the best?
> 
> 
> Mike The Spike
> PS. Knowing that Gothic NightShade is the fastest.





Do You Yahoo!?

Get your free @yahoo.com address at http://mail.yahoo.com

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu