Re: Moving back to .NET

2015-09-30 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 30 September 2015 at 17:12:37 UTC, Mengu wrote: what is libucrtd.lib http://blogs.msdn.com/b/vcblog/archive/2015/03/03/introducing-the-universal-crt.aspx "The Universal CRT is a Windows operating system component. It is a part of Windows 10. For Windows versions prior to

HOW TO COPY DBF Files in VB.NET

2015-09-30 Thread sunil880089 via Digitalmars-d
Hello Everyone, I have one old foxpro application which is using dbf files as database. But now i want to develop a new VB.net application for the same dbf database files. when i try to read dbf files from VB.Net application at the same time foxpro application and dbf files get crashed. So

Re: Shout out to D at cppcon, when talkign about ranges.

2015-09-30 Thread wobbles via Digitalmars-d
On Wednesday, 30 September 2015 at 16:06:59 UTC, Joakim wrote: On Wednesday, 30 September 2015 at 01:45:49 UTC, deadalnix wrote: https://www.youtube.com/watch?v=mFUXNMfaciE From http://wiki.dlang.org/Component_programming_with_ranges Congrat H. S. Teoh Thanks for the link, I watched the

Re: Interface file

2015-09-30 Thread Steven Schveighoffer via Digitalmars-d
On 9/30/15 2:12 PM, Jan Johansson wrote: Thanks, But (there is always a but) ;-) The main.d should rely on itest.d, not test.d, otherwise I do the declaration for the library itself, but the main.d includes the test.d - the implementation (not the declaration). If I change the 'dmd main.d

Re: Moving back to .NET

2015-09-30 Thread Mengu via Digitalmars-d
On Wednesday, 30 September 2015 at 15:45:02 UTC, learn wrote: working as advertised libucrtd.lib is still sought and not found after another new release. you guys should get your shit together, otherwise more people that try D will "Moving back to .NET" and not tell you about it. well i

Re: Interface file

2015-09-30 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 30 September 2015 at 17:51:50 UTC, Jan Johansson wrote: The interface file (I called it test.di): FYI there's no actual difference between .di files and .d files. The way D is meant to be used is you write the declarations together, then if you want to, you can automatically

Re: Shout out to D at cppcon, when talkign about ranges.

2015-09-30 Thread Brad Roberts via Digitalmars-d
On 9/30/15 12:12 PM, wobbles via Digitalmars-d wrote: On Wednesday, 30 September 2015 at 16:06:59 UTC, Joakim wrote: On Wednesday, 30 September 2015 at 01:45:49 UTC, deadalnix wrote: https://www.youtube.com/watch?v=mFUXNMfaciE From http://wiki.dlang.org/Component_programming_with_ranges

Re: Interface file

2015-09-30 Thread Jan Johansson via Digitalmars-d
On Wednesday, 30 September 2015 at 18:01:57 UTC, Adam D. Ruppe wrote: On Wednesday, 30 September 2015 at 17:51:50 UTC, Jan Johansson wrote: The interface file (I called it test.di): FYI there's no actual difference between .di files and .d files. The way D is meant to be used is you write

Re: Interface file

2015-09-30 Thread Jeremy DeHaan via Digitalmars-d
On Wednesday, 30 September 2015 at 17:51:50 UTC, Jan Johansson wrote: Hello all, I'm testing D language, and the first thing I want to do is to separate declaration from implementation. I was happy to find support of interfaces in the D language, and set out to do a basic test. However, this

Re: Moving back to .NET

2015-09-30 Thread learn via Digitalmars-d
On Wednesday, 30 September 2015 at 17:12:37 UTC, Mengu wrote: On Wednesday, 30 September 2015 at 15:45:02 UTC, learn wrote: working as advertised libucrtd.lib is still sought and not found after another new release. you guys should get your shit together, otherwise more people that try D

Re: Improving assert-printing in DMD

2015-09-30 Thread H. S. Teoh via Digitalmars-d
On Wed, Sep 30, 2015 at 04:14:59PM +, John Colvin via Digitalmars-d wrote: > On Wednesday, 30 September 2015 at 14:53:31 UTC, H. S. Teoh wrote: > >On Wed, Sep 30, 2015 at 08:30:47AM +0200, Jacob Carlborg via Digitalmars-d > >wrote: > >>On 2015-09-29 23:32, Andrej Mitrovic via Digitalmars-d

Re: Moving back to .NET

