Re: D vs nim

2018-03-27 Thread Stefan Koch via Digitalmars-d
On Tuesday, 27 March 2018 at 12:02:37 UTC, jmh530 wrote: On Wednesday, 22 April 2015 at 06:03:07 UTC, Timothee Cour wrote: [snip] I would like to refocus this thread on feature set and how it compares to D, not on flame wars about brackets or language marketing issues. In the comparison

Re: unittests, dub and libraries

2018-03-27 Thread Joe via Digitalmars-d-learn
On Wednesday, 28 March 2018 at 03:07:23 UTC, Jonathan M Davis wrote: Run dub test The problem is that an executable needs a main, and a library doesn't have one, whereas when you're testing a library, you need an executable. So, a main must be inserted - e.g. with the -main flag to dmd.

Re: rvalues -> ref (yup... again!)

2018-03-27 Thread Rubn via Digitalmars-d
On Wednesday, 28 March 2018 at 00:56:29 UTC, kinke wrote: On Tuesday, 27 March 2018 at 23:59:09 UTC, Rubn wrote: Just adding a few writeln it isn't able to remove the function entirely anymore and can't optimize it out. Well writeln() here involves number -> string formatting, GC, I/O,

[Issue 18669] isNestedFunction does not check if parameter is a function

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18669 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 18669] isNestedFunction does not check if parameter is a function

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18669 --- Comment #1 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/09cc0bac145422636e88616ce88f8bab3f0adefc Fix Issue 18669 - isNestedFunction does not check if

Re: unittests, dub and libraries

2018-03-27 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, March 28, 2018 02:16:59 Joe via Digitalmars-d-learn wrote: > I'm trying to build a very simple library. For now it just has a > single class, constructor, destructor and one method. I added a > unit test right after the method, declared the targetType to be > "library" and a

[Issue 18672] Error in @safe transitive propagation with associative arrays

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18672 Carsten Blüggel changed: What|Removed |Added CC||chi...@posteo.net --

unittests, dub and libraries

2018-03-27 Thread Joe via Digitalmars-d-learn
I'm trying to build a very simple library. For now it just has a single class, constructor, destructor and one method. I added a unit test right after the method, declared the targetType to be "library" and a buildType of "unittest" (with options "unittests", "debugMode", "debugInfo"). When I

Re: Checking if a structs .init value is zero bits only

2018-03-27 Thread Seb via Digitalmars-d-learn
On Wednesday, 28 March 2018 at 00:15:34 UTC, Per Nordlöw wrote: Is there a way to check if a struct `S` can be initialized using zero bits only, so that we can allocate and initialize an array of `S` in one go using `calloc`? If not, what should such a trait look like? Have a look at:

[Issue 18197] [REG2.073] Internal error: backend\cgcod.c 1659

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18197 --- Comment #5 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/689fa72cb110250bc8b0dc152e48e20ba1f67cf9 Fix issue 18197 - Correct optimization for OPpair in x87 mode

[Issue 18197] [REG2.073] Internal error: backend\cgcod.c 1659

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18197 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: rvalues -> ref (yup... again!)

2018-03-27 Thread kinke via Digitalmars-d
On Tuesday, 27 March 2018 at 23:59:09 UTC, Rubn wrote: Just adding a few writeln it isn't able to remove the function entirely anymore and can't optimize it out. Well writeln() here involves number -> string formatting, GC, I/O, template bloat... There are indeed superfluous memcpy's in your

Re: Checking if a structs .init value is zero bits only

2018-03-27 Thread Ali Çehreli via Digitalmars-d-learn
On 03/27/2018 05:15 PM, Per Nordlöw wrote: Is there a way to check if a struct `S` can be initialized using zero bits only, so that we can allocate and initialize an array of `S` in one go using `calloc`? If not, what should such a trait look like? The following idea should work. One question

Checking if a structs .init value is zero bits only

2018-03-27 Thread Per Nordlöw via Digitalmars-d-learn
Is there a way to check if a struct `S` can be initialized using zero bits only, so that we can allocate and initialize an array of `S` in one go using `calloc`? If not, what should such a trait look like?

Re: rvalues -> ref (yup... again!)

