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);
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);
dot is
On Sunday, 28 September 2014 at 04:38:56 UTC, JKPdouble wrote:
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);
On Sun, 28 Sep 2014 04:24:19 +
Joel via Digitalmars-d-learn digitalmars-d-learn@puremagic.com 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
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
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.
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
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 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
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 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;
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
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
Am Sun, 28 Sep 2014 14:07:22 +
schrieb tcak t...@gmail.com:
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
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?
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 digitalmars-d-learn@puremagic.com wrote:
struct Spot { bool dot; }
spots = new Spot[][](800,600);
btw, does anybody know why i can do `new
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;
}
would function as
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
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 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:
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 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
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
i want to chain 'new' with method calls on the created object. i
found this on the internet:
window.mainWidget = (new Button()).text(Hello
worldd).textColor(0xFF);
it would look much nicer with UFCS:
window.mainWidget = Button.new().text(Hello
worldd).textColor(0xFF);
well, it's
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
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
worldd).textColor(0xFF);
it would look much nicer with UFCS:
window.mainWidget =
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
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.
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: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
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) {
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
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
worldd).textColor(0xFF);
it would look much nicer with UFCS:
window.mainWidget =
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
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
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 digitalmars-d-learn@puremagic.com wrote:
struct Spot { bool dot; }
spots = new Spot[][](800,600);
btw, does anybody know why i can do `new ubyte[256];` but not
`new
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 Sun, 28 Sep 2014 07:40:23 -0700
H. S. Teoh via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
File a bug.
https://issues.dlang.org/show_bug.cgi?id=13556
signature.asc
Description: PGP signature
On Sun, 28 Sep 2014 22:33:40 +0100
Stewart Gordon via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com 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
39 matches
Mail list logo