On Friday, 6 April 2018 at 02:18:28 UTC, Kayomn wrote:
On Friday, 6 April 2018 at 01:22:42 UTC, Kayomn wrote:
On Friday, 6 April 2018 at 01:14:37 UTC, ketmar wrote:
Kayomn wrote:
[...]
it is already done for you, free of charge.
class Node {}
class RootNode : Node {}
On Friday, 6 April 2018 at 01:22:42 UTC, Kayomn wrote:
On Friday, 6 April 2018 at 01:14:37 UTC, ketmar wrote:
Kayomn wrote:
[...]
it is already done for you, free of charge.
class Node {}
class RootNode : Node {}
class SpriteNode : Node {}
void main () {
On Friday, 23 February 2018 at 03:25:33 UTC, Norm wrote:
On Friday, 23 February 2018 at 01:54:07 UTC, Leonardo wrote:
Hi, I'm new to language and games.
Many people say that GC is bad and can slow down your project
in some moments.
What can happen if I create a game using D without worrying
On Friday, 6 April 2018 at 01:14:37 UTC, ketmar wrote:
Kayomn wrote:
[...]
it is already done for you, free of charge.
class Node {}
class RootNode : Node {}
class SpriteNode : Node {}
void main () {
auto nodeId1 = typeid(Node);
On Friday, April 06, 2018 00:35:39 Kayomn via Digitalmars-d-learn wrote:
> On Friday, 6 April 2018 at 00:21:54 UTC, H. S. Teoh wrote:
> > On Thu, Apr 05, 2018 at 11:53:00PM +, Kayomn via
> > Digitalmars-d-learn wrote: [...]
> >
> >> [...]
> >
> > [...]
> >
> >> [...]
> >
> > `lastID`, as
Kayomn wrote:
I'll give a better example of what it is I'm trying to do.
These are node types. Their contents are not important in this
explanation, only that they operate as a tree structure.
class Node;
class RootNode : Node;
class SpriteNode : Node;
The result of getNodeID on a
I'll give a better example of what it is I'm trying to do.
These are node types. Their contents are not important in this
explanation, only that they operate as a tree structure.
class Node;
class RootNode : Node;
class SpriteNode : Node;
The result of getNodeID on a specific type is
On Friday, 6 April 2018 at 00:21:54 UTC, H. S. Teoh wrote:
On Thu, Apr 05, 2018 at 11:53:00PM +, Kayomn via
Digitalmars-d-learn wrote: [...]
[...]
[...]
[...]
`lastID`, as declared above, are runtime variables. The
'static' in this case just means it's thread-local, rather than
On Thu, Apr 05, 2018 at 11:53:00PM +, Kayomn via Digitalmars-d-learn wrote:
[...]
> ---
> alias NodeTypeID = uint;
>
> enum NodeTypeID getNodeID() {
> static NodeTypeID lastID = 0;
>
> return lastID++;
>
Hi,
I've got a scene graph which contains multiple inheriting types.
As such, I've been tagging them with a type enum for whenever I
need to do things such as loading a structure from binary.
Up until now I've been using an enum that looks like this:
On Thursday, 5 April 2018 at 19:31:39 UTC, Jonathan M Davis wrote:
And you can't abstract whether a member variable is marked with
immutable or not. That's part of the variable. Declaring an
immutable instance of an object would then treat the member
variable in immutable for that instance, so
Seems I found a better solution hidden in the docs:
@nogc protected int[2] transformFunc(int[2] xy){
version(X86){
asm @nogc{
naked;
mov EBX, this;
movdXMM1, sX[EBX];
pslldq XMM1, 4;
movss XMM1, sY[EBX];
On Thursday, 5 April 2018 at 04:48:02 UTC, Basile B. wrote:
The "this" seems to be in R11, so you have to apply the asm
syntax for accessing the members using
.offsetof.[R11], example:
```
class Foo
{
double a = 123456;
extern(D) double foo()
{
asm
{
On Thursday, 5 April 2018 at 17:36:56 UTC, Seb wrote:
On Thursday, 5 April 2018 at 17:06:04 UTC, rumbu wrote:
Is there a standard way to handle errors in a chain of range
transformations?
[...]
Are you aware of ifThrown?
https://dlang.org/phobos/std_exception.html#ifThrown
It's not
On Thursday, April 05, 2018 13:36:07 Alex via Digitalmars-d-learn wrote:
> On Wednesday, 4 April 2018 at 21:49:08 UTC, Timoses wrote:
> > "[...] the construction of the base class can be independent
> > from the derived one."
> >
> > Hm, the points 7 and 8 don't clearly state what you wrote.
>
>
On Thursday, 5 April 2018 at 14:58:21 UTC, Andy Smith wrote:
On Thursday, 5 April 2018 at 08:12:38 UTC, aerto wrote:
This is the bitcoin genesis block merkle root
4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b how i can get it at this format
On Wednesday, 4 April 2018 at 22:47:07 UTC, Jonathan M Davis
wrote:
Because doing that basically makes it impossible to guarantee
that the type system isn't violated. Once an immutable variable
has been initialized, its value must _never_ change. It must be
initalized exactly once, and the
On Thursday, 5 April 2018 at 17:06:04 UTC, rumbu wrote:
Is there a standard way to handle errors in a chain of range
transformations?
[...]
Are you aware of ifThrown?
https://dlang.org/phobos/std_exception.html#ifThrown
It's not perfect, but imho a nice start and one of the places
where
On Thursday, 5 April 2018 at 17:06:04 UTC, rumbu wrote:
Is there a standard way to handle errors in a chain of range
transformations?
Let's say I want to read some comma separated numbers from a
file.
auto myArray = file.byLine().splitter().map!(to!int).array();
Now, besides fatal errors
Is there a standard way to handle errors in a chain of range
transformations?
Let's say I want to read some comma separated numbers from a file.
auto myArray = file.byLine().splitter().map!(to!int).array();
Now, besides fatal errors (like I/O), let's suppose I want to
handle some errors in a
On Thursday, 5 April 2018 at 08:12:38 UTC, aerto wrote:
This is the bitcoin genesis block merkle root
4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b how i can get it at this format 3ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a ??
i try it using
string
On Thursday, 5 April 2018 at 09:49:58 UTC, Seb wrote:
Strings are bi-directional ranges, but they aren't
random-access nor have a length
chunks requires hasSlicing + hasLength:
Okay, thanks for the great references. chunks/slide certainly
need the length to decide which, and how many,
On Wednesday, 4 April 2018 at 21:49:08 UTC, Timoses wrote:
"[...] the construction of the base class can be independent
from the derived one."
Hm, the points 7 and 8 don't clearly state what you wrote.
Yes :)
But it somehow does make sense.. Still I wonder why that is so.
Let's say you
On Thursday, 5 April 2018 at 09:24:31 UTC, SimonN wrote:
On Thursday, 5 April 2018 at 09:07:52 UTC, Seb wrote:
FYI: The problem isn't chunks, but that strings aren't
bi-directional ranges (hello ugly auto-decoding!).
"4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b".byCodeUnit
On Thursday, 5 April 2018 at 09:07:52 UTC, Seb wrote:
FYI: The problem isn't chunks, but that strings aren't
bi-directional ranges (hello ugly auto-decoding!).
"4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b".byCodeUnit
Thanks! Very appropriate because it's all hex digits
On Thursday, 5 April 2018 at 08:57:11 UTC, SimonN wrote:
On Thursday, 5 April 2018 at 08:12:38 UTC, aerto wrote:
This is the bitcoin genesis block merkle root
4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b how i can get it at this format
05.04.2018 11:57, SimonN пишет:
Here's one solution with std.range.chunks. A small downside is that it
needs the array allocation in the middle because chunks cannot offer the
bi-directional range necessary for retro.
import std.range;
import std.algorithm;
void main()
On Thursday, 5 April 2018 at 08:12:38 UTC, aerto wrote:
This is the bitcoin genesis block merkle root
4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b how i can get it at this format 3ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a ??
i try it using
string
This is the bitcoin genesis block merkle root
4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
how i can get it at this format
3ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a
??
i try it using
string merkle =
29 matches
Mail list logo