Welcome, Guest. Please login or register.

Author Topic: View the Outbox  (Read 8202 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Jose

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: View the Outbox
« on: January 28, 2007, 03:45:28 PM »
I'm probably saying nonsense (never tried network programming..) but would a site like this be that hard to code from scratch ? I mean Xoops (or whatever it's called) is a full blown general engine, probably full of features most sites don't use anyway...
It all seems just a bunch of user accounts/forums and news items... :roll:
:lol:

:pint:
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline Jose

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: View the Outbox
« Reply #1 on: January 28, 2007, 04:10:02 PM »
Fair enouph... but you could make it a tinny hobby, like a few lines of code per day or something...
Ok forget it.. 8-)
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline Jose

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: View the Outbox
« Reply #2 on: January 29, 2007, 12:30:13 AM »
"But, I will NOT code in C, under any circumstances. "

Any ? Wow.. Why ? :-)
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline Jose

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: View the Outbox
« Reply #3 on: January 29, 2007, 01:26:39 AM »
C rules:) Actually I've for the 1st time tryed to code some stuff (that general coder thing, unfinished...) that made me see some actual limitations of C. The main loop for array handling for each data type had blocks of code that followed the same control statements. If I was to code it for each type separately it would have a bunch of repeated code. So I abstracted it using function pointers:) But I think in the end it was to be much less efective because of the constant function calls within the loop, wich supposedly take memo of registers, stack etc, between function calls. C++ would have handled this internaly with a simple goto, right ? I tried to avoid the overhead using only a single pointer as argument, wich points to the set of arguments that all the "objects" might need. It still won't be as fast but probably almost the same (provided compilers optimize multiple pointer acess wich is only logical that they do, right ?)...
...
I need some sleep... :-)
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline Jose

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: View the Outbox
« Reply #4 on: January 29, 2007, 08:31:54 PM »
I guess macros would do just fine, as templates:)
But both also repeat the code internaly (from my limited knowledge of C++ templates also do that), wich leads to unecessarily bigger code. I think a C++ class would solve it better, without duplicating code and allowing for faster code I think (?) (compared to function pointers). BTW, is there a way to use function pointers without the usual overhead of function calls ? Inline functions come to mind, but those also duplicate the code...
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline Jose

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: View the Outbox
« Reply #5 on: January 29, 2007, 09:56:53 PM »
@So I guess using a class the resulting code will be like adding a switch inside the loop for each type(not that bad admiting that the compiler optimizes it to an array of goto's indexed by the variable) ? Maybe I'll just use that next time:-)
\\"We made Amiga, they {bleep}ed it up\\"