2015-09-30 Thread Jan Johansson via Digitalmars-d
On Sunday, 20 September 2015 at 17:32:53 UTC, Adam wrote: My experiences with D recently have not been fun. The language itself has a top notch feature rich set. The implementation, excluding bugs, feels a bit boxy and old school. .NET has a unified approach and everything seems to fit

[Issue 7979] Alias this does not work with switch

2015-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7979 Kenji Hara changed: What|Removed |Added Keywords||pull, rejects-valid ---

Re: Pathing in the D ecosystem is generally broken (at least on windows)

2015-09-30 Thread Jacob Carlborg via Digitalmars-d
On 2015-09-30 01:50, Walter Bright wrote: Cases that frustrate me: 1. In filing a bug report, I need to input the version number. For Internet Explorer, I bring up the "About Internet Explorer" dialog box. The version is (I kid you not) a 55 character string of random digits and letters. I

[Issue 15128] New: "IP_ADD_MEMBERSHIP" error in winsock2.d

2015-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15128 Issue ID: 15128 Summary: "IP_ADD_MEMBERSHIP" error in winsock2.d Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: enhancement

Re: zip packages to pack modules

2015-09-30 Thread Atila Neves via Digitalmars-d
On Tuesday, 29 September 2015 at 17:13:26 UTC, bachmeier wrote: On Tuesday, 29 September 2015 at 14:29:44 UTC, Atila Neves wrote: On Tuesday, 29 September 2015 at 12:04:51 UTC, bachmeier wrote: Again, that's the problem. You shouldn't have to write your own dub package in order to use dub

Re: Pathing in the D ecosystem is generally broken (at least on windows)

2015-09-30 Thread Dmitry Olshansky via Digitalmars-d
On 30-Sep-2015 02:50, Walter Bright wrote: On 9/29/2015 1:58 AM, Jonathan M Davis wrote: There have certainly been times where I've wanted to copy text that was not selectable for some reason (or selectable but not copyable), but it sounds like you have a much higher expectation of text

[Issue 15110] pragma(inline) rarely works how I want it to

2015-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15110 Iain Buclaw changed: What|Removed |Added CC||ibuc...@gdcproject.org

Re: Moving back to .NET

2015-09-30 Thread Laeeth Isharc via Digitalmars-d
On Tuesday, 29 September 2015 at 17:22:30 UTC, jmh530 wrote: On Tuesday, 29 September 2015 at 15:31:30 UTC, Laeeth Isharc wrote: In my experience, risk is the excuse, and habit and human dislike of change is a much more powerful reason. I love this line. Thank you. The sentiment I am

Re: Why getting private member fails using getMember trait in a template?

2015-09-30 Thread Atila Neves via Digitalmars-d-learn
On Tuesday, 29 September 2015 at 09:40:41 UTC, Alexandru Ermicioi wrote: On Saturday, 26 September 2015 at 10:10:39 UTC, Alexandru Ermicioi wrote: Suppose we have, two modules: module testOne; [...] So, is this behavior correct? If yes, then why? Yes, because private members aren't

Re: A new article about working with files in D

2015-09-30 Thread extrawurst via Digitalmars-d-announce
On Tuesday, 29 September 2015 at 06:26:32 UTC, Suliman wrote: Big thanks! It's very helpful for newcomers. D need extend Phobos docs with such examples. Is there any plan to do it, because it's often it's hard to understand how to proper use functions. Also I think you need to add example of

[Issue 15129] New: std.parallelism.parallel doesn't enforce shared-correctness

2015-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15129 Issue ID: 15129 Summary: std.parallelism.parallel doesn't enforce shared-correctness Product: D Version: D2 Hardware: x86_64 URL:

[Issue 11043] Context pointer of delegate should be const qualified

2015-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11043 Marc Schütz changed: What|Removed |Added Blocks||15129 --

[Issue 1983] Delegates violate const

2015-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1983 Marc Schütz changed: What|Removed |Added Blocks||15129 --

Re: Pathing in the D ecosystem is generally broken (at least on windows)

2015-09-30 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, 30 September 2015 at 04:48:35 UTC, H. S. Teoh wrote: On Wed, Sep 30, 2015 at 01:59:36AM +, Jonathan M Davis via Digitalmars-d wrote: I know the commandline scares away your average joe. That's the kind of audience GUIs are catered to, which is understandable. What gets

Re: Moving back to .NET

2015-09-30 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, 30 September 2015 at 05:17:59 UTC, deadalnix wrote: On Wednesday, 30 September 2015 at 05:00:11 UTC, H. S. Teoh wrote: Are we accepting PRs to convert ddmd to be more D-like? T Sure, you can submit PR here : https://github.com/SDC-Developers/SDC ;) LOL. - Jonathan M

