Re: Current limitations of -dip1000

2017-10-10 Thread Walter Bright via Digitalmars-d
On 10/10/2017 3:31 PM, Nordlöw wrote: I did it: https://issues.dlang.org/show_bug.cgi?id=17892 Thank you!

[Issue 17892] Scope analysis with -dip1000 fails for templated structs

2017-10-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17892 Walter Bright changed: What|Removed |Added Keywords||safe

Re: Why do I have to cast arguments from int to byte?

2017-10-10 Thread rjframe via Digitalmars-d-learn
On Tue, 10 Oct 2017 19:55:36 +, Chirs Forest wrote: > It wouldn't be so bad if I didn't have to use the word cast before each > cast, bust since I have to specify both the word cast and the cast type > and then wrap both the cast type and the value in brackets... it just > explodes my code

[Issue 10060] readf doesn't work with arrays

2017-10-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10060 alex.jercai...@gmail.com changed: What|Removed |Added CC||alex.jercai...@gmail.com

Re: Current limitations of -dip1000

2017-10-10 Thread Nordlöw via Digitalmars-d
On Tuesday, 10 October 2017 at 18:58:42 UTC, Nordlöw wrote: On Tuesday, 10 October 2017 at 14:12:04 UTC, 12345swordy wrote: Report any bugs to the official bug tracker here: https://issues.dlang.org/ Shall I file the bug? I did it: https://issues.dlang.org/show_bug.cgi?id=17892

[Issue 17892] New: Scope analysis with -dip1000 fails for templated structs

2017-10-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17892 Issue ID: 17892 Summary: Scope analysis with -dip1000 fails for templated structs Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW

Re: Multiline string literal improvements

2017-10-10 Thread sarn via Digitalmars-d
On Tuesday, 10 October 2017 at 21:38:41 UTC, captaindet wrote: string a = |q{ firstLine(); if (cond) { secondLine() }   }; you could write your own string processing function according to your needs

Re: the best language I have ever met(?)

2017-10-10 Thread Igor Shirkalin via Digitalmars-d-learn
On Friday, 25 November 2016 at 19:16:43 UTC, ketmar wrote: yeah. but i'm not Andrei, i don't believe that the only compiler task is to resolve templated code. ;-) i.e. Andrei believes that everything (and more) should be moved out of compiler core and done with library templates. Andrei is

Re: initializing a static array

2017-10-10 Thread kinke via Digitalmars-d-learn
On Tuesday, 10 October 2017 at 22:00:27 UTC, kinke wrote: [...] Ah sorry, overlooked that it's the initializer for a struct field.

Re: initializing a static array

2017-10-10 Thread kinke via Digitalmars-d-learn
On Tuesday, 10 October 2017 at 14:15:07 UTC, Simon Bürger wrote: On Tuesday, 10 October 2017 at 13:48:16 UTC, Andrea Fontana wrote: Maybe: double[n] bar = 0.repeat(n).array; This works fine, thanks a lot. I would have expected `.array` to return a dynamic array. But apparently the compiler

Re: Multiline string literal improvements

2017-10-10 Thread captaindet via Digitalmars-d
string a = |q{ firstLine(); if (cond) { secondLine() }   }; you could write your own string processing function according to your needs to filter the code string, and use it like string a = inject(q{...})

[Issue 17891] forum is dog slow

2017-10-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17891 ki...@gmx.net changed: What|Removed |Added CC||ki...@gmx.net --- Comment #2 from

Re: Why do I have to cast arguments from int to byte?

2017-10-10 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 10 October 2017 at 19:55:36 UTC, Chirs Forest wrote: Why? D inherited a silly rule from C where any arithmetic is promoted to int first. The big difference is D doesn't do implicit narrowing conversion... so x + 1 becomes int, but then int to byte requires an explicit cast

Re: "This week in D" state

2017-10-10 Thread Igor Shirkalin via Digitalmars-d
On Tuesday, 10 October 2017 at 15:52:03 UTC, Adam D. Ruppe wrote: Of course, if someone wants to email me something I can copy/paste in, that's cool... but you could also send that to the blog... I'd like to but i would be nice to know where to write to without required piles.

Multiline string literal improvements

2017-10-10 Thread Igor via Digitalmars-d
D has a very nice feature of token strings: string a = q{ looksLikeCode(); }; It is useful in writing mixins and to have syntax highlighting in editors. Although I like it, it is not something I ever felt like missing in other languages. What I do always miss are

