[Issue 17842] [scope] array append allows for escaping references

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

[Issue 17842] New: [scope] array append allows for escaping references

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17842 Issue ID: 17842 Summary: [scope] array append allows for escaping references Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal

Re: Andrei Alexandrescu - i am proud

2017-09-19 Thread useroruser via Digitalmars-d-announce
On Tuesday, 19 September 2017 at 22:54:32 UTC, roman wrote: I am absolutely proud of your government: http://madworldnews.com/illegal-muslim-shore-coast-guard/ they keep the ... lol, he's an US citizen [1] :slap: [1]

Re: What the hell is wrong with D?

2017-09-19 Thread jmh530 via Digitalmars-d-learn
On Wednesday, 20 September 2017 at 02:36:50 UTC, Jonathan M Davis wrote: Please try to be civil. It's fine if you're unhappy about some aspect of how D works and want to discuss it, but we do not condone personal attacks here. - Jonathan M Davis He seemed to be threatening the guy's life

Re: A potential danger to dub

2017-09-19 Thread solidstate1991 via Digitalmars-d
On Saturday, 16 September 2017 at 17:09:34 UTC, David Gileadi wrote: Let me preface this by saying I love package managers and think dub is one of the best things with dlang. However they can also sometimes be dangerous, as this PyPI incident[1] shows: several Python packages were uploaded

Re: What the hell is wrong with D?

2017-09-19 Thread EntangledQuanta via Digitalmars-d-learn
On Tuesday, 19 September 2017 at 21:17:53 UTC, nkm1 wrote: On Tuesday, 19 September 2017 at 17:40:20 UTC, EntangledQuanta wrote: Yeah, that is really logical! No wonder D sucks and has so many bugs! Always wants me to be explicit about the stuff it won't figure out but it implicitly does stuff

[Issue 17841] New: cannot access frame of function

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17841 Issue ID: 17841 Summary: cannot access frame of function Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW Severity: normal Priority: P1

Re: What the hell is wrong with D?

2017-09-19 Thread B4s1L3 via Digitalmars-d-learn
On Wednesday, 20 September 2017 at 02:16:16 UTC, EntangledQuanta wrote: Your an idiot, I know about how operator precedence works far more than you do. Wanna bet? how much? Your house? your wife? Your life? It's about doing things correctly, you seem to fail to understand, not your fault,

Re: static array with inferred size

2017-09-19 Thread Meta via Digitalmars-d
On Wednesday, 20 September 2017 at 01:29:39 UTC, Jonathan M Davis wrote: On Tuesday, September 19, 2017 20:47:25 Steven Schveighoffer via Digitalmars-d wrote: This needs to happen. e.g.: char[$] arr = "hello"; // syntax up for debate, but I like this. I can't think of a correct way to do

Re: What the hell is wrong with D?

2017-09-19 Thread EntangledQuanta via Digitalmars-d-learn
On Tuesday, 19 September 2017 at 22:11:44 UTC, Jesse Phillips wrote: On Tuesday, 19 September 2017 at 19:16:05 UTC, EntangledQuanta wrote: The D community preaches all this safety shit but when it comes down to it they don't seem to really care(look at the other responses like like "Hey, C

Re: static array with inferred size

2017-09-19 Thread Steven Schveighoffer via Digitalmars-d
On 9/19/17 10:46 PM, Meta wrote: With all due respect to Andrei, I think he overreacted a bit and it was a mistake to revert static array length deduction (although the array/aa type deduction on steroids was probably overly complicated so that was a good call). Maybe now that @nogc and

Re: static array with inferred size

2017-09-19 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, September 19, 2017 20:47:25 Steven Schveighoffer via Digitalmars-d wrote: > This needs to happen. > > e.g.: > > char[$] arr = "hello"; // syntax up for debate, but I like this. > > I can't think of a correct way to do this that doesn't heap-allocate and > is DRY. > > D is so powerful,

Re: What the hell is wrong with D?

2017-09-19 Thread rikki cattermole via Digitalmars-d-learn
On 19/09/2017 9:22 PM, Neia Neutuladh wrote: On Tuesday, 19 September 2017 at 17:40:20 UTC, EntangledQuanta wrote: writeln(x + ((_win[0] == '@') ? w/2 : 0)); writeln(x + (_win[0] == '@') ? w/2 : 0); The first returns x + w/2 and the second returns w/2! Yeah, it sucks to have bugs

Re: Specifying @nogc on structs seems to have no effect