Re: Moving back to .NET

2015-09-30 Thread Laeeth Isharc via Digitalmars-d
On Tuesday, 29 September 2015 at 16:19:19 UTC, Ola Fosheim Grøstad wrote: On Tuesday, 29 September 2015 at 15:31:30 UTC, Laeeth Isharc wrote: On Sunday, 27 September 2015 at 09:51:42 UTC, Ola Fosheim Grøstad wrote: But even after years of polish Go is still perceived as risky: Of course it's

Re: std.experimental.testing formal review

2015-09-30 Thread Atila Neves via Digitalmars-d
On Tuesday, 29 September 2015 at 19:15:13 UTC, Meta wrote: On Tuesday, 29 September 2015 at 14:34:42 UTC, Atila Neves wrote: runTests with no optional arguments will run the tests in threads. There's nothing about purity enforcement there. In fact, I tried using pure unit tests yesterday with

Re: 1st Ever Artificial Consciousness to be Written in D Language

2015-09-30 Thread Grand_Axe via Digitalmars-d-announce
I am slightly behind schedule with the coding. The main logic is only getting completed today. The system should be ready for first looks by the 9th of October.

Re: Moving back to .NET

2015-09-30 Thread Laeeth Isharc via Digitalmars-d
On Tuesday, 29 September 2015 at 17:52:54 UTC, Chris wrote: And don't forget a*se covering, risk aversion is often not much more than that. It's one of the most common things in organizations. If things go wrong, at least you stuck to the protocol, the the well-established, widely used

Re: Pathing in the D ecosystem is generally broken (at least on windows)

2015-09-30 Thread Kagamin via Digitalmars-d
On Wednesday, 30 September 2015 at 04:48:35 UTC, H. S. Teoh wrote: I know the commandline scares away your average joe. That's the kind of audience GUIs are catered to, which is understandable. What gets annoying is when you're *forced* to use GUI even if you're not the average joe. Many tasks

Re: Improving assert-printing in DMD

2015-09-30 Thread Jacob Carlborg via Digitalmars-d
On 2015-09-30 05:45, deadalnix wrote: On Tuesday, 29 September 2015 at 21:02:42 UTC, Nordlöw wrote: As a follow-up to https://github.com/D-Programming-Language/phobos/pull/3207#issuecomment-144073495 I do think wiring this in the compiler is probably not the right way forward. Most language

Re: Moving back to .NET

2015-09-30 Thread Laeeth Isharc via Digitalmars-d
On Tuesday, 29 September 2015 at 17:33:04 UTC, Chris wrote: On Tuesday, 29 September 2015 at 05:52:13 UTC, Ola Fosheim Grøstad wrote: This logic is very difficult to follow. Software project management is often done by people who are programmers. From a project health point of view D2

Re: Moving back to .NET

2015-09-30 Thread ponce via Digitalmars-d
On Wednesday, 30 September 2015 at 04:59:22 UTC, H. S. Teoh wrote: I find these kinds of comments rather humorous, actually. Every once in a while, somebody would barge into the forum and decry the current state of things, bemoaning that D is too Linux-centric and that Windows gets no love.

Re: Improving assert-printing in DMD

2015-09-30 Thread Jacob Carlborg via Digitalmars-d
On 2015-09-29 23:32, Andrej Mitrovic via Digitalmars-d wrote: If you have plaintext passwords stored anywhere you are already screwed. ;) The password always starts out in plaintext, or do you hash it in the front end, as the users types? Since the back end shouldn't trust the front end, it

Re: 1st Ever Artificial Consciousness to be Written in D Language