Re: how to shorten templates structs name?

2017-10-10 Thread Ali Çehreli via Digitalmars-d-learn
On 10/10/2017 04:30 AM, drug wrote: > using classes I can make an inherited class of templated class and avoid > too long mangled name: > ``` > class TemplatedClass(A, Very, Much, Args, Here) { ... } > > class ShortenClass : TemplatedClass!(A,Very, Much, Args, Here) { ... }; > ``` > Now

Re: Why do I have to cast arguments from int to byte?

2017-10-10 Thread Moritz Maxeiner via Digitalmars-d-learn
On Tuesday, 10 October 2017 at 19:55:36 UTC, Chirs Forest wrote: I keep having to make casts like the following and it's really rubbing me the wrong way: void foo(T)(T bar){...} byte bar = 9; [...] Why? Because of integer promotion [1], which is inherited from C. [1]

Re: Why do I have to cast arguments from int to byte?

2017-10-10 Thread Igor Shirkalin via Digitalmars-d-learn
On Tuesday, 10 October 2017 at 19:55:36 UTC, Chirs Forest wrote: I keep having to make casts like the following and it's really rubbing me the wrong way: void foo(T)(T bar){...} byte bar = 9; foo!byte(bar + 1); //Error: function foo!byte.foo (byte bar) is not callable using argument types

Re: is private broken?

2017-10-10 Thread Seb via Digitalmars-d
On Tuesday, 10 October 2017 at 20:02:32 UTC, Jonathan M Davis wrote: On Tuesday, October 10, 2017 15:33:30 Steven Schveighoffer via Digitalmars-d wrote: On 10/10/17 3:20 PM, Jonathan Marler wrote: > On windows I was able to compile the following using both > dmd.2.075.1 and dmd.2.076.1 > >

Re: is private broken?

2017-10-10 Thread jmh530 via Digitalmars-d
On Tuesday, 10 October 2017 at 19:59:05 UTC, Jonathan M Davis wrote: There is - by putting them in a separate module. It was done this way to avoid the extra complication of friend functions that you get in C++, and the theory is that you're in control of everything that's in your own

[Issue 17891] forum is dog slow

2017-10-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17891 --- Comment #1 from Vladimir Panteleev --- There is some maintenance running on the server right now which is impacting load. Should be resolved soon. --

Re: is private broken?

2017-10-10 Thread Steven Schveighoffer via Digitalmars-d
On 10/10/17 4:02 PM, Jonathan M Davis wrote: On Tuesday, October 10, 2017 15:33:30 Steven Schveighoffer via Digitalmars-d wrote: On 10/10/17 3:20 PM, Jonathan Marler wrote: On windows I was able to compile the following using both dmd.2.075.1 and dmd.2.076.1 From what I understand, you

Re: is private broken?

2017-10-10 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, October 10, 2017 15:33:30 Steven Schveighoffer via Digitalmars-d wrote: > On 10/10/17 3:20 PM, Jonathan Marler wrote: > > On windows I was able to compile the following using both dmd.2.075.1 > > and dmd.2.076.1 > > > > From what I understand, you shouldn't be able to access private

Why do I have to cast arguments from int to byte?

2017-10-10 Thread Chirs Forest via Digitalmars-d-learn
I keep having to make casts like the following and it's really rubbing me the wrong way: void foo(T)(T bar){...} byte bar = 9; foo!byte(bar + 1); //Error: function foo!byte.foo (byte bar) is not callable using argument types (int) foo!byte(cast(byte)(bar + 1)); It wouldn't be so bad if I

Re: is private broken?

2017-10-10 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, October 10, 2017 19:50:49 Jonathan Marler via Digitalmars-d wrote: > On Tuesday, 10 October 2017 at 19:33:30 UTC, Steven Schveighoffer > > wrote: > > On 10/10/17 3:20 PM, Jonathan Marler wrote: > >> On windows I was able to compile the following using both > >> dmd.2.075.1 and

Re: is private broken?

2017-10-10 Thread Jonathan Marler via Digitalmars-d
On Tuesday, 10 October 2017 at 19:33:30 UTC, Steven Schveighoffer wrote: On 10/10/17 3:20 PM, Jonathan Marler wrote: On windows I was able to compile the following using both dmd.2.075.1 and dmd.2.076.1 From what I understand, you shouldn't be able to access private fields/methods like