2017-09-19 Thread Craig Black via Digitalmars-d
On Tuesday, 19 September 2017 at 20:57:17 UTC, Neia Neutuladh wrote: On Tuesday, 19 September 2017 at 15:11:31 UTC, Craig Black wrote: [...] You want to ensure that it can never refer to GC memory. The type system does not contain that information. It doesn't say whether an object was

Re: What the hell is wrong with D?

2017-09-19 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, September 20, 2017 02:16:16 EntangledQuanta via Digitalmars-d- learn wrote: > On Tuesday, 19 September 2017 at 21:17:53 UTC, nkm1 wrote: > > On Tuesday, 19 September 2017 at 17:40:20 UTC, EntangledQuanta > > > > wrote: > >> Yeah, that is really logical! No wonder D sucks and has so >

Re: Specifying @nogc on structs seems to have no effect

2017-09-19 Thread B4s1L3 via Digitalmars-d
On Tuesday, 19 September 2017 at 13:11:03 UTC, Craig Black wrote: I've recently tried coding in D again after some years. One of my earlier concerns was the ability to code without the GC, which seemed difficult to pull off. To be clear, I want my programs to be garbage collected, but I want

Re: static array with inferred size

2017-09-19 Thread jmh530 via Digitalmars-d
On Wednesday, 20 September 2017 at 02:46:53 UTC, Meta wrote: [snip] I also favor making arr[..] equivalent to arr[0..$] and allowing overloading of \ (for inverse, similar syntax as Matlab).

Re: opEquals code generation

2017-09-19 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/19/17 4:28 PM, Neia Neutuladh wrote: Could be a bit simpler than that, depending on your needs: bool opEquals(Object other) const nothrow @nogc {     auto f = cast(typeof(this)) other;     if (f is null) return false;     return this.tupleof == other.tupleof; } That doesn't compare

Re: floating point value rounded to 6digits

2017-09-19 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/19/17 8:04 PM, Jonathan M Davis wrote: On Tuesday, September 19, 2017 19:35:15 Steven Schveighoffer via Digitalmars-d-learn wrote: On 9/19/17 7:28 PM, Ivan Kazmenko wrote: On Tuesday, 19 September 2017 at 22:44:06 UTC, greatsam4sure wrote: On Tuesday, 19 September 2017 at 21:52:57 UTC,

static array with inferred size

2017-09-19 Thread Steven Schveighoffer via Digitalmars-d
This needs to happen. e.g.: char[$] arr = "hello"; // syntax up for debate, but I like this. I can't think of a correct way to do this that doesn't heap-allocate and is DRY. D is so powerful, it's a huge shame it can't figure this one out. issue:

Andrei Alexandrescu - i am proud

2017-09-19 Thread roman via Digitalmars-d-announce
I am absolutely proud of your government: http://madworldnews.com/illegal-muslim-shore-coast-guard/ they keep the ...

Re: floating point value rounded to 6digits

2017-09-19 Thread greatsam4sure via Digitalmars-d-learn
On Tuesday, 19 September 2017 at 21:52:57 UTC, Ivan Kazmenko wrote: On Tuesday, 19 September 2017 at 20:47:02 UTC, greatsam4sure wrote: double value = 20.89766554373733; writeln(value); //Output =20.8977 How do I output the whole value without using writfln,write or format. How do I change

Re: floating point value rounded to 6digits

2017-09-19 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, September 19, 2017 19:35:15 Steven Schveighoffer via Digitalmars-d-learn wrote: > On 9/19/17 7:28 PM, Ivan Kazmenko wrote: > > On Tuesday, 19 September 2017 at 22:44:06 UTC, greatsam4sure wrote: > >> On Tuesday, 19 September 2017 at 21:52:57 UTC, Ivan Kazmenko wrote: > >>> On Tuesday,

Re: formattedRead can't work with tab delimiter input

2017-09-19 Thread Ky-Anh Huynh via Digitalmars-d-learn
On Tuesday, 19 September 2017 at 20:04:36 UTC, kdevel wrote: On Tuesday, 19 September 2017 at 13:28:22 UTC, Ky-Anh Huynh wrote: Hi, I want to read two fields from STDIN string key; double value; line_st.formattedRead!"%s %f"(key, value); Well it's so different from C. I would

Re: floating point value rounded to 6digits