2015-09-30 Thread ketmar via Digitalmars-d-announce
alot of "bla-bla", no scientific publications, a miserable "award from microsoft" (really, it's better to have nothing than to have *this*), constantly out of schedule... this is attention whore, boys. nothing to see here, let's go home.

Re: Why getting private member fails using getMember trait in a template?

2015-09-30 Thread Marc Schütz via Digitalmars-d-learn
On Wednesday, 30 September 2015 at 07:57:59 UTC, Atila Neves wrote: On Tuesday, 29 September 2015 at 09:40:41 UTC, Alexandru Ermicioi wrote: On Saturday, 26 September 2015 at 10:10:39 UTC, Alexandru Ermicioi wrote: Suppose we have, two modules: module testOne; [...] So, is this behavior

Re: Moving back to .NET

2015-09-30 Thread rumbu via Digitalmars-d
On Wednesday, 30 September 2015 at 16:52:21 UTC, Adam D. Ruppe wrote: On Wednesday, 30 September 2015 at 09:49:34 UTC, rumbu wrote: I would believe that when core.sys.windows will have the same amount of code like core.sys.posix after the default installation. I'm unbelievably close to that

Re: Range of variables

2015-09-30 Thread anonymous via Digitalmars-d-learn
On Wednesday, 30 September 2015 at 20:11:56 UTC, Freddy wrote: Is there a way to make a range of a variables lazily? --- int var1; int var2; void func() { int var3; auto range = /*range of var1,var2,var3*/ ; } --- There's std.range.only which gives you a range over the arguments you

Re: Interface file

2015-09-30 Thread Andrei Alexandrescu via Digitalmars-d
On 09/30/2015 02:01 PM, Adam D. Ruppe wrote: [snip] Good material for a Q section of TWiD. -- Andrei

Re: Shout out to D at cppcon, when talkign about ranges.

2015-09-30 Thread Jim Hewes via Digitalmars-d
I haven't watched it yet, but it seems to be similar to this one from NWCPP I watched recently: https://www.youtube.com/watch?v=8yV2ONeWXyI

Range of variables

2015-09-30 Thread Freddy via Digitalmars-d-learn
Is there a way to make a range of a variables lazily? --- int var1; int var2; void func() { int var3; auto range = /*range of var1,var2,var3*/ ; } ---

[Issue 14034] std.algorithm.mean

2015-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14034 --- Comment #2 from Jack Stouffer --- Take two https://github.com/D-Programming-Language/phobos/pull/3679 --

Re: Pathing in the D ecosystem is generally broken (at least on windows)

2015-09-30 Thread Walter Bright via Digitalmars-d
On 9/29/2015 11:36 PM, Jacob Carlborg wrote: Can't you copy the editable text fields? Or do you want to copy the labels as well? I'm not making myself clear. I want to copy any or all of the text in the dialog box using the usual method: click and drag the mouse to pick what I want to copy.

Re: Moving back to .NET

2015-09-30 Thread rumbu via Digitalmars-d
On Wednesday, 30 September 2015 at 04:59:22 UTC, H. S. Teoh wrote: On Wed, Sep 30, 2015 at 04:32:52AM +, Mike Parker via Digitalmars-d wrote: On Tuesday, 29 September 2015 at 22:05:48 UTC, rumbu wrote: >My main complaints are also the compiler error messages ("Out >of memory" is the most

Re: Moving back to .NET

2015-09-30 Thread Kagamin via Digitalmars-d
On Wednesday, 30 September 2015 at 09:49:34 UTC, rumbu wrote: Or when mscoff32 libs will be included in setup. Said to be in 2.068.1: https://issues.dlang.org/show_bug.cgi?id=13889

Re: Pathing in the D ecosystem is generally broken (at least on windows)

2015-09-30 Thread Walter Bright via Digitalmars-d
On 9/29/2015 11:03 PM, Dmitry Olshansky wrote: When that happens to me I use Abbyy FineReader to OCR the screenshot, there is even a special screenshot reader app. Sometimes it's a lifesaver. I use a flamethrower to light cigarettes, too!

Re: Improving assert-printing in DMD

2015-09-30 Thread Timon Gehr via Digitalmars-d
On 09/30/2015 05:08 AM, Andrei Alexandrescu wrote: On 09/29/2015 05:25 PM, John Colvin wrote: auto pass = getPassword(); pass.clean(); assert(pass == pass.toLower()); //and on we go ... Interesting angle, but it's not something we should worry about. -- Andrei There's also the possibility

[Issue 15130] New: dmd emits huge data for zero initialized struct

2015-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15130 Issue ID: 15130 Summary: dmd emits huge data for zero initialized struct Product: D Version: D2 Hardware: All OS: Linux Status: NEW Severity: normal

Re: Moving back to .NET

2015-09-30 Thread Kagamin via Digitalmars-d
On Tuesday, 29 September 2015 at 05:52:13 UTC, Ola Fosheim Grøstad wrote: D2 does not solve C++'s issues Heartbleed?

Re: Threading Questions

2015-09-30 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, September 29, 2015 22:38:42 Johannes Pfau via Digitalmars-d-learn wrote: > Am Tue, 29 Sep 2015 15:10:58 -0400 > schrieb Steven Schveighoffer : > > > > > > 3) Why do I have to pass a "Mutex" to "Condition"? Why can't I just > > > pass an "Object"? > > > > An object

Re: Shout out to D at cppcon, when talkign about ranges.

2015-09-30 Thread Arjan via Digitalmars-d
On Wednesday, 30 September 2015 at 01:55:43 UTC, deadalnix wrote: On Wednesday, 30 September 2015 at 01:45:49 UTC, deadalnix wrote: https://www.youtube.com/watch?v=mFUXNMfaciE From http://wiki.dlang.org/Component_programming_with_ranges Congrat H. S. Teoh Shared on reddit:

Re: Moving back to .NET

2015-09-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 29 September 2015 at 22:05:48 UTC, rumbu wrote: The original OP complained about compiler error messages and the lack of a true IDE, these are not "qualities" of a system level programming language, I see them as basic failures. Yes, sure, but people looking for a system level

Re: Moving back to .NET

2015-09-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Wednesday, 30 September 2015 at 07:44:09 UTC, Laeeth Isharc wrote: On Tuesday, 29 September 2015 at 16:19:19 UTC, Ola Fosheim Grøstad wrote: On Tuesday, 29 September 2015 at 15:31:30 UTC, Laeeth Isharc wrote: We know that you think D is a toy language, although you also say that you aren't

Re: Moving back to .NET

2015-09-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 29 September 2015 at 17:33:04 UTC, Chris wrote: This is not my impression. Even "geeks" don't touch D (I know this from personal experience), even when there's no risk involved, e.g. when writing a small internal tool. As soon as they hear they have to learn about ranges and map!(a

Re: Moving back to .NET

2015-09-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Wednesday, 30 September 2015 at 09:16:44 UTC, Kagamin wrote: On Tuesday, 29 September 2015 at 05:52:13 UTC, Ola Fosheim Grøstad wrote: D2 does not solve C++'s issues Heartbleed? C++ offers optional bounds checks + static analysis tools.

How to do unittests

2015-09-30 Thread Namal via Digitalmars-d-learn
Hello, can someone give me a complete example please how to do unittests? I tried this with the example from german wikipedia, but the flag -unittest didn't make any difference.

Re: StyleCop for D

2015-09-30 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 30 September 2015 at 13:40:48 UTC, Suliman wrote: It would be nice to have such tool for D. Take a look at: https://github.com/Hackerpilot/dfmt

Re: Improving assert-printing in DMD

2015-09-30 Thread Andrei Alexandrescu via Digitalmars-d
On 09/29/2015 11:45 PM, deadalnix wrote: On Tuesday, 29 September 2015 at 21:02:42 UTC, Nordlöw wrote: As a follow-up to https://github.com/D-Programming-Language/phobos/pull/3207#issuecomment-144073495 I starting digging in DMD for logic controlling behaviour of assert(), especially whether

Re: Improving assert-printing in DMD

2015-09-30 Thread Andrei Alexandrescu via Digitalmars-d
On 09/29/2015 11:45 PM, deadalnix wrote: On Tuesday, 29 September 2015 at 21:02:42 UTC, Nordlöw wrote: As a follow-up to https://github.com/D-Programming-Language/phobos/pull/3207#issuecomment-144073495 I starting digging in DMD for logic controlling behaviour of assert(), especially whether

Re: Shout out to D at cppcon, when talkign about ranges.

2015-09-30 Thread Steven Schveighoffer via Digitalmars-d
On 9/29/15 9:45 PM, deadalnix wrote: https://www.youtube.com/watch?v=mFUXNMfaciE From http://wiki.dlang.org/Component_programming_with_ranges Congrat H. S. Teoh Ditto! Here is the link to the video at the time where D is credited, very nice compliment: https://youtu.be/mFUXNMfaciE?t=115

Re: Moving back to .NET

2015-09-30 Thread Kagamin via Digitalmars-d
On Wednesday, 30 September 2015 at 12:43:10 UTC, Ola Fosheim Grøstad wrote: On Wednesday, 30 September 2015 at 09:16:44 UTC, Kagamin wrote: On Tuesday, 29 September 2015 at 05:52:13 UTC, Ola Fosheim Grøstad wrote: D2 does not solve C++'s issues Heartbleed? C++ offers optional bounds checks

Re: How to do unittests

2015-09-30 Thread Rikki Cattermole via Digitalmars-d-learn
On 01/10/15 1:59 AM, Namal wrote: Hello, can someone give me a complete example please how to do unittests? I tried this with the example from german wikipedia, but the flag -unittest didn't make any difference. Example file with loads of unittests:

[Issue 14981] [REG 2.068.0] Missing nothrow attribute in dbgVerifySorted()

2015-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14981 Steven Schveighoffer changed: What|Removed |Added Status|NEW |RESOLVED

StyleCop for D

2015-09-30 Thread Suliman via Digitalmars-d
I found very interesting tool for .NET https://stylecopplus.codeplex.com/#MoreCustomRules It would be nice to have such tool for D.

Checking that a template parameter is an enum

2015-09-30 Thread Nordlöw via Digitalmars-d-learn
How do I check that a template parameter is a CT-value or an enum symbol? I want this to restrict the following template: /** Returns: true iff all values $(D V) are the same. */ template allSame(V...) // TODO restrict to values only { static if (V.length <= 1) enum bool

[Issue 7979] Alias this does not work with switch

2015-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7979 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/6b848c352f0865986fc6a0ed9e09effc4f014458 fix Issue 7979 - Alias this

Re: Shout out to D at cppcon, when talkign about ranges.

2015-09-30 Thread H. S. Teoh via Digitalmars-d
On Wed, Sep 30, 2015 at 10:32:16AM -0400, Andrei Alexandrescu via Digitalmars-d wrote: > On 09/30/2015 09:31 AM, Steven Schveighoffer wrote: > >On 9/29/15 9:45 PM, deadalnix wrote: > >>https://www.youtube.com/watch?v=mFUXNMfaciE > >> > >>From >

address of overloaded function

2015-09-30 Thread Freddy via Digitalmars-d-learn
How do you take the address of a specific overloaded function. This won't compile --- import std.range; void main() { ForwardAssignable!int range; int delegate() @property get = void delegate(int) @property set = } ---

Re: Shout out to D at cppcon, when talkign about ranges.

2015-09-30 Thread rsw0x via Digitalmars-d
On Wednesday, 30 September 2015 at 01:45:49 UTC, deadalnix wrote: https://www.youtube.com/watch?v=mFUXNMfaciE From http://wiki.dlang.org/Component_programming_with_ranges Congrat H. S. Teoh D's ranges are inarguably the best part of the language and one of the major reasons to use it

Re: std.data.json formal review

2015-09-30 Thread Marco Leise via Digitalmars-d
Am Tue, 29 Sep 2015 11:06:01 + schrieb Marc Schütz : > No, the JSON type should just store the raw unparsed token and > implement: > > struct JSON { > T to(T) if(isNumeric!T && is(typeof(T("" { > return T(this.raw); > } > } > >

Re: an example of parallel calculation of metrics

2015-09-30 Thread Jay Norwood via Digitalmars-d-learn
On Wednesday, 30 September 2015 at 22:24:25 UTC, Jay Norwood wrote: // various metric definitions // the Tuples could also define names for each member and use the names here in the metrics. long met1( TI m){ return m[0] + m[1] + m[2]; } long met2( TI m){ return m[1] + m[2] + m[3]; } long

Re: address of overloaded function

2015-09-30 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 30 September 2015 at 22:48:03 UTC, Freddy wrote: How do you take the address of a specific overloaded function. This won't compile You can write a helper function that uses __traits(getOverloads) and searches them for the right signature:

Found on Reddit: sgio.d - D lang project to send scsi ioctls and bypass drivers (Windows/Linux)

2015-09-30 Thread Ali Çehreli via Digitalmars-d-announce
https://www.reddit.com/r/programming/comments/3mze6p/sgiod_d_lang_project_to_send_scsi_ioctls_and/ Ali

an example of parallel calculation of metrics

2015-09-30 Thread Jay Norwood via Digitalmars-d-learn
This is something I'm playing with for work. We do this a lot, capture counter events for some number of on-chip performance counters, compute some metrics, display the outputs. This seems ideal for the application. import std.algorithm, std.parallelism, std.range; import std.stdio; import

Regex start/end position of match?

2015-09-30 Thread Gerald via Digitalmars-d-learn
I'm using the std.regex API as part of Linux GUI grep utility I'm trying to create. I've got the GUI going fine using gtkd, the code to iterate over files (wow that was succinct in D, very impressive!), and getting matches via regex using the matchAll function. I'm stuck though on how to get

Re: an example of parallel calculation of metrics

2015-09-30 Thread Jay Norwood via Digitalmars-d-learn
This compiles and appears to execute correctly, but if I uncomment the taskPool line I get a compile error message about wrong buffer type. Am I breaking some rule for std.parallelism.amap? import std.algorithm, std.parallelism, std.range; import std.stdio; import std.datetime; import

Re: Shout out to D at cppcon, when talkign about ranges.

2015-09-30 Thread lobo via Digitalmars-d
On Wednesday, 30 September 2015 at 22:51:24 UTC, H. S. Teoh wrote: On Wed, Sep 30, 2015 at 10:32:16AM -0400, Andrei Alexandrescu [...] I watched most of the video (mainly the first half where he goes through the C++ version of the code), and I have to confess I couldn't help noticing just

Re: Interface file

2015-09-30 Thread Jan Johansson via Digitalmars-d
On Wednesday, 30 September 2015 at 19:17:41 UTC, Steven Schveighoffer wrote: On 9/30/15 2:12 PM, Jan Johansson wrote: [...] There is no reason to use interfaces here, you can separate declaration from implementation without them: test.di: module test; class MyTest { void Write(string

Re: Shout out to D at cppcon, when talkign about ranges.

2015-09-30 Thread bitwise via Digitalmars-d
On Thursday, 1 October 2015 at 01:32:17 UTC, bitwise wrote: I don't think it would be that hard to make something this possible: for(int x : iota(0, 5).to(3)) printf("%d ", x); Curiosity got the best of me: http://ideone.com/RoJxLa output doesn't show up for some reason, but it works.

Re: Checking that a template parameter is an enum

2015-09-30 Thread Fusxfaranto via Digitalmars-d-learn
On Thursday, 1 October 2015 at 00:04:18 UTC, Nordlöw wrote: How do I check that a template parameter is a CT-value or an enum symbol? I want this to restrict the following template: /** Returns: true iff all values $(D V) are the same. */ template allSame(V...) // TODO restrict to

Re: Shout out to D at cppcon, when talkign about ranges.

2015-09-30 Thread lobo via Digitalmars-d
On Thursday, 1 October 2015 at 01:54:22 UTC, bitwise wrote: On Thursday, 1 October 2015 at 01:32:17 UTC, bitwise wrote: I don't think it would be that hard to make something this possible: for(int x : iota(0, 5).to(3)) printf("%d ", x); Curiosity got the best of me:

Re: Interface file

2015-09-30 Thread Jan Johansson via Digitalmars-d
On Wednesday, 30 September 2015 at 19:24:05 UTC, Jeremy DeHaan wrote: On Wednesday, 30 September 2015 at 17:51:50 UTC, Jan Johansson wrote: [...] Like Adam said, the real difference between a .d and a .di file is that the .di file has all the guts removed and is just the declarations. If

Re: Interface file

2015-09-30 Thread Jan Johansson via Digitalmars-d
On Wednesday, 30 September 2015 at 17:51:50 UTC, Jan Johansson wrote: Hello all, I'm testing D language, and the first thing I want to do is to separate declaration from implementation. I was happy to find support of interfaces in the D language, and set out to do a basic test. However, this

Re: Shout out to D at cppcon, when talkign about ranges.

2015-09-30 Thread bitwise via Digitalmars-d
On Thursday, 1 October 2015 at 02:53:25 UTC, lobo wrote: On Thursday, 1 October 2015 at 01:54:22 UTC, bitwise wrote: On Thursday, 1 October 2015 at 01:32:17 UTC, bitwise wrote: I don't think it would be that hard to make something this possible: for(int x : iota(0, 5).to(3)) printf("%d

[Issue 14981] [REG 2.068.0] Missing nothrow attribute in dbgVerifySorted()

2015-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14981 --- Comment #4 from Kenji Hara --- (In reply to Steven Schveighoffer from comment #3) > Seems to be fixed in latest head. Not sure where it was fixed, possibly here: > >

Re: Shout out to D at cppcon, when talkign about ranges.

2015-09-30 Thread bitwise via Digitalmars-d
On Thursday, 1 October 2015 at 00:42:43 UTC, lobo wrote: If ranges are accepted into ISO C++ I can't imagine it would be long before for(auto e:range). Special features are not necessary to do this. C++ for loop works on anything with begin()/end() functions. Real ranges could just be a

Interface file

2015-09-30 Thread Jan Johansson via Digitalmars-d
Hello all, I'm testing D language, and the first thing I want to do is to separate declaration from implementation. I was happy to find support of interfaces in the D language, and set out to do a basic test. However, this test failed, and I want some newbie help to understand how it should

Re: A new article about working with files in D

2015-09-30 Thread extrawurst via Digitalmars-d-announce
On Wednesday, 30 September 2015 at 17:03:25 UTC, Gary Willoughby wrote: On Wednesday, 30 September 2015 at 08:32:29 UTC, extrawurst wrote: I agree on that, these examples should be added to the ddocs of phobos. -- Stephan I might do that myself. :) As always in dland: you better do it

WTF does "Enforcement failed" actually mean?

2015-09-30 Thread Russel Winder via Digitalmars-d-learn
I have the code: reduce!"a+b"(x) where x is a int[] and I get an exception "Enforcement failed" at run time. This gives me enough information to say ¿que? -- Russel. = Dr Russel Winder t: +44 20 7585 2200

Re: Shout out to D at cppcon, when talkign about ranges.

2015-09-30 Thread Eric Niebler via Digitalmars-d
On Thursday, 1 October 2015 at 04:08:00 UTC, bitwise wrote: I understand, but the C++ committee seems very conservative to me, so when it's this easy to add for(:) support by giving ranges begin()/end() functions, it makes me doubt they will actually change the language for it. As of C++11,

Re: How to do unittests

2015-09-30 Thread Namal via Digitalmars-d-learn
On Wednesday, 30 September 2015 at 13:03:52 UTC, Rikki Cattermole wrote: On 01/10/15 1:59 AM, Namal wrote: Hello, can someone give me a complete example please how to do unittests? I tried this with the example from german wikipedia, but the flag -unittest didn't make any difference.

Re: How to do unittests

2015-09-30 Thread qsdf via Digitalmars-d-learn
On Wednesday, 30 September 2015 at 14:20:28 UTC, Namal wrote: On Wednesday, 30 September 2015 at 13:03:52 UTC, Rikki Cattermole wrote: On 01/10/15 1:59 AM, Namal wrote: Hello, can someone give me a complete example please how to do unittests? I tried this with the example from german

Re: Improving assert-printing in DMD

2015-09-30 Thread H. S. Teoh via Digitalmars-d
On Wed, Sep 30, 2015 at 08:30:47AM +0200, Jacob Carlborg via Digitalmars-d wrote: > On 2015-09-29 23:32, Andrej Mitrovic via Digitalmars-d wrote: > > >If you have plaintext passwords stored anywhere you are already > >screwed. ;) > > The password always starts out in plaintext, or do you hash

Re: Shout out to D at cppcon, when talkign about ranges.

2015-09-30 Thread Andrei Alexandrescu via Digitalmars-d
On 09/30/2015 09:31 AM, Steven Schveighoffer wrote: On 9/29/15 9:45 PM, deadalnix wrote: https://www.youtube.com/watch?v=mFUXNMfaciE From http://wiki.dlang.org/Component_programming_with_ranges Congrat H. S. Teoh Ditto! Here is the link to the video at the time where D is credited, very

Re: Shout out to D at cppcon, when talkign about ranges.

2015-09-30 Thread Ali Çehreli via Digitalmars-d
On 09/29/2015 06:45 PM, deadalnix wrote: https://www.youtube.com/watch?v=mFUXNMfaciE From http://wiki.dlang.org/Component_programming_with_ranges Congrat H. S. Teoh Yay! :) I almost gave the same talk! This talk could have been a part of DConf 2014 if H. S. Teoh or I could go to the

Re: Shout out to D at cppcon, when talkign about ranges.

2015-09-30 Thread Wyatt via Digitalmars-d
On Wednesday, 30 September 2015 at 02:59:40 UTC, Freddy wrote: So this is what APL feels like. /s Nah, the APL version would be shorter and only use builtins. ;) -Wyatt

Re: Shout out to D at cppcon, when talkign about ranges.

2015-09-30 Thread Ali Çehreli via Digitalmars-d
On 09/30/2015 08:02 AM, Ali Çehreli wrote: > if H. S. Teoh or I could go to the conference. Oops! I've mixed up the years. I did go to DConf 2014 but not DConf 2015. Still... :) Ali

Re: Shout out to D at cppcon, when talkign about ranges.

2015-09-30 Thread Joakim via Digitalmars-d
On Wednesday, 30 September 2015 at 01:45:49 UTC, deadalnix wrote: https://www.youtube.com/watch?v=mFUXNMfaciE From http://wiki.dlang.org/Component_programming_with_ranges Congrat H. S. Teoh Thanks for the link, I watched the whole video today and it was a very good presentation by Niebler.

Re: Improving assert-printing in DMD

2015-09-30 Thread John Colvin via Digitalmars-d
On Wednesday, 30 September 2015 at 14:53:31 UTC, H. S. Teoh wrote: On Wed, Sep 30, 2015 at 08:30:47AM +0200, Jacob Carlborg via Digitalmars-d wrote: On 2015-09-29 23:32, Andrej Mitrovic via Digitalmars-d wrote: >If you have plaintext passwords stored anywhere you are >already screwed. ;)

  1   2   >