2018-03-27 Thread kinke via Digitalmars-d
On Tuesday, 27 March 2018 at 23:35:44 UTC, kinke wrote: On Tuesday, 27 March 2018 at 21:52:25 UTC, Rubn wrote: It happens with LDC too, not sure how it would be able to know to do any kind of optimization like that unless it was able to inline every single function called into one function and

Re: Recursive attribute for virtual functions?

2018-03-27 Thread ag0aep6g via Digitalmars-d
On 03/28/2018 01:34 AM, arturg wrote: you can call them with __traits(getOverloads, T, "name")[index]; you can overload on types attributes and linkage, but seems like you can only merge overloads based on types. I don't think there's value in allowing overloads that can only be called via

Re: rvalues -> ref (yup... again!)

2018-03-27 Thread Rubn via Digitalmars-d
On Tuesday, 27 March 2018 at 23:35:44 UTC, kinke wrote: On Tuesday, 27 March 2018 at 21:52:25 UTC, Rubn wrote: It happens with LDC too, not sure how it would be able to know to do any kind of optimization like that unless it was able to inline every single function called into one function and

Re: utf.d codeLength asserts false on certain input

2018-03-27 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, March 27, 2018 23:29:57 Anonymouse via Digitalmars-d-learn wrote: > My IRC bot is suddenly seeing crashes. It reads characters from a > Socket into an ubyte[] array, then idups parts of that (full > lines) into strings for parsing. Parsing involves slicing such > strings into

Re: Recursive attribute for virtual functions?

2018-03-27 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, March 27, 2018 21:10:25 12345swordy via Digitalmars-d wrote: > On Tuesday, 27 March 2018 at 21:05:32 UTC, ag0aep6g wrote: > > On 03/27/2018 11:02 PM, 12345swordy wrote: > >> Then explain this then. > >> https://run.dlang.io/is/S2KLs5 > > > > B.talk is @safe. The compiler ignores the

Re: Recursive attribute for virtual functions?

2018-03-27 Thread arturg via Digitalmars-d
On Tuesday, 27 March 2018 at 23:34:20 UTC, arturg wrote: On Tuesday, 27 March 2018 at 23:23:38 UTC, ag0aep6g wrote: DMD might accept that, but I don't think it works in a meaningful way. How do you call the @system one? Looks like the @safe one will always be called, even from @system

[Issue 17874] Segmentation fault when constructing a struct with a static array of structs containing floats

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17874 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 17874] Segmentation fault when constructing a struct with a static array of structs containing floats

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17874 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/5662aa94c091083f004530d7ed77ec42a93414a4 Fix issue 17874 - Static arrays & memset Hopefully completes

Re: rvalues -> ref (yup... again!)

2018-03-27 Thread kinke via Digitalmars-d
On Tuesday, 27 March 2018 at 21:52:25 UTC, Rubn wrote: It happens with LDC too, not sure how it would be able to know to do any kind of optimization like that unless it was able to inline every single function called into one function and be able to do optimize it from there. I don't imagine

Re: Recursive attribute for virtual functions?

2018-03-27 Thread arturg via Digitalmars-d
On Tuesday, 27 March 2018 at 23:23:38 UTC, ag0aep6g wrote: DMD might accept that, but I don't think it works in a meaningful way. How do you call the @system one? Looks like the @safe one will always be called, even from @system code: import std.stdio; void talk() @system {

[Issue 18433] rdmd doesn't respect DFLAGS for its cache hash

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18433 --- Comment #3 from Seb --- https://github.com/dlang/tools/pull/343 --

utf.d codeLength asserts false on certain input

2018-03-27 Thread Anonymouse via Digitalmars-d-learn
My IRC bot is suddenly seeing crashes. It reads characters from a Socket into an ubyte[] array, then idups parts of that (full lines) into strings for parsing. Parsing involves slicing such strings into meaningful segments; sender, event type, target channel/user, message content, etc. I can

[Issue 14855] -cov should ignore assert(0)

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14855 --- Comment #7 from hst...@quickfur.ath.cx --- To me it doesn't make sense that `assert(0);` should be counted towards coverage. I mean, `assert(0);` is basically the programmer telling the compiler "this is not supposed to happen" and "this is