2017-09-19 Thread Ivan Kazmenko via Digitalmars-d-learn
On Tuesday, 19 September 2017 at 22:44:06 UTC, greatsam4sure wrote: On Tuesday, 19 September 2017 at 21:52:57 UTC, Ivan Kazmenko wrote: On Tuesday, 19 September 2017 at 20:47:02 UTC, greatsam4sure wrote: double value = 20.89766554373733; writeln(value); //Output =20.8977 How do I output the

Re: floating point value rounded to 6digits

2017-09-19 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/19/17 6:44 PM, greatsam4sure wrote: I don't  want to use write,writefln or format. I just want to change the default It's not a bad idea for an enhancement request -- provide default format specifiers for a given type. Currently, there isn't a mechanism for that. -Steve

Re: floating point value rounded to 6digits

2017-09-19 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/19/17 7:28 PM, Ivan Kazmenko wrote: On Tuesday, 19 September 2017 at 22:44:06 UTC, greatsam4sure wrote: On Tuesday, 19 September 2017 at 21:52:57 UTC, Ivan Kazmenko wrote: On Tuesday, 19 September 2017 at 20:47:02 UTC, greatsam4sure wrote: double  value = 20.89766554373733;

[Issue 17839] Review and take ownership or close all github PRs below 5000

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17839 Iain Buclaw changed: What|Removed |Added Status|NEW |ASSIGNED

[Issue 17839] New: Review and take ownership or close all github PRs below 5000

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17839 Issue ID: 17839 Summary: Review and take ownership or close all github PRs below 5000 Product: D Version: D2 Hardware: Other OS: Other Status: NEW

[Issue 965] `is()` is true and doesn't gap errors if not in a function

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=965 Simen Kjaeraas changed: What|Removed |Added Status|NEW |RESOLVED

D std.regex is so slow

2017-09-19 Thread Daniel Kozak via Digitalmars-d
https://github.com/mariomka/regex-benchmark#performance Do you know why? Here is a code: https://github.com/mariomka/regex-benchmark/blob/master/d/benchmark.d I have try it with ldc too, but is still much slower (10x) than PHP

Re: D for Android

2017-09-19 Thread Andrea Fontana via Digitalmars-d
On Tuesday, 19 September 2017 at 03:25:08 UTC, Joakim wrote: Next up, 32-bit ARM Android devices are now supported, I'm looking at getting 64-bit AArch64 Android up and running. Keep it up! Andrea

Re: Binary serialization of a struct

2017-09-19 Thread Nordlöw via Digitalmars-d-learn
On Saturday, 16 September 2017 at 03:30:51 UTC, Joseph wrote: Are there any simple direct serialization libraries where I can mark elements of a class or struct that I want serialized with an attribute and it will take care of all the rest(including recursive structures, arrays, etc) then

[Issue 17839] Review and take ownership or close all github PRs below 6000

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17839 Iain Buclaw changed: What|Removed |Added Summary|Review and take ownership |Review and take

Re: How to list all process directories under /proc/

2017-09-19 Thread Matt Jones via Digitalmars-d-learn
On Sunday, 17 September 2017 at 08:37:33 UTC, Ky-Anh Huynh wrote: The official documentation here https://dlang.org/phobos/std_path.html#.globMatch refers to the wiki page https://en.wikipedia.org/wiki/Glob_%28programming%29 . However I think the popular glob rules (man 7 glob) are not

Re: D std.regex is so slow

2017-09-19 Thread rikki cattermole via Digitalmars-d
On 19/09/2017 8:53 AM, Daniel Kozak wrote: https://github.com/mariomka/regex-benchmark#performance Do you know why? Here is a code: https://github.com/mariomka/regex-benchmark/blob/master/d/benchmark.d I have try it with ldc too, but is still much slower (10x) than PHP Most likely

[Issue 3448] `__traits(compiles, )` is true and doesn't gap errors if not in a function

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3448 Simen Kjaeraas changed: What|Removed |Added Status|NEW |RESOLVED

Re: D std.regex is so slow

2017-09-19 Thread Daniel Kozak via Digitalmars-d
Is there a plan to make BitNFA back? Is possible that newCTFE will improve problem with memory? Or it is possible to improve those slow cases? On Tue, Sep 19, 2017 at 8:12 PM, Dmitry Olshansky via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On Tuesday, 19 September 2017 at 16:27:51

Re: formattedRead can't work with tab delimiter input

