Re: Building DMD on OpenBSD

2017-07-17 Thread Kai Nacke via Digitalmars-d
On Monday, 17 July 2017 at 18:58:40 UTC, Joakim wrote: On Monday, 17 July 2017 at 18:42:39 UTC, Anonymous wrote: On Monday, 17 July 2017 at 17:18:23 UTC, Joakim wrote: Unfortunately, dmd has not kept porters in mind and hasnt kept the C++ version updated, or kept a workflow that enables easy

Re: New library: open multi-methods

2017-07-17 Thread Ali Çehreli via Digitalmars-d-announce
On 07/16/2017 10:24 AM, Jean-Louis Leroy wrote: > TL;DR: see here https://github.com/jll63/methods.d/blob/master/README.md Woot! :) I'm so happy to see this project complete. Honestly, growing up with languages without this feature (C and C++), I've not even known that I needed this feature

Re: (char* str) is not callable using argument types (string)

2017-07-17 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 18 July 2017 at 03:58:49 UTC, Shachar Shemesh wrote: If you cast a D string to const char* may or may not null terminate the string. I do not recommend explicitly casting. This specific case is a string literal, which is guaranteed to be null terminated and will implicitly cast.

Re: (char* str) is not callable using argument types (string)

2017-07-17 Thread Shachar Shemesh via Digitalmars-d
On 07/17/2017 05:10 PM, Adam D. Ruppe wrote: On Monday, 17 July 2017 at 13:56:24 UTC, Zaheer Ahmed wrote: I Developed OS in C and C++ but first time stuck in types. A lot of C and C++ knowledge will carry over to D, but it isn't exactly the same. D's strings are of type `string` which is

Re: Idiomatic way of writing nested loops?

