Author Topic: Porting the code  (Read 8029 times)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Porting the code
« on: October 19, 2005, 09:36:48 PM »
I've just finished porting the Robots module to C++.

It took me a while because I also redid a number of things along the way, and fixed a few minor bugs in random places.

If anyone wants to see what the unfisinished code looks like at the moment, holler and I'll zip it and put it on the FTP.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Porting the code
« Reply #1 on: October 20, 2005, 12:17:24 PM »
Wolfhound is selecting a GUI library.  Soon he will probably begin porting the GUI to C++.

I'll be sure that we kep this GUI idiot proof (no offense meant.  It's a technical term, I swear).

Offline Zelos

  • Bot Overlord
  • ****
  • Posts: 707
    • View Profile
Porting the code
« Reply #2 on: October 20, 2005, 12:49:27 PM »
why is it so important to port DB?
When I have the eclipse cannon under my control there is nothing that can stop me from ruling the world. And I wont stop there. I will never stop conquering worlds through the universe. All the worlds in the universe will belong to me. All the species in on them will be my slaves. THE ENIRE UNIVERSE WILL BELONG TO ME AND EVERYTHING IN IT :evil: AND THERE IS NOTHING ANYONE OF you CAN DO TO STOP ME. HAHAHAHAHAHAHAHA

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Porting the code
« Reply #3 on: October 20, 2005, 01:24:05 PM »
2 things:

1.  Speed
2.  Pointers

VB is slow and lacks pointers.  With speed, well, that's fairly obvious.  The faster the better.

With pointers, I can construct abstract classes, that makes having two programmers working on different sections of code easier.

Offline vryko

  • Bot Neophyte
  • *
  • Posts: 14
    • View Profile
Porting the code
« Reply #4 on: October 21, 2005, 10:21:44 AM »
Quote
2 things:

1.  Speed
2.  Pointers

VB is slow and lacks pointers.  With speed, well, that's fairly obvious.  The faster the better.

With pointers, I can construct abstract classes, that makes having two programmers working on different sections of code easier.
because vb is bad

in vb your programs are run trough an interpretor, so you lose a lot performance.  In c++ your program is completly compiled so it runs directly on your os, api's and hardware without any translations from an interpretor.

and most important, I learned c++.  I could understand most of the vb-code, but became demotivated by all the little things I didn't understand directly.

(sorry for any spelling-mistakes)

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Porting the code
« Reply #5 on: October 21, 2005, 10:25:47 AM »
Quote
in vb your programs are run trough an interpretor, so you lose a lot performance. In c++ your program is completly compiled so it runs directly on your os, api's and hardware without any translations from an interpretor.
Not quite.

VB only runs through an interpreter while you are running it in debug mode directly from code.

Once you make an execuatable then VB is 100% compiled. The reason that C is faster is that VB is compiled into a slightly less efficient format due to the high level of the VB language.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline vryko

  • Bot Neophyte
  • *
  • Posts: 14
    • View Profile
Porting the code
« Reply #6 on: October 21, 2005, 10:35:41 AM »
it isn't compiled for 100%

it is more like java, but the vm is integrated in windows (maybe because it is from the same firm).

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Porting the code
« Reply #7 on: October 21, 2005, 10:52:27 AM »
OK maybe you are right that it isn't 100%. I am not in a position to know that for sure.
The one thing I do know is that you don't require any kind of interpretter program to run an executable created from VB. It just kicks out a .exe file that can be run on any windows OS
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Zelos

  • Bot Overlord
  • ****
  • Posts: 707
    • View Profile
Porting the code
« Reply #8 on: October 21, 2005, 11:26:35 AM »
I still think its kinda sad ure moving it, when im starting to understand vb you guys move it into something I cant under stand :( :'(
When I have the eclipse cannon under my control there is nothing that can stop me from ruling the world. And I wont stop there. I will never stop conquering worlds through the universe. All the worlds in the universe will belong to me. All the species in on them will be my slaves. THE ENIRE UNIVERSE WILL BELONG TO ME AND EVERYTHING IN IT :evil: AND THERE IS NOTHING ANYONE OF you CAN DO TO STOP ME. HAHAHAHAHAHAHAHA

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Porting the code
« Reply #9 on: October 21, 2005, 11:49:03 AM »
I think I like the idea suggested in another thread that we possibly split DB into two camps.

On the one hand we have the developmental version being ported to C. This will eventually be much faster and hopefully better than the VB version. Also should be able to run cross platform.

On the other hand, I think the VB version should also be honed to fix all the bugs that are still there in V2.36.

It will be very useful to have a completely bug free version for people who want a stable environment for long term sims. This version will most likely be one of the VB versions for a long time yet.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Porting the code
« Reply #10 on: October 21, 2005, 11:49:22 AM »
Quote
GUI idiot proof

NO offance taken, but what do you mean by that?

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Porting the code
« Reply #11 on: October 21, 2005, 11:56:12 AM »
It is just standard jargon, normally understood to mean that the end user is unable to do anything that will cause a problem to the software no matter how hard they try.

"Idiot proof" is the holy grail to all programmers. Often quite difficult to achieve.

To test how "idiot proof" a piece of software is, you would normally give it to a known idiot for them to make every possibly attempt to break it.

In my case I give my software packages to my boss (Director of Research and Eductaion, Head of Chemistry). Not the kind of person that you would normally call an idiot, but from the point of view of breaking software, he difinitely fits the bill.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Porting the code
« Reply #12 on: October 21, 2005, 03:35:23 PM »
Don't get me wrong... You need to be skill to brake some software PY... I finaly broke igod the one that got more hits then alice...



Oh, I thought you mean "idiot proof" as in "Ha! No c++ newbys will ever understand this peace of code". Never mind then...

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Porting the code
« Reply #13 on: October 21, 2005, 03:39:14 PM »
Quite the contrary, I'm hoping even people who don't have any idea of what classes are will be able to figure out what's going on.

If anything, I think the C++ code as it stands is more readable.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Porting the code
« Reply #14 on: October 21, 2005, 03:56:10 PM »
Yea I just got some "readable" AIML code. He wrote each prosedure in a seporate .h file. How readable is that?  :banghead: #include@$$%%$#!! .... ok ok, don't reply ... it is a dead topic.