2017-09-19 Thread kdevel via Digitalmars-d-learn
On Tuesday, 19 September 2017 at 13:28:22 UTC, Ky-Anh Huynh wrote: Hi, I want to read two fields from STDIN string key; double value; line_st.formattedRead!"%s %f"(key, value); Well it's so different from C. I would use this: --- auto t = line_st.split.join (' ');

[Issue 17836] ICE with custom 'map' template

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17836 --- Comment #4 from Iain Buclaw --- Note to anyone looking. For function call to mmap(...). Given that: FuncDeclaration fd = void mmap(T...); fd.toParent2() == main(); fd.parent.isTemplateInstance() == template

Re: What the hell is wrong with D?

2017-09-19 Thread Brad Anderson via Digitalmars-d-learn
On Tuesday, 19 September 2017 at 19:16:05 UTC, EntangledQuanta wrote: [snip] I'm just glad there is at least one sane person that decided to chime in... was quite surprised actually. I find it quite pathetic when someone tries to justify a wrong by pointing to other wrongs. It takes away all

Re: What the hell is wrong with D?

2017-09-19 Thread Neia Neutuladh via Digitalmars-d-learn
On Tuesday, 19 September 2017 at 17:40:20 UTC, EntangledQuanta wrote: writeln(x + ((_win[0] == '@') ? w/2 : 0)); writeln(x + (_win[0] == '@') ? w/2 : 0); The first returns x + w/2 and the second returns w/2! Yeah, it sucks to have bugs like this crop up. I have enough

Re: What the hell is wrong with D?

2017-09-19 Thread EntangledQuanta via Digitalmars-d-learn
On Tuesday, 19 September 2017 at 18:51:51 UTC, Jesse Phillips wrote: On Tuesday, 19 September 2017 at 17:40:20 UTC, EntangledQuanta wrote: I assume someone is going to tell me that the compiler treats it as writeln((x + (_win[0] == '@')) ? w/2 : 0); Yeah, that is really logical! Yeah, I've

Re: How to compile for Win64 with Visual D? Optlink error?

2017-09-19 Thread Rainer Schuetze via Digitalmars-d-learn
On 19.09.2017 13:47, Timothy Foster wrote: I'm trying to compile my project as a Win64 application but this is happening: Building C:\Users\me\test\test.exe... OPTLINK (R) for Win32  Release 8.00.17 Copyright (C) Digital Mars 1989-2013  All rights reserved.

Re: opEquals code generation

2017-09-19 Thread Neia Neutuladh via Digitalmars-d-learn
On Tuesday, 19 September 2017 at 13:18:04 UTC, drug wrote: 19.09.2017 15:38, Steven Schveighoffer пишет: On 9/19/17 8:01 AM, drug wrote: I iterate over struct members and check against equality depending on member type. is there more simple/cleaner/better way to achieve this functionality?

Re: Specifying @nogc on structs seems to have no effect

2017-09-19 Thread Neia Neutuladh via Digitalmars-d
On Tuesday, 19 September 2017 at 15:11:31 UTC, Craig Black wrote: Thank you for the information. What I would like to do is to create an Array template class that doesn't use GC at all. You want to ensure that it can never refer to GC memory. The type system does not contain that

[Issue 11886] "cannot access frame" error on lambda in lambda

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11886 Alex changed: What|Removed |Added CC||sascha.or...@gmail.com ---

Re: What the hell is wrong with D?

2017-09-19 Thread Jesse Phillips via Digitalmars-d-learn
On Tuesday, 19 September 2017 at 19:16:05 UTC, EntangledQuanta wrote: The D community preaches all this safety shit but when it comes down to it they don't seem to really care(look at the other responses like like "Hey, C does it" or "Hey, look up the operator precedence"... as if those

Re: What the hell is wrong with D?

2017-09-19 Thread jmh530 via Digitalmars-d-learn
On Tuesday, 19 September 2017 at 19:16:05 UTC, EntangledQuanta wrote: ()?: is not ambiguous! The D community preaches all this safety shit but when it comes down to it they don't seem to really care(look at the other responses like like "Hey, C does it" or "Hey, look up the operator

[Issue 17836] ICE with custom 'map' template

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17836 --- Comment #5 from Iain Buclaw --- (In reply to Iain Buclaw from comment #4) > > This is how you track the 'this' pointer for mmap to the frame of > printstuffs. > Also note that you can't trust toParent2() here, as it

floating point value rounded to 6digits

