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

2015-10-01 Thread deadalnix via Digitalmars-d
On Thursday, 1 October 2015 at 05:47:25 UTC, Eric Niebler wrote: 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

Re: Threading Questions

2015-10-01 Thread Kagamin via Digitalmars-d-learn
On Friday, 25 September 2015 at 15:19:27 UTC, bitwise wrote: I know that all global variables are TLS unless explicitly marked as 'shared', but someone once told me something about 'shared' affecting member variables in that accessing them from a separate thread would return T.init instead of

[Issue 1983] Delegates violate const

2015-10-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1983 Sobirari Muhomori changed: What|Removed |Added See Also|

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

2015-10-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11043 Sobirari Muhomori changed: What|Removed |Added See Also|

In the age of AliasSeq, how to refer to template tuple parameters?

2015-10-01 Thread Mike Parker via Digitalmars-d
What's the official way to refer to T... now? In std.meta, I see this for AliasSeq: /** * Creates a sequence of zero or more aliases. This is most commonly * used as template parameters or arguments. */ This implies "sequence parameters". But the documentation at [1] still uses Template

Re: Moving back to .NET

2015-10-01 Thread Kagamin via Digitalmars-d
On Wednesday, 30 September 2015 at 17:32:27 UTC, Adam D. Ruppe wrote: 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

Re: Mac IDE with Intellisense

2015-10-01 Thread Marco Leise via Digitalmars-d-learn
Am Sat, 26 Sep 2015 10:38:25 + schrieb Gary Willoughby : > Auto-complete in D is tricky because of this feature and no-one > has invested any time to figure out a nice way to provide > auto-complete for this. Mono-D does have UFCS auto-complete. The plugin is going to

Re: WTF does "Enforcement failed" actually mean?

2015-10-01 Thread Marco Leise via Digitalmars-d-learn
Am Thu, 01 Oct 2015 08:52:43 + schrieb John Colvin : > On Thursday, 1 October 2015 at 07:08:00 UTC, Russel Winder wrote: > > On Wed, 2015-09-30 at 23:35 -0700, Ali Çehreli via > > Digitalmars-d-learn wrote: > >> On 09/30/2015 10:46 PM, Russel Winder via

Re: In the age of AliasSeq, how to refer to template tuple parameters?

2015-10-01 Thread Dicebot via Digitalmars-d
On Thursday, 1 October 2015 at 11:23:51 UTC, Mike Parker wrote: On Thursday, 1 October 2015 at 09:43:10 UTC, Dicebot wrote: Do you want to refer to `T...` as a syntax feature or actual arguments? Former is called "template tuple parameter" as you correctly linked indeed, but for latter there

Re: In the age of AliasSeq, how to refer to template tuple parameters?

2015-10-01 Thread Mike Parker via Digitalmars-d
On Thursday, 1 October 2015 at 08:30:15 UTC, John Colvin wrote: One approach would be to just call them an AliasSeq, defined as "a sequence of aliases, such as what is created by variadic template parameters". Then you have to deal with explaining how storage classes can end up in AliasSeqs,

[Issue 15041] Pointer slice with one negative index throws 'Range violation'

2015-10-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15041 --- Comment #2 from anoneu...@gmail.com --- Hmm yes, it seems all operations with array indices are treated as unsigned, and just happen to do the right thing in most cases because the integers are modular (e.g. adding size_t.max is the same as

Re: Improving assert-printing in DMD

2015-10-01 Thread John Colvin via Digitalmars-d
On Thursday, 1 October 2015 at 09:59:41 UTC, Jonathan M Davis wrote: In almost all cases, printing out an assertion is by far the best thing to do, and in general, the more information that's printed, the better. But if anyone is dealing with sensitive data, they _have_ to be smart about what

Re: Improving assert-printing in DMD

2015-10-01 Thread Per Nordlöw via Digitalmars-d
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 added a long comment about a new more flexible solution to this problem:

Re: Which GDC to download?

2015-10-01 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 1 October 2015 at 12:04:40 UTC, NX wrote: 1) Why there is a download targeting arm-linux-gnueabi(hf) and what exactly it means? Is this a cross-compiler which will produce obj files containing ARM instructions or what? If so, will linking just work? and how? Yes, that's a cross

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