2017-07-17 Thread Nicholas Wilson via Digitalmars-d-learn
On Monday, 17 July 2017 at 11:07:35 UTC, Anton Fediushin wrote: Hello! What is the best way of rewriting this code in idiomatic D manner? -- foreach(a; ["foo", "bar"]) { foreach(b; ["baz", "foz", "bof"]) { foreach(c; ["FOO", "BAR"]) { // Some operations on a, b and c } } }

[Issue 17661] New isInputRange rejects valid input range

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17661 Vladimir Panteleev changed: What|Removed |Added Hardware|x86_64 |All

[Issue 17416] SocketOption.REUSEPORT not available on linux

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17416 Vladimir Panteleev changed: What|Removed |Added Severity|normal

Re: D doesn't read the first character of a file (reads everything but the first chararacter) with either read() or readText()

2017-07-17 Thread Nicholas Wilson via Digitalmars-d-learn
On Tuesday, 18 July 2017 at 02:21:59 UTC, Enjoys Math wrote: DMD32 D Compiler v2.074.1 import std.file; void main() { string bigInput = readText("input.txt"); } The file is 7 MB of ascii text, don't know if that matters... Should I upgrade versions? I wonder if it thinks there is a BOM

[Issue 17660] ICE with `static foreach`: AssertError@ddmd/visitor.d(39)

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17660 --- Comment #1 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/425f129192605d53288190762ebd75a50a300a26 fix Issue 17660 - ICE with : AssertError@ddmd/visitor.d(39)

Re: New library: open multi-methods

2017-07-17 Thread Jay Norwood via Digitalmars-d-announce
On Tuesday, 18 July 2017 at 00:47:04 UTC, Jean-Louis Leroy wrote: I don't know R but after a trip to Wikipedia it looks like it. J-L R is listed as one of the languages with built-in support in this wiki link. I searched for multiple dispatch because I was familiar with the similar

D doesn't read the first character of a file (reads everything but the first chararacter) with either read() or readText()

2017-07-17 Thread Enjoys Math via Digitalmars-d-learn
DMD32 D Compiler v2.074.1 import std.file; void main() { string bigInput = readText("input.txt"); } The file is 7 MB of ascii text, don't know if that matters... Should I upgrade versions?

[Issue 17662] New: Replace 2.0^e2 with std.math.ldexp(1.0, cast(int) e2)

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17662 Issue ID: 17662 Summary: Replace 2.0^e2 with std.math.ldexp(1.0, cast(int) e2) Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: performance

Re: proposed @noreturn attribute

2017-07-17 Thread Timon Gehr via Digitalmars-d
On 18.07.2017 03:06, Walter Bright wrote: On 7/17/2017 5:13 PM, Timon Gehr wrote: (Reminds me of divide by 0 discussions in calculus class.) The reason division by 0 is left undefined is that instead saying 1/0 = ∞ introduces a new number ∞ that does not play nice with the axioms of a

Re: proposed @noreturn attribute

2017-07-17 Thread Walter Bright via Digitalmars-d
On 7/17/2017 5:13 PM, Timon Gehr wrote: (Reminds me of divide by 0 discussions in calculus class.) The reason division by 0 is left undefined is that instead saying 1/0 = ∞ introduces a new number ∞ that does not play nice with the axioms of a complete ordered field. The question for

Re: proposed @noreturn attribute

2017-07-17 Thread Nicholas Wilson via Digitalmars-d
On Monday, 17 July 2017 at 18:54:37 UTC, H. S. Teoh wrote: IMO, the observations "used rarely" and "attention-seeking notation" are better satisfied by an attribute named @noreturn than some strange, convoluted, arcane invocation like `typeof(assert(0))`. Because: (1) "used rarely" means it

Re: DCompute: GPGPU with Native D for OpenCL and CUDA

2017-07-17 Thread Nicholas Wilson via Digitalmars-d-announce
On Monday, 17 July 2017 at 13:50:22 UTC, Mike Parker wrote: Nicholas Wilson has put together a blog post on his progress with DCompute, expanding on his DConf talk. I have to admit that this is one of the D projects I'm most excited about, even though I'll probably never have a need to use it.

Re: New library: open multi-methods

2017-07-17 Thread Jean-Louis Leroy via Digitalmars-d-announce
On Monday, 17 July 2017 at 21:32:13 UTC, jmh530 wrote: On Monday, 17 July 2017 at 21:31:20 UTC, jmh530 wrote: On Monday, 17 July 2017 at 20:41:05 UTC, Jean-Louis Leroy wrote: Thinking about it, 'openmethods' would probably be a better module/package name than just 'methods'. It emphasizes the

Re: New library: open multi-methods

2017-07-17 Thread Jean-Louis Leroy via Digitalmars-d-announce
On Monday, 17 July 2017 at 22:59:03 UTC, jmh530 wrote: On Monday, 17 July 2017 at 22:46:02 UTC, Jean-Louis Leroy wrote: I think I will rename 'methods' to 'openmethods' for the time being, but the discussion remains open. Not renaming the repo yet. On the other hand, when I saw methods,

Re: proposed @noreturn attribute

2017-07-17 Thread Brad Roberts via Digitalmars-d
On 7/17/2017 5:06 PM, Seb via Digitalmars-d wrote: I can't agree more. This is textbook procrastination and bike-shedding [1]! There are dozens of open regressions that could have fixed or great, stalled PRs that could have been reviewed. In fact if only PRs would be as heartily reviewed as

Re: proposed @noreturn attribute

2017-07-17 Thread Timon Gehr via Digitalmars-d
On 18.07.2017 01:01, Walter Bright wrote: ... But if Bottom does not exist, then S doesn't exist either, and hence the < size relationship has no meaning. ... Both Bottom and S exist, but they have no instances. (Reminds me of divide by 0 discussions in calculus class.) The reason

Re: proposed @noreturn attribute

2017-07-17 Thread Seb via Digitalmars-d
On Monday, 17 July 2017 at 23:26:18 UTC, H. S. Teoh wrote: Actually, I don't really care enough about this issue to want it to be implemented one way or another, as long as there is *some* way to annotate a non-returning function. But the point is that so much time and effort is being spent

[Issue 17250] ProcessPipes (std.process) should provide a test for a null pid

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17250 --- Comment #7 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/b4284db1f937e90fec6ffe4a9e4e2bf4783799bb Fix Issue 17250 - ProcessPipes (std.process) should

Re: proposed @noreturn attribute

2017-07-17 Thread H. S. Teoh via Digitalmars-d
On Mon, Jul 17, 2017 at 06:42:02PM -0400, Andrei Alexandrescu via Digitalmars-d wrote: > On 7/17/17 2:54 PM, H. S. Teoh via Digitalmars-d wrote: > > I see `typeof(assert(0))` as the same kind of over-engineering of > > something trivially solved and relatively unimportant ("rarely > > used") that

Re: proposed @noreturn attribute

2017-07-17 Thread Walter Bright via Digitalmars-d
On 7/16/2017 5:41 AM, Timon Gehr wrote: struct S{ T x; Bottom everything; } turns the entire struct into an empty type. It is therefore most natural to say that Bottom.sizeof == ∞. (It's the only choice for which S.sizeof == Bottom.sizeof.) Another way to think about it: If

[Issue 17661] New isInputRange rejects valid input range

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17661 --- Comment #2 from hst...@quickfur.ath.cx --- Haha, I tried doing that but ran into another bug: -- struct C { private S* impl; } struct S { bool empty; @property C front() return { return C(); } void popFront() { }

Re: New library: open multi-methods

2017-07-17 Thread jmh530 via Digitalmars-d-announce
On Monday, 17 July 2017 at 22:46:02 UTC, Jean-Louis Leroy wrote: I think I will rename 'methods' to 'openmethods' for the time being, but the discussion remains open. Not renaming the repo yet. On the other hand, when I saw methods, my first thought was R's methods, which I imagine is

[Issue 17661] New isInputRange rejects valid input range

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17661 Andrei Alexandrescu changed: What|Removed |Added CC||and...@erdani.com

Re: New library: open multi-methods

2017-07-17 Thread Jean-Louis Leroy via Digitalmars-d-announce
On Monday, 17 July 2017 at 21:31:20 UTC, jmh530 wrote: On Monday, 17 July 2017 at 20:41:05 UTC, Jean-Louis Leroy wrote: Thinking about it, 'openmethods' would probably be a better module/package name than just 'methods'. It emphasizes the #1 feature, i.e. polymorphism outside of classes.

Re: Appending static arrays

2017-07-17 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Jul 17, 2017 at 10:32:14PM +, Nordlöw via Digitalmars-d-learn wrote: > On Monday, 17 July 2017 at 20:01:41 UTC, H. S. Teoh wrote: [...] > > result[offset .. offset + a.length] = a[]; > > This slice assignment doesn't support conversion between different >

Re: DIP 1010--Static foreach--Accepted

2017-07-17 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 7/17/17 8:38 AM, Steven Schveighoffer wrote: What is the resolution of how break statements affect static foreach/foreach? We initially allowed break and continue to refer to the enclosing statement, but upon further consideration we will make it an error. This allows us to collect more

Re: proposed @noreturn attribute

2017-07-17 Thread Walter Bright via Digitalmars-d
On 7/16/2017 1:15 PM, Timon Gehr wrote: In this case, Bottom.sizeof is a value of type Bottom, which must not exist. T.sizeof is a value of type size_t, not type T.

Re: proposed @noreturn attribute

2017-07-17 Thread Andrei Alexandrescu via Digitalmars-d
On 7/17/17 2:54 PM, H. S. Teoh via Digitalmars-d wrote: I see `typeof(assert(0))` as the same kind of over-engineering of something trivially solved and relatively unimportant ("rarely used") that has unfortunately plagued C++ design and led C++ to become the mess it is today. It's sad to see D

Re: Appending static arrays

2017-07-17 Thread Nordlöw via Digitalmars-d-learn
On Monday, 17 July 2017 at 20:28:12 UTC, Nordlöw wrote: Made some adjustments with working unittest and put it up on https://github.com/nordlow/phobos-next/blob/master/src/algorithm_ex.d#L2467 Moved here https://github.com/nordlow/phobos-next/blob/master/src/array_ex.d#L2765

[Issue 15759] chunks should work with only an input range

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15759 hst...@quickfur.ath.cx changed: What|Removed |Added Keywords||pull --- Comment #1 from

Re: Appending static arrays

2017-07-17 Thread Nordlöw via Digitalmars-d-learn
On Monday, 17 July 2017 at 20:01:41 UTC, H. S. Teoh wrote: OK, here's an actual, compilable, runnable version: import std.algorithm : sum; import std.meta : allSatisfy, staticMap; import std.range : only; import std.traits : CommonType, isStaticArray;

Re: proposed @noreturn attribute

2017-07-17 Thread Stefan Koch via Digitalmars-d
On Monday, 17 July 2017 at 18:54:37 UTC, H. S. Teoh wrote: On Mon, Jul 17, 2017 at 02:10:27PM -0400, Andrei Alexandrescu via Digitalmars-d wrote: On 7/17/17 11:39 AM, Olivier FAURE wrote: > I'd really prefer if you avoided the whole > `typeof(assert(0))` > thing. > > First off, it's way too

[Issue 15759] chunks should work with only an input range

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15759 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --

[Issue 17517] DMD fails to build on amd64 debian jessie

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17517 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --

Re: Appending static arrays

2017-07-17 Thread Nordlöw via Digitalmars-d-learn
On Monday, 17 July 2017 at 20:53:36 UTC, H. S. Teoh wrote: See the working implementation in my latest post on this thread. That version supports CommonType, and works correctly with empty tuples as well. T Thanks.

[Issue 17661] New: New isInputRange rejects valid input range

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17661 Issue ID: 17661 Summary: New isInputRange rejects valid input range Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: regression

Re: New library: open multi-methods

2017-07-17 Thread jmh530 via Digitalmars-d-announce
On Monday, 17 July 2017 at 21:31:20 UTC, jmh530 wrote: On Monday, 17 July 2017 at 20:41:05 UTC, Jean-Louis Leroy wrote: Thinking about it, 'openmethods' would probably be a better module/package name than just 'methods'. It emphasizes the #1 feature, i.e. polymorphism outside of classes.

Re: New library: open multi-methods

2017-07-17 Thread jmh530 via Digitalmars-d-announce
On Monday, 17 July 2017 at 20:41:05 UTC, Jean-Louis Leroy wrote: Thinking about it, 'openmethods' would probably be a better module/package name than just 'methods'. It emphasizes the #1 feature, i.e. polymorphism outside of classes. Googling `multimethods` brought up more programming-related

Re: static foreach is now in github master

2017-07-17 Thread Martin Nowak via Digitalmars-d-announce
On Monday, 17 July 2017 at 18:14:35 UTC, Andrei Alexandrescu wrote: For those who want to play with our new static foreach feature and are willing to take the steps to building their own dmd, Or just wait for the next nightly until tomorrow around 5AM UTC. curl -fsS

Re: static foreach is now in github master

2017-07-17 Thread John Colvin via Digitalmars-d-announce
On Monday, 17 July 2017 at 18:14:35 UTC, Andrei Alexandrescu wrote: For those who want to play with our new static foreach feature and are willing to take the steps to building their own dmd, the feature is now merged in master: https://github.com/dlang/dmd/pull/6760 Happy hacking! Andrei

Re: regex(q"<[^]>")

2017-07-17 Thread unDEFER via Digitalmars-d
On Monday, 17 July 2017 at 20:43:29 UTC, unDEFER wrote: Sorry, fixed in the newest DMD also as the other bug in regex... Oh, no. Not fixed. Fixed only other bug.

Re: Appending static arrays

2017-07-17 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Jul 17, 2017 at 08:28:12PM +, Nordlöw via Digitalmars-d-learn wrote: [...] > I had to special-case foreach body for `i == 0` since `sumOfLengths` > couldn't instantiate with empty tuple `()`. > > Further, should `concat` support `CommonType`? That is, should > > int[2] x = [1,

Re: New library: open multi-methods

2017-07-17 Thread Jean-Louis Leroy via Digitalmars-d-announce
Thinking about it, 'openmethods' would probably be a better module/package name than just 'methods'. It emphasizes the #1 feature, i.e. polymorphism outside of classes.

Re: regex(q"<[^]>")

2017-07-17 Thread unDEFER via Digitalmars-d
Sorry, fixed in the newest DMD also as the other bug in regex...

Profiling Windows App and DLL

2017-07-17 Thread Igor via Digitalmars-d-learn
Is there a known limitation in profiling these or am I doing something wrong? When I try to run my application from VisualD (x64 build) with -profile switch I just get Access Violation reported on WinMain function (actual declaration, it doesn't enter its body). If I build it with dub build

Re: Appending static arrays

2017-07-17 Thread Nordlöw via Digitalmars-d-learn
On Monday, 17 July 2017 at 20:10:31 UTC, H. S. Teoh wrote: On Mon, Jul 17, 2017 at 08:11:03PM +, Nordlöw via Digitalmars-d-learn wrote: [...] Does this have a place in Phobos? Never know till you try. :-D If so, - under what name: append, concat or cat? I'd vote for concat. -

Re: DCompute: GPGPU with Native D for OpenCL and CUDA

2017-07-17 Thread Walter Bright via Digitalmars-d-announce
On 7/17/2017 6:50 AM, Mike Parker wrote: Blog: https://dlang.org/blog/2017/07/17/dcompute-gpgpu-with-native-d-for-opencl-and-cuda/ Reddit: https://www.reddit.com/r/programming/comments/6nt4ba/dcompute_gpgpu_with_native_d_for_opencl_and_cuda/ It's now #10 on Hacker News!

Re: Appending static arrays

2017-07-17 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Jul 17, 2017 at 08:11:03PM +, Nordlöw via Digitalmars-d-learn wrote: [...] > Does this have a place in Phobos? Never know till you try. :-D > If so, > > - under what name: append, concat or cat? I'd vote for concat. > - where: std.algorithm or std.array? std.array, IMO, since

Re: Appending static arrays

2017-07-17 Thread Nordlöw via Digitalmars-d-learn
On Monday, 17 July 2017 at 19:11:26 UTC, H. S. Teoh wrote: Hmm, since we already have sumOfLengths available at compile-time, what about: T[sumOfLengths!StaticArrays] append(StaticArrays...)(StaticArrays arrays) if (allSatisfy!(isStaticArray, StaticArrays)) {

Re: Appending static arrays

2017-07-17 Thread H. S. Teoh via Digitalmars-d-learn
OK, here's an actual, compilable, runnable version: import std.algorithm : sum; import std.meta : allSatisfy, staticMap; import std.range : only; import std.traits : CommonType, isStaticArray; alias Elem(A : E[n], E, size_t n) = E; enum Length(A) =

Re: Appending static arrays

2017-07-17 Thread Nordlöw via Digitalmars-d-learn
On Monday, 17 July 2017 at 18:54:31 UTC, Stefan Koch wrote: we have special code in the compiler to optimize a ~ b ~ c. Interesting, can you elaborate on what you mean with "optimize". In that case, is there a reason why int x[2]; int y[2]; int z[x.length + y.length] = x ~ y;

Re: Appending static arrays

2017-07-17 Thread Nordlöw via Digitalmars-d-learn
On Monday, 17 July 2017 at 18:54:31 UTC, Stefan Koch wrote: So all you need to do make it so auto cat(T[]...)(T args) { T[] result; mixin(() { string mix = `result = `; foreach(i;args.length) { mix ~= `args[` ~ itos(i) ~ `] ~`; } mix[$-1] = ';';

[Issue 17484] high penalty for vbroadcastsd with -mcpu=avx

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17484 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 17484] high penalty for vbroadcastsd with -mcpu=avx

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17484 --- Comment #1 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/1f11aa0eb8f6087b7dbadeb770e4526ec9808ccc fix Issue 17484 - high penalty for AVX-256 instructions with

Re: An Issue I Wish To Raise Awareness On

2017-07-17 Thread Jack Stouffer via Digitalmars-d
On Monday, 17 July 2017 at 17:41:58 UTC, Atila Neves wrote: On Monday, 17 July 2017 at 14:26:19 UTC, Jack Stouffer wrote: TL;DR: Issue 17658 [1] makes using shared very annoying/practically impossible. [...] I fixed this already, should be in the next release. Atila Are you sure? Because

[Issue 17250] ProcessPipes (std.process) should provide a test for a null pid

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17250 --- Comment #6 from Jon Degenhardt --- (In reply to Jon Degenhardt from comment #5) > (In reply to Vladimir Panteleev from comment #4) > > (In reply to Jon Degenhardt from comment #1) > > > The problem is that there is

[Issue 17250] ProcessPipes (std.process) should provide a test for a null pid

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17250 --- Comment #5 from Jon Degenhardt --- (In reply to Vladimir Panteleev from comment #4) > (In reply to Jon Degenhardt from comment #1) > > The problem is that there is no method available to determine if pid is null > >

[Issue 17660] New: ICE with `static foreach`: AssertError@ddmd/visitor.d(39)

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17660 Issue ID: 17660 Summary: ICE with `static foreach`: AssertError@ddmd/visitor.d(39) Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW

Re: Appending static arrays

2017-07-17 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Jul 17, 2017 at 12:01:48PM -0700, H. S. Teoh via Digitalmars-d-learn wrote: [...] > template sumOfLengths(A...) > if (A.length > 0) > { > static if (A.length == 1) > enum sumOfLengths = A[0].length; > else >

Re: Appending static arrays

2017-07-17 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Jul 17, 2017 at 12:01:48PM -0700, H. S. Teoh via Digitalmars-d-learn wrote: [...] > T[sumOfLengths!StaticArrays] append(StaticArrays...)(StaticArrays > arrays) > if (/* insert static array constraints here */) > { > typeof(return) result = void; >

Re: Appending static arrays

2017-07-17 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Jul 17, 2017 at 05:38:23PM +, Nordlöw via Digitalmars-d-learn wrote: > I'm want to define a specialization of `append()` that takes only > static arrays as inputs and returns a static array being the sum of > the lengths of the inputs. > > Have anybody already implemented this? > >

Re: Appending static arrays

2017-07-17 Thread ag0aep6g via Digitalmars-d-learn
On 07/17/2017 08:35 PM, Nordlöw wrote: Thanks, but I'm talking about the variadic case where the number of input arguments are unknown (>= 2) where the function header looks something like import std.traits : allSatisfy, isStaticArray; auto append(R, Args...)(auto ref Args args) if

[Issue 6718] "nWayUnion" => "nWayMerge", plus true nWayUnion

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6718 --- Comment #15 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/9efa504bdca2b2644375e86d3b1527170512b726 Fix Issue 6718 - nWayUnion => nWayMerge, plus true

[Issue 15831] IFTI voldemort type exploding bloat

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15831 hst...@quickfur.ath.cx changed: What|Removed |Added Keywords||pull --- Comment #18 from

Re: proposed @noreturn attribute

2017-07-17 Thread H. S. Teoh via Digitalmars-d
On Mon, Jul 17, 2017 at 02:10:27PM -0400, Andrei Alexandrescu via Digitalmars-d wrote: > On 7/17/17 11:39 AM, Olivier FAURE wrote: > > I'd really prefer if you avoided the whole `typeof(assert(0))` > > thing. > > > > First off, it's way too verbose for a simple concept. > > Noted, thanks. I

Re: Building DMD on OpenBSD

2017-07-17 Thread Joakim via Digitalmars-d
On Monday, 17 July 2017 at 18:42:39 UTC, Anonymous wrote: On Monday, 17 July 2017 at 17:18:23 UTC, Joakim wrote: Unfortunately, dmd has not kept porters in mind and hasnt kept the C++ version updated, or kept a workflow that enables easy bootstrapping:

Re: Error: -o no longer supported, use -of or -od

2017-07-17 Thread Zaheer Ahmed via Digitalmars-d
On Monday, 17 July 2017 at 17:10:51 UTC, Jonathan Marler wrote: On Monday, 17 July 2017 at 16:08:30 UTC, Zaheer Ahmed wrote: When Compiling kernel.d with makefile I get Error: -o no longer supported, use -of or -od and my Makefile Commands to do this is following. DMDPARAMS = -m32 //...some

Re: Appending static arrays

2017-07-17 Thread Stefan Koch via Digitalmars-d-learn
On Monday, 17 July 2017 at 18:38:16 UTC, Nordlöw wrote: On Monday, 17 July 2017 at 17:46:42 UTC, ag0aep6g wrote: int[n + m] result = a ~ b; Further, the expression `a ~ b` here will allocate and create a copy on the GC-heap before writing `result`. Maybe LDC optimizes away this now or

Re: Compilation times and idiomatic D code

2017-07-17 Thread H. S. Teoh via Digitalmars-d
On Sat, Jul 15, 2017 at 07:11:54PM +, Enamex via Digitalmars-d wrote: [...] > All that time I'd assumed that 'symbols' as linkers used them were > constant length :T They may have been once upon a time, many decades ago. :-D But modern linkers support symbols of arbitrary length (well, up to

Re: Appending static arrays

2017-07-17 Thread Nordlöw via Digitalmars-d-learn
On Monday, 17 July 2017 at 17:38:23 UTC, Nordlöw wrote: I'm want to define a specialization of `append()` that takes only static arrays as inputs and returns a static array being the sum of the lengths of the inputs. Have anybody already implemented this? If not, I'm specifically interested

Re: Building DMD on OpenBSD

2017-07-17 Thread Anonymous via Digitalmars-d
On Monday, 17 July 2017 at 17:18:23 UTC, Joakim wrote: Unfortunately, dmd has not kept porters in mind and hasnt kept the C++ version updated, or kept a workflow that enables easy bootstrapping: http://forum.dlang.org/thread/xgtbpcvbikxlilanr...@forum.dlang.org You will have to build

Re: Appending static arrays

2017-07-17 Thread Nordlöw via Digitalmars-d-learn
On Monday, 17 July 2017 at 17:46:42 UTC, ag0aep6g wrote: int[n + m] result = a ~ b; Further, the expression `a ~ b` here will allocate and create a copy on the GC-heap before writing `result`. Maybe LDC optimizes away this now or in the future but DMD cannot. Yeah I know, kind of dumb

Re: Appending static arrays

2017-07-17 Thread Nordlöw via Digitalmars-d-learn
On Monday, 17 July 2017 at 17:46:42 UTC, ag0aep6g wrote: Like so? int[n + m] append(size_t n, size_t m)(int[n] a, int[m] b) { int[n + m] result = a ~ b; return result; } Thanks, but I'm talking about the variadic case where the number of input arguments are unknown (>= 2) where the

static foreach is now in github master

2017-07-17 Thread Andrei Alexandrescu via Digitalmars-d-announce
For those who want to play with our new static foreach feature and are willing to take the steps to building their own dmd, the feature is now merged in master: https://github.com/dlang/dmd/pull/6760 Happy hacking! Andrei

Re: proposed @noreturn attribute

2017-07-17 Thread Andrei Alexandrescu via Digitalmars-d
On 7/17/17 11:39 AM, Olivier FAURE wrote: I'd really prefer if you avoided the whole `typeof(assert(0))` thing. First off, it's way too verbose for a simple concept. Noted, thanks. I won't debate this much but for now I disagree. The "no return" type has several particular properties that

Re: Yesterday Visual D worked, today it does not!

2017-07-17 Thread Enjoys Math via Digitalmars-d-learn
On Monday, 17 July 2017 at 17:57:14 UTC, Enjoys Math wrote: I made a console app the other day and there were build options present. In the build options I had to specify the dmd2 executable directly. Then it worked (but that's another error). Today there are no build options! I tried

Yesterday Visual D worked, today it does not!

2017-07-17 Thread Enjoys Math via Digitalmars-d-learn
I made a console app the other day and there were build options present. In the build options I had to specify the dmd2 executable directly. Then it worked (but that's another error). Today there are no build options! I tried creating a regular console app and a GDC/DMD console app.

Re: newCTFE Status July 2017

2017-07-17 Thread Stefan Koch via Digitalmars-d
On Thursday, 13 July 2017 at 12:45:19 UTC, Stefan Koch wrote: [ ... ] I just figured out the bug in test/runnable/template8.d What happens somewhere inside those templates is that the following expression is executed: "some string literal" ~ null; when then happens we executed the

[Issue 17645] `pure` is transitively applied to all delegates inside a pure function

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17645 --- Comment #7 from Steven Schveighoffer --- (In reply to Tomer Filiba (weka) from comment #5) > the fact i *create* a delegate in a pure scope > shouldn't force the *delegate* to be pure. I'm not 100% sure about that, but it

Re: DCompute: GPGPU with Native D for OpenCL and CUDA

2017-07-17 Thread Johan Engelen via Digitalmars-d-announce
On Monday, 17 July 2017 at 13:50:22 UTC, Mike Parker wrote: Nicholas Wilson has put together a blog post on his progress with DCompute Great, Nick!

Re: Appending static arrays

2017-07-17 Thread ag0aep6g via Digitalmars-d-learn
On 07/17/2017 07:38 PM, Nordlöw wrote: I'm want to define a specialization of `append()` that takes only static arrays as inputs and returns a static array being the sum of the lengths of the inputs. Have anybody already implemented this? If not, I'm specifically interested in how to most

Re: An Issue I Wish To Raise Awareness On

2017-07-17 Thread Atila Neves via Digitalmars-d
On Monday, 17 July 2017 at 14:26:19 UTC, Jack Stouffer wrote: TL;DR: Issue 17658 [1] makes using shared very annoying/practically impossible. [...] I fixed this already, should be in the next release. Atila

[Issue 17659] `pure` causes function to be inferred as a delegate

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17659 Steven Schveighoffer changed: What|Removed |Added CC|

Appending static arrays

2017-07-17 Thread Nordlöw via Digitalmars-d-learn
I'm want to define a specialization of `append()` that takes only static arrays as inputs and returns a static array being the sum of the lengths of the inputs. Have anybody already implemented this? If not, I'm specifically interested in how to most conveniently infer the length (as an

Re: proposed @noreturn attribute

2017-07-17 Thread Patrick Schluter via Digitalmars-d
On Monday, 17 July 2017 at 15:39:30 UTC, Olivier FAURE wrote: On Sunday, 16 July 2017 at 20:44:13 UTC, Andrei Alexandrescu wrote: An issue is that we already have typeof(null). typeof(null) and typeof(assert(0))* are two ways to specify almost the same thing. One question is whether

[Issue 16856] D does not work on FreeBSD current (what will eventually be 12) due to libunwind

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16856 --- Comment #17 from anonymous4 --- (In reply to Vladimir Panteleev from comment #15) > (In reply to Jonathan M Davis from comment #13) > > That's a separate bug though: bug #17596. > > Clickable link: issue 17596 > > See

Re: Building DMD on OpenBSD

2017-07-17 Thread Joakim via Digitalmars-d
On Monday, 17 July 2017 at 16:45:28 UTC, Anonymous wrote: On Monday, 17 July 2017 at 09:58:42 UTC, Joakim wrote: The last dmd we released that was written in C++ was 2.067, for which you can still check out the branch. Youd have to build that bootstrap compiler 2.067 first, then worry about

Re: Error: -o no longer supported, use -of or -od

2017-07-17 Thread Jonathan Marler via Digitalmars-d
On Monday, 17 July 2017 at 16:08:30 UTC, Zaheer Ahmed wrote: When Compiling kernel.d with makefile I get Error: -o no longer supported, use -of or -od and my Makefile Commands to do this is following. DMDPARAMS = -m32 //...some objects %.o: %.d dmd $(DMDPARAMS) -o $@ -c $< dmd

regex(q"<[^]>")

2017-07-17 Thread unDEFER via Digitalmars-d
Hello! The code in the header leads to assertion! But the user inputed data don't must leads to any assertions!

Re: Building DMD on OpenBSD

2017-07-17 Thread Anonymous via Digitalmars-d
On Monday, 17 July 2017 at 09:58:42 UTC, Joakim wrote: The last dmd we released that was written in C++ was 2.067, for which you can still check out the branch. Youd have to build that bootstrap compiler 2.067 first, then worry about the latest dmd. Since we dont regularly build for

[Issue 17645] `pure` is transitively applied to all delegates inside a pure function

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17645 --- Comment #6 from Tomer Filiba (weka) --- Opened https://issues.dlang.org/show_bug.cgi?id=17659 --

[Issue 17659] New: `pure` causes function to be inferred as a delegate

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17659 Issue ID: 17659 Summary: `pure` causes function to be inferred as a delegate Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: major

[Issue 17645] `pure` is transitively applied to all delegates inside a pure function

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17645 --- Comment #5 from Tomer Filiba (weka) --- (In reply to Steven Schveighoffer from comment #4) > `format` actually is pure. nitpicking. sure, format may be pure, but the variables i want to log in the assert may be __gshared and then

[Issue 17658] Shared postblits and dtors conflict with non-shared versions

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17658 Jack Stouffer changed: What|Removed |Added Blocks||16535 --

[Issue 17658] Shared postblits and dtors conflict with non-shared versions

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17658 Jack Stouffer changed: What|Removed |Added Blocks|15768 | --

[Issue 15768] std.stdio.trustedStdout accesses __gshared data without synchronization.

2017-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15768 Jack Stouffer changed: What|Removed |Added Depends on|17658 | --

  1   2   >