2017-09-19 Thread greatsam4sure via Digitalmars-d-learn
double value = 20.89766554373733; writeln(value); //Output =20.8977 How do I output the whole value without using writfln,write or format. How do I change this default

Re: What the hell is wrong with D?

2017-09-19 Thread nkm1 via Digitalmars-d-learn
On Tuesday, 19 September 2017 at 17:40:20 UTC, EntangledQuanta wrote: Yeah, that is really logical! No wonder D sucks and has so many bugs! Always wants me to be explicit about the stuff it won't figure out but it implicitly does stuff that makes no sense. The whole point of the parenthesis is

Re: Trial v0.4.0 and visual-trial v0.1.0 are out

2017-09-19 Thread Anton Fediushin via Digitalmars-d-announce
On Monday, 18 September 2017 at 20:50:55 UTC, Szabo Bogdan wrote: Hi! I want to announce that I managed to release a new version of Trial, the DLang test runner. Great news, it works just fine now!

Re: Specifying @nogc on structs seems to have no effect

2017-09-19 Thread ag0aep6g via Digitalmars-d
On 09/19/2017 08:06 PM, Craig Black wrote: This wouldn't be allowed for classes or class references, since they are always pointing to GC data That's not true. You can put class objects into other places than the GC heap.

Re: What the hell is wrong with D?

2017-09-19 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/19/17 1:40 PM, EntangledQuanta wrote: The first returns x + w/2 and the second returns w/2! Did you mean (x + w) / 2 or x + (w / 2)? Stop being ambiguous! -Steve

Re: What the hell is wrong with D?

2017-09-19 Thread jmh530 via Digitalmars-d-learn
On Tuesday, 19 September 2017 at 20:00:40 UTC, Brad Anderson wrote: If you want to help, I suggest trying to come up with a DIP that addresses it while being conscious of how to avoid breaking an enormous amount of code. I suspect it's a hard and maybe impossible problem but if you are up

Re: floating point value rounded to 6digits

2017-09-19 Thread Ivan Kazmenko via Digitalmars-d-learn
On Tuesday, 19 September 2017 at 20:47:02 UTC, greatsam4sure wrote: double value = 20.89766554373733; writeln(value); //Output =20.8977 How do I output the whole value without using writfln,write or format. How do I change this default The default when printing floating-point numbers is to

[Issue 1433] in array / slice / range / enum / ...

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1433 Simen Kjaeraas changed: What|Removed |Added Status|NEW |RESOLVED

Re: D std.regex is so slow

2017-09-19 Thread Dmitry Olshansky via Digitalmars-d
On Tuesday, 19 September 2017 at 07:53:27 UTC, Daniel Kozak wrote: https://github.com/mariomka/regex-benchmark#performance Do you know why? Here is a code: https://github.com/mariomka/regex-benchmark/blob/master/d/benchmark.d I have try it with ldc too, but is still much slower (10x) than

Re: How to compile for Win64 with Visual D? Optlink error?

2017-09-19 Thread Nicholas Wilson via Digitalmars-d-learn
On Tuesday, 19 September 2017 at 11:47:00 UTC, Timothy Foster wrote: I'm trying to compile my project as a Win64 application but this is happening: Building C:\Users\me\test\test.exe... OPTLINK (R) for Win32 Release 8.00.17 Copyright (C) Digital Mars 1989-2013 All rights reserved.

Re: D for Android

2017-09-19 Thread twkrimm via Digitalmars-d
On Tuesday, 19 September 2017 at 07:44:47 UTC, Andrea Fontana wrote: On Tuesday, 19 September 2017 at 03:25:08 UTC, Joakim wrote: Next up, 32-bit ARM Android devices are now supported, I'm looking at getting 64-bit AArch64 Android up and running. Keep it up! Andrea Joakim I think the

Re: opEquals code generation

2017-09-19 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/19/17 8:01 AM, drug wrote: I iterate over struct members and check against equality depending on member type. is there more simple/cleaner/better way to achieve this functionality? Especially without string mixins? Why not just use tupleof directly instead of having to find the member

[Issue 1432] Bogus "overlapping initialization" error with structs, unions, and member initializers

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1432 Simen Kjaeraas changed: What|Removed |Added Status|NEW |RESOLVED

How to compile for Win64 with Visual D? Optlink error?

2017-09-19 Thread Timothy Foster via Digitalmars-d-learn
I'm trying to compile my project as a Win64 application but this is happening: Building C:\Users\me\test\test.exe... OPTLINK (R) for Win32 Release 8.00.17 Copyright (C) Digital Mars 1989-2013 All rights reserved. http://www.digitalmars.com/ctg/optlink.html OPTLINK : Warning 183: Extension not