2015-10-01 Thread lobo via Digitalmars-d
On Thursday, 1 October 2015 at 05:47:25 UTC, Eric Niebler wrote: ...[snip]... Hope that clears things up. It does, thank you. Eric P.S. I see lots of people here assuming that C++ is playing catch-up to D because D has ranges and C++ doesn't yet. That is ignoring the long history of

Re: Interval Arithmetic

2015-10-01 Thread Marco Leise via Digitalmars-d-learn
Am Tue, 29 Sep 2015 21:04:00 + schrieb Wulfrick : > Is there an interval arithmetic library in D? I couldn’t find one. > > In case I had to write my own, I understand that the IEEE > standard floating point arithmetic provides operations for > rounding up or down

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

2015-10-01 Thread Walter Bright via Digitalmars-d
On 10/1/2015 2:31 AM, Joakim wrote: On Thursday, 1 October 2015 at 08:37:37 UTC, Walter Bright wrote: Sadly, Matthew's work seems to have disappeared from the internets and his web sites have vanished (rangelib.org). Update: found it on web.archive.org!

[Issue 15060] Can't load a D shared library first, then load a C shared library

2015-10-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15060 --- Comment #9 from ponce --- If this need back-end support, maybe Walter could implement global ctor/dtor like in LDC? @bitwise: how much would you take to do it? :)) FWIW, I'm having problem with the workaround (calling

Which GDC to download?

2015-10-01 Thread NX via Digitalmars-d-learn
Windows X86 64bit (x86_64-w64-mingw32) Standard builds Target DMDFE Runtime GCC GDC revisionBuild Date arm-linux-gnueabi 2.066.1 yes 5.2.0 dadb5a3784 2015-08-30 arm-linux-gnueabihf 2.066.1 yes 5.2.0 dadb5a3784

Re: Interval Arithmetic

2015-10-01 Thread ponce via Digitalmars-d-learn
On Thursday, 1 October 2015 at 11:40:28 UTC, Marco Leise wrote: Note that the FP control word is per thread and any external code you call or even buggy interrupt handlers could change or reset it to defaults. Known cases include a faulty printer driver and Delphi's runtime, which enables FP

Re: A new article about working with files in D

2015-10-01 Thread Nikolay via Digitalmars-d-announce
On Monday, 28 September 2015 at 11:41:37 UTC, Gary Willoughby wrote: Article: http://nomad.so/2015/09/working-with-files-in-the-d-programming-language/ Reddit link: https://www.reddit.com/r/programming/comments/3mosw7/working_with_files_in_the_d_programming_language/ A little criticism:

Re: In the age of AliasSeq, how to refer to template tuple parameters?

2015-10-01 Thread Mike Parker via Digitalmars-d
On Thursday, 1 October 2015 at 09:43:10 UTC, Dicebot wrote: Do you want to refer to `T...` as a syntax feature or actual arguments? Former is called "template tuple parameter" as you correctly linked indeed, but for latter there is http://dlang.org/template.html#TemplateArgumentList Both.

Re: Which GDC to download?

2015-10-01 Thread Johannes Pfau via Digitalmars-d-learn
Am Thu, 01 Oct 2015 12:04:38 + schrieb NX : > Windows X86 64bit (x86_64-w64-mingw32) > > Standard builds > TargetDMDFE Runtime > GCC GDC revisionBuild Date arm-linux-gnueabi > 2.066.1 yes 5.2.0 dadb5a3784

Re: Regex start/end position of match?

2015-10-01 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 1 October 2015 at 03:29:29 UTC, Gerald wrote: I'm stuck though on how to get the start/end index of a match? I couldn't find one either so I did the pre/post/hit things broken up. Take a look at this little program I wrote: http://arsdnet.net/dcode/replacer/ All the files it

Re: Improving assert-printing in DMD

2015-10-01 Thread Kapps via Digitalmars-d
On Tuesday, 29 September 2015 at 21:26:00 UTC, John Colvin wrote: Not necessarily. It could just be a defensive assert for something that should already have been verified/cleaned/caught earlier. auto pass = getPassword(); pass.clean(); assert(pass == pass.toLower()); //and on we go ...

Re: Looking for someone that could work on 32 bits support for SDC