[Issue 17891] New: forum is dog slow

2017-10-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17891 Issue ID: 17891 Summary: forum is dog slow Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: major Priority: P1

Re: is private broken?

2017-10-10 Thread Steven Schveighoffer via Digitalmars-d
Hah! Beat you by 10 seconds :) -Steve

Re: is private broken?

2017-10-10 Thread Steven Schveighoffer via Digitalmars-d
On 10/10/17 3:20 PM, Jonathan Marler wrote: On windows I was able to compile the following using both dmd.2.075.1 and dmd.2.076.1 From what I understand, you shouldn't be able to access private fields/methods like this...am I missing something? Before I even read your code, I was pretty

Re: is private broken?

2017-10-10 Thread w0rp via Digitalmars-d
https://wiki.dlang.org/Access_specifiers_and_visibility#private Private means that only members of the enclosing class can access the member, or members and functions in the same module as the enclosing class. You can access private attributes anywhere in the same module.

is private broken?

2017-10-10 Thread Jonathan Marler via Digitalmars-d
On windows I was able to compile the following using both dmd.2.075.1 and dmd.2.076.1 From what I understand, you shouldn't be able to access private fields/methods like this...am I missing something? I find it hard to believe that a bug of this magnitudue could have been introduced and not

Array/range-version of emplace

2017-10-10 Thread Nordlöw via Digitalmars-d-learn
Why isn't there an array/range version of `emplace`, when there is one for `moveEmplace`, namely https://dlang.org/library/std/algorithm/mutation/move_emplace_all.html ?

Re: Current limitations of -dip1000

2017-10-10 Thread Nordlöw via Digitalmars-d
On Tuesday, 10 October 2017 at 14:12:04 UTC, 12345swordy wrote: Report any bugs to the official bug tracker here: https://issues.dlang.org/ Shall I file the bug?

[Issue 17740] ghost "internal" symbols show up sometimes

2017-10-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17740 --- Comment #9 from Mr. Smith --- Error doesn't happen when `import std.datetime : MonoTime;` is removed --

[Issue 17740] ghost "internal" symbols show up sometimes

2017-10-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17740 --- Comment #8 from Steven Schveighoffer --- Correction: PR was not about MonoTime but SysTime. But still, datetime seems to be involved. --

[Issue 17740] ghost "internal" symbols show up sometimes

2017-10-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17740 --- Comment #7 from Steven Schveighoffer --- Hm... I didn't see this before, but you have an import for MonoTime. On the original PR I saw this, it was an update to MonoTime. Can you confirm that your code works or not without

[Issue 17740] ghost "internal" symbols show up sometimes

2017-10-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17740 --- Comment #6 from Mr. Smith --- Looks like the problem is with Piece* sentinel = new Piece; If I do that at runtime it works. --

[Issue 17890] cpp_long is not declared for Posix 64bit

2017-10-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17890 --- Comment #1 from anonymous4 --- (In reply to Илья Ярошенко from comment #0) > BTW, why c_long is always 32 bit for windows? I suppose for compatibility with code written for 32-bit architecture, though long was 32-bit

Re: "This week in D" state

2017-10-10 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 10 October 2017 at 16:36:14 UTC, jmh530 wrote: While I liked when you did the longer stuff, I think even the slimmed down version has value. It's also probably less work for you (or someone else if they take it over). Yeah, I'll post the last couple I generated but never saved.

Re: "This week in D" state

2017-10-10 Thread jmh530 via Digitalmars-d
On Tuesday, 10 October 2017 at 15:52:03 UTC, Adam D. Ruppe wrote: I generated the file for a couple weeks last month, but I'm not happy at all with the forum links but also don't have much else to put in. The blog really took over for the longer form stuff I used to write. I might go

[Issue 17740] ghost "internal" symbols show up sometimes

2017-10-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17740 Mr. Smith changed: What|Removed |Added CC||mrsmit...@yandex.ru ---

Re: How do I filter out data from mongodb in D-code

2017-10-10 Thread Eduard Staniloiu via Digitalmars-d
On Tuesday, 10 October 2017 at 09:43:10 UTC, Anders S wrote: Hi, I'm working on a middleware application that reads array of data from a POSIX pipe and insert data into the db if any position in the array has changed. This is where my problem lays, in order not to duplicate data I want to