[Issue 1820] Let ifti see through static if condition in some cases

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1820 Simen Kjaeraas changed: What|Removed |Added Status|NEW |RESOLVED

Re: opEquals code generation

2017-09-19 Thread drug via Digitalmars-d-learn
19.09.2017 15:01, drug пишет: I iterate over struct members and check against equality depending on member type. is there more simple/cleaner/better way to achieve this functionality? Especially without string mixins? oops, https://run.dlang.io/is/PbZE5i

[Issue 1816] Parameter names not visible in return type in function declarations

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1816 Simen Kjaeraas changed: What|Removed |Added Status|NEW |RESOLVED

opEquals code generation

2017-09-19 Thread drug via Digitalmars-d-learn
I iterate over struct members and check against equality depending on member type. is there more simple/cleaner/better way to achieve this functionality? Especially without string mixins?

Re: How to compile for Win64 with Visual D? Optlink error?

2017-09-19 Thread Daniel Kozak via Digitalmars-d-learn
this should be ok, can you post error when using with m64 On Tue, Sep 19, 2017 at 1:47 PM, Timothy Foster via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > I'm trying to compile my project as a Win64 application but this is > happening: > > Building

Basic LDC Linux Install Question

2017-09-19 Thread jmh530 via Digitalmars-d-learn
I'm more of a Windows user than a Linux user. I have the latest DMD on my Linux install (linux mint 17.3), but I wanted to test LDC. I get a message that ldc2 is not found when I type ldc2 --version or sudo ldc2 --version (I'm not on root and the existing user does not have root privileges,

Re: D std.regex is so slow

2017-09-19 Thread John Colvin via Digitalmars-d
On Tuesday, 19 September 2017 at 10:14:05 UTC, Dmitry Olshansky wrote: On Tuesday, 19 September 2017 at 07:53:27 UTC, Daniel Kozak wrote: https://github.com/mariomka/regex-benchmark#performance Do you know why? Here is a code:

Re: Basic LDC Linux Install Question

2017-09-19 Thread Daniel Kozak via Digitalmars-d-learn
Yes you need to add ldc2 to your PATH. So if your ldc2 binary is in /user/something/something/folder_where_is_ldc2/ldc2 you havto add /user/something/something/folder_where_is_ldc2 to your PATH. You can test this by pasting this to terminal: export

Re: static array with inferred size

2017-09-19 Thread Andrei Alexandrescu via Digitalmars-d
On 9/19/17 8:47 PM, Steven Schveighoffer wrote: This needs to happen. e.g.: char[$] arr = "hello"; // syntax up for debate, but I like this. I can't think of a correct way to do this that doesn't heap-allocate and is DRY. D is so powerful, it's a huge shame it can't figure this one out.

Re: D for Android

2017-09-19 Thread Andrei Alexandrescu via Digitalmars-d
On 9/18/17 11:25 PM, Joakim wrote: Almost four years ago, I asked where Android was at, in this thread about supporting ARM, and decided to take up the port: http://forum.dlang.org/thread/yhulkqvlwnxjklnog...@forum.dlang.org After releasing linux/x64 cross-compilers for the last couple years,

Re: What the hell is wrong with D?

2017-09-19 Thread nkm1 via Digitalmars-d-learn
On Wednesday, 20 September 2017 at 02:16:16 UTC, EntangledQuanta wrote: Your an idiot, I know about how operator precedence works far more than you do. Wanna bet? how much? Your house? your wife? Your life? It's about doing things correctly, you seem to fail to understand, not your fault,

Re: D std.regex is so slow

2017-09-19 Thread Dmitry Olshansky via Digitalmars-d
On Tuesday, 19 September 2017 at 19:52:57 UTC, Daniel Kozak wrote: Is there a plan to make BitNFA back? Yes, the moment we have CTFE that doesn't leak. Is possible that newCTFE will improve problem with memory? It should but it doesn't support classes and exceptions. I need them. Or it

mysqln - tagged bugfix release v1.1.1

2017-09-19 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-announce
https://github.com/mysql-d/mysql-native Native D client driver for MySQL/MariaDB, works with or without Vibe.d Tagged bugfix release v1.1.1: - Fixed: #116: Prevent segfault on copying ResultRange. (@schveiguy) - Fixed: #120: Fix typos / grammars in documentation (@Marenz) - Fixed: #124: Fix

