Re: D community's view on syntactic sugar

2018-06-15 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 06/15/2018 07:04 PM, Sjoerd Nijboer wrote: For someone coming from a C# background there is some seemingly simple syntactic sugar missing from D. Everyone here is probably going to be different (D programmers are a varied bunch), but for me, I absolutely love syntax sugar. And I very

Get static fields!

2018-06-15 Thread DigitalDesigns via Digitalmars-d-learn
tupleof does not return static fields as does not Fields. Currently the only method seems to be use allMembers, but that returns members requiring filtering, which there is no good filtering checks. I'd simply like to get all the fields of a type, static and non-static.

Re: D community's view on syntactic sugar

2018-06-15 Thread rumbu via Digitalmars-d
On Saturday, 16 June 2018 at 02:44:04 UTC, Jonathan M Davis wrote: Typically, the approach right now is to do stuff in libraries rather than the language if it's at all reasonably possible. The language is incredibly powerful as it is, and we can do a _lot_ of stuff with libraries,

Re: import std.traits. std.string;

2018-06-15 Thread Basile B. via Digitalmars-d
On Saturday, 16 June 2018 at 00:24:42 UTC, DigitalDesigns wrote: space is ignored! Seems like a bug std . traits . std . string is valid? No, it's not a bug. Tokens are so. Try to write a grammar and a lexer, you'll understand that this makes sense. https://run.dlang.io/is/5YxAwR

Re: D community's view on syntactic sugar

2018-06-15 Thread Jonathan M Davis via Digitalmars-d
On Friday, June 15, 2018 23:04:40 Sjoerd Nijboer via Digitalmars-d wrote: > For someone coming from a C# background there is some seemingly > simple syntactic sugar missing from D. Typically, the approach right now is to do stuff in libraries rather than the language if it's at all reasonably

Storing temp for later use with ranges

2018-06-15 Thread DigitalDesigns via Digitalmars-d-learn
Does ranges have the ability to store a temp value in a "range like way" that can be used later? The idea is to avoid having to create temp variables. A sort of range with "memory"

Re: import std.traits. std.string;

2018-06-15 Thread DigitalDesigns via Digitalmars-d
On Saturday, 16 June 2018 at 00:34:01 UTC, H. S. Teoh wrote: On Sat, Jun 16, 2018 at 12:24:42AM +, DigitalDesigns via Digitalmars-d wrote: space is ignored! Seems like a bug std . traits . std . string is valid? It's not a bug. The '.' is the member-access operator, and like all other

Re: D community's view on syntactic sugar

2018-06-15 Thread evilrat via Digitalmars-d
On Saturday, 16 June 2018 at 00:20:35 UTC, Seb wrote: So of course, people obviously like syntactic sugar, but the problem is that nowadays one needs a strong argument when trying to convince W for introducing yet another language feature as it bloats the language and makes it harder for

Can't start application on heroku

2018-06-15 Thread crimaniak via Digitalmars-d-learn
Hi all! The first try to host application on Heroku provider. The application is started and starts to listen in 3 seconds on the port, provided by heroku-buildpack-d. But the server doesn't detect listening and stops the application. On the local machine, the application works as expected.

Re: D community's view on syntactic sugar

2018-06-15 Thread Seb via Digitalmars-d
On Saturday, 16 June 2018 at 00:32:24 UTC, H. S. Teoh wrote: On Sat, Jun 16, 2018 at 12:20:35AM +, Seb via Digitalmars-d wrote: On Friday, 15 June 2018 at 23:04:40 UTC, Sjoerd Nijboer wrote: > For someone coming from a C# background there is some > seemingly simple syntactic sugar missing

Re: import std.traits. std.string;

2018-06-15 Thread H. S. Teoh via Digitalmars-d
On Sat, Jun 16, 2018 at 12:24:42AM +, DigitalDesigns via Digitalmars-d wrote: > space is ignored! Seems like a bug std . traits . std . string is valid? It's not a bug. The '.' is the member-access operator, and like all other operators, is allowed to be surrounded by spaces. (Even though

Re: D community's view on syntactic sugar