2015-10-01 Thread Suliman via Digitalmars-d
On Wednesday, 9 September 2015 at 20:33:43 UTC, deadalnix wrote: All is in the title. ARM/Mips/pNaCl/WebAssembly require 32bits to work. These are valuable targets IMO. What is the current status of the project? What need to implement since it's become self-compiling, oтв would be able to

Re: Improving assert-printing in DMD

2015-10-01 Thread Andrei Alexandrescu via Digitalmars-d
On 10/01/2015 04:46 AM, John Colvin wrote: Checks involving sensitive data after processing can definitely be a check of program logic. Sensitive data enters program Sensitive data is checked using enforce Sensitive data is passed to another function, but something goes wrong (not enough

Re: In the age of AliasSeq, how to refer to template tuple parameters?

2015-10-01 Thread Jonathan M Davis via Digitalmars-d
On Thursday, 1 October 2015 at 11:28:17 UTC, Dicebot wrote: On Thursday, 1 October 2015 at 11:23:51 UTC, Mike Parker wrote: On Thursday, 1 October 2015 at 09:43:10 UTC, Dicebot wrote: Do you want to refer to `T...` as a syntax feature or actual arguments? Former is called "template tuple

Re: How to use std.experimental.logger?

2015-10-01 Thread Panke via Digitalmars-d-learn
Ah, I tried to format a custom struct that has a non-pure toString, because std.conv.to isn't pure either, sigh :(

[Issue 15060] Can't load a D shared library first, then load a C shared library

2015-10-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15060 --- Comment #10 from Jacob Carlborg --- (In reply to ponce from comment #9) > If this need back-end support, maybe Walter could implement global ctor/dtor > like in LDC? DMD already does what's necessary for ELF (Linux, FreeBSD). Just

[Issue 15131] New: curl.lib is not available in 32 bit mscoff format

2015-10-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15131 Issue ID: 15131 Summary: curl.lib is not available in 32 bit mscoff format Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: normal

[Issue 15060] Can't load a D shared library first, then load a C shared library

2015-10-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15060 --- Comment #11 from ponce --- :X Thanks!!! can't believe I forgot that. --

Re: Which GDC to download?

2015-10-01 Thread NX via Digitalmars-d-learn
Thanks both to you for answers... On Thursday, 1 October 2015 at 14:07:02 UTC, Johannes Pfau wrote: Unfortunately Windows GDC builds are very unstable right now. I'd recommend using DMD or LDC for Windows. Well... To me it's surprising GDC is not usable on windows but I doubt LDC is more

Re: Improving assert-printing in DMD

2015-10-01 Thread Per Nordlöw via Digitalmars-d
On Thursday, 1 October 2015 at 14:37:55 UTC, Andrei Alexandrescu wrote: Whoever wants to work on better assert expression printing: make sure you specify which grammar constructs are supported, and how the parts involved are printed. Expressing semantics via lowering would be great. Write a

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

2015-10-01 Thread bitwise via Digitalmars-d
On Thursday, 1 October 2015 at 05:47:25 UTC, Eric Niebler wrote: 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

Re: Moving back to .NET

2015-10-01 Thread Chris via Digitalmars-d
On Wednesday, 30 September 2015 at 12:21:10 UTC, Ola Fosheim Grøstad wrote: The reason is much more likely that the expectations are set at a level where D does not deliver. If you want a production environment to be judged favourably it is a good idea to set the expectations one notch below

Re: Indicators and traction…

2015-10-01 Thread Shammah Chancellor via Digitalmars-d
On Wednesday, 23 September 2015 at 12:19:48 UTC, Russel Winder wrote: Having just done a session at PyConUK 2015 aimed at weaning people of pure Python and into polyglot – Python with (C++|D|Chapel) (there should have been a Rust bit but…) – and as people probably heard the D bit was a bit

Re: Compile failing with D 2.068.2 works with 2.068.1

2015-10-01 Thread John Colvin via Digitalmars-d
On Thursday, 1 October 2015 at 16:37:25 UTC, Zz wrote: Hi, When using D 2.068.2 I get the following error with some code I have. Assertion failure: 'minst->isRoot() || minst->rootImports()' on line 8013 in file 'template.c' dmd failed with exit code 1. It work with 2.068.1. No idea why

Re: Improving assert-printing in DMD

2015-10-01 Thread Per Nordlöw via Digitalmars-d
On Thursday, 1 October 2015 at 16:35:51 UTC, Per Nordlöw wrote: Help please. I figured it out.

Re: Regex start/end position of match?

2015-10-01 Thread Gerald via Digitalmars-d-learn
Thanks Adam, that was the hint I needed. For a given RegexMatch the pre().length() is essentially equivalent to the start position and taking pre().length + hit.length() gives the end position so I think this should be OK for my needs.

Re: an example of parallel calculation of metrics

2015-10-01 Thread Jay Norwood via Digitalmars-d-learn
On Thursday, 1 October 2015 at 07:03:40 UTC, Ali Çehreli wrote: Looks like a bug. Workaround: Get rid of member names Thanks. My particular use case, working with metric expressions, is easier to understand if I use the names. I converted the use of Tuple to struct to see if I could get an

Compile failing with D 2.068.2 works with 2.068.1

2015-10-01 Thread Zz via Digitalmars-d
Hi, When using D 2.068.2 I get the following error with some code I have. Assertion failure: 'minst->isRoot() || minst->rootImports()' on line 8013 in file 'template.c' dmd failed with exit code 1. It work with 2.068.1. No idea why it fails, moved back to 2.068.1. Regards, Zz

[Issue 15132] New: std.algorithm.sort crash on windows

2015-10-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15132 Issue ID: 15132 Summary: std.algorithm.sort crash on windows Product: D Version: D2 Hardware: x86_64 URL: http://dlang.org/ OS: Windows Status: NEW

Re: Interface file

2015-10-01 Thread Jeremy DeHaan via Digitalmars-d
On Thursday, 1 October 2015 at 01:41:22 UTC, Jan Johansson wrote: Thanks Jeremy, Do you spot a weakness in your proposed code snip? The declaration for interface is done in two separate files, both test.d and test.di. Scattered declarations has never been a good idea. I know that I can ask

Re: Announcing dplug, a toolkit for making audio plugins with D

2015-10-01 Thread ponce via Digitalmars-d-announce
On Wednesday, 9 September 2015 at 07:51:19 UTC, ponce wrote: - Mac VST support for 64-bit is there, with the exception of a weird scanning bug in Reaper and Studio One (#62). The interface use Cocoa through DerelictCocoa. 32-bit plugins would require a Carbon UI and I don't think it's clever

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

2015-10-01 Thread Ali Çehreli via Digitalmars-d
On 10/01/2015 01:37 AM, Walter Bright wrote: > Update: found it on web.archive.org! > > https://web.archive.org/web/20050427085507/http://rangelib.synesis.com.au/ > > Anyhow, this is what I could dig up in an hour or so. Thank you for mining for that. From the days that I used to frequent

Re: Improving assert-printing in DMD

2015-10-01 Thread Jack Stouffer via Digitalmars-d
On Thursday, 1 October 2015 at 17:19:39 UTC, Per Nordlöw wrote: A first version: http://wiki.dlang.org/DIP83 Looks good! But I lack the knowledge to comment on the implementation details for the compiler mentioned in the DIP. Bikesheading: could you change "being" in "([1,2,3][2] being 3)

[Issue 15134] New: std.parallelism taskPool.amap fails to compile with array of structs or Tuples with named members

2015-10-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15134 Issue ID: 15134 Summary: std.parallelism taskPool.amap fails to compile with array of structs or Tuples with named members Product: D Version: D2 Hardware: x86

[Issue 15134] std.parallelism taskPool.amap fails to compile with array of structs or Tuples with named members

2015-10-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15134 --- Comment #1 from Jay Norwood --- This may be my problem. I see this works with array of struct as inputs and a Tuple as result with named members. So this is not a blocker. I'll need to check if there was some other problem

Re: Compile failing with D 2.068.2 works with 2.068.1

2015-10-01 Thread Meta via Digitalmars-d
On Thursday, 1 October 2015 at 16:37:25 UTC, Zz wrote: Hi, When using D 2.068.2 I get the following error with some code I have. Assertion failure: 'minst->isRoot() || minst->rootImports()' on line 8013 in file 'template.c' dmd failed with exit code 1. It work with 2.068.1. No idea why

[Issue 15132] std.algorithm.sort crash on windows

2015-10-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15132 bearophile_h...@eml.cc changed: What|Removed |Added CC||bearophile_h...@eml.cc --- Comment

Re: Go, D, and the GC

2015-10-01 Thread Jack Stouffer via Digitalmars-d
On Thursday, 1 October 2015 at 09:33:26 UTC, Tourist wrote: Hi Guys, I know that Go invested many time and resources in an implementation of a good GC. And they keep working on it, e.g. https://github.com/golang/proposal/blob/master/design/12800-sweep-free-alloc.md I also see that the

Re: an example of parallel calculation of metrics

2015-10-01 Thread Jay Norwood via Digitalmars-d-learn
On Thursday, 1 October 2015 at 18:08:31 UTC, Ali Çehreli wrote: Makes sense. Please open a bug at least for investigation why tuples with named members don't work with amap. ok, thanks. I opened the issue. https://issues.dlang.org/show_bug.cgi?id=15134

Re: Improving assert-printing in DMD

2015-10-01 Thread Andrei Alexandrescu via Digitalmars-d
On 10/01/2015 01:19 PM, Per Nordlöw wrote: On Thursday, 1 October 2015 at 14:37:55 UTC, Andrei Alexandrescu wrote: Whoever wants to work on better assert expression printing: make sure you specify which grammar constructs are supported, and how the parts involved are printed. Expressing

help me learn to read documentation

2015-10-01 Thread Robin via Digitalmars-d-learn
Hi. I like to learn programming by examples but I need help learning how to read documentation. I have some idea of how it works in some aspects but in others i get completely stuck because there are no examples or code snippets. I am using dgame (dgame-dev.de) and im reading the

Re: an example of parallel calculation of metrics

2015-10-01 Thread Jay Norwood via Digitalmars-d-learn
On Thursday, 1 October 2015 at 18:08:31 UTC, Ali Çehreli wrote: However, if you prove to yourself that the result tuple and your struct have the same memory layout, you can cast the tuple slice to struct slice after calling amap: After re-reading your explanation, I see that the problem is

[Issue 15132] std.algorithm.sort crash on windows

2015-10-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15132 Steven Schveighoffer changed: What|Removed |Added Priority|P3 |P1

Re: WTF does "Enforcement failed" actually mean?

2015-10-01 Thread Russel Winder via Digitalmars-d-learn
On Thu, 2015-10-01 at 08:52 +, John Colvin via Digitalmars-d-learn wrote: > […] > > Bug report? Then it'll get fixed. https://issues.dlang.org/show_bug.cgi?id=15133 Timer running… ;-) -- Russel. = Dr Russel

Re: Improving assert-printing in DMD

2015-10-01 Thread Per Nordlöw via Digitalmars-d
On Thursday, 1 October 2015 at 14:37:55 UTC, Andrei Alexandrescu wrote: Whoever wants to work on better assert expression printing: make sure you specify which grammar constructs are supported, and how the parts involved are printed. Expressing semantics via lowering would be great. Write a

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

2015-10-01 Thread Jack Stouffer via Digitalmars-d
On Thursday, 1 October 2015 at 09:25:37 UTC, Walter Bright wrote: Ranges because a D core language feature with D 2.021 Nov 25, 2008. Core language feature meaning it was no longer just a library construction, it was supported by foreach loops. As a library feature, it appeared in D 2.008

Re: an example of parallel calculation of metrics

2015-10-01 Thread Ali Çehreli via Digitalmars-d-learn
On 10/01/2015 08:56 AM, Jay Norwood wrote: > Thanks. My particular use case, working with metric expressions, is > easier to understand if I use the names. Makes sense. Please open a bug at least for investigation why tuples with named members don't work with amap. > I converted the use of

[Issue 15133] New: Error message is incomprehensible

2015-10-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15133 Issue ID: 15133 Summary: Error message is incomprehensible Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: major Priority: P1

Re: Looking for someone that could work on 32 bits support for SDC

2015-10-01 Thread deadalnix via Digitalmars-d
On Thursday, 1 October 2015 at 14:56:22 UTC, Suliman wrote: On Wednesday, 9 September 2015 at 20:33:43 UTC, deadalnix wrote: All is in the title. ARM/Mips/pNaCl/WebAssembly require 32bits to work. These are valuable targets IMO. What is the current status of the project? What need to

Re: Interval Arithmetic

2015-10-01 Thread Marco Leise via Digitalmars-d-learn
Am Thu, 01 Oct 2015 12:03:10 + schrieb ponce : > I have a RAII struct to save/restore the FP control word. > It also handle the SSE control word which unfortunately exist. > > https://github.com/p0nce/dplug/blob/master/plugin/dplug/plugin/fpcontrol.d Nice to have

[Issue 15134] std.parallelism taskPool.amap fails to compile with array of structs or Tuples with named members

2015-10-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15134 Jay Norwood changed: What|Removed |Added Status|NEW |RESOLVED

Re: an example of parallel calculation of metrics

2015-10-01 Thread Jay Norwood via Digitalmars-d-learn
So, this is a condensed version of the original problem. It looks like the problem is that the return value for taskPool.amap can't be a tuple of tuples or a tuple of struct. Either way, it fails with the Wrong buffer type error message if I uncomment the taskPool line import std.algorithm,

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

2015-10-01 Thread Walter Bright via Digitalmars-d
On 10/1/2015 11:18 AM, Ali Çehreli wrote: From the days that I used to frequent comp.lang.c++.moderated (before around 2009 or so), I remember an individual who was trying to sell the idea of ranges to the C++ community. As I remember, nobody took him seriously at that time. Reading the page

[Issue 15134] std.parallelism taskPool.amap fails to compile with array of structs or Tuples with named members

2015-10-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15134 --- Comment #2 from Jay Norwood --- Must have been my bug. Inputs with named Tuple members also works. I'm going to close this. import std.algorithm, std.parallelism, std.range; import std.typecons; import std.meta; import

[Issue 15135] New: std.parallelism taskPool.amap compilation error for array of tuple of tuple or tuple of struct results

2015-10-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15135 Issue ID: 15135 Summary: std.parallelism taskPool.amap compilation error for array of tuple of tuple or tuple of struct results Product: D Version: D2 Hardware: x86

Re: an example of parallel calculation of metrics

2015-10-01 Thread Jay Norwood via Digitalmars-d-learn
I re-submitted this as: https://issues.dlang.org/show_bug.cgi?id=15135

Re: Checking that a template parameter is an enum

2015-10-01 Thread Nordlöw via Digitalmars-d-learn
On Thursday, 1 October 2015 at 02:06:48 UTC, Fusxfaranto wrote: /** 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 allSame = true; else enum bool allSame = V[0] ==

Re: Checking that a template parameter is an enum

2015-10-01 Thread Nordlöw via Digitalmars-d-learn
On Thursday, 1 October 2015 at 02:06:48 UTC, Fusxfaranto wrote: /** 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 allSame = true; else enum bool allSame = V[0] ==

Re: Checking that a template parameter is an enum

2015-10-01 Thread Ali Çehreli via Digitalmars-d-learn
On 10/01/2015 03:26 PM, Nordlöw wrote: On Thursday, 1 October 2015 at 02:06:48 UTC, Fusxfaranto wrote: /** 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 allSame = true;

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

2015-10-01 Thread Timon Gehr via Digitalmars-d
On 09/30/2015 06:06 PM, Joakim wrote: It is amazing how noisy some of the implementation code with templates is in C++: I felt like I was looking at some Haskell variant compared to how clean D would look for the same code. It's easy to write a clean Haskell version, in case you were trying to

Re: Compile failing with D 2.068.2 works with 2.068.1

2015-10-01 Thread Zz via Digitalmars-d
On Thursday, 1 October 2015 at 17:16:47 UTC, Meta wrote: On Thursday, 1 October 2015 at 16:37:25 UTC, Zz wrote: Hi, When using D 2.068.2 I get the following error with some code I have. Assertion failure: 'minst->isRoot() || minst->rootImports()' on line 8013 in file 'template.c' dmd

Re: an example of parallel calculation of metrics

2015-10-01 Thread Jay Norwood via Digitalmars-d-learn
This is another attempt with the metric parallel processing. This uses the results only to return an int value, which could be used later as an error return value. The metric value locations are now allocated as a part of the input measurement values tuple. The Tuple vs struct definitions

Re: Checking that a template parameter is an enum

2015-10-01 Thread Nordlöw via Digitalmars-d-learn
On Thursday, 1 October 2015 at 22:37:57 UTC, Ali Çehreli wrote: Very quickly: import std.traits; template allSame(V...) if (isExpressions!(V)) { bool impl_(V...)() { static if (V.length > 1) { foreach (i, _; V[0 .. $ - 1]) { if (V[i] != V[i + 1]) {

Re: Improving assert-printing in DMD

2015-10-01 Thread Timon Gehr via Digitalmars-d
On 09/30/2015 03:10 PM, Andrei Alexandrescu wrote: I encourage making assert smarter seeing (a) it's already used everywhere so the benefits will come for free and (b) it's a built-in. -- Andrei About (b): I'm surprised to see that you seem to have so fundamentally changed your attitude

Re: Improving assert-printing in DMD

2015-10-01 Thread Andrei Alexandrescu via Digitalmars-d
On 10/01/2015 06:41 PM, Timon Gehr wrote: On 09/30/2015 03:10 PM, Andrei Alexandrescu wrote: I encourage making assert smarter seeing (a) it's already used everywhere so the benefits will come for free and (b) it's a built-in. -- Andrei About (b): I'm surprised to see that you seem to have

Re: WTF does "Enforcement failed" actually mean?

2015-10-01 Thread Ali Çehreli via Digitalmars-d-learn
On 09/30/2015 10:46 PM, Russel Winder via Digitalmars-d-learn wrote: 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? It's coming from the following no-message enforce():

Re: an example of parallel calculation of metrics

2015-10-01 Thread Ali Çehreli via Digitalmars-d-learn
On 09/30/2015 09:15 PM, Jay Norwood wrote: > alias TO = Tuple!(TR,"L1_MISS", TR, "L1_HIT", TR,"DATA_ACC", TR,"ALL_ACC"); Looks like a bug. Workaround: Get rid of member names there: alias TO = Tuple!(TR, TR, TR, TR); > //taskPool.amap!(Metrics)(std.algorithm.map!getTerm(samples),results);

Re: address of overloaded function

2015-10-01 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-10-01 00:48, Freddy wrote: 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 = } --- Not sure why that

Re: WTF does "Enforcement failed" actually mean?

2015-10-01 Thread Russel Winder via Digitalmars-d-learn
On Wed, 2015-09-30 at 23:35 -0700, Ali Çehreli via Digitalmars-d-learn wrote: > On 09/30/2015 10:46 PM, Russel Winder via Digitalmars-d-learn wrote: > > I have the code: > > > > reduce!"a+b"(x) > > > > where x is a int[] and I get an exception "Enforcement failed" at > > run > > time. This

[Issue 15060] Can't load a D shared library first, then load a C shared library

2015-10-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15060 --- Comment #12 from bitwise --- (In reply to Jacob Carlborg from comment #10) > (In reply to ponce from comment #9) > > If this need back-end support, maybe Walter could implement global ctor/dtor > > like in LDC? > >

Re: Is Anything Holding you back?

2015-10-01 Thread Yaser via Digitalmars-d
On Friday, 2 October 2015 at 02:52:23 UTC, David DeWitt wrote: Im sure he meant if he needs something thats not yet available then he'll just write it. D is a community effort so obviously many ppl need to chip in. I pretty much use the usual Python/JS combo professionally and there are a

[Issue 9875] opDispatch is wrongly set to safe

2015-10-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9875 --- 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/4eec962ad52b8267b4c3102427d0d590e28de06d another case for Issue 9875

Re: Improving assert-printing in DMD

2015-10-01 Thread David Nadlinger via Digitalmars-d
On Friday, 2 October 2015 at 00:25:18 UTC, jmh530 wrote: Wouldn't that mean that every file that uses unit tests would have to import std.assert or something? So pretty much every file would be importing it anyway. It could, for example, still be in object. — David

Re: Go, D, and the GC

2015-10-01 Thread rsw0x via Digitalmars-d
On Thursday, 1 October 2015 at 09:48:57 UTC, Kagamin wrote: On Thursday, 1 October 2015 at 09:40:09 UTC, Rikki Cattermole wrote: Go's GC would have been optimized for Go's patterns and usage of it. It's JIT, no? which usually gets optimized for patterns, the GC pattern is generic: collect

Re: help me learn to read documentation

2015-10-01 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 1 October 2015 at 19:15:39 UTC, Robin wrote: The documentation here (http://dgame-dev.de/index.php?controller=learn=package=graphic=Text=0.6)... gives me the Text() class but i dont know how to use "foreground, background, and Font mode" or at least turn it into usable syntax.

Is Anything Holding you back?

2015-10-01 Thread Yaser via Digitalmars-d
Are there any critical frameworks or libraries that are holding you back in fully investing in D? Obviously I think D is an awesome language, but some frameworks/libraries hold me back, wish I could do everything in D.

Re: Is Anything Holding you back?

2015-10-01 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 2 October 2015 at 02:25:21 UTC, Yaser wrote: Are there any critical frameworks or libraries that are holding you back in fully investing in D? Nope, if anything like that comes up, I'll just write it myself!

Re: Checking that a template parameter is an enum

2015-10-01 Thread Meta via Digitalmars-d-learn
On Thursday, 1 October 2015 at 22:41:21 UTC, Nordlöw wrote: Will this spare memory in DMD? If so there are a few traits that should be update accordingly, for instance `allSatisfy` and `anySatisfy`. Thanks! Highly doubtful as CTFE already allocates like there's no tomorrow.

[Issue 15066] std.net.curl.get should support IPv6 addresses on Windows

2015-10-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15066 brocolis changed: What|Removed |Added CC||broco...@eml.cc --- Comment #3

Re: Is Anything Holding you back?

2015-10-01 Thread David DeWitt via Digitalmars-d
On Friday, 2 October 2015 at 02:31:50 UTC, Yaser wrote: On Friday, 2 October 2015 at 02:29:47 UTC, Adam D. Ruppe wrote: On Friday, 2 October 2015 at 02:25:21 UTC, Yaser wrote: Are there any critical frameworks or libraries that are holding you back in fully investing in D? Nope, if anything

Re: Improving assert-printing in DMD

2015-10-01 Thread Timon Gehr via Digitalmars-d
On 10/02/2015 01:33 AM, Andrei Alexandrescu wrote: On 10/01/2015 06:41 PM, Timon Gehr wrote: On 09/30/2015 03:10 PM, Andrei Alexandrescu wrote: I encourage making assert smarter seeing (a) it's already used everywhere so the benefits will come for free and (b) it's a built-in. -- Andrei

Re: Improving assert-printing in DMD

2015-10-01 Thread jmh530 via Digitalmars-d
On Thursday, 1 October 2015 at 23:33:39 UTC, Andrei Alexandrescu wrote: I haven't - I still think making "assert" a built-in and ascribing a keyword to it was a minor mistake. But then that sail has shipped, so let's make the best use of the situation. -- Andrei Wouldn't that mean that every

Re: Improving assert-printing in DMD

2015-10-01 Thread deadalnix via Digitalmars-d
On Friday, 2 October 2015 at 00:05:33 UTC, Timon Gehr wrote: On 10/02/2015 01:33 AM, Andrei Alexandrescu wrote: On 10/01/2015 06:41 PM, Timon Gehr wrote: On 09/30/2015 03:10 PM, Andrei Alexandrescu wrote: I encourage making assert smarter seeing (a) it's already used everywhere so the

Re: help me learn to read documentation

2015-10-01 Thread Robin via Digitalmars-d-learn
On Friday, 2 October 2015 at 01:20:50 UTC, Adam D. Ruppe wrote: On Thursday, 1 October 2015 at 19:15:39 UTC, Robin wrote: [...] Those describe simple class members, so you can set them through assignment: Text CurrentFps = new Text(dejavu); // change to white on black

Re: Is Anything Holding you back?

2015-10-01 Thread Yaser via Digitalmars-d
On Friday, 2 October 2015 at 02:29:47 UTC, Adam D. Ruppe wrote: On Friday, 2 October 2015 at 02:25:21 UTC, Yaser wrote: Are there any critical frameworks or libraries that are holding you back in fully investing in D? Nope, if anything like that comes up, I'll just write it myself! That's

Re: Go, D, and the GC

2015-10-01 Thread Rikki Cattermole via Digitalmars-d
On 01/10/15 10:33 PM, Tourist wrote: Hi Guys, I know that Go invested many time and resources in an implementation of a good GC. And they keep working on it, e.g. https://github.com/golang/proposal/blob/master/design/12800-sweep-free-alloc.md I also see that the implementation is licensed as

  1   2   >