Re: What the hell is wrong with D?

2017-09-19 Thread EntangledQuanta via Digitalmars-d-learn
On Wednesday, 20 September 2017 at 02:36:50 UTC, Jonathan M Davis wrote: On Wednesday, September 20, 2017 02:16:16 EntangledQuanta via Digitalmars-d- learn wrote: On Tuesday, 19 September 2017 at 21:17:53 UTC, nkm1 wrote: > On Tuesday, 19 September 2017 at 17:40:20 UTC, > EntangledQuanta > >

Re: How to list all process directories under /proc/

2017-09-19 Thread Ky-Anh Huynh via Digitalmars-d-learn
On Tuesday, 19 September 2017 at 18:32:06 UTC, Matt Jones wrote: On Tuesday, 19 September 2017 at 13:32:29 UTC, Ky-Anh Huynh wrote: Btw, is that a bit weird that range is not supported in glob pattern :) Is there a design reason for this? That is strange. But then again, every glob

[Issue 17832] std.random.choice cannot be used with other random generators

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17832 Anton Fediushin changed: What|Removed |Added CC|

Re: Specifying @nogc on structs seems to have no effect

2017-09-19 Thread Craig Black via Digitalmars-d
On Tuesday, 19 September 2017 at 13:59:27 UTC, Jonathan M Davis wrote: On Tuesday, September 19, 2017 13:11:03 Craig Black via Digitalmars-d wrote: I've recently tried coding in D again after some years. One of my earlier concerns was the ability to code without the GC, which seemed difficult

Re: Specifying @nogc on structs seems to have no effect

2017-09-19 Thread Craig Black via Digitalmars-d
On Tuesday, 19 September 2017 at 13:11:03 UTC, Craig Black wrote: I've recently tried coding in D again after some years. One of my earlier concerns was the ability to code without the GC, which seemed difficult to pull off. To be clear, I want my programs to be garbage collected, but I want

formattedRead can't work with tab delimiter input

2017-09-19 Thread Ky-Anh Huynh via Digitalmars-d-learn
Hi, I want to read two fields from STDIN string key; double value; line_st.formattedRead!"%s %f"(key, value); However, if the input line contains \t and it doesn't contain any space, the code doesn't work as expected. If there is a space, it works well a[space]1 #

Re: How to list all process directories under /proc/

2017-09-19 Thread Ky-Anh Huynh via Digitalmars-d-learn
On Tuesday, 19 September 2017 at 06:35:18 UTC, Matt Jones wrote: On Sunday, 17 September 2017 at 08:37:33 UTC, Ky-Anh Huynh wrote: [...] The problem with matching "[0123456789]*" is that it will match files like "1blah" and "8stuff". It looks like glob patterns are not robust enough to

Re: Specifying @nogc on structs seems to have no effect

2017-09-19 Thread John Colvin via Digitalmars-d
On Tuesday, 19 September 2017 at 13:11:03 UTC, Craig Black wrote: I've recently tried coding in D again after some years. One of my earlier concerns was the ability to code without the GC, which seemed difficult to pull off. To be clear, I want my programs to be garbage collected, but I want

[Issue 17832] std.random.choice cannot be used with other random generators

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17832 Duncan Paterson changed: What|Removed |Added Status|NEW |ASSIGNED

Specifying @nogc on structs seems to have no effect

2017-09-19 Thread Craig Black via Digitalmars-d
I've recently tried coding in D again after some years. One of my earlier concerns was the ability to code without the GC, which seemed difficult to pull off. To be clear, I want my programs to be garbage collected, but I want to use the GC sparingly so that the mark and sweep collections

Re: opEquals code generation

2017-09-19 Thread drug via Digitalmars-d-learn
19.09.2017 15:38, Steven Schveighoffer пишет: On 9/19/17 8:01 AM, drug wrote: I iterate over struct members and check against equality depending on member type. is there more simple/cleaner/better way to achieve this functionality? Especially without string mixins? Why not just use tupleof

Re: Specifying @nogc on structs seems to have no effect