Re: Recursive attribute for virtual functions?

2018-03-27 Thread ag0aep6g via Digitalmars-d
On 03/28/2018 12:19 AM, arturg wrote: shouldn't it create a overload? I don't think so. As far as I know, you can't overload on attributes. [...] but this works: class A {     void talk() {} } class B : A {     alias talk = A.talk;     void talk(int) {} } Because different parameters

[Issue 14855] -cov should ignore assert(0)

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14855 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --

Re: D vs nim

2018-03-27 Thread Timothee Cour via Digitalmars-d
that comment was regarding -betterC RAII (with structs) has been available in D for a while, eg: ```d struct A{ ~this(){...} } void fun(){ A a; // when a goes out of scope, will call dtor deterministically } ``` On Tue, Mar 27, 2018 at 4:15 PM, Ali via Digitalmars-d

Re: D vs nim

2018-03-27 Thread Ali via Digitalmars-d
On Tuesday, 27 March 2018 at 01:19:44 UTC, timotheecour wrote: On Wednesday, 22 April 2015 at 06:03:07 UTC, Timothee Cour wrote: On Mon, Apr 13, 2015 at 10:28 AM, Timothee Cour wrote: I would like to refocus this thread on feature set and how it compares to D, not

[Issue 18433] rdmd doesn't respect DFLAGS for its cache hash

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18433 --- Comment #2 from Seb --- Argh, apparently this hasn't been fixed in master and DFLAGS is only looked at when -conf= is set: ``` > DFLAGS="-version=Foo" ../dmd/generated/linux/release/64/dmd -v foo.d && ./foo predefs

[Issue 17874] Segmentation fault when constructing a struct with a static array of structs containing floats

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17874 Walter Bright changed: What|Removed |Added CC|

[Issue 18433] rdmd doesn't respect DFLAGS for its cache hash

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18433 Seb changed: What|Removed |Added CC||greensunn...@gmail.com

[Issue 10550] Xorshift32 and Xorshift160 do not generate uniformly-distributed random numbers

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10550 Zach Bjornson changed: What|Removed |Added CC||zbbjorn...@gmail.com

Re: Recursive attribute for virtual functions?

2018-03-27 Thread arturg via Digitalmars-d
On Tuesday, 27 March 2018 at 21:25:33 UTC, ag0aep6g wrote: On 03/27/2018 11:10 PM, 12345swordy wrote: Shouldn't it give a warning then? I wouldn't mind a warning, or even an error. Putting both @safe and @system directly on a function is an error, too. shouldn't it create a overload? for

[Issue 17493] nothrow constructor may throw

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17493 Seb changed: What|Removed |Added Status|REOPENED|RESOLVED

Re: Building application with LDC and -flto=thin fails in link stage