2018-06-15 Thread H. S. Teoh via Digitalmars-d
On Sat, Jun 16, 2018 at 12:20:35AM +, Seb via Digitalmars-d wrote: > On Friday, 15 June 2018 at 23:04:40 UTC, Sjoerd Nijboer wrote: > > For someone coming from a C# background there is some seemingly simple > > syntactic sugar missing from D. > > > > * The null conditional operator `?.` > >

Re: D community's view on syntactic sugar

2018-06-15 Thread Seb via Digitalmars-d
On Friday, 15 June 2018 at 23:04:40 UTC, Sjoerd Nijboer wrote: For someone coming from a C# background there is some seemingly simple syntactic sugar missing from D. * The null conditional operator `?.` e.g. SafeAccess

Compiler segfaults if not compiling with -debug #dbugfix

2018-06-15 Thread Anonymouse via Digitalmars-d
I'd like to bring #dbugfix attention to issue 18026: Stack overflow in ddmd/dtemplate.d:6241, TemplateInstance::needsCodegen()[0]. Put simply, I can only compile my code with -debug. Without it, dmd and ldc segfault on all of Linux, Windows and OSX. The smallest I can dustmite it to is to

import std.traits. std.string;

2018-06-15 Thread DigitalDesigns via Digitalmars-d
space is ignored! Seems like a bug std . traits . std . string is valid?

[Issue 18026] Stack overflow in ddmd/dtemplate.d:6241, TemplateInstance::needsCodegen()

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18026 --- Comment #11 from JR --- (In reply to ag0aep6g from comment #10) > Fails a bit less reliably, but still 7 out of 10 times. I can't reproduce your snippet, which confirms that it's inconsistent on different setups on different machines. Updated

Re: D community's view on syntactic sugar

2018-06-15 Thread DigitalDesigns via Digitalmars-d
On Friday, 15 June 2018 at 23:04:40 UTC, Sjoerd Nijboer wrote: For someone coming from a C# background there is some seemingly simple syntactic sugar missing from D. * The null conditional operator `?.` * Something like a `yield return` statement for coroutines. T* he `async` & `await` keyword

D community's view on syntactic sugar

2018-06-15 Thread Sjoerd Nijboer via Digitalmars-d
For someone coming from a C# background there is some seemingly simple syntactic sugar missing from D. * The null conditional operator `?.` * Something like a `yield return` statement for coroutines. T* he `async` & `await` keyword from C# make proactor pattern async code extremely easy to

Wouldn't it be far fetch for finalize to be allowed to call only attrubutes in certain context?

