Can anybody explain:
Is dependencies file produced from command:
dmd -deps=moduleA.deps moduleA.d
must contains mention of moduleC?
Is dependencies file produced reccursively?
Thanks.
On Saturday, January 16, 2016 06:06:03 Kapps via Digitalmars-d-learn wrote:
> On Friday, 15 January 2016 at 20:04:47 UTC, Nordlöw wrote:
> > On Friday, 15 January 2016 at 16:51:24 UTC, Anon wrote:
> >> On Friday, 15 January 2016 at 14:04:50 UTC, Nordlöw wrote:
> >>> What have I missed?
> >>
> >>
On Friday, 15 January 2016 at 15:13:37 UTC, Jacob Carlborg wrote:
On 2016-01-15 11:16, Warwick wrote:
I though C style casts were not supported? But when I
accidentaly did
int i;
if (uint(i) < length)
it compiled and worked fine. Whys that?
Wouldn't a C style cast be:
int i;
if
I'm trying to make a fast little function that'll give me a
random looking (but deterministic) value from an x,y position on
a grid. I'm just going to run each co-ord that I need through an
FNV-1a hash function as an array of bytes since that seems like a
fast and easy way to go. I'm going to
On 01/16/2016 11:50 PM, data pulverizer wrote:
I guess the constraints are that of a static language.
(This is not true.)
On Saturday, 16 January 2016 at 20:28:02 UTC, Dibyendu Majumdar
wrote:
I have installed DMD by unzipping the DMD archive (The
installer does not work correctly on Windows 10). DUB installed
as normal.
What problem did you have with the installer? Which version? I've
installed DMD more
On Sunday, 17 January 2016 at 02:48:47 UTC, Mike Parker wrote:
On Saturday, 16 January 2016 at 20:28:02 UTC, Dibyendu Majumdar
wrote:
I have installed DMD by unzipping the DMD archive (The
installer does not work correctly on Windows 10). DUB
installed as normal.
What problem did you
On 01/16/2016 02:50 PM, data pulverizer wrote:
> I guess I have been writing a lot of julia where I take
> creating arrays and tuples of types for granted. In this case
> types are of type DataType. [...] I guess the constraints are
> that of a static language.
Exactly. I am sure every D
Hello to forum readers!
I have a question about using OutputRange and std.range: put. I
have the following code snippet to illustrate my question:
import std.range, std.stdio, std.string;
void main()
{
string greating = "Hello, " ;
string username = "Bob";
On Saturday, 16 January 2016 at 15:42:39 UTC, bearophile wrote:
Yazan D:
On Saturday, 16 January 2016 at 14:42:27 UTC, Yazan D wrote:
ubyte[] b = (cast(ubyte*) )[0 .. int.sizeof];
Better to use the actual size:
ubyte[] b = (cast(ubyte*) )[0 .. a.sizeof];
Bye,
bearophile
Good thinking, I
On Saturday, January 16, 2016 12:11:11 Uranuz via Digitalmars-d-learn wrote:
> Hello to forum readers!
> I have a question about using OutputRange and std.range: put. I
> have the following code snippet to illustrate my question:
>
> import std.range, std.stdio, std.string;
>
> void main()
> {
>
On Saturday, 16 January 2016 at 14:42:27 UTC, Yazan D wrote:
On Sat, 16 Jan 2016 14:34:54 +, Samson Smith wrote:
[...]
You can do this:
ubyte[] b = (cast(ubyte*) )[0 .. int.sizeof];
It is casting the pointer to `a` to a ubyte (or byte) pointer
and then taking a slice the size of int.
On Saturday, 16 January 2016 at 16:14:56 UTC, Jonathan M Davis
wrote:
On Saturday, January 16, 2016 12:11:11 Uranuz via
Digitalmars-d-learn wrote:
[...]
There are a few problems here. First off, when put is used with
an array, it fills the array. It doesn't append to it. So, you
can't use a
On Saturday, January 16, 2016 16:53:24 Uranuz via Digitalmars-d-learn wrote:
> On Saturday, 16 January 2016 at 16:14:56 UTC, Jonathan M Davis
> wrote:
> > On Saturday, January 16, 2016 12:11:11 Uranuz via
> > Digitalmars-d-learn wrote:
> >> [...]
> >
> > There are a few problems here. First off,
On Sat, 16 Jan 2016 14:34:54 +, Samson Smith wrote:
> I'm trying to make a fast little function that'll give me a random
> looking (but deterministic) value from an x,y position on a grid. I'm
> just going to run each co-ord that I need through an FNV-1a hash
> function as an array of bytes
On Saturday, January 16, 2016 14:34:54 Samson Smith via Digitalmars-d-learn
wrote:
> I'm trying to make a fast little function that'll give me a
> random looking (but deterministic) value from an x,y position on
> a grid. I'm just going to run each co-ord that I need through an
> FNV-1a hash
On Sat, 16 Jan 2016 14:42:27 +, Yazan D wrote:
>
> You can do this:
> ubyte[] b = (cast(ubyte*) )[0 .. int.sizeof];
>
> It is casting the pointer to `a` to a ubyte (or byte) pointer and then
> taking a slice the size of int.
You can also use a union:
union Foo
{
int i;
ubyte[4] b;
}
Yazan D:
On Saturday, 16 January 2016 at 14:42:27 UTC, Yazan D wrote:
ubyte[] b = (cast(ubyte*) )[0 .. int.sizeof];
Better to use the actual size:
ubyte[] b = (cast(ubyte*) )[0 .. a.sizeof];
Bye,
bearophile
On Saturday, 16 January 2016 at 16:28:21 UTC, Jonathan M Davis
wrote:
On Saturday, January 16, 2016 14:34:54 Samson Smith via
Digitalmars-d-learn wrote:
I'm trying to make a fast little function that'll give me a
random looking (but deterministic) value from an x,y position
on a grid. I'm just
Am Sat, 16 Jan 2016 18:05:46 +
schrieb Samson Smith :
> On Saturday, 16 January 2016 at 16:28:21 UTC, Jonathan M Davis
> wrote:
> >
> > But it will be less error-prone to use those functions, and if
> > you _do_ actually need to swap endianness, then they're exactly
> > what
On Saturday, 16 January 2016 at 21:22:15 UTC, data pulverizer
wrote:
Is it possible to create a function that returns Type like
typeof() does? Something such as:
Type returnInt(){
return int;
}
More to the point what is the Type of a type such as int?
Thanks
p.s. I am aware I could do
On Saturday, 16 January 2016 at 21:22:15 UTC, data pulverizer
wrote:
Is it possible to create a function that returns Type like
typeof() does? Something such as:
Type returnInt(){
return int;
}
Functions return values, not types. You would use a template to
"return" a type.
More to
Hi
I am using DUB on Windows 10 64-bit with DMD. I have simple
project with following configuration:
{
"name": "testing",
"description": "A minimal D application.",
"copyright": "Copyright © 2016, dibyendu",
"authors": ["dibyendu"],
"targetType":
On 2016-01-16 20:28:02 +, Dibyendu Majumdar said:
I have installed DMD by unzipping the DMD archive (The installer does
not work correctly on Windows 10). DUB installed as normal.
Check your paths in sc.ini Looks like the D link libraries are not found.
--
Robert M. Münch
Am Sat, 16 Jan 2016 15:46:00 +
schrieb Samson Smith :
> On Saturday, 16 January 2016 at 14:42:27 UTC, Yazan D wrote:
> > On Sat, 16 Jan 2016 14:34:54 +, Samson Smith wrote:
> >
> >> [...]
> >
> > You can do this:
> > ubyte[] b = (cast(ubyte*) )[0 .. int.sizeof];
> >
> >
Is it possible to create a function that returns Type like
typeof() does? Something such as:
Type returnInt(){
return int;
}
More to the point what is the Type of a type such as int?
Thanks
On Saturday, 16 January 2016 at 21:59:22 UTC, data pulverizer
wrote:
On Saturday, 16 January 2016 at 21:22:15 UTC, data pulverizer
wrote:
Is it possible to create a function that returns Type like
typeof() does? Something such as:
Type returnInt(){
return int;
}
More to the point what is
On Saturday, 16 January 2016 at 21:22:15 UTC, data pulverizer
wrote:
Is it possible to create a function that returns Type like
typeof() does? Something such as:
Type returnInt(){
return int;
}
No. A function cannot return a type. A template can evaluate to a
type, though:
On Saturday, 16 January 2016 at 21:22:15 UTC, data pulverizer
wrote:
Is it possible to create a function that returns Type like
typeof() does? Something such as:
Type returnInt(){
return int;
}
A type itself isn't a runtime value. I think the closest thing
is a TypeInfo object:
On Saturday, 16 January 2016 at 14:46:47 UTC, Yazan D wrote:
You can also use a union:
union Foo
{
int i;
ubyte[4] b;
}
// write to int part
Foo f = Foo(a);
// then read from ubyte part
writeln(foo.b);
ps. I am not sure of the aliasing rules in D for unions. In C,
this is allowed, but in
On Saturday, 16 January 2016 at 20:50:51 UTC, Robert M. Münch
wrote:
Check your paths in sc.ini Looks like the D link libraries are
not found.
Well as far as I can tell they are correct (unchanged from
whatever the installer set them to):
; environment for both 32/64 bit
[Environment]
On Saturday, 16 January 2016 at 21:51:15 UTC, Dibyendu Majumdar
wrote:
Well as far as I can tell they are correct (unchanged from
whatever the installer set them to):
; environment for both 32/64 bit
[Environment]
DFLAGS="-I%@P%\..\..\src\phobos"
"-I%@P%\..\..\src\druntime\import"
;
My underlying question is how to compose functions taking
functions as arguments, while allowing the caller the flexibility
to pass either a function or delegate.
Simply declaring an argument as either a function or delegate
seems to prohibit the other. Overloading works. Are there better
On Sunday, 17 January 2016 at 06:27:41 UTC, Jon D wrote:
My underlying question is how to compose functions taking
functions as arguments, while allowing the caller the
flexibility to pass either a function or delegate.
[...]
Templates are an easy way.
---
auto call(F, Args...)(F fun, auto
On Sunday, 17 January 2016 at 06:49:23 UTC, rsw0x wrote:
On Sunday, 17 January 2016 at 06:27:41 UTC, Jon D wrote:
My underlying question is how to compose functions taking
functions as arguments, while allowing the caller the
flexibility to pass either a function or delegate.
[...]
35 matches
Mail list logo