Re: initializing a static array

2017-10-10 Thread ag0aep6g via Digitalmars-d-learn
On 10/10/2017 03:36 PM, Simon Bürger wrote: I have a static array inside a struct which I would like to be initialized to all-zero like so   struct Foo(size_t n)   {     double[n] bar = ... all zeroes ...   } (note that the default-initializer of double is nan, and not zero) I tried  

Re: "This week in D" state

2017-10-10 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 10 October 2017 at 07:12:19 UTC, Eliatto wrote: I noticed that "This week in D" site was seldom updated. Last activity is September, the 3rd. If Adam is busy at the moment, then I think that he should have an assistant. I generated the file for a couple weeks last month, but I'm

[Issue 16510] Request: RSA digital signature validation in phobos

2017-10-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16510 --- Comment #2 from Andre --- As far as I know there is no native library available (not depending on e.g. openssl dll) which works for dmd OMF. Unfortunately even botan only works with x86 / x64 coff. --

[Issue 9362] Add a method to remove one item to std.container.SList

2017-10-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9362 Alexandru Razvan Caciulescu changed: What|Removed |Added CC|

[Issue 17740] ghost "internal" symbols show up sometimes

2017-10-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17740 --- Comment #4 from Steven Schveighoffer --- A better reduced test case: https://gist.github.com/MrSmith33/dc53d8cb6ce642fcb6dbc5863d029cec Courtesy of MrSmith:

Re: Linking error: unresolved external symbol internal

2017-10-10 Thread Steven Schveighoffer via Digitalmars-d-learn
On 10/10/17 11:09 AM, MrSmith wrote: I have a static library and an application. When linking final executable I get:     lib.lib(texteditor_1d_40c.obj) : error LNK2001: unresolved external symbol internal     lib.lib(textbuffer_14_3ce.obj) : error LNK2001: unresolved external symbol

Re: initializing a static array

2017-10-10 Thread Daniel Kozak via Digitalmars-d-learn
https://run.dlang.io/is/SC3Fks

Re: Deprecation message of library functions should state the replacement function

2017-10-10 Thread Eduard Staniloiu via Digitalmars-d
On Tuesday, 10 October 2017 at 13:56:36 UTC, Seb wrote: On Tuesday, 10 October 2017 at 12:57:36 UTC, bauss wrote: On Tuesday, 10 October 2017 at 11:48:48 UTC, Eduard Staniloiu wrote: Hi guys, I've just build druntime on Windows and we are displaying the following deprecation message:

Re: Default hashing function for AA's

2017-10-10 Thread Steven Schveighoffer via Digitalmars-d
On 10/9/17 10:11 AM, RazvanN wrote: Hi all, We in the UPB dlang group have been having discussions about the hashing functions of associative arrays. In particular, we were wondering why is the AA implementation in druntime is not using the hash function implemented in

Re: Proposal: Object/?? Destruction

2017-10-10 Thread Steven Schveighoffer via Digitalmars-d
On 10/9/17 11:22 AM, Timon Gehr wrote: On 09.10.2017 01:20, Steven Schveighoffer wrote: My questioning comes with this: void bar(int a); void bar((int,) x); To me, it is confusing or at least puzzling that these two aren't the same. ... Well, to me it is a bit confusing that this is

Linking error: unresolved external symbol internal

2017-10-10 Thread MrSmith via Digitalmars-d-learn
I have a static library and an application. When linking final executable I get: lib.lib(texteditor_1d_40c.obj) : error LNK2001: unresolved external symbol internal lib.lib(textbuffer_14_3ce.obj) : error LNK2001: unresolved external symbol internal Happens on Windows 32 and 64 bit.

Re: initializing a static array

2017-10-10 Thread Daniel Kozak via Digitalmars-d-learn
Yeah, you are right. My fault. On Tue, Oct 10, 2017 at 4:47 PM, Adam D. Ruppe via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > On Tuesday, 10 October 2017 at 14:42:15 UTC, Daniel Kozak wrote: > >> It will return dynamic array. it is same as: >> >> double[5] = [0,0,0,0,0]; //

Re: initializing a static array

