On 10/10/2017 3:31 PM, Nordlöw wrote:
I did it: https://issues.dlang.org/show_bug.cgi?id=17892
Thank you!
https://issues.dlang.org/show_bug.cgi?id=17892
Walter Bright changed:
What|Removed |Added
Keywords||safe
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
https://issues.dlang.org/show_bug.cgi?id=10060
alex.jercai...@gmail.com changed:
What|Removed |Added
CC||alex.jercai...@gmail.com
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
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
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
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
On Tuesday, 10 October 2017 at 22:00:27 UTC, kinke wrote:
[...]
Ah sorry, overlooked that it's the initializer for a struct field.
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
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{...})
https://issues.dlang.org/show_bug.cgi?id=17891
ki...@gmx.net changed:
What|Removed |Added
CC||ki...@gmx.net
--- Comment #2 from
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
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.
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
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
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]
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
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
>
>
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
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.
--
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
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
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
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
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
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
Hah! Beat you by 10 seconds :)
-Steve
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
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.
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
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
?
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?
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
--
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.
--
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
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.
--
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
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.
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
https://issues.dlang.org/show_bug.cgi?id=17740
Mr. Smith changed:
What|Removed |Added
CC||mrsmit...@yandex.ru
---
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
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
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
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.
--
https://issues.dlang.org/show_bug.cgi?id=9362
Alexandru Razvan Caciulescu changed:
What|Removed |Added
CC|
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:
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
https://run.dlang.io/is/SC3Fks
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:
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
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
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.
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]; //
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
https://issues.dlang.org/show_bug.cgi?id=17890
Илья Ярошенко changed:
What|Removed |Added
Keywords||C++
--
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
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
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
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.
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*
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.
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
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;
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
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
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
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) { ... }
>
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
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.
https://issues.dlang.org/show_bug.cgi?id=10131
Seb changed:
What|Removed |Added
CC||greensunn...@gmail.com
---
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
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
--
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
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
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
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
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
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?
--
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(); //
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
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
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
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
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
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
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
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
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
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.
https://issues.dlang.org/show_bug.cgi?id=17797
Rainer Schuetze changed:
What|Removed |Added
CC||r.sagita...@gmx.de
91 matches
Mail list logo