2017-09-19 Thread Andrea Fontana via Digitalmars-d
On Tuesday, 19 September 2017 at 13:13:48 UTC, Craig Black wrote: @nogc struct Array(T) { ... } class GarbageCollectedClass { } void main() { Array!int intArray; // fine Array!GarbageCollectedClass classArray; // Error: struct Array is @nogc } If you want to enforce that behaviour I

Re: Specifying @nogc on structs seems to have no effect

2017-09-19 Thread Eugene Wissner via Digitalmars-d
On Tuesday, 19 September 2017 at 13:11:03 UTC, Craig Black wrote: I've recently tried coding in D again after some years. One of my earlier concerns was the ability to code without the GC, which seemed difficult to pull off. To be clear, I want my programs to be garbage collected, but I want

Re: D for Android

2017-09-19 Thread Johannes Pfau via Digitalmars-d
Am Tue, 19 Sep 2017 12:38:15 + schrieb twkrimm : > On Tuesday, 19 September 2017 at 07:44:47 UTC, Andrea Fontana > wrote: > > On Tuesday, 19 September 2017 at 03:25:08 UTC, Joakim wrote: > >> Next up, 32-bit ARM Android devices are now supported, I'm > >> looking at

Re: Basic LDC Linux Install Question

2017-09-19 Thread jmh530 via Digitalmars-d-learn
On Tuesday, 19 September 2017 at 12:37:12 UTC, Daniel Kozak wrote: Yes you need to add ldc2 to your PATH. So if your ldc2 binary is in /user/something/something/folder_where_is_ldc2/ldc2 you havto add /user/something/something/folder_where_is_ldc2 to your PATH. You can test this by pasting

Re: Specifying @nogc on structs seems to have no effect

2017-09-19 Thread drug via Digitalmars-d
19.09.2017 16:48, drug пишет: 19.09.2017 16:46, Craig Black пишет: class Foo { } struct MyStruct { @nogc: public:    Foo foo; // This does not produce an error, but it still requires a GC scan    void Bar()    { foo = new Foo; // This produces an error    } } it produces an error for

Re: Specifying @nogc on structs seems to have no effect

2017-09-19 Thread drug via Digitalmars-d
19.09.2017 16:49, drug пишет: 19.09.2017 16:48, drug пишет: 19.09.2017 16:46, Craig Black пишет: class Foo { } struct MyStruct { @nogc: public:    Foo foo; // This does not produce an error, but it still requires a GC scan    void Bar()    { foo = new Foo; // This produces an error   

Re: Specifying @nogc on structs seems to have no effect

2017-09-19 Thread Craig Black via Digitalmars-d
On Tuesday, 19 September 2017 at 13:32:59 UTC, Eugene Wissner wrote: On Tuesday, 19 September 2017 at 13:11:03 UTC, Craig Black wrote: I've recently tried coding in D again after some years. One of my earlier concerns was the ability to code without the GC, which seemed difficult to pull off.

Re: Specifying @nogc on structs seems to have no effect

2017-09-19 Thread drug via Digitalmars-d
19.09.2017 16:46, Craig Black пишет: class Foo { } struct MyStruct { @nogc: public:   Foo foo; // This does not produce an error, but it still requires a GC scan   void Bar()   {     foo = new Foo; // This produces an error   } } it produces an error for me

Re: Specifying @nogc on structs seems to have no effect

2017-09-19 Thread ag0aep6g via Digitalmars-d
On 09/19/2017 03:46 PM, Craig Black wrote: struct MyStruct { @nogc: public:   Foo foo; // This does not produce an error, but it still requires a GC scan @nogc is about GC allocations. `Foo foo;` doesn't cause a GC allocation. @nogc doesn't control what memory is scanned by the GC.

Re: Specifying @nogc on structs seems to have no effect

2017-09-19 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, September 19, 2017 13:11:03 Craig Black via Digitalmars-d wrote: > I've recently tried coding in D again after some years. One of > my earlier concerns was the ability to code without the GC, which > seemed difficult to pull off. To be clear, I want my programs to > be garbage

Re: Specifying @nogc on structs seems to have no effect

2017-09-19 Thread Mike Parker via Digitalmars-d
On Tuesday, 19 September 2017 at 13:46:20 UTC, Craig Black wrote: Thanks, I didn't know you could to that but it still doesn't give me the behavior that I want: class Foo { } struct MyStruct { @nogc: public: Foo foo; // This does not produce an error, but it still requires a GC scan

[Issue 17840] New: Check status of all bugzilla issues below 2000

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17840 Issue ID: 17840 Summary: Check status of all bugzilla issues below 2000 Product: D Version: D2 Hardware: Other OS: Other Status: NEW Severity: normal

  1   2   >