2017-10-10 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 10 October 2017 at 14:42:15 UTC, Daniel Kozak wrote: It will return dynamic array. it is same as: double[5] = [0,0,0,0,0]; // this is still dynamicaly allocated. Not true here, the compiler knows it is going into a static array and puts the result directly in there. It handles

[Issue 17890] cpp_long is not declared for Posix 64bit

2017-10-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17890 Илья Ярошенко changed: What|Removed |Added Keywords||C++ --

[Issue 17890] New: cpp_long is not declared for Posix 64bit

2017-10-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17890 Issue ID: 17890 Summary: cpp_long is not declared for Posix 64bit Product: D Version: D2 Hardware: x86_64 OS: Mac OS X Status: NEW Severity: enhancement

Re: initializing a static array

2017-10-10 Thread Daniel Kozak via Digitalmars-d-learn
On Tue, Oct 10, 2017 at 4:15 PM, Simon Bürger via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > On Tuesday, 10 October 2017 at 13:48:16 UTC, Andrea Fontana wrote: > >> On Tuesday, 10 October 2017 at 13:36:56 UTC, Simon Bürger wrote: >> >>> Is there a good way to set them all

Re: initializing a static array

2017-10-10 Thread Simon Bürger via Digitalmars-d-learn
On Tuesday, 10 October 2017 at 13:54:16 UTC, Daniel Kozak wrote: struct Double { double v = 0; alias v this; } struct Foo(size_t n) { Double[n] bar; } Interesting approach. But this might introduce problems later. For example `Double` is implicitly convertible to `double`, but

Re: initializing a static array

2017-10-10 Thread Simon Bürger via Digitalmars-d-learn
On Tuesday, 10 October 2017 at 13:48:16 UTC, Andrea Fontana wrote: On Tuesday, 10 October 2017 at 13:36:56 UTC, Simon Bürger wrote: Is there a good way to set them all to zero? The only way I can think of is using string-mixins to generate a string such as "[0,0,0,0]" with exactly n zeroes.

Re: Current limitations of -dip1000

2017-10-10 Thread 12345swordy via Digitalmars-d
On Tuesday, 10 October 2017 at 10:49:54 UTC, meppl wrote: On Tuesday, 10 October 2017 at 09:55:13 UTC, meppl wrote: ... also, these differ: (with dmd v2.076.0) @safe: struct S { @safe: int* x; scope int* pointer() return { return x; } } int*

Re: initializing a static array

2017-10-10 Thread Andrea Fontana via Digitalmars-d-learn
On Tuesday, 10 October 2017 at 13:53:37 UTC, jmh530 wrote: double[n] bar; bar[] = 0; This works at runtime only for mutable arrays, anyway.

Re: Deprecation message of library functions should state the replacement function

2017-10-10 Thread Seb via Digitalmars-d
On Tuesday, 10 October 2017 at 12:57:36 UTC, bauss wrote: On Tuesday, 10 October 2017 at 11:48:48 UTC, Eduard Staniloiu wrote: Hi guys, I've just build druntime on Windows and we are displaying the following deprecation message: src\core\sys\windows\odbcinst.d(157): Deprecation: function

Re: initializing a static array

2017-10-10 Thread jmh530 via Digitalmars-d-learn
On Tuesday, 10 October 2017 at 13:48:16 UTC, Andrea Fontana wrote: Maybe: double[n] bar = 0.repeat(n).array; Alt: double[n] bar; bar[] = 0;

Re: Should we have prettier string printing for exceptions and std elemts?

2017-10-10 Thread Seb via Digitalmars-d
On Tuesday, 10 October 2017 at 11:17:09 UTC, bauss wrote: On Monday, 9 October 2017 at 18:52:03 UTC, Petar Kirov [ZombineDev] wrote: On Monday, 9 October 2017 at 17:44:12 UTC, jmh530 wrote: On Monday, 9 October 2017 at 17:19:42 UTC, Petar Kirov [ZombineDev] wrote: Printing the container

Re: initializing a static array

2017-10-10 Thread Daniel Kozak via Digitalmars-d-learn
struct Double { double v = 0; alias v this; } struct Foo(size_t n) { Double[n] bar; } Dne 10. 10. 2017 3:40 odpoledne napsal uživatel "Simon Bürger via Digitalmars-d-learn" : I have a static array inside a struct which I would like to be

Re: initializing a static array