2018-06-15 Thread 12345swordy via Digitalmars-d
Example: @nogc void stuff() { A.destroy(); //Call destructors that is marked with @nogc due to being in context } Granted there is a risk of not calling all the destructors, but I think that responsibility lies on the programmer when designing the class.

[Issue 18995] std.array.array doesn't free elements

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18995 Steven Schveighoffer changed: What|Removed |Added Keywords||pull --- Comment #2 from Steven

[Issue 18982] Source files are invisible in the project explorer when creating a new project

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18982 --- Comment #4 from Manu --- I can confirm that configuration DID work for me. x86 + DMD worked. I'm surprised the VS project wizard still unconditionally emits an x86 project. Does anyone build x86 anymore?! O_o I guess you could remove that

Re: What is the point of nothrow?

2018-06-15 Thread jmh530 via Digitalmars-d-learn
On Friday, 15 June 2018 at 17:29:39 UTC, bauss wrote: [snip] There is a reason that I have not gotten rid of this: http://diamondmvc.org/docs/logging/#database-logging It just _works_ most of the time and really helpful when you do not have access to the server and/or the standard

[Issue 18995] std.array.array doesn't free elements

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18995 Steven Schveighoffer changed: What|Removed |Added CC||schvei...@yahoo.com

[Issue 18995] std.array.array doesn't free elements

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18995 Steven Schveighoffer changed: What|Removed |Added Hardware|x86 |All OS|Mac OS X

Re: What is the point of nothrow?

2018-06-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/15/18 1:27 PM, bauss wrote: On Friday, 15 June 2018 at 17:25:18 UTC, wjoe wrote: On Thursday, 14 June 2018 at 22:27:42 UTC, bauss wrote: On Thursday, 14 June 2018 at 19:06:07 UTC, Jonathan M Davis wrote: So in case of a thrown Error, you can catch it and log it to a database. No, you

Re: What is the point of nothrow?

2018-06-15 Thread wjoe via Digitalmars-d-learn
On Friday, 15 June 2018 at 17:27:13 UTC, bauss wrote: On Friday, 15 June 2018 at 17:25:18 UTC, wjoe wrote: On Thursday, 14 June 2018 at 22:27:42 UTC, bauss wrote: On Thursday, 14 June 2018 at 19:06:07 UTC, Jonathan M Davis wrote: So in case of a thrown Error, you can catch it and log it to a

[Issue 18982] Source files are invisible in the project explorer when creating a new project

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18982 --- Comment #3 from Rainer Schuetze --- So it only works if there is a "Debug|Win32" configuration? --

Re: What is the point of nothrow?

2018-06-15 Thread wjoe via Digitalmars-d-learn
On Friday, 15 June 2018 at 08:13:44 UTC, Kagamin wrote: On Wednesday, 13 June 2018 at 17:08:26 UTC, wjoe wrote: My question was more like what's the benefit of having thrown Errors corrupt your program state rendering it useless for debugging ? D allows various levels of performance and

[Issue 18982] Source files are invisible in the project explorer when creating a new project

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18982 --- Comment #2 from Manu --- I just created one with only x64 DMD and it happened. There is a config called "Debug". --

[Issue 18982] Source files are invisible in the project explorer when creating a new project

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18982 Rainer Schuetze changed: What|Removed |Added CC||r.sagita...@gmx.de --- Comment #1 from

Re: What is the point of nothrow?

2018-06-15 Thread bauss via Digitalmars-d-learn
On Friday, 15 June 2018 at 17:25:18 UTC, wjoe wrote: On Thursday, 14 June 2018 at 22:27:42 UTC, bauss wrote: On Thursday, 14 June 2018 at 19:06:07 UTC, Jonathan M Davis wrote: So in case of a thrown Error, you can catch it and log it to a database. No, you can't. Once the Error was thrown

Re: struct dtor never called, what's wrong?

2018-06-15 Thread Andrea Fontana via Digitalmars-d
On Friday, 15 June 2018 at 15:49:01 UTC, Steven Schveighoffer wrote: Can you file a bug or search for one on this? I will see if I can fix it. -Steve https://issues.dlang.org/show_bug.cgi?id=18995

Re: What is the point of nothrow?

2018-06-15 Thread bauss via Digitalmars-d-learn
On Friday, 15 June 2018 at 17:27:13 UTC, bauss wrote: On Friday, 15 June 2018 at 17:25:18 UTC, wjoe wrote: On Thursday, 14 June 2018 at 22:27:42 UTC, bauss wrote: On Thursday, 14 June 2018 at 19:06:07 UTC, Jonathan M Davis wrote: So in case of a thrown Error, you can catch it and log it to a

Re: What is the point of nothrow?

2018-06-15 Thread wjoe via Digitalmars-d-learn
On Thursday, 14 June 2018 at 22:27:42 UTC, bauss wrote: On Thursday, 14 June 2018 at 19:06:07 UTC, Jonathan M Davis wrote: So in case of a thrown Error, you can catch it and log it to a database. No, you can't. Once the Error was thrown the program is in invalid state and you can't assume

[Issue 18995] New: std.array.array doesn't free elements

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18995 Issue ID: 18995 Summary: std.array.array doesn't free elements Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW Severity: enhancement

Re: comparing nullables

2018-06-15 Thread Alex via Digitalmars-d-learn
On Friday, 15 June 2018 at 16:49:47 UTC, bauss wrote: https://github.com/dlang/phobos/pull/6583 Thanks a lot.

[Issue 18994] New: Use noncopyable variable in foreach loop without ref results in error message without line number

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18994 Issue ID: 18994 Summary: Use noncopyable variable in foreach loop without ref results in error message without line number Product: D Version: D2 Hardware: x86_64

Re: comparing nullables

2018-06-15 Thread bauss via Digitalmars-d-learn
On Friday, 15 June 2018 at 15:00:38 UTC, Alex wrote: Hi all, do you see any valid reason why the last line yields an error: import std.typecons; void main() { void* ptr1; void* ptr2; assert(ptr1 is null); assert(ptr2 is null); assert(ptr1 == ptr2);

Re: Aalborg D meetup

2018-06-15 Thread bauss via Digitalmars-d-announce
On Friday, 15 June 2018 at 08:45:29 UTC, Bienlein wrote: On Friday, 15 June 2018 at 07:34:07 UTC, biocyberman wrote: On Friday, 15 June 2018 at 07:20:04 UTC, Bienlein wrote: On Wednesday, 13 June 2018 at 12:37:26 UTC, bauss wrote: On Wednesday, 13 June 2018 at 12:12:11 UTC, bauss wrote: I'll

Re: struct dtor never called, what's wrong?

2018-06-15 Thread Steven Schveighoffer via Digitalmars-d
On 6/15/18 11:18 AM, Andrea Fontana wrote: On Friday, 15 June 2018 at 15:10:54 UTC, Steven Schveighoffer wrote: I tried using -vcg-ast, and see an interesting lowering: for (; !__r115.empty(); __r115.popFront()) {     ref A r = __r115.front(); ... Also for std.array:array? I don't get

Re: struct dtor never called, what's wrong?

2018-06-15 Thread Andrea Fontana via Digitalmars-d
On Friday, 15 June 2018 at 15:10:54 UTC, Steven Schveighoffer wrote: I tried using -vcg-ast, and see an interesting lowering: for (; !__r115.empty(); __r115.popFront()) { ref A r = __r115.front(); ... Also for std.array:array? I don't get where it is using foreach with refs. Can be this

Re: struct dtor never called, what's wrong?

2018-06-15 Thread Steven Schveighoffer via Digitalmars-d
On 6/15/18 10:51 AM, ketmar wrote: Andrea Fontana wrote: I hope I'm wrong. Maybe I'm missing something. Anyone can help? you are not wrong, this is bug in DMDFE. Yep. I tried using -vcg-ast, and see an interesting lowering: for (; !__r115.empty(); __r115.popFront()) { ref A r =

Re: Implementing a tree with recursive Algebraic

2018-06-15 Thread Kamil Koczurek via Digitalmars-d-learn
On Friday, 15 June 2018 at 14:57:33 UTC, Adam D. Ruppe wrote: You can make the tree store a *pointer* to a tree though. That's the traditional way to do it and it works here too. Oh, alright. I changed Tree to be a class instead of a struct and it seems to work just fine now. Thanks a lot!

comparing nullables

2018-06-15 Thread Alex via Digitalmars-d-learn
Hi all, do you see any valid reason why the last line yields an error: import std.typecons; void main() { void* ptr1; void* ptr2; assert(ptr1 is null); assert(ptr2 is null); assert(ptr1 == ptr2); Nullable!uint val1; Nullable!uint val2;

Re: Implementing a tree with recursive Algebraic

2018-06-15 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 15 June 2018 at 14:53:13 UTC, Kamil Koczurek wrote: Can I somehow fix this, or is my approach inherently flawed? A tree there would be storing a copy of a tree which is storing a copy of a tree... where would it end? You can make the tree store a *pointer* to a tree though.

[Issue 18374] Add range functions to Nullable

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18374 Alex changed: What|Removed |Added CC||sascha.or...@gmail.com --

Implementing a tree with recursive Algebraic

2018-06-15 Thread Kamil Koczurek via Digitalmars-d-learn
Hi, I'm trying to implement a simple tree and this 3-liner was my initial idea: struct Tree(T) { Algebraic!(Tree, T)[] content; } But it doesn't work and I get the following error message: /.../variant.d(...): Error: struct `app.Tree` no size because of forward reference

Re: IOS support status

2018-06-15 Thread Joakim via Digitalmars-d
On Friday, 15 June 2018 at 13:18:25 UTC, makedgreatagain wrote: On Friday, 15 June 2018 at 11:30:40 UTC, Joakim wrote: On Friday, 15 June 2018 at 11:25:11 UTC, makedgreatagain wrote: On Friday, 15 June 2018 at 05:42:48 UTC, Joakim wrote: Cmake build recent LLVM is ok, but not the ios llvm for

[Issue 18682] std.typecons.Nullable has opEquals but no toHash

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18682 Alex changed: What|Removed |Added CC||sascha.or...@gmail.com --

Re: struct dtor never called, what's wrong?

2018-06-15 Thread ketmar via Digitalmars-d
Andrea Fontana wrote: I hope I'm wrong. Maybe I'm missing something. Anyone can help? you are not wrong, this is bug in DMDFE.

[Issue 17615] Deprecate using reference types for Nullable

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17615 Alex changed: What|Removed |Added CC||sascha.or...@gmail.com --

Re: Encouraging preliminary results implementing memcpy in D

2018-06-15 Thread Arafel via Digitalmars-d-announce
Well, e-mail was never meant to be reliable or secure... BTW, there are already solutions to prevent impersonation: sign the messages with either PGP or S/MIME... the former is more decentralised, and the later usually comes together with stronger verifications, like personal identification of

struct dtor never called, what's wrong?

2018-06-15 Thread Andrea Fontana via Digitalmars-d
Maybe it's just a big blunder, but I think there's something wrong in phobos. All started a couple of days ago, when I was investigating on some not-freed resource on my code. It turns out that on "each" function inside phobos it is used a "ref foreach". Something like: foreach(ref

Re: Why std.array : array needs pure postblit?

2018-06-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/15/18 7:56 AM, Andrea Fontana wrote: On Friday, 15 June 2018 at 11:48:59 UTC, Andrea Fontana wrote: On Friday, 15 June 2018 at 11:25:49 UTC, Basile B. wrote: Hello, i've tested locally and it can works by making `Appender.reserve()` and `Appender.ensureAddable()` function templates.

Re: install.sh gives Invalid signature error

2018-06-15 Thread Seb via Digitalmars-d
On Friday, 15 June 2018 at 12:02:57 UTC, Arjan wrote: Trying to execute the install.sh on a centos7.5 system gives an error: Invalid signature http://downloads.dlang.org/releases/2.x/2.080.1/dmd.2.080.1.linux.tar.xz.sig For each version I tried. Whats wrong? Maybe you have an outdated

[Issue 18993] toLower is broken for UTF chars

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18993 Basile B. changed: What|Removed |Added CC||b2.t...@gmx.com --- Comment #2 from Basile B.

Re: toLower is totally broken in 2.080

2018-06-15 Thread Basile B. via Digitalmars-d
On Friday, 15 June 2018 at 13:34:32 UTC, Temtaime wrote: On Friday, 15 June 2018 at 13:30:53 UTC, Basile B. wrote: On Friday, 15 June 2018 at 12:17:03 UTC, Temtaime wrote: https://issues.dlang.org/show_bug.cgi?id=18993 Please, maybe someone fix and backport it to stable Works for me w/ 2.081

Re: toLower is totally broken in 2.080

2018-06-15 Thread Basile B. via Digitalmars-d
On Friday, 15 June 2018 at 13:30:53 UTC, Basile B. wrote: On Friday, 15 June 2018 at 12:17:03 UTC, Temtaime wrote: https://issues.dlang.org/show_bug.cgi?id=18993 Please, maybe someone fix and backport it to stable Works for me w/ 2.081 but fails with dmd ~master. whoops phobos ~master i

Re: toLower is totally broken in 2.080

2018-06-15 Thread Basile B. via Digitalmars-d
On Friday, 15 June 2018 at 12:17:03 UTC, Temtaime wrote: https://issues.dlang.org/show_bug.cgi?id=18993 Please, maybe someone fix and backport it to stable Works for me w/ 2.081 but fails with dmd ~master.

Re: toLower is totally broken in 2.080

2018-06-15 Thread Temtaime via Digitalmars-d
On Friday, 15 June 2018 at 13:30:53 UTC, Basile B. wrote: On Friday, 15 June 2018 at 12:17:03 UTC, Temtaime wrote: https://issues.dlang.org/show_bug.cgi?id=18993 Please, maybe someone fix and backport it to stable Works for me w/ 2.081 but fails with dmd ~master. Maybe i mixed up versions,

Re: IOS support status

2018-06-15 Thread makedgreatagain via Digitalmars-d
On Friday, 15 June 2018 at 11:30:40 UTC, Joakim wrote: On Friday, 15 June 2018 at 11:25:11 UTC, makedgreatagain wrote: On Friday, 15 June 2018 at 05:42:48 UTC, Joakim wrote: Cmake build recent LLVM is ok, but not the ios llvm for d, report same error. You're using his llvm 3.6.2 branch with

[Issue 18985] bad error message for += operation on shared Object

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18985 --- Comment #5 from RazvanN --- PR: https://github.com/dlang/dmd/pull/8360 --

[Issue 13300] pure function 'std.array.Appender!(T[]).Appender.ensureAddable' cannot call impure function 'test.T.__fieldPostBlit'

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13300 Andrea Fontana changed: What|Removed |Added Status|RESOLVED|REOPENED CC|

toLower is totally broken in 2.080

2018-06-15 Thread Temtaime via Digitalmars-d
https://issues.dlang.org/show_bug.cgi?id=18993 Please, maybe someone fix and backport it to stable

[Issue 18993] toLower is broken for UTF chars

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18993 --- Comment #1 from Temtaime --- It converts UTF chars into something totally wrong so they break down --

[Issue 18993] New: toLower is broken for UTF chars

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18993 Issue ID: 18993 Summary: toLower is broken for UTF chars Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: regression Priority: P1

install.sh gives Invalid signature error

2018-06-15 Thread Arjan via Digitalmars-d
Trying to execute the install.sh on a centos7.5 system gives an error: Invalid signature http://downloads.dlang.org/releases/2.x/2.080.1/dmd.2.080.1.linux.tar.xz.sig For each version I tried. Whats wrong?

[Issue 18985] bad error message for += operation on shared Object

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18985 RazvanN changed: What|Removed |Added CC||razvan.nitu1...@gmail.com --- Comment #4 from

Re: Create an Algebraic type at compile time and more

2018-06-15 Thread Simen Kjærås via Digitalmars-d-learn
On Friday, 15 June 2018 at 10:53:35 UTC, uknys wrote: On Friday, 15 June 2018 at 07:27:22 UTC, Simen Kjærås wrote: [snip] Yeah I saw that Algebraic doesn't work at compile time, then I thought of using an Interface with one function (execute()) and making Hello and Toto as classes

Re: Why std.array : array needs pure postblit?

2018-06-15 Thread Andrea Fontana via Digitalmars-d-learn
On Friday, 15 June 2018 at 11:48:59 UTC, Andrea Fontana wrote: On Friday, 15 June 2018 at 11:25:49 UTC, Basile B. wrote: Hello, i've tested locally and it can works by making `Appender.reserve()` and `Appender.ensureAddable()` function templates. That was my idea too. But I wonder if

Re: Docs for subpackages?

2018-06-15 Thread Guillaume Piolat via Digitalmars-d-learn
On Thursday, 14 June 2018 at 04:39:16 UTC, 9il wrote: On Wednesday, 13 June 2018 at 14:56:10 UTC, 9il wrote: Hi, I am trying to build a large project that is split into dozen of sub-packages. How I can do it using dub without writing my own doc scripts? --combined does not help here. Best

Re: Why std.array : array needs pure postblit?

2018-06-15 Thread Andrea Fontana via Digitalmars-d-learn
On Friday, 15 June 2018 at 11:25:49 UTC, Basile B. wrote: Hello, i've tested locally and it can works by making `Appender.reserve()` and `Appender.ensureAddable()` function templates. That was my idea too. But I wonder if pureness of reserve and ensureAddable have a particular reason.

[Issue 18992] New: Appender doesn't work with structs that have impure postblit

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18992 Issue ID: 18992 Summary: Appender doesn't work with structs that have impure postblit Product: D Version: D2 Hardware: All OS: All Status: NEW

[Issue 17602] improve message for deprecated enum comparison

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17602 --- Comment #2 from Mario Kroeplin --- It is no longer a deprecation warning but an error message. The error message, however, is still misleading: --- module a; enum Status { on } --- module b; import a; enum Status { off } void main() {

Re: IOS support status

2018-06-15 Thread Joakim via Digitalmars-d
On Friday, 15 June 2018 at 11:25:11 UTC, makedgreatagain wrote: On Friday, 15 June 2018 at 05:42:48 UTC, Joakim wrote: On Friday, 15 June 2018 at 05:35:02 UTC, makedgreatagain wrote: On Friday, 15 June 2018 at 05:26:57 UTC, makedgreatagain wrote: [...] I use git apply --reject

Re: IOS support status

2018-06-15 Thread makedgreatagain via Digitalmars-d
On Friday, 15 June 2018 at 05:42:48 UTC, Joakim wrote: On Friday, 15 June 2018 at 05:35:02 UTC, makedgreatagain wrote: On Friday, 15 June 2018 at 05:26:57 UTC, makedgreatagain wrote: [...] I use git apply --reject --whitespace=fix to patch and it working now. [...] Not sure about llvm,

Re: Why std.array : array needs pure postblit?

2018-06-15 Thread Basile B. via Digitalmars-d-learn
On Friday, 15 June 2018 at 11:24:42 UTC, Basile B. wrote: On Friday, 15 June 2018 at 11:15:03 UTC, Andrea Fontana wrote: Check this code: https://run.dlang.io/is/PoluHI It won't work, because array appender requires a pure postblit. Why? Can we remove this limitation? Andrea Hello, i've

Re: Why std.array : array needs pure postblit?

2018-06-15 Thread Basile B. via Digitalmars-d-learn
On Friday, 15 June 2018 at 11:15:03 UTC, Andrea Fontana wrote: Check this code: https://run.dlang.io/is/PoluHI It won't work, because array appender requires a pure postblit. Why? Can we remove this limitation? Andrea Hello, i've tested locally and it can works by making

Why std.array : array needs pure postblit?

2018-06-15 Thread Andrea Fontana via Digitalmars-d-learn
Check this code: https://run.dlang.io/is/PoluHI It won't work, because array appender requires a pure postblit. Why? Can we remove this limitation? Andrea

[Issue 18990] Failing class instantiations ignored in UDAs

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18990 RazvanN changed: What|Removed |Added CC||razvan.nitu1...@gmail.com --- Comment #1 from

[Issue 18990] Failing class instantiations ignored in UDAs

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18990 Simen Kjaeraas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: Create an Algebraic type at compile time and more

2018-06-15 Thread uknys via Digitalmars-d-learn
On Friday, 15 June 2018 at 07:27:22 UTC, Simen Kjærås wrote: On Thursday, 14 June 2018 at 19:15:38 UTC, uknys wrote: [...] First off - Algebraic doesn't work at compile-time[0]: // Error: memcpy cannot be interpreted at compile time, because it has no available source code enum a =

[Issue 5212] no escape analysis for typesafe variadic function arguments

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5212 --- Comment #23 from Artem Borisovskiy --- And yes, I was able to compile the code with -dip1000 --

[Issue 5212] no escape analysis for typesafe variadic function arguments

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5212 Artem Borisovskiy changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED

Re: Encouraging preliminary results implementing memcpy in D

2018-06-15 Thread Patrick Schluter via Digitalmars-d-announce
On Friday, 15 June 2018 at 00:15:35 UTC, Mike Franklin wrote: On Thursday, 14 June 2018 at 20:35:23 UTC, baz wrote: [...] Correct! D already has features like `a[] = b[]` so there is no reason to call `memcpy` directly; that is a job for the druntime. `memcpyD` is intended to be an

Re: Aalborg D meetup

2018-06-15 Thread Bienlein via Digitalmars-d-announce
On Friday, 15 June 2018 at 07:34:07 UTC, biocyberman wrote: On Friday, 15 June 2018 at 07:20:04 UTC, Bienlein wrote: On Wednesday, 13 June 2018 at 12:37:26 UTC, bauss wrote: On Wednesday, 13 June 2018 at 12:12:11 UTC, bauss wrote: I'll be there since I live there and would be nice to see

[Issue 18991] New: Invalid code in std.iteration.each

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18991 Issue ID: 18991 Summary: Invalid code in std.iteration.each Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority:

Re: What is the point of nothrow?

2018-06-15 Thread Kagamin via Digitalmars-d-learn
On Wednesday, 13 June 2018 at 17:08:26 UTC, wjoe wrote: My question was more like what's the benefit of having thrown Errors corrupt your program state rendering it useless for debugging ? D allows various levels of performance and safety. Though I'd say Errors not working in debug mode is

Re: Dioinformatic Challenges: Implement Needleman-Wunsch and Smith-Waterman algorithms

2018-06-15 Thread biocyberman via Digitalmars-d-announce
On Friday, 8 June 2018 at 22:41:47 UTC, Luís Marques wrote: On Tuesday, 8 May 2018 at 22:28:22 UTC, biocyberman wrote: A new deadline is also applied: 23:00 GMT+2, Saturday, 9 June 2018. That means we have about a month. Do your timing well and solve the challenges well :) I had planned to

[Issue 18990] New: Failing class instantiations ignored in UDAs

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18990 Issue ID: 18990 Summary: Failing class instantiations ignored in UDAs Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: normal

Re: Aalborg D meetup

2018-06-15 Thread biocyberman via Digitalmars-d-announce
On Friday, 15 June 2018 at 07:20:04 UTC, Bienlein wrote: On Wednesday, 13 June 2018 at 12:37:26 UTC, bauss wrote: On Wednesday, 13 June 2018 at 12:12:11 UTC, bauss wrote: I'll be there since I live there and would be nice to see monthly meetups! :) I forgot to ask. Is it free entry? :)

Re: Would be nice if compiler gave more information!

2018-06-15 Thread DigitalDesigns via Digitalmars-d
On Friday, 15 June 2018 at 04:19:28 UTC, Vladimir Panteleev wrote: On Friday, 15 June 2018 at 03:54:34 UTC, DigitalDesigns wrote: So, it should be very important to have some type of info that connects the error to what the compiler was doing. With large problems it is not easy to reduce to a

Re: Aalborg D meetup

2018-06-15 Thread biocyberman via Digitalmars-d-announce
On Wednesday, 13 June 2018 at 12:37:26 UTC, bauss wrote: On Wednesday, 13 June 2018 at 12:12:11 UTC, bauss wrote: I'll be there since I live there and would be nice to see monthly meetups! :) I forgot to ask. Is it free entry? :) Yes, it is free entry.

Re: Create an Algebraic type at compile time and more

2018-06-15 Thread Simen Kjærås via Digitalmars-d-learn
On Thursday, 14 June 2018 at 19:15:38 UTC, uknys wrote: Hello, I wanted to know if such code was possible : alias Operation = Algebraic!(/* All type that implements X UDA */) struct X { int opcode; Operation h; } @X(0x01, Hello(3)) @X(0x02, Hello(4)) struct Hello { int Hello; }

Re: Aalborg D meetup

2018-06-15 Thread Bienlein via Digitalmars-d-announce
On Wednesday, 13 June 2018 at 12:37:26 UTC, bauss wrote: On Wednesday, 13 June 2018 at 12:12:11 UTC, bauss wrote: I'll be there since I live there and would be nice to see monthly meetups! :) I forgot to ask. Is it free entry? :) Yeah, and the Aalborg Akvavit is also free ? ;-)

[Issue 18953] Win32: extern(C++) struct destructor not called correctly through runtime

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18953 --- Comment #4 from Rainer Schuetze --- I added a test for this in some iteration, but it seemed it failed/crashed on Linux, so I removed it immediately to not complicate the PR. I'll open a new PR with a test case... --

[Issue 18953] Win32: extern(C++) struct destructor not called correctly through runtime

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18953 Manu changed: What|Removed |Added Keywords||C++, industry --

[Issue 18953] Win32: extern(C++) struct destructor not called correctly through runtime

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18953 --- Comment #3 from Manu --- Was this fixed by your last merged patch? --

[Issue 18983] DCompiler option seems to have disappeared from project settings

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18983 --- Comment #2 from Manu --- I haven't installed anything else, and certainly VisualD was the most recent thing I've installed... and I'm often reinstalling VisualD (because i've been testing all the pre-releases). --

[Issue 18984] Debugging stack struct's which are returned causes incorrect debuginfo.

2018-06-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18984 Manu changed: What|Removed |Added Keywords||symdeb --

  1   2   >