So as I'm currently expanding my knowledge in network programming / database usage using D, I thought this might be a good project for now to experiment with it.
The project will be completely open-source, so feel free to contribute if you want to.
As of now there's not really anything in other, other than being able to receive connections.
I will be updating this thread with more information later, as well changes that happens.
The project is written in D using cheetah (Uses vibe.d behind the scene) for network (Will be using MySql for database, once I get to that.)
You can read more about cheetah here:
You can read more about vibe.d here:
It should be able to compile on any platform that can compile D using both ldc, gdc or dmd. Which means it can be run on Windows, Linux and OSX.
The project is hosted on github as an organization for simplicity. The plan is to later have different projects tied to the current one.
It will be targeted at patch 5017 for a start, but I may branch out later to create higher patched versions.
The server can be run on any platform that can compile D using both DMD or LDC (LLVM). Which means it can be run on Windows, Linux, OSX etc. without any complications or configuration changes.
Update:
Switched from raw vibe.d tcp sockets to using my own library that wraps around vibe.d
Implement auth crypto, as well able to receive packets now.
Packet handling has been added as well started handling packet 1051.
Database integration has been done to with MySql.
Upcoming:
Login
Other:
Also added continuous-integration to the repository.
#Update:
Added type/mutability safety around a few places and created the skeleton of the world server.
Why did you suddenly add "inout" for some parameters? Inout should only be used, as far as I know, to create functions that have a return type with the same "mutability" as the inout parameter, which seems not to be what you're using it for.
Why did you suddenly add "inout" for some parameters? Inout should only be used, as far as I know, to create functions that have a return type with the same "mutability" as the inout parameter, which seems not to be what you're using it for.
inout accepts both mutable, immutable and const values for parameters.
inout accepts both mutable, immutable and const values for parameters.
Unless there's a behavior I misunderstood.
Yes, but so does:
Code:
void write(T)(T value) { }
The use-case for "inout", I believe, is when you want a function whose return type "mutability" matches the mutability of a passed in parameter - aka the part in bold:
Quote:
The inout forms a wildcard that stands in for any of mutable, const, immutable, inout, or inout const. When the function is called, the inout of the return type is changed to whatever the mutable, const, immutable, inout, or inout const status of the argument type to the parameter inout was.
I don't think there's ever a reason to use "inout" on a function that doesn't have an inout(T) return type.
The use-case for "inout", I believe, is when you want a function whose return type "mutability" matches the mutability of a passed in parameter - aka the part in bold:
I don't think there's ever a reason to use "inout" on a function that doesn't have an inout(T) return type.
This is an interesting read, however I'd like to add my few (opinion-heavy) cents on it. Overall D seems nice, I'm gonna try to make some lil thing in it to see it for myself.
No more header files. IMO this is a bad thing, header files are great.
Faster compiles. This is indeed great, but with C++ there's always the option of compilation units, or other methods to speed up compilation. Though yeah, even with these, compile times could be WAY better.
D STL is actually readable. IMO the C++ STL is perfectly readable (but that might be due to extensive use, and getting used to it, rather than good design)
GC - good for some things, bad for other things. In my area of work we despise it, great microfreezes in performance heavy games are caused by it, but again, this is a very specific example that doesn't invalidate the other cases.
DUB - this is great indeed
No more preprocessor - but I like the preprocessor, especially when targeting multiplatform
No more order of declaration - stone me but I dislike this, enforced order gives you a logical hierarchy when reading through someone elses code
C++ multiple inheritance - yea if you inherit more than one thing that usually is the sign of bad design
Streamlined operator overloading - this is such a minor thing I'm just gonna ignore it, it's nice but it doesn't matter
No need for C++ template heroes - really? C++17 template programming has gotten extremely simple IMO. Again, a matter of getting used to it I guess.
Range based iterators - I don't see how this is different than for(auto needle : haystack), might be my ignorance
This is an interesting read, however I'd like to add my few (opinion-heavy) cents on it. Overall D seems nice, I'm gonna try to make some lil thing in it to see it for myself.
...
Here are a few clarifications.
Quote:
Originally Posted by KraHen
GC - good for some things, bad for other things. In my area of work we despise it, great microfreezes in performance heavy games are caused by it, but again, this is a very specific example that doesn't invalidate the other cases.
You have control over the GC in D though and it isn't always forced upon you.
Quote:
Originally Posted by KraHen
No more preprocessor - but I like the preprocessor, especially when targeting multiplatform
D has built-in stuff for things like that.
The version keyword for an example:
Code:
version (Windows) {
void doStuffOnWindows() { ... }
alias myFunction = doStuffOnWindows();
}
else version (Posix) {
void doStuffOnPosix() { ... }
alias myFunction = doStuffOnPosix();
}
else {
static assert(0); // platform not supported ...
}
// call myFunction as you wish ...
And with DUB you can easily setup platforms and versions for different compilation configurations.
Ex. look:
Quote:
Originally Posted by KraHen
No need for C++ template heroes - really? C++17 template programming has gotten extremely simple IMO. Again, a matter of getting used to it I guess.
Yeah, but ....
Quote:
Originally Posted by KraHen
Range based iterators - I don't see how this is different than for(auto needle : haystack), might be my ignorance
No more header files. IMO this is a bad thing, header files are great.
What kind of drugs are you on?
Quote:
Originally Posted by KraHen
D STL is actually readable. IMO the C++ STL is perfectly readable (but that might be due to extensive use, and getting used to it, rather than good design)
There's still some abominations in the D std lib, IMO, for instance:
(I used a URL shortener on the links, since apparently epvp removes the # part of the URL ...)
Quote:
Originally Posted by KraHen
GC - good for some things, bad for other things. In my area of work we despise it, great microfreezes in performance heavy games are caused by it, but again, this is a very specific example that doesn't invalidate the other cases.
Like Bauss said, it's easy to turn off the GC in D. The hard part is using the standard library / language features without a GC (arrays/slices, strings, etc. all use the GC)
Quote:
Originally Posted by KraHen
Range based iterators - I don't see how this is different than for(auto needle : haystack), might be my ignorance
It's not really any different from C++'s range-based for loop. It's just that the whole D standard library has been designed with ranges in mind from the start.
[Selling] 5760 Source conquer online. No Major bugs. C# Firmware. Open thread for more features 03/29/2014 - Conquer Online 2 Trading - 3 Replies Hey guys DIVI Here and now I have an amazing 5375 source. Tested and works..
Some things to know:
C# Firmware.
Easy to configure.
Should know some shit about coding.
Used by sql
Worked on for a long time, and worked hard!
NO Major bugs! <--
The source is ready for vps use and is ready to put as server so you can make it your server.
Conquer Open Source Project 01/19/2011 - CO2 Private Server - 101 Replies Ok so, as a few of you know ive been working on an open source project for a little while with the intention of having a number of people contribute to it, this hasnt happened for whatever reason so i figured i would try and get different people involved.
This project is to create a base which will work for any client version, be secure, reliable and maintainable. Currently the base is setup to work with a standard 4267 client, and any number of people can login, your character is defined by...
[Source] The Conquer Pax Project online. 01/10/2011 - CO2 Private Server - 7 Replies Hello, im asking you guys for help, i just got back into the whole conquer private server thing (because of private issues)
im planning to make a kind of server project and it will get the name "TCPP online" (The Conquer Pax project online) it will be a pvp (player versus player) server, the name wont change until its 100% done and that will take a while.
The first test server will be running 24/7 when it is stable enough.
Im not planning to make a new source and that is why i need the help...