Yo, I'm starting off a new game engine designed around D, and I
just wanted to know if some of you might be kind enough to review
some of my base code and tell me if I need to change anything in
it.. While it's small. ;_;
I'm still learning D, I quite like it, the power of C++ in some
parts,
On Wednesday, 20 November 2013 at 07:47:39 UTC, Ali Çehreli wrote:
On 11/19/2013 11:18 PM, Jeremy DeHaan wrote:
Like I said in the title, this is related to Windows.
Basically, I'm
looking to put a command line together to keep things
consistent between
Windows, OSX and Linux.
On OSX and
On Wednesday, 20 November 2013 at 07:48:21 UTC, Mineko wrote:
Yo, I'm starting off a new game engine designed around D, and I
just wanted to know if some of you might be kind enough to
review some of my base code and tell me if I need to change
anything in it.. While it's small. ;_;
I'm
Wikipedia states that the color bit can be stored without taking
additional space: In many cases the additional bit of
information can be stored at no additional memory cost.
Looking at the Phobos implementation, it stores it as a regular
byte:
On Wednesday, 20 November 2013 at 07:48:21 UTC, Mineko wrote:
(...)
..That and if I'm using the GPL right. _
Do you really plan on using 677 lines per file on the license
header..?
On Wednesday, 20 November 2013 at 07:48:21 UTC, Mineko wrote:
Yo, I'm starting off a new game engine designed around D, and I
just wanted to know if some of you might be kind enough to
review some of my base code and tell me if I need to change
anything in it.. While it's small. ;_;
I'm
On Wednesday, 20 November 2013 at 07:48:21 UTC, Mineko wrote:
Yo, I'm starting off a new game engine designed around D, and I
just wanted to know if some of you might be kind enough to
review some of my base code and tell me if I need to change
anything in it.. While it's small. ;_;
I'm
On Monday, 18 November 2013 at 19:52:42 UTC, Jonathan M Davis
wrote:
On Monday, November 18, 2013 19:16:11 Daniel Davidson wrote:
On Sunday, 17 November 2013 at 10:56:16 UTC, Jonathan M Davis
wrote:
I think that the typical approach at this point is to just
drop
purity for the
moment,
simendsjo:
But I would think this trick would break the GC,
If the tree manages its memory manually, using C heap memory,
then the pointer tagging becomes possible.
Bye,
bearophile
Meta:
import std.typecons;
Nullable!(string[]) func(string[] zz) pure nothrow
{
return Nullable!(string[])();
}
void main()
{
//AssertError thrown for trying to get
//a value that is null. Might as well
//return null at this point
auto x = func([test])
On Wednesday, 20 November 2013 at 09:15:41 UTC, Rene Zwanenburg
wrote:
Hi,
A few things jumped out at me:
Camera.d:
...
Oops, I have to run.. Will take a look at the rest later.
Still regarding camera.d:
- The glfw3 import appears to be unused and can be removed.
- the call to
On Wednesday, 20 November 2013 at 00:02:42 UTC, bearophile wrote:
Ali Çehreli:
That is a VLA.
That are currently not present in D. The most common and safe
alternatives in D are allocating the memory on the heap with
'new', or over-allocating on the stack a fixed size and then
slicing.
On Wednesday, November 20, 2013 10:20:35 Kenji Hara wrote:
I opened a new pull request to fix the compiler issue.
https://github.com/D-Programming-Language/dmd/pull/2832
Yay! Go Kenji. I don't know what we'd do without you.
- Jonathan M Davis
is typedef gone?
http://forum.dlang.org/thread/aqsjjrtzfzslcopab...@forum.dlang.org?page=2
so If I want to define a new type as typedef string[]
surrealNumber, then it does not work?
On Wednesday, 20 November 2013 at 10:49:19 UTC, seany wrote:
is typedef gone?
http://forum.dlang.org/thread/aqsjjrtzfzslcopab...@forum.dlang.org?page=2
so If I want to define a new type as typedef string[]
surrealNumber, then it does not work?
it is replaced with alias.
so for ur case this
Here is my code: http://www.everfall.com/paste/id.php?1si5bl7yymec
It's compile ok, but when I run App. I got next error: Entry
point pqueue_size in libeay32.dll did not founded
I had download OpenSSL, and put this lib to system32 and App
folder. And it's did not help.
Is there any way to represent mixed data (of various types) as a
single array?
In scilab, we have list, and you can do list(integer, stringvar
) etc.
Can you do something similar in D? An idea is to use a struct
wil all possible data types, but think that is inefficient.
Any other
seany:
is typedef gone?
http://forum.dlang.org/thread/aqsjjrtzfzslcopab...@forum.dlang.org?page=2
Right.
so If I want to define a new type as typedef string[]
surrealNumber, then it does not work?
There is a Typedef implemented in Phobos. In some cases it works,
but it's still buggy
On Wednesday, 20 November 2013 at 11:07:27 UTC, seany wrote:
Is there any way to represent mixed data (of various types) as
a single array?
In scilab, we have list, and you can do list(integer, stringvar
) etc.
Can you do something similar in D? An idea is to use a struct
wil all
On Wednesday, November 20, 2013 12:07:25 seany wrote:
Is there any way to represent mixed data (of various types) as a
single array?
In scilab, we have list, and you can do list(integer, stringvar
) etc.
Can you do something similar in D? An idea is to use a struct
wil all possible
On Wednesday, 20 November 2013 at 10:54:31 UTC, evilrat wrote:
On Wednesday, 20 November 2013 at 10:49:19 UTC, seany wrote:
is typedef gone?
http://forum.dlang.org/thread/aqsjjrtzfzslcopab...@forum.dlang.org?page=2
so If I want to define a new type as typedef string[]
surrealNumber, then it
On 11/20/2013 4:48 PM, Mineko wrote:
Thanks for helping out a newbie, and if you want to contribute to it,
even better!
You don't need to list derelict-util as a dependency in your
package.json. The other Derelict packages already depend on it so it
will be pulled in anyway.
On 11/20/2013 5:01 PM, Jeremy DeHaan wrote:
The -L switch is just for sending switches to the linker. On OSX and
Linux, it is -L-lLibraryName, like I mention before, where -lLibraryName
is what actually gets passed to the linker. Basically I'm wondering of
Optlink has a switch that does the
On Monday, 26 March 2012 at 07:14:50 UTC, Ali Çehreli wrote:
On 03/25/2012 08:26 AM, AaronP wrote:
Could I get a hello, world example of parsing json? The docs
look
simple enough, but I could still use an example.
For what it's worth, I've just sent the following program to a
friend before
For tasks that imply conversion between D types and JSON text
(alike to serialization), vibe.d module is really much superior
because it provides functions like
http://vibed.org/api/vibe.data.json/serializeToJson which just
work on many user types.
On Wednesday, 20 November 2013 at 13:20:48 UTC, Dicebot wrote:
For tasks that imply conversion between D types and JSON text
(alike to serialization), vibe.d module is really much superior
because it provides functions like
http://vibed.org/api/vibe.data.json/serializeToJson which just
work
What I mean is that std.json does not seem to be written with
such usage mode in mind, it is more about direct DOM
manipulation/construction. So probably examples should probably
not highlight how bad it is at tasks it is really bad at :P
On Wednesday, 20 November 2013 at 13:29:54 UTC, Dicebot wrote:
What I mean is that std.json does not seem to be written with
such usage mode in mind, it is more about direct DOM
manipulation/construction. So probably examples should probably
not highlight how bad it is at tasks it is really
On Wednesday, 20 November 2013 at 08:48:33 UTC, simendsjo wrote:
But I would think this trick would break the GC, as well as
making code less portable.
Since the GC supports interior pointers, I think you can justify
using the least significant bits as long as the size and
alignment of the
On 11/20/13, Craig Dillabaugh cdill...@cg.scs.carleton.ca wrote:
On Wednesday, 20 November 2013 at 13:29:54 UTC, Dicebot wrote:
What I mean is that std.json does not seem to be written with
such usage mode in mind, it is more about direct DOM
manipulation/construction. So probably examples
Wow!
You guys are really helpful, I wouldn't have thought about a lot
of that, I'll pounce on all of this right after breakfast!
Thanks! :D
safety0ff:
Since the GC supports interior pointers, I think you can
justify using the least significant bits as long as the size
and alignment of the pointed object guarantee that the pointer
+ tag will always lie inside the memory block.
From:
http://dlang.org/garbage.html
Do not take
Feel free to take a look at https://github.com/hpohl/ext/. Maybe
you can find something useful.
On Wednesday, 20 November 2013 at 11:00:07 UTC, Suliman wrote:
Here is my code:
http://www.everfall.com/paste/id.php?1si5bl7yymec
It's compile ok, but when I run App. I got next error: Entry
point pqueue_size in libeay32.dll did not founded
I had download OpenSSL, and put this lib to
You should fix your LICENSE following these instructions
http://www.gnu.org/licenses/gpl-howto.html. I hope you understand
the virality of GPL and why most people won't touch your code for
real work.
On Wednesday, 20 November 2013 at 07:48:21 UTC, Mineko wrote:
Yo, I'm starting off a new
On Wednesday, 20 November 2013 at 11:25:24 UTC, Jonathan M Davis
wrote:
On Wednesday, November 20, 2013 12:07:25 seany wrote:
Is there any way to represent mixed data (of various types) as
a
single array?
In scilab, we have list, and you can do list(integer, stringvar
) etc.
Can you do
seany:
Now, i was trying the first, i used the
std.algorithms.splitter, and the result is of type *Result* and
not string[], nonetheless I can cast (how does this work? isn't
typedef removed, and alias should preserve underlaying types)
cast() should be used only when you know what you are
On Wednesday, 20 November 2013 at 10:20:06 UTC, Rene Zwanenburg
wrote:
On Wednesday, 20 November 2013 at 09:15:41 UTC, Rene Zwanenburg
wrote:
Hi,
A few things jumped out at me:
Camera.d:
...
Oops, I have to run.. Will take a look at the rest later.
Still regarding camera.d:
- The glfw3
On Tuesday, 19 November 2013 at 23:36:57 UTC, Rob T wrote:
On Tuesday, 19 November 2013 at 18:35:08 UTC, Jeroen Bollen
wrote:
Is there a way I can call a receive method on a socket with
MSG_WAITALL as a flag? There doesn't seem to be an enum for
that.
module core.sys.posix.sys.socket;
On Wednesday, 20 November 2013 at 12:02:36 UTC, Mike Parker wrote:
On 11/20/2013 5:01 PM, Jeremy DeHaan wrote:
The -L switch is just for sending switches to the linker. On
OSX and
Linux, it is -L-lLibraryName, like I mention before, where
-lLibraryName
is what actually gets passed to the
On Monday, 18 November 2013 at 19:12:03 UTC, Ali Çehreli wrote:
On 11/18/2013 10:28 AM, Jeroen Bollen wrote:
Is it possible to do something like:
TestInterface testi = new classReferenceList[integer];
We still don't know what the use case is :) but it is possible
to store types in a
On Wednesday, 20 November 2013 at 15:30:32 UTC, Geancarlo Rocha
wrote:
You should fix your LICENSE following these instructions
http://www.gnu.org/licenses/gpl-howto.html. I hope you
understand the virality of GPL and why most people won't touch
your code for real work.
Yeah I know, have
Hi,
is there a library function for encoding text as QuotedPrintable?
I found an old post from 2005:
http://forum.dlang.org/thread/cv98ti$1sf8$1...@digitaldaemon.com
The used function toHex throws errors. I also not found
an alternative way to convert a char to a hex as replacement
for the
On Wednesday, 20 November 2013 at 16:53:47 UTC, Andre wrote:
is there a library function for encoding text as
QuotedPrintable?
I fixed the function in that post:
char[] generateQuotedPrintable(in char[] string, in char[]
charset =
UTF-8)
{
char[] output;
bool special =
On Wednesday, 20 November 2013 at 17:04:07 UTC, Adam D. Ruppe
wrote:
On Wednesday, 20 November 2013 at 16:53:47 UTC, Andre wrote:
is there a library function for encoding text as
QuotedPrintable?
I fixed the function in that post:
char[] generateQuotedPrintable(in char[] string, in char[]
On Wednesday, 20 November 2013 at 10:49:19 UTC, seany wrote:
is typedef gone?
http://forum.dlang.org/thread/aqsjjrtzfzslcopab...@forum.dlang.org?page=2
so If I want to define a new type as typedef string[]
surrealNumber, then it does not work?
typedef was removed from the language, there
On Wednesday, 20 November 2013 at 10:20:06 UTC, Rene Zwanenburg
wrote:
On Wednesday, 20 November 2013 at 09:15:41 UTC, Rene Zwanenburg
wrote:
Hi,
A few things jumped out at me:
Camera.d:
...
Oops, I have to run.. Will take a look at the rest later.
Still regarding camera.d:
- The glfw3
is there a way I can pass a TypeTulip to a function?
Something like:
Can I create a class array in D? Something like:
interface A {}
class AA: A {}
class AB: A {}
class AC: A {}
ClassList!A list = new ClassList!A {AA, AB, AC};
void testf(ulong testv) {
A a = new list[testv];
}
I know
On 11/20/2013 08:35 AM, Jeroen Bollen wrote:
I was more looking for a way to just access a type/class by specifying
an index... I don't really get your code.
TypeTuple can contain types. Do you know the index at compile time or at
run time? Here is a program that demonstrates constructing an
On 11/20/2013 10:12 AM, Jeroen Bollen wrote:
is there a way I can pass a TypeTulip to a function?
alias TypeTulip = TypeTuple;
;)
Something like:
Can I create a class array in D? Something like:
interface A {}
class AA: A {}
class AB: A {}
class AC: A {}
ClassList!A list = new
On Wednesday, 20 November 2013 at 18:23:37 UTC, Ali Çehreli wrote:
On 11/20/2013 10:12 AM, Jeroen Bollen wrote:
is there a way I can pass a TypeTulip to a function?
alias TypeTulip = TypeTuple;
;)
Something like:
Can I create a class array in D? Something like:
interface A {}
class
On Wednesday, 20 November 2013 at 18:31:37 UTC, Jeroen Bollen
wrote:
That doesn't allow specifying a base class all members should
be a part of though, or does it?
You could write your own tuple template for it, or just let the
compile fail on the factory function: the A a = new T(); will
On Wednesday, November 20, 2013 17:26:27 Jeroen Bollen wrote:
On Tuesday, 19 November 2013 at 23:36:57 UTC, Rob T wrote:
On Tuesday, 19 November 2013 at 18:35:08 UTC, Jeroen Bollen
wrote:
Is there a way I can call a receive method on a socket with
MSG_WAITALL as a flag? There doesn't
On Wednesday, 20 November 2013 at 16:40:59 UTC, Mineko wrote:
On Wednesday, 20 November 2013 at 15:30:32 UTC, Geancarlo Rocha
wrote:
You should fix your LICENSE following these instructions
http://www.gnu.org/licenses/gpl-howto.html. I hope you
understand the virality of GPL and why most
On Wednesday, 20 November 2013 at 19:38:09 UTC, Paulo Pinto wrote:
I would suggest dual license.
GPL for open source projects and something else for commercial
projects.
It all depends how you see companies using your code, without
any kind of retribution or recognition. I see this
On Wednesday, 20 November 2013 at 20:00:17 UTC, Mineko wrote:
On Wednesday, 20 November 2013 at 19:38:09 UTC, Paulo Pinto
wrote:
as long as the engine itself is free and redistributed intact
then everything is fine.
Then you are probably looking at a LGPL license. I'm not gonna
explain in
On Wednesday, 20 November 2013 at 20:57:11 UTC, Franz wrote:
On Wednesday, 20 November 2013 at 20:00:17 UTC, Mineko wrote:
On Wednesday, 20 November 2013 at 19:38:09 UTC, Paulo Pinto
wrote:
as long as the engine itself is free and redistributed intact
then everything is fine.
Then you are
On Wednesday, 20 November 2013 at 21:13:05 UTC, Mineko wrote:
On Wednesday, 20 November 2013 at 20:57:11 UTC, Franz wrote:
On Wednesday, 20 November 2013 at 20:00:17 UTC, Mineko wrote:
On Wednesday, 20 November 2013 at 19:38:09 UTC, Paulo Pinto
wrote:
as long as the engine itself is free and
On Wednesday, 20 November 2013 at 09:15:41 UTC, Rene Zwanenburg
wrote:
Hi,
A few things jumped out at me:
Camera.d:
- The use of x, y, z and rx, ry, rz. These should really be in
some vector struct. Since you're using Dub, you can easily use
gl3n [1][2]. While it's still pretty basic,
I've been screwing around with templates lately, and I'm
attempting to figure out why the following won't compile:
struct value
{
int a;
const auto
opBinary(string op, T)(in T rhs) const pure {
static if (op == +)
return
On Monday, 28 October 2013 at 11:22:03 UTC, Jeroen Bollen wrote:
Is it possible in D to create an enum of class references?
Something around the lines of:
enum ClassReferences : Interface {
CLASS1 = ClassOne,
CLASS2 = ClassTwo
}
Here's my solution using an enum as you originally
On Wednesday, 20 November 2013 at 23:06:37 UTC, Jared Miller
wrote:
Foo getObj(ClassNames name) {
// without cast, it converts to the enum member name.
return cast(Foo)Object.factory(cast(string)name);
}
Oops, never mind - you don't need the cast(string) there.
On Wednesday, 20 November 2013 at 13:48:37 UTC, Orvid King wrote:
On 11/20/13, Craig Dillabaugh cdill...@cg.scs.carleton.ca
wrote:
On Wednesday, 20 November 2013 at 13:29:54 UTC, Dicebot wrote:
What I mean is that std.json does not seem to be written with
such usage mode in mind, it is more
On 11/20/2013 06:50 AM, bearophile wrote:
safety0ff:
Since the GC supports interior pointers, I think you can justify using
the least significant bits as long as the size and alignment of the
pointed object guarantee that the pointer + tag will always lie inside
the memory block.
From:
Hi, help please, how I get array of elements the base type from
Variant?
http://dpaste.dzfl.pl/6dd70f9b
On Thursday, 21 November 2013 at 05:16:10 UTC, RomulT wrote:
Hi, help please, how I get array of elements the base type from
Variant?
http://dpaste.dzfl.pl/6dd70f9b
may be there is a way to cast array directly but i doubt.
so you need either to do this
IXXX[] x = [new XXX(), new
On Wednesday, 20 November 2013 at 16:40:59 UTC, Mineko wrote:
On Wednesday, 20 November 2013 at 15:30:32 UTC, Geancarlo Rocha
wrote:
You should fix your LICENSE following these instructions
http://www.gnu.org/licenses/gpl-howto.html. I hope you
understand the virality of GPL and why most
On Thursday, 21 November 2013 at 05:44:53 UTC, evilrat wrote:
On Thursday, 21 November 2013 at 05:16:10 UTC, RomulT wrote:
Hi, help please, how I get array of elements the base type
from Variant?
http://dpaste.dzfl.pl/6dd70f9b
may be there is a way to cast array directly but i doubt.
so
On Wednesday, 20 November 2013 at 22:49:42 UTC, Spott wrote:
I've been screwing around with templates lately, and I'm
attempting to figure out why the following won't compile:
struct value
{
int a;
const auto
opBinary(string op, T)(in T rhs) const pure {
static
On Wednesday, 20 November 2013 at 22:49:42 UTC, Spott wrote:
I've been screwing around with templates lately, and I'm
attempting to figure out why the following won't compile:
struct value
{
int a;
const auto
opBinary(string op, T)(in T rhs) const pure {
static
On Thursday, 21 November 2013 at 06:31:54 UTC, RomulT wrote:
Yes, it a work, thank you. The problem occurs when, in Variant
already recorded XXX[] and it is necessary to extract the
IXXX[], because in the place used nothing is known about type
XXX.
so you need just to cast XXX[] to IXXX[] ?
On Wednesday, November 20, 2013 23:49:42 Spott wrote:
I've been screwing around with templates lately, and I'm
attempting to figure out why the following won't compile:
struct value
{
int a;
const auto
opBinary(string op, T)(in T rhs) const pure {
On Thursday, November 21, 2013 07:48:34 qznc wrote:
First, use dpaste for such code snippets:
http://dpaste.dzfl.pl/f2f39b32
Really? I find it annoying when people do that unless the code is quite long.
It's much easier to have it just be in the message IMHO. Also, it has the
benefit of not
On Thursday, November 21, 2013 08:21:37 bioinfornatics wrote:
why this fail http://www.dpaste.dzfl.pl/a6d6acf4
I want to works with ubyte -
i do not want use int for manipulating these byte and consume
more memory as need!
All arithmetic operations on integer types (including
On 11/20/2013 11:21 PM, bioinfornatics wrote:
why this fail http://www.dpaste.dzfl.pl/a6d6acf4
as with c, most of the integer operators return int for integral types
smaller than int. also, this is a case where
a += b
does something different than
a = a + b
i guess the former
75 matches
Mail list logo