2017-10-10 Thread Andrea Fontana via Digitalmars-d-learn
On Tuesday, 10 October 2017 at 13:36:56 UTC, Simon Bürger wrote: Is there a good way to set them all to zero? The only way I can think of is using string-mixins to generate a string such as "[0,0,0,0]" with exactly n zeroes. But that seems quite an overkill for such a basic task. I suspect I

Re: how to shorten templates structs name?

2017-10-10 Thread Daniel Kozak via Digitalmars-d-learn
Use alias this Dne 10. 10. 2017 1:30 odpoledne napsal uživatel "drug via Digitalmars-d-learn" : > using classes I can make an inherited class of templated class and avoid > too long mangled name: > ``` > class TemplatedClass(A, Very, Much, Args, Here) { ... } >

initializing a static array

2017-10-10 Thread Simon Bürger via Digitalmars-d-learn
I have a static array inside a struct which I would like to be initialized to all-zero like so struct Foo(size_t n) { double[n] bar = ... all zeroes ... } (note that the default-initializer of double is nan, and not zero) I tried double[n] bar = 0; // does not compile

Re: New release v0.5 of the D bindings for SAP NetWeaver RFC SDK

2017-10-10 Thread Martin Nowak via Digitalmars-d-announce
On 10/08/2017 12:59 PM, Kai Nacke wrote: > The included set of example applications show how easy it is to call an > RFC. To use the library just add a dependency to your dub.json/dub.sdl > file or clone the source at https://github.com/redstar/sapnwrfc-d. Thanks, examples are nice for packages.

[Issue 10131] To remove duplicates and keep order

2017-10-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10131 Seb changed: What|Removed |Added CC||greensunn...@gmail.com ---

Re: Deprecation message of library functions should state the replacement function

2017-10-10 Thread bauss via Digitalmars-d
On Tuesday, 10 October 2017 at 11:48:48 UTC, Eduard Staniloiu wrote: Hi guys, I've just build druntime on Windows and we are displaying the following deprecation message: src\core\sys\windows\odbcinst.d(157): Deprecation: function core.sys.windows.odbcinst.SQLInstallTranslatorW is

[Issue 17889] Cross platform function to redirect standard input/output

2017-10-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17889 --- Comment #2 from RazvanN --- I was actually refering to dup2: [1] http://man7.org/linux/man-pages/man2/dup.2.html [2] https://msdn.microsoft.com/en-us/library/8syseb29.aspx --

[Issue 17889] Cross platform function to redirect standard input/output

2017-10-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17889 b2.t...@gmx.com changed: What|Removed |Added CC||b2.t...@gmx.com --- Comment #1 from

[Issue 17889] New: Cross platform function to redirect standard input/output

2017-10-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17889 Issue ID: 17889 Summary: Cross platform function to redirect standard input/output Product: D Version: D2 Hardware: x86_64 OS: All Status: NEW

Deprecation message of library functions should state the replacement function

2017-10-10 Thread Eduard Staniloiu via Digitalmars-d
Hi guys, I've just build druntime on Windows and we are displaying the following deprecation message: src\core\sys\windows\odbcinst.d(157): Deprecation: function core.sys.windows.odbcinst.SQLInstallTranslatorW is deprecated. I believe that we should also state with what should the

how to shorten templates structs name?

2017-10-10 Thread drug via Digitalmars-d-learn
using classes I can make an inherited class of templated class and avoid too long mangled name: ``` class TemplatedClass(A, Very, Much, Args, Here) { ... } class ShortenClass : TemplatedClass!(A,Very, Much, Args, Here) { ... }; ``` Now ShortenClass has a nice mangling. What can be done in case

Re: Should we have prettier string printing for exceptions and std elemts?

2017-10-10 Thread bauss via Digitalmars-d
On Monday, 9 October 2017 at 18:52:03 UTC, Petar Kirov [ZombineDev] wrote: On Monday, 9 October 2017 at 17:44:12 UTC, jmh530 wrote: On Monday, 9 October 2017 at 17:19:42 UTC, Petar Kirov [ZombineDev] wrote: Printing the container type, address and length would be most useful default IMO (but

[Issue 11577] Template std.typetuple.NoDuplicates removes const types for classes and structs

2017-10-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11577 --- Comment #1 from alex.jercai...@gmail.com --- What would be the correct behaviour here? Should it treat the const and nonconst as duplicates? --

Re: Current limitations of -dip1000

2017-10-10 Thread meppl via Digitalmars-d
On Tuesday, 10 October 2017 at 09:55:13 UTC, meppl wrote: ... also, these differ: (with dmd v2.076.0) @safe: struct S { @safe: int* x; scope int* pointer() return { return x; } } int* testPointer() { S s; return s.pointer(); //

Re: Current limitations of -dip1000

2017-10-10 Thread meppl via Digitalmars-d
On Tuesday, 10 October 2017 at 02:37:21 UTC, Walter Bright wrote: On 10/9/2017 8:04 AM, Per Nordlöw wrote: ... Get rid of the templates, too. Replace T with int. Get rid of any of the layers of confusing complexity. ... this looks like an issue to me. If its a template the pointer can

Re: How do I filter out data from mongodb in D-code

2017-10-10 Thread Anders S via Digitalmars-d
On Tuesday, 10 October 2017 at 09:43:10 UTC, Anders S wrote: I'm working on a middleware application that reads array of data from a POSIX pipe and insert data into the db if any position in the array has changed. This is where my problem lays, in order not to duplicate data I want to fetch

How do I filter out data from mongodb in D-code

2017-10-10 Thread Anders S via Digitalmars-d
Hi, I'm working on a middleware application that reads array of data from a POSIX pipe and insert data into the db if any position in the array has changed. This is where my problem lays, in order not to duplicate data I want to fetch the latest data/document in the array of documents. I'm

Re: Catching C++ Exceptions in D - Windows and Linux

2017-10-10 Thread Laeeth Isharc via Digitalmars-d-learn
On Tuesday, 12 September 2017 at 04:33:30 UTC, Nicholas Wilson wrote: On Tuesday, 12 September 2017 at 03:51:45 UTC, Laeeth Isharc wrote: Hi. I'm here in HK with Ilya, Atila, John Colvin, and Jonathan Davis. I wondered what the current state of D catching C++ exceptions was on Linux and

Some tasks in D app

2017-10-10 Thread Orkhan via Digitalmars-d
Hello. I have an app for multiplayer game website. I am Facing an issue about stacking terminal. Also the app does not save the logs which is supposed to. I need someone who can fix this. Will send the app to developer. in total The tasks are : 1) Fix stacking issue in the terminal, 2) Fix

Re: "This week in D" state

2017-10-10 Thread Joakim via Digitalmars-d
On Tuesday, 10 October 2017 at 07:12:19 UTC, Eliatto wrote: I noticed that "This week in D" site was seldom updated. Last activity is September, the 3rd. If Adam is busy at the moment, then I think that he should have an assistant. I think he's lost interest, even when he does post, he rarely

Re: How to call function with variable arguments at runtime?

2017-10-10 Thread Marc Schütz via Digitalmars-d-learn
On Tuesday, 10 October 2017 at 02:58:45 UTC, Mr. Jonse wrote: I need to store a hetrogeneous array of delegates. How can I do this but still call the function with the appropriate number of parameters at run time? I have the parameters as Variant[] params and a function/delegate

Re: How to call function with variable arguments at runtime?

2017-10-10 Thread bauss via Digitalmars-d-learn
On Tuesday, 10 October 2017 at 02:58:45 UTC, Mr. Jonse wrote: I need to store a hetrogeneous array of delegates. How can I do this but still call the function with the appropriate number of parameters at run time? I have the parameters as Variant[] params and a function/delegate

Re: How to make commented code to compile?

2017-10-10 Thread bauss via Digitalmars-d-learn
On Monday, 9 October 2017 at 15:22:54 UTC, Adam D. Ruppe wrote: On Monday, 9 October 2017 at 15:15:48 UTC, Zhuo Nengwen wrote: test(cast(ushort) 1, (m, c) => { writeln(m); writeln(m); }); Just remove the => (m, c) { // code here } Common mistake from people who worked with LINQ in

"This week in D" state

2017-10-10 Thread Eliatto via Digitalmars-d
I noticed that "This week in D" site was seldom updated. Last activity is September, the 3rd. If Adam is busy at the moment, then I think that he should have an assistant.

[Issue 17797] [REG 2.073.2] double print to stdout when reading stdin in another thread

2017-10-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17797 Rainer Schuetze changed: What|Removed |Added CC||r.sagita...@gmx.de