2018-03-27 Thread Per Nordlöw via Digitalmars-d-learn
On Tuesday, 27 March 2018 at 22:00:42 UTC, Johan Engelen wrote: Indeed. Please try to manually link first (without dub) by modifying the command on which dub errors: ``` ldmd2 -flto=thin

Re: rvalues -> ref (yup... again!)

2018-03-27 Thread H. S. Teoh via Digitalmars-d
On Tue, Mar 27, 2018 at 09:52:25PM +, Rubn via Digitalmars-d wrote: > On Tuesday, 27 March 2018 at 20:38:35 UTC, H. S. Teoh wrote: > > On Tue, Mar 27, 2018 at 08:25:36PM +, Rubn via Digitalmars-d wrote: > > [...] > > > _D7example__T3fooTSQr3FooZQnFNbNiNfQrZv: > > > push rbp > > > mov

[Issue 17493] nothrow constructor may throw

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17493 --- Comment #4 from Walter Bright --- Why was this reopened? --

Re: Building application with LDC and -flto=thin fails in link stage

2018-03-27 Thread Johan Engelen via Digitalmars-d-learn
On Tuesday, 27 March 2018 at 13:28:08 UTC, kinke wrote: On Monday, 26 March 2018 at 23:32:59 UTC, Nordlöw wrote: forwarded as `-L-flto=thin` but still errors as Which is wrong, it's not a ld command-line option (i.e., the `-L` prefix is wrong). Indeed. Please try to manually link first

Re: rvalues -> ref (yup... again!)

2018-03-27 Thread Rubn via Digitalmars-d
On Tuesday, 27 March 2018 at 20:38:35 UTC, H. S. Teoh wrote: On Tue, Mar 27, 2018 at 08:25:36PM +, Rubn via Digitalmars-d wrote: [...] _D7example__T3fooTSQr3FooZQnFNbNiNfQrZv: push rbp mov rbp, rsp sub rsp, 3104 lea rax, [rbp + 16] lea rdi, [rbp - 2048] lea rcx, [rbp - 1024]

Re: D_vs_nim: git repo to compare features of D vs nim and help migrating code bw them. PRs welcome

2018-03-27 Thread Walter Bright via Digitalmars-d-announce
On 3/27/2018 5:11 AM, Guillaume Piolat wrote: - ability to write file during CTFE is not necessarily positive. THough I can't tell why from the top of my mind. The act of compiling a buggy program not influence the global state of the computer. It should not be necessary to vet code

Re: Recursive attribute for virtual functions?

2018-03-27 Thread ag0aep6g via Digitalmars-d
On 03/27/2018 11:10 PM, 12345swordy wrote: Shouldn't it give a warning then? I wouldn't mind a warning, or even an error. Putting both @safe and @system directly on a function is an error, too.

[Issue 18672] Error in @safe transitive propagation with associative arrays

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18672 ag0aep6g changed: What|Removed |Added CC||ag0ae...@gmail.com ---

Re: Recursive attribute for virtual functions?

2018-03-27 Thread 12345swordy via Digitalmars-d
On Tuesday, 27 March 2018 at 21:05:32 UTC, ag0aep6g wrote: On 03/27/2018 11:02 PM, 12345swordy wrote: Then explain this then. https://run.dlang.io/is/S2KLs5 B.talk is @safe. The compiler ignores the @system attribute on B.talk, because A.talk's @safe attribute takes precedence. Shouldn't

[Issue 18670] compiler segfault if `new` on a union type with dip1000

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18670 --- Comment #3 from hst...@quickfur.ath.cx --- P.S. Tested on git commit 2e21d0713babf760e4428d6404d733282ef85e8a, just to be clear. --

[Issue 18670] compiler segfault if `new` on a union type with dip1000

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18670 --- Comment #2 from hst...@quickfur.ath.cx --- Unable to reproduce problem on git master. Perhaps it has since been fixed? --

Re: Recursive attribute for virtual functions?

2018-03-27 Thread ag0aep6g via Digitalmars-d
On 03/27/2018 11:02 PM, 12345swordy wrote: Then explain this then. https://run.dlang.io/is/S2KLs5 B.talk is @safe. The compiler ignores the @system attribute on B.talk, because A.talk's @safe attribute takes precedence.

Re: DLS : an attempt at a language server

2018-03-27 Thread WebFreak001 via Digitalmars-d-announce
On Tuesday, 27 March 2018 at 18:08:14 UTC, Laurent Tréguier wrote: Hello, D community! I've been looking at D for a while now, but never got to really use it. And now that Microsoft initiated the Language Server Protocol, I thought about trying to make a language server using DCD, DFMT and

[Issue 18670] compiler segfault if `new` on a union type with dip1000

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18670 hst...@quickfur.ath.cx changed: What|Removed |Added Keywords||ice CC|

[Issue 18672] Error in @safe transitive propagation with associative arrays

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18672 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --

[Issue 18603] Illegal instruction: 4 on Mac OS 10.7.5 Leopard

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18603 --- Comment #6 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/installer https://github.com/dlang/installer/commit/427674142aecdd820a017c73b75508d4cddb1dfe Fix Issue 18603 - Illegal instruction: 4 on Mac

Re: Recursive attribute for virtual functions?

2018-03-27 Thread 12345swordy via Digitalmars-d
On Tuesday, 27 March 2018 at 20:49:25 UTC, ag0aep6g wrote: On 03/27/2018 10:39 PM, 12345swordy wrote: class A {     @recursive @safe void talk() [...] } class B : A {     override void talk() // @safe attribute added by recursive attribute and can not be removed [...] } It already

[Issue 18672] Error in @safe transitive propagation with associative arrays

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18672 Seb changed: What|Removed |Added Summary|@safe should be |Error in @safe transitive

[Issue 18672] New: @safe should be transitively propagated

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18672 Issue ID: 18672 Summary: @safe should be transitively propagated Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: safe Severity:

[Issue 18663] std.random.isSeedable has false positives

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18663 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 18663] std.random.isSeedable has false positives

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18663 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/e9f56ba3b293670b7b7173ae75bf465448fff7ac Fix Issue 18663 - std.random.isSeedable has false

Re: Recursive attribute for virtual functions?

2018-03-27 Thread ag0aep6g via Digitalmars-d
On 03/27/2018 10:39 PM, 12345swordy wrote: class A {     @recursive @safe void talk() [...] } class B : A {     override void talk() // @safe attribute added by recursive attribute and can not be removed [...] } It already works like that. B.talk is @safe, and you can't make it

Re: rvalues -> ref (yup... again!)

2018-03-27 Thread H. S. Teoh via Digitalmars-d
On Tue, Mar 27, 2018 at 08:25:36PM +, Rubn via Digitalmars-d wrote: [...] > _D7example__T3fooTSQr3FooZQnFNbNiNfQrZv: > push rbp > mov rbp, rsp > sub rsp, 3104 > lea rax, [rbp + 16] > lea rdi, [rbp - 2048] > lea rcx, [rbp - 1024] > mov edx, 1024 > mov rsi, rcx > mov qword ptr

Recursive attribute for virtual functions?

2018-03-27 Thread 12345swordy via Digitalmars-d
For example class A { @recursive @safe void talk() { writeln("Hi"); } } class B : A { override void talk() // @safe attribute added by recursive attribute and can not be removed { writeln("Bye"); } } I have notice that potential bugs can slip by the

Re: rvalues -> ref (yup... again!)

2018-03-27 Thread Rubn via Digitalmars-d
On Tuesday, 27 March 2018 at 15:50:37 UTC, Atila Neves wrote: It's fine for references to just be references in D. We're not struggling to make references move-able in D, that's not a thing, we already have move semantics. Any extension of this conversation about references into C++

Re: rvalues -> ref (yup... again!)

2018-03-27 Thread Peter Campbell via Digitalmars-d
On Tuesday, 27 March 2018 at 18:14:18 UTC, Manu wrote: That's exactly what I've been saying. For like, 9 years.. It looks like this: https://github.com/TurkeyMan/DIPs/blob/ref_args/DIPs/DIP1xxx-rval_to_ref.md (contribution appreciated) I've followed this thread since it was made as this has

[Issue 18671] New: Implement loop unrolling in dmd's optimizer

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18671 Issue ID: 18671 Summary: Implement loop unrolling in dmd's optimizer Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

Re: rvalues -> ref (yup... again!)

2018-03-27 Thread Rubn via Digitalmars-d
On Tuesday, 27 March 2018 at 07:33:12 UTC, Atila Neves wrote: On Tuesday, 27 March 2018 at 00:30:24 UTC, Rubn wrote: On Monday, 26 March 2018 at 14:40:03 UTC, Atila Neves wrote: C++ T&& (Rvalue reference) -> D T Not really, in C++ it is an actual reference and you get to choose which

Re: Where is TypeInfo stored?

2018-03-27 Thread Jeremy DeHaan via Digitalmars-d-learn
On Tuesday, 27 March 2018 at 19:06:38 UTC, Adam D. Ruppe wrote: On Tuesday, 27 March 2018 at 18:56:58 UTC, Jeremy DeHaan wrote: Are these put into the text or data segments? Yeah, they are in the data segment as static data (just like if you declared your own static array). Awesome,

[Issue 18184] std.zip should be usable in @safe

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18184 --- Comment #1 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/a67d667d8b4234be99dc9ffde901dc88825153fb Work On Issue 18184 - std.zip should be usable in @safe

Re: Where is TypeInfo stored?

2018-03-27 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 27 March 2018 at 18:56:58 UTC, Jeremy DeHaan wrote: Are these put into the text or data segments? Yeah, they are in the data segment as static data (just like if you declared your own static array).

Re: "in" no longer "scope" since 2.079.0?

2018-03-27 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, March 27, 2018 16:16:15 Adam D. Ruppe via Digitalmars-d-learn wrote: > On Tuesday, 27 March 2018 at 09:27:07 UTC, Jonathan M Davis wrote: > > it was deemed too dangerous to have in suddenly really mean > > both scope and const, because it would potentially break a lot > > of code. > >

Where is TypeInfo stored?

2018-03-27 Thread Jeremy DeHaan via Digitalmars-d-learn
I was doing some experiments with the runtime and I didn't notice the TypeInfo instances being allocated by the GC. Are these put into the text or data segments? Is there anyway to find out more about this process?

Re: DLS : an attempt at a language server

2018-03-27 Thread Laurent Tréguier via Digitalmars-d-announce
On Tuesday, 27 March 2018 at 18:32:40 UTC, Anton Pastukhov wrote: Ahem... https://github.com/Pure-D/serve-d I know, but I still wanted to have a bit of fun anyway

[Issue 18550] Offline option for dlang.org makefile

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18550 --- Comment #4 from hst...@quickfur.ath.cx --- Argh, is there a way to tell the `phobos-prerelease` target to just use the local dmd repo instead of yet another remote cloning? --

[Issue 18550] Offline option for dlang.org makefile

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18550 --- Comment #3 from hst...@quickfur.ath.cx --- Thanks for taking the time to clarify. I simply assumed it was downloading old releases because it needed to generate tarballs and whatnot. I've been on git master for too long, I don't even know which

Re: DLS : an attempt at a language server

2018-03-27 Thread Anton Pastukhov via Digitalmars-d-announce
On Tuesday, 27 March 2018 at 18:08:14 UTC, Laurent Tréguier wrote: Hello, D community! I've been looking at D for a while now, but never got to really use it. And now that Microsoft initiated the Language Server Protocol, I thought about trying to make a language server using DCD, DFMT and

Re: "in" no longer "scope" since 2.079.0?

2018-03-27 Thread Schrom, Brian T via Digitalmars-d-learn
On Tue, Mar 27, 2018 at 03:27:07AM -0600, Jonathan M Davis via Digitalmars-d-learn wrote: > > Because scope has mostly done nothing (it only affected delegates), in has > effectively been const without scope for its entire existence in D2 in spite > of the fact that it was supposed to be the

Comparing In-Person Interpretation Vs Video Interpretation

2018-03-27 Thread Globibo via Digitalmars-d-learn
In recent years, thanks to the rapid and continuous advancements in the field of technology, more companies are doing businesses across borders. Hence, language interpretation services have become extremely crucial in today's world. There are different types of interpretation services such as

Re: rvalues -> ref (yup... again!)

2018-03-27 Thread Manu via Digitalmars-d
On 27 March 2018 at 00:14, Atila Neves via Digitalmars-d wrote: > On Monday, 26 March 2018 at 19:24:13 UTC, Manu wrote: >> >> On 26 March 2018 at 07:40, Atila Neves via Digitalmars-d >> wrote: >>> >>> On Friday, 23 March 2018 at 22:01:44

DLS : an attempt at a language server

2018-03-27 Thread Laurent Tréguier via Digitalmars-d-announce
Hello, D community! I've been looking at D for a while now, but never got to really use it. And now that Microsoft initiated the Language Server Protocol, I thought about trying to make a language server using DCD, DFMT and D-Scanner. It only supports formatting with DFMT and basic

Re: DConf 2018 Hackathon -- now open to the public free of charge

2018-03-27 Thread Jack Stouffer via Digitalmars-d-announce
On Tuesday, 27 March 2018 at 14:04:29 UTC, Mike Parker wrote: Yesterday, I made the announcement that the Hackathon would be open to anyone willing to pay $100 to get in. That idea has now been nixed. Instead, anyone can come in for the full day completely free. It's like a big Munich Meetup!

Re: "in" no longer "scope" since 2.079.0?

2018-03-27 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Mar 27, 2018 at 04:16:15PM +, Adam D. Ruppe via Digitalmars-d-learn wrote: > On Tuesday, 27 March 2018 at 09:27:07 UTC, Jonathan M Davis wrote: > > it was deemed too dangerous to have in suddenly really mean both > > scope and const, because it would potentially break a lot of code. >

Re: How to use annotation get key name?

2018-03-27 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 27 March 2018 at 15:38:48 UTC, Brian wrote: but you don't understand my means, I want have keys with multiple indeterminate names. You can pass an associative array (or better yet, a struct containing one) as a UDA and then use the regular loop over its keys and values. struct

Re: "in" no longer "scope" since 2.079.0?

2018-03-27 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 27 March 2018 at 09:27:07 UTC, Jonathan M Davis wrote: it was deemed too dangerous to have in suddenly really mean both scope and const, because it would potentially break a lot of code. To be frank, this pisses me off to a ridiculous extent because if it "breaks" at all... THAT

Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-27 Thread H. S. Teoh via Digitalmars-d-announce
On Tue, Mar 27, 2018 at 09:27:16AM -0400, Steven Schveighoffer via Digitalmars-d-announce wrote: > On 3/26/18 9:26 AM, Atila Neves wrote: > > On Friday, 23 March 2018 at 14:54:57 UTC, Steven Schveighoffer wrote: [...] > > > It's simple. Unittests in imported modules should not be visible. > > >

Re: rvalues -> ref (yup... again!)

2018-03-27 Thread Atila Neves via Digitalmars-d
On Tuesday, 27 March 2018 at 02:41:12 UTC, Manu wrote: He's trying to say that C++ introduced rvalue references because normal references weren't able to allow for move semantics to exist. It's a red-herring. D already has move semantics, they work well, and they're not on trial here. In

Re: Optional type - how to correctly reset a wrapped immutable T

2018-03-27 Thread SimonN via Digitalmars-d-learn
On Tuesday, 27 March 2018 at 15:28:40 UTC, jmh530 wrote: static if (isMutable!T) bag[0] = rhs; else bag = [rhs]; I like this idea. I'd even take it a step futher: When T is a pointer or class reference, then we can put the reference on the stack

Re: How to use annotation get key name?

2018-03-27 Thread Brian via Digitalmars-d-learn
On Monday, 26 March 2018 at 08:50:31 UTC, Simen Kjærås wrote: On Monday, 26 March 2018 at 08:29:31 UTC, Brian wrote: Rust sample code: #[cfg(name = "users")] PHP sample code: /* @Table(name = "users") */ Java sample code: @Table(name = "users") How to use dlang get key name? If I

Re: D_vs_nim: git repo to compare features of D vs nim and help migrating code bw them. PRs welcome

2018-03-27 Thread Uknown via Digitalmars-d-announce
On Tuesday, 27 March 2018 at 14:51:30 UTC, bachmeier wrote: On Tuesday, 27 March 2018 at 01:25:42 UTC, timotheecour wrote: D and nim are both very promising. I created this git repo to compare them: https://github.com/timotheecour/D_vs_nim/ Goal: up to date and objective comparison of

Re: Optional type - how to correctly reset a wrapped immutable T

2018-03-27 Thread jmh530 via Digitalmars-d-learn
On Tuesday, 27 March 2018 at 13:51:20 UTC, jmh530 wrote: How about: [snip] I can kind of like this more, but after re-reading your original post I'm not sure it really resolves your issue: struct Optional(T) { import std.traits : isMutable; T[] bag; this(T t) inout {

Re: CTFE ^^ (pow)

2018-03-27 Thread Guillaume Piolat via Digitalmars-d
On Tuesday, 27 March 2018 at 02:23:50 UTC, Jonathan M Davis wrote: I think that that we all agree that having these functions work with CTFE would be great. The disagreement is mostly on how much of an inconvenience it is or how big a deal that inconvenience is. Ultimately, it's just a

Re: Optional type - how to correctly reset a wrapped immutable T

2018-03-27 Thread SimonN via Digitalmars-d-learn
On Monday, 26 March 2018 at 14:17:03 UTC, Jonathan M Davis wrote: Rebindable does is pretty questionable as far as the type system goes, but it does what it does by forcing pointer semantics on a class reference, so the point is arguable. Yeah, I've always assumed that Rebindable cannot be

Re: D_vs_nim: git repo to compare features of D vs nim and help migrating code bw them. PRs welcome

2018-03-27 Thread bachmeier via Digitalmars-d-announce
On Tuesday, 27 March 2018 at 01:25:42 UTC, timotheecour wrote: D and nim are both very promising. I created this git repo to compare them: https://github.com/timotheecour/D_vs_nim/ Goal: up to date and objective comparison of features between D and nim (to help deciding what language to use),

[Issue 18670] New: compiler segfault if `new` on a union type with dip1000

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18670 Issue ID: 18670 Summary: compiler segfault if `new` on a union type with dip1000 Product: D Version: D2 Hardware: All OS: All Status: NEW

[Issue 18669] New: isNestedFunction does not check if parameter is a function

2018-03-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18669 Issue ID: 18669 Summary: isNestedFunction does not check if parameter is a function Product: D Version: D2 Hardware: All OS: All Status: NEW

Re: DConf 2018 Hackathon -- now open to the public free of charge

2018-03-27 Thread rikki cattermole via Digitalmars-d-announce
On 28/03/2018 3:04 AM, Mike Parker wrote: Yesterday, I made the announcement that the Hackathon would be open to anyone willing to pay $100 to get in. That idea has now been nixed. Instead, anyone can come in for the full day completely free. It's like a big Munich Meetup! I was a little

DConf 2018 Hackathon -- now open to the public free of charge

2018-03-27 Thread Mike Parker via Digitalmars-d-announce
Yesterday, I made the announcement that the Hackathon would be open to anyone willing to pay $100 to get in. That idea has now been nixed. Instead, anyone can come in for the full day completely free. It's like a big Munich Meetup! So, if you are in the area and can't make the conference, now

Re: Optional type - how to correctly reset a wrapped immutable T

2018-03-27 Thread jmh530 via Digitalmars-d-learn
On Tuesday, 27 March 2018 at 13:02:50 UTC, aliak wrote: Hmm, now that I'm explicitly trying to produce it, I feel I maybe using inout incorrectly? struct Optional(T) { T[] bag; this(T t) { bag = [t]; } } struct S { Optional!(inout(int)) f() inout { return

ErupteD v2.0 + Vulkan v1.1 breaking changes and NEW transition strategy

2018-03-27 Thread ParticlePeter via Digitalmars-d-announce
The deprecated ErupteD was un-deprecated again. Version v2.0 comes with Vulkan 1.1 support and breaking changes regarding its dependency mechanism. Details in the projects dub and github [0] pages. Regarding [1]: ErupteD-V1 will be destroyed, ErupteD-V2 continued to implement a valid

Re: Building application with LDC and -flto=thin fails in link stage

2018-03-27 Thread kinke via Digitalmars-d-learn
On Monday, 26 March 2018 at 23:32:59 UTC, Nordlöw wrote: forwarded as `-L-flto=thin` but still errors as Which is wrong, it's not a ld command-line option (i.e., the `-L` prefix is wrong). I don't use dub though, so I don't know how to fix it.

Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-27 Thread Steven Schveighoffer via Digitalmars-d-announce
On 3/26/18 9:26 AM, Atila Neves wrote: On Friday, 23 March 2018 at 14:54:57 UTC, Steven Schveighoffer wrote: On 3/22/18 6:59 AM, Atila Neves wrote: Blog post: https://atilanevesoncode.wordpress.com/ Atila It's simple. Unittests in imported modules should not be visible. They should be

Re: Optional type - how to correctly reset a wrapped immutable T

2018-03-27 Thread aliak via Digitalmars-d-learn
On Tuesday, 27 March 2018 at 11:57:28 UTC, jmh530 wrote: On Tuesday, 27 March 2018 at 06:26:57 UTC, aliak wrote: [snip] By the by, how come inout has to be stack based and const/immutable/mutable doesn't? Isn't inout just one of those depending on context? Example? Hmm, now that I'm

  1   2   >