On Sun, 28 Sep 2014 22:33:40 +0100
Stewart Gordon via Digitalmars-d-learn
wrote:
> You can do `new ubyte[256][256]`, if the destination type is a
> ubyte[256][]. The reason is that you are performing an allocation of
> the form `new T[n]`, which means allocate an array of n instances of
> type T
On Sun, 28 Sep 2014 07:40:23 -0700
"H. S. Teoh via Digitalmars-d-learn"
wrote:
> File a bug.
https://issues.dlang.org/show_bug.cgi?id=13556
signature.asc
Description: PGP signature
On Sunday, 28 September 2014 at 20:50:07 UTC, Jay wrote:
On Sunday, 28 September 2014 at 20:30:42 UTC, Meta wrote:
class Button
{
typeof(this) text(string t)
{
return this;
}
typeof(this) textColour(int c)
{
return
On 28/09/2014 08:48, ketmar via Digitalmars-d-learn wrote:
On Sun, 28 Sep 2014 04:24:19 +
Joel via Digitalmars-d-learn wrote:
struct Spot { bool dot; }
spots = new Spot[][](800,600);
btw, does anybody know why i can do `new ubyte[256];` but not
`new ubyte[256][256];`? hate that.
You can
Coming from the C# world, all of localization we did was based on
defining string resource files (XML-formatted source files which
were translated into C# classes with named-string accessors by
the build process) that would get included in the final
application. For log messages, exception mes
On Sunday, 28 September 2014 at 20:30:42 UTC, Meta wrote:
class Button
{
typeof(this) text(string t)
{
return this;
}
typeof(this) textColour(int c)
{
return this;
}
}
void main()
{
auto b = new Butt
On Sunday, 28 September 2014 at 19:11:23 UTC, Jay wrote:
i want to chain 'new' with method calls on the created object.
i found this on the internet:
window.mainWidget = (new Button()).text("Hello
world"d).textColor(0xFF);
it would look much nicer with UFCS:
window.mainWidget = Button.n
On Sunday, 28 September 2014 at 09:04:42 UTC, Nordlöw wrote:
On Sunday, 28 September 2014 at 08:58:27 UTC, Nordlöw wrote:
In my strive to add msgpacking support for std.container.Array
I've been blocked by the fact that std.container.Array.opIndex
only has one overload which is non-const probab
On Sunday, 28 September 2014 at 19:19:56 UTC, Foo wrote:
mixin template New(T) if (is(T == class)) {
static T New(Args...)(Args args) {
return new T(args);
}
}
fwiw here's what i wrote:
template New(T) if (is(T == class)) {
T New(Args...) (Args args) {
r
On Sunday, 28 September 2014 at 19:06:09 UTC, Marc Schütz wrote:
On Sunday, 28 September 2014 at 16:12:53 UTC, Meta wrote:
On Sunday, 28 September 2014 at 08:01:00 UTC, Nordlöw wrote:
Is there a reason why isArray!T doesn't match T when T is a
std.container.Array? I'm asking because after looki
On Sunday, 28 September 2014 at 19:41:29 UTC, Idan Arye wrote:
Because `new` is not a function - it's an operator.
do you think the function call syntax has any chance to be
implemented? is it just me who needs it?
On Sunday, 28 September 2014 at 19:32:11 UTC, Jay wrote:
thanks! but i'm still interested *why* you can't have this with
'new'. if there's no good reason i will file a bug report.
Because `new` is not a function - it's an operator.
thanks! but i'm still interested *why* you can't have this with
'new'. if there's no good reason i will file a bug report.
On Sunday, 28 September 2014 at 19:19:56 UTC, Foo wrote:
mixin template New(T) if (is(T == class)) {
static T New(Args...)(Args args) {
return new T(arg
On Sunday, 28 September 2014 at 19:11:23 UTC, Jay wrote:
i want to chain 'new' with method calls on the created object.
i found this on the internet:
window.mainWidget = (new Button()).text("Hello
world"d).textColor(0xFF);
it would look much nicer with UFCS:
window.mainWidget = Button.n
On Sunday, 28 September 2014 at 16:02:44 UTC, Nordlöw wrote:
On Sunday, 28 September 2014 at 16:01:06 UTC, Nordlöw wrote:
The piping to ddemangle messed things up...
Thanks anyway.
Does anybody have a better solution to this? I would still like
the linker error output be ddemangled...
You
i want to chain 'new' with method calls on the created object. i
found this on the internet:
window.mainWidget = (new Button()).text("Hello
world"d).textColor(0xFF);
it would look much nicer with UFCS:
window.mainWidget = Button.new().text("Hello
world"d).textColor(0xFF);
well, it
On Sunday, 28 September 2014 at 16:12:53 UTC, Meta wrote:
On Sunday, 28 September 2014 at 08:01:00 UTC, Nordlöw wrote:
Is there a reason why isArray!T doesn't match T when T is a
std.container.Array? I'm asking because after looking into
msgpack-d because of
http://forum.dlang.org/thread/acla
On Sunday, 28 September 2014 at 08:01:00 UTC, Nordlöw wrote:
Is there a reason why isArray!T doesn't match T when T is a
std.container.Array? I'm asking because after looking into
msgpack-d because of
http://forum.dlang.org/thread/aclapseyptgcwntda...@forum.dlang.org#post-aclapseyptgcwntdavwt:
On Sunday, 28 September 2014 at 16:01:06 UTC, Nordlöw wrote:
The piping to ddemangle messed things up...
Thanks anyway.
Does anybody have a better solution to this? I would still like
the linker error output be ddemangled...
On Sunday, 28 September 2014 at 15:36:17 UTC, Marc Schütz wrote:
However, I can't reproduce it with DMD master on Linux, it
works for me as intended.
My fault. I was too clever and call the program through a wrapper
to rdmd I call rdmd-dev containing
#!/usr/bin/env bash
# See also:
http://
On Sunday, 28 September 2014 at 14:48:03 UTC, H. S. Teoh via
Digitalmars-d-learn wrote:
On Sun, Sep 28, 2014 at 02:16:29PM +, "Nordlöw" via
Digitalmars-d-learn wrote:
I thought
int main(string[] args)
{
import std.stdio;
write(`Press enter to continue: `);
stdout.flush;
auto
On 9/28/2014 11:31 PM, "Nordlöw" wrote:
Running dmd...
../../.dub/packages/dchip-master/src/dchip/cpCollision.d(350): Warning:
instead of C-style syntax, use D-style syntax 'MinkowskiPoint[3] hull'
FAIL
../../.dub/packages/dchip-master/.dub/build/library-debug-linux.posix-x86_64-dmd_2067-0A8B639
On Sun, Sep 28, 2014 at 02:16:29PM +, "Nordlöw" via Digitalmars-d-learn
wrote:
> I thought
>
> int main(string[] args)
> {
> import std.stdio;
> write(`Press enter to continue: `);
> stdout.flush;
> auto line = readln();
> writeln("Read ", line);
> return 0;
> }
>
> w
On Sun, Sep 28, 2014 at 10:48:45AM +0300, ketmar via Digitalmars-d-learn wrote:
> On Sun, 28 Sep 2014 04:24:19 +
> Joel via Digitalmars-d-learn wrote:
>
> > struct Spot { bool dot; }
> > spots = new Spot[][](800,600);
> btw, does anybody know why i can do `new ubyte[256];` but not
> `new ubyt
On Sunday, 28 September 2014 at 14:31:33 UTC, Nordlöw wrote:
https://github.com/nordlow/justd/blob/master/dub.json
fails as
Shouldn't
"buildRequirements": ["allowWarnings"],
affect build rules of dependencies aswell?
Am Sun, 28 Sep 2014 14:07:22 +
schrieb "tcak" :
> On Sunday, 28 September 2014 at 09:11:07 UTC, Marco Leise wrote:
> > For head-unshared there is `static if (is(T U : shared U))`.
> > But how do you get the unshared type for anything from `shared
> > void*` to `shared uint` ?
>
> shared int a
My
https://github.com/nordlow/justd/blob/master/dub.json
fails as
WARNING: A deprecated branch based version specification is used
for the dependency dchip. Please use numbered versions instead.
Also note that you can still use the dub.selections.json file to
override a certain dependency to
I thought
int main(string[] args)
{
import std.stdio;
write(`Press enter to continue: `);
stdout.flush;
auto line = readln();
writeln("Read ", line);
return 0;
}
would function as a good prompting but it doesn't.
I outputs the string given to write *after* I've pressed r
On Sunday, 28 September 2014 at 09:11:07 UTC, Marco Leise wrote:
For head-unshared there is `static if (is(T U : shared U))`.
But how do you get the unshared type for anything from `shared
void*` to `shared uint` ?
shared int a;
int b = cast()a;
For head-unshared there is `static if (is(T U : shared U))`.
But how do you get the unshared type for anything from `shared
void*` to `shared uint` ?
--
Marco
On Sunday, 28 September 2014 at 08:58:27 UTC, Nordlöw wrote:
In my strive to add msgpacking support for std.container.Array
I've been blocked by the fact that std.container.Array.opIndex
only has one overload which is non-const probably because it
returns a ref T. This doesn't place nicely with
In my strive to add msgpacking support for std.container.Array
I've been blocked by the fact that std.container.Array.opIndex
only has one overload which is non-const probably because it
returns a ref T. This doesn't place nicely with serialization.
Shouldn't inout be used here?
On Sunday, 28 September 2014 at 04:24:25 UTC, Joel wrote:
I'm trying to make a multidimensional array. I feel I've tried
every thing. Is there a good guide explaining it?
struct Spot { bool dot; }
spots = new Spot[][](800,600);
assert(spots[800-1][600-1].dot, "Out of bounds");
You cou
On Saturday, 27 September 2014 at 21:24:14 UTC, Nordlöw wrote:
How do I add the leading byte 146?
Update: This is achieved by calling stream_.put() which is only
allowed in members of PackerImpl.
Is there a reason why isArray!T doesn't match T when T is a
std.container.Array? I'm asking because after looking into
msgpack-d because of
http://forum.dlang.org/thread/aclapseyptgcwntda...@forum.dlang.org#post-aclapseyptgcwntdavwt:40forum.dlang.org
I realized that this is the reason why msgp
On Sun, 28 Sep 2014 04:24:19 +
Joel via Digitalmars-d-learn wrote:
> struct Spot { bool dot; }
> spots = new Spot[][](800,600);
btw, does anybody know why i can do `new ubyte[256];` but not
`new ubyte[256][256];`? hate that.
signature.asc
Description: PGP signature
36 matches
Mail list logo