[Issue 17613] New: Inconsistent behaviour in code coverage

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17613 Issue ID: 17613 Summary: Inconsistent behaviour in code coverage Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal

Panda Antivirus puts the latest dmd installer in quarantine

2017-07-06 Thread Ecstatic Coder via Digitalmars-d-learn
But no problem with any file stored inside the current .7z archive file. So I guess the problem comes from the installer executable itself. Please try to fix this as soon as possible, as this immediately drives people away from D before they even got a chance to install it...

[Issue 4923] immutable module variables are modifiable in non-shared module constructors

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4923 Steven Schveighoffer changed: What|Removed |Added Keywords|pull|

[Issue 17369] [Module std.traits] Documentation lists ditto in table

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

Re: auto*

2017-07-06 Thread FoxyBrown via Digitalmars-d
On Thursday, 6 July 2017 at 18:11:13 UTC, H. S. Teoh wrote: On Thu, Jul 06, 2017 at 06:10:57PM +, FoxyBrown via Digitalmars-d wrote: Create an auto pointer, handy in some cases and fits in the language as a natural generalization. What's an auto pointer? T is it not obvious? auto x =

Strange -cov bug

2017-07-06 Thread H. S. Teoh via Digitalmars-d
Recently I discovered a strange bug in dmd -cov, that I finally got some time today to reduce to a smallish test case. However, I can't seem to get rid of the dependency on std.stdio; anybody has any idea how to reduce this code further? https://issues.dlang.org/show_bug.cgi?id=17613

Re: Webassembly?

2017-07-06 Thread Wulfklaue via Digitalmars-d
On Thursday, 6 July 2017 at 17:19:34 UTC, bauss wrote: I'm just curious how it doesn't support GC? Like if you can allocate and free memory then you can have a GC. Currently there is no native GC build into WebAssembly. This is planned for the future. If your language is designed around

auto*

2017-07-06 Thread FoxyBrown via Digitalmars-d
Create an auto pointer, handy in some cases and fits in the language as a natural generalization.

[Issue 8472] Replace walkLength() with an improved count()

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8472 --- Comment #2 from Andrei Alexandrescu --- thx! --

Re: Experience with https://www.patreon.com

2017-07-06 Thread Brad Anderson via Digitalmars-d
On Thursday, 6 July 2017 at 16:00:05 UTC, Jack Stouffer wrote: On Thursday, 6 July 2017 at 13:53:08 UTC, Andrei Alexandrescu wrote: Does anyone have experience with https://www.patreon.com either as a patron or creator? Thanks! -- Andrei It works well for supporting artists. I support many

Re: Compilation times and idiomatic D code

2017-07-06 Thread John Colvin via Digitalmars-d
On Wednesday, 5 July 2017 at 20:32:08 UTC, Stefan Koch wrote: On Wednesday, 5 July 2017 at 20:12:40 UTC, H. S. Teoh wrote: I vaguely remember there was talk about compressing symbols when they get too long... is there any hope of seeing this realized in the near future? Yes there is.

Re: Need simple sound

2017-07-06 Thread FoxyBrown via Digitalmars-d-learn
On Thursday, 6 July 2017 at 14:41:32 UTC, Sebastiaan Koppe wrote: On Thursday, 6 July 2017 at 13:28:26 UTC, FoxyBrown wrote: On Wednesday, 5 July 2017 at 07:21:45 UTC, Sebastiaan Koppe wrote: Sure, see http://code.dlang.org/packages/portaudio So, after a bit of work I can get port audio to

Re: Strange -cov bug

2017-07-06 Thread Ali Çehreli via Digitalmars-d
On 07/06/2017 10:58 AM, H. S. Teoh via Digitalmars-d wrote: Recently I discovered a strange bug in dmd -cov, that I finally got some time today to reduce to a smallish test case. However, I can't seem to get rid of the dependency on std.stdio; anybody has any idea how to reduce this code

[Issue 17540] std.net.curl: HTTP no possibillity to set CURLOPT_NOPROXY

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17540 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/e40a35675a89ec9346ba90cf973a423ff8e5d973 Fix Issue 17540 - std.net.curl: HTTP no possibillity to

Re: Undefined symbol for, apparently, valid code?

2017-07-06 Thread unleashy via Digitalmars-d-learn
On Thursday, 6 July 2017 at 16:16:17 UTC, H. S. Teoh wrote: Which version of the compiler are you using? I just tested on the latest dmd git HEAD, and it (correctly) tells me that it's illegal to override a non-virtual function. I'm surprised you got your code to compile at all. `dmd

[Issue 4923] immutable module variables are modifiable in non-shared module constructors

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4923 --- Comment #7 from Steven Schveighoffer --- *** Issue 6114 has been marked as a duplicate of this issue. *** --

[Issue 6114] immutable class variable not properly initialized when the constructor initializing it is non-shared

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6114 Steven Schveighoffer changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 8472] Replace walkLength() with an improved count()

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8472 RazvanN changed: What|Removed |Added Status|NEW |RESOLVED

Re: Panda Antivirus puts the latest dmd installer in quarantine

2017-07-06 Thread bauss via Digitalmars-d-learn
On Thursday, 6 July 2017 at 18:33:35 UTC, Ecstatic Coder wrote: But no problem with any file stored inside the current .7z archive file. So I guess the problem comes from the installer executable itself. Please try to fix this as soon as possible, as this immediately drives people away

Re: gdc is in

2017-07-06 Thread Marco Leise via Digitalmars-d
Am Wed, 21 Jun 2017 15:11:39 + schrieb Joakim : > the gcc tree: > > https://gcc.gnu.org/ml/gcc/2017-06/msg00111.html > > Congratulations to Iain and the gdc team. :) > > I found out because it's on the front page of HN right now, where > commenters are asking

Re: DCD 0.9.0 released

2017-07-06 Thread bauss via Digitalmars-d-announce
On Monday, 3 July 2017 at 08:30:52 UTC, Basile@dlang-community wrote: I'm glad to announce that the dlang-community has released DCD 0.9.0[1] [...] Is there a way to set this up with atom?

Re: [BEGINNER] reccurence! and sequence!

2017-07-06 Thread ag0aep6g via Digitalmars-d-learn
On 07/06/2017 02:21 AM, Ali Çehreli wrote: On 07/05/2017 04:38 PM, helxi wrote: [...] >> recurrence!((a, n) => a[0] + 1)(1).take(10).writeln; > 1. In the last example of reccurence, what does n in (a,n) refer to? n is "the index of the current value". Each time the lambda is called,

[Issue 17608] [REG2.075.0-b2] No [] operator overload for type object.TypeInfo_Class

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17608 ZombineDev changed: What|Removed |Added CC|

Re: auto*

2017-07-06 Thread H. S. Teoh via Digitalmars-d
On Thu, Jul 06, 2017 at 06:10:57PM +, FoxyBrown via Digitalmars-d wrote: > Create an auto pointer, handy in some cases and fits in the language > as a natural generalization. What's an auto pointer? T -- Truth, Sir, is a cow which will give [skeptics] no more milk, and so they are gone

Re: Undefined symbol for, apparently, valid code?

2017-07-06 Thread H. S. Teoh via Digitalmars-d-learn
On Thu, Jul 06, 2017 at 06:49:51PM +, unleashy via Digitalmars-d-learn wrote: > On Thursday, 6 July 2017 at 16:16:17 UTC, H. S. Teoh wrote: > > Which version of the compiler are you using? I just tested on the > > latest dmd git HEAD, and it (correctly) tells me that it's illegal > > to

[Issue 17369] [Module std.traits] Documentation lists ditto in table

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17369 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/43eadc38e3e31258470b53237db4176876ad54c5 Fix Issue 17369 - [Module std.traits] Documentation

Re: auto*

2017-07-06 Thread Ali Çehreli via Digitalmars-d
On 07/06/2017 01:24 PM, FoxyBrown wrote: > On Thursday, 6 July 2017 at 18:11:13 UTC, H. S. Teoh wrote: >> On Thu, Jul 06, 2017 at 06:10:57PM +, FoxyBrown via Digitalmars-d >> wrote: >>> Create an auto pointer, handy in some cases and fits in the language >>> as a natural generalization. >> >>

Re: Experience with https://www.patreon.com

2017-07-06 Thread Brad Roberts via Digitalmars-d
On 7/6/17 6:53 AM, Andrei Alexandrescu via Digitalmars-d wrote: Does anyone have experience with https://www.patreon.com either as a patron or creator? Thanks! -- Andrei I have experience as both. Feel free to grab me off-list to talk in more detail.

Re: GtkD nothing

2017-07-06 Thread Marco Leise via Digitalmars-d-learn
Am Thu, 06 Jul 2017 03:49:04 + schrieb FoxyBrown : > Unfortunately, importing that module seems to throw an error for > some insane reason. > > Error 42: Symbol Undefined _D3gtk6All12__ModuleInfoZ > (gtk.AllGTK.__ModuleInfo) > > without importing it in to the project(but

Re: auto*

2017-07-06 Thread H. S. Teoh via Digitalmars-d
On Thu, Jul 06, 2017 at 08:24:24PM +, FoxyBrown via Digitalmars-d wrote: [...] > auto x = ... > > auto* x = ... > > auto* is the pointerized version of auto. > > > e.g., > > int x = ... > > int* x = ... > > typeof(x) y = ... > typeof(x)* y = ... > > > obviously the rhs must be

Re: Panda Antivirus puts the latest dmd installer in quarantine

2017-07-06 Thread Ecstatic Coder via Digitalmars-d-learn
VirusTotal analysis : https://www.virustotal.com/fr/file/d12e9521ab0ad6a9c0babadeb789692b625fa3535ff406f27a7f47a096430a99/analysis/ The following malware signatures were detected a few hours ago : Baidu Win32.Trojan.WisdomEyes.16070401.9500.9674 20170706 CAT-QuickHeal Trojan.Generic 20170

Re: Webassembly?

2017-07-06 Thread kinke via Digitalmars-d
On Thursday, 6 July 2017 at 18:26:18 UTC, Joakim wrote: On Thursday, 6 July 2017 at 17:19:34 UTC, bauss wrote: On Thursday, 6 July 2017 at 15:34:08 UTC, Wulfklaue wrote: Is there a future where we can see WebAssembly as part of D? Seeing Rusts backbone already producing wasm is impressive.

Re: Experience with https://www.patreon.com

2017-07-06 Thread Nick B via Digitalmars-d
On Thursday, 6 July 2017 at 13:53:08 UTC, Andrei Alexandrescu wrote: Does anyone have experience with https://www.patreon.com either as a patron or creator? Thanks! -- Andrei I support someone who is a pure intellectual now, and can no longer survive in the university system, with his radical

Re: auto*

2017-07-06 Thread H. S. Teoh via Digitalmars-d
On Thu, Jul 06, 2017 at 09:42:22PM +, Meta via Digitalmars-d wrote: > On Thursday, 6 July 2017 at 18:10:57 UTC, FoxyBrown wrote: > > Create an auto pointer, handy in some cases and fits in the language > > as a natural generalization. > > It's been suggested before (as well as more powerful

Re: Need simple sound

2017-07-06 Thread FoxyBrown via Digitalmars-d-learn
Heres a better version that automatically generates a class wrapping the portaudio.dll. Need portaudio.di(possibly renamed to portaudio.d and imported). Still same problem as original though. import portaudio; import std.conv, std.stdio; import core.stdc.stdio; alias BOOL = ubyte; alias

Re: AutoDLL

2017-07-06 Thread FoxyBrown via Digitalmars-d-learn
Here is a solution that will wrap all extern C functions and allow one to then map them to a dll. auto BuildDLLClassFromCHeader(alias modulename, string name)() { import std.traits, std.algorithm, std.meta; auto s = "extern (C) class " ~name~"\n{\n\timport ___import =

Re: Experience with https://www.patreon.com

2017-07-06 Thread Meta via Digitalmars-d
On Thursday, 6 July 2017 at 16:00:05 UTC, Jack Stouffer wrote: On Thursday, 6 July 2017 at 13:53:08 UTC, Andrei Alexandrescu wrote: Does anyone have experience with https://www.patreon.com either as a patron or creator? Thanks! -- Andrei It works well for supporting artists. I support many

[Issue 16564] KRRegion.empty sometimes returns Ternary.no

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16564 --- Comment #5 from Vladimir Panteleev --- (In reply to Temtaime from comment #4) > ubyte[1024 * 1024] buf; Are you sure that's not just because you have a 1MB static array on the stack? This program, by

Re: auto*

2017-07-06 Thread Meta via Digitalmars-d
On Thursday, 6 July 2017 at 18:10:57 UTC, FoxyBrown wrote: Create an auto pointer, handy in some cases and fits in the language as a natural generalization. It's been suggested before (as well as more powerful generalization for slices and associative arrays), but Andrei vetoed it so it

Re: Check if a variadic argument is numeric?

2017-07-06 Thread Hamborg via Digitalmars-d-learn
On Thursday, 6 July 2017 at 07:11:01 UTC, Ali Çehreli wrote: On 07/05/2017 11:26 PM, Hamborg wrote: I can test for exactly what what the args are with (_arguments[i] == typeid(int)) but if I just want to know if it's numeric and can pull it out as a double what should I do? I don't really want

Foreach loops on static arrays error message

2017-07-06 Thread Guillaume Chatelet via Digitalmars-d
I stumbled upon https://issues.dlang.org/show_bug.cgi?id=12685 In essence: ubyte[256] data; foreach (ubyte i, x; data) {} Error: index type 'ubyte' cannot cover index range 0..256 `ubyte` can clearly hold a value from 0 to 255 so it should be ok. No need for 256 ?! So I decided to fix it

[Issue 17611] New: core.demangle cannot demangle delegates with function attributes

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17611 Issue ID: 17611 Summary: core.demangle cannot demangle delegates with function attributes Product: D Version: D2 Hardware: x86_64 OS: Windows Status:

Check if a variadic argument is numeric?

2017-07-06 Thread Hamborg via Digitalmars-d-learn
I can test for exactly what what the args are with (_arguments[i] == typeid(int)) but if I just want to know if it's numeric and can pull it out as a double what should I do? I don't really want to test for int, uint, byte, float, etc individually.

Re: Remove instance from array

2017-07-06 Thread Andrea Fontana via Digitalmars-d-learn
On Wednesday, 5 July 2017 at 16:17:29 UTC, Jolly James wrote: On Wednesday, 5 July 2017 at 16:04:16 UTC, Jolly James wrote: On Wednesday, 5 July 2017 at 15:56:45 UTC, Igor Shirkalin wrote: [...] Thank you! :) But why a containers so complicated in D? [...] Part of CoreCLR's 'List':

Re: Compile without generating code

2017-07-06 Thread Johannes Pfau via Digitalmars-d
Am Wed, 05 Jul 2017 22:05:53 + schrieb Stefan Koch : > On Wednesday, 5 July 2017 at 21:58:45 UTC, Lewis wrote: > > I was reading > > https://blog.rust-lang.org/2017/07/05/Rust-Roadmap-Update.html, > > which mentioned that the Rust compiler now has a mode to go

Undefined symbol for, apparently, valid code?

2017-07-06 Thread unleashy via Digitalmars-d-learn
Hello. I am trying to compile this: --- module asd.asd; abstract class Asd { void opCall(Args...)(Args args); } @system unittest { class Foo : Asd { override void opCall(Args...)(Args args) { /* nothing */ } } Asd a = new Foo();

Re: Undefined symbol for, apparently, valid code?

2017-07-06 Thread rikki cattermole via Digitalmars-d-learn
On 06/07/2017 7:28 AM, unleashy wrote: Hello. I am trying to compile this: --- module asd.asd; abstract class Asd { void opCall(Args...)(Args args); } @system unittest { class Foo : Asd { override void opCall(Args...)(Args args) { /* nothing */

Vibe.d - very low performance

2017-07-06 Thread Marek via Digitalmars-d
https://www.techempower.com/benchmarks/#section=data-r14=ph=plaintext C++, Java and Go frameworks have very high performance. Vibe.d is supposed to have similar performance, but in fact vibe.d performance is very low. Why?

Re: unittest-cov - results?

2017-07-06 Thread Sebastiaan Koppe via Digitalmars-d-learn
On Wednesday, 5 July 2017 at 19:01:06 UTC, Jonathan M Davis wrote: I ran into a bug in dub not all that long ago where the tests in the module with main in it weren't actually being run even though the other tests were. (which reminds me, I should verify that again and report it). - Jonathan

Re: Check if a variadic argument is numeric?

2017-07-06 Thread Ali Çehreli via Digitalmars-d-learn
On 07/05/2017 11:26 PM, Hamborg wrote: I can test for exactly what what the args are with (_arguments[i] == typeid(int)) but if I just want to know if it's numeric and can pull it out as a double what should I do? I don't really want to test for int, uint, byte, float, etc individually. If it

Re: Check if a variadic argument is numeric?

2017-07-06 Thread Andrea Fontana via Digitalmars-d-learn
On Thursday, 6 July 2017 at 08:22:44 UTC, Hamborg wrote: But how would I check _arguments[i]? When I do (isNumeric!_arguments[i]) I get an error saying: "Error: template instance isNumeric!(_arguments) does not match template declaration isNumeric(T)" or when I do

Re: Foreach loops on static arrays error message

2017-07-06 Thread Stefan Koch via Digitalmars-d
On Thursday, 6 July 2017 at 08:57:42 UTC, Nemanja Boric wrote: On Thursday, 6 July 2017 at 08:49:33 UTC, Stefan Koch wrote: On Thursday, 6 July 2017 at 08:26:42 UTC, Guillaume Chatelet wrote: [...] I'd say this is not often encoutered. One should avoid using a different type then size_t for

Re: Foreach loops on static arrays error message

2017-07-06 Thread Ola Fosheim Grøstad via Digitalmars-d
On Thursday, 6 July 2017 at 09:11:44 UTC, Ola Fosheim Grøstad wrote: ubyte[256] data; if (data.length > 0) { ubyte i = 0; do { writeln(i); } while ((++i) != cast(ubyte)data.length); } Here is another version that will work ok on CPUs that can issue many instructions in

Re: [BEGINNER] reccurence! and sequence!

2017-07-06 Thread helxi via Digitalmars-d-learn
On Thursday, 6 July 2017 at 00:21:44 UTC, Ali Çehreli wrote: On 07/05/2017 04:38 PM, helxi wrote: >> [...] > > Oh thank you. Just 2 follow-up questions: >> [...] > 1. In the last example of reccurence, what does n in (a,n) refer to? n is "the index of the current value". Each time the lambda

Re: Foreach loops on static arrays error message

2017-07-06 Thread Stefan Koch via Digitalmars-d
On Thursday, 6 July 2017 at 08:26:42 UTC, Guillaume Chatelet wrote: I stumbled upon https://issues.dlang.org/show_bug.cgi?id=12685 In essence: [...] `ubyte` can clearly hold a value from 0 to 255 so it should be ok. No need for 256 ?! So I decided to fix it

Re: Foreach loops on static arrays error message

2017-07-06 Thread Andrea Fontana via Digitalmars-d
On Thursday, 6 July 2017 at 08:26:42 UTC, Guillaume Chatelet wrote: From the programmer's point of view the original code makes sense. A correct lowering would be: ubyte[256] data; for(ubyte i = 0;;++i) { ubyte x = data[i]; ... if(i==255) break; } or: ubyte[256] data;

Re: Foreach loops on static arrays error message

2017-07-06 Thread Ola Fosheim Grøstad via Digitalmars-d
On Thursday, 6 July 2017 at 09:11:44 UTC, Ola Fosheim Grøstad wrote: ubyte[256] data; if (data.length > 0) { ubyte i = 0; do { writeln(i); } while ((++i) != cast(ubyte)data.length); } You also need to add an assert before the if to check that the last index can be

Re: Foreach loops on static arrays error message

2017-07-06 Thread Andrea Fontana via Digitalmars-d
On Thursday, 6 July 2017 at 09:06:18 UTC, Guillaume Chatelet wrote: ubyte[256] data; foreach(ubyte i; 0..256) { ubyte x = data[i]; } Yes. Much better. What's the rewrite in this case? Using a size_t internally and casting to ubyte? I was just wondering

[Issue 11594] synchronized causing segfault instead of Error.

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11594 --- Comment #3 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/a2ead6dd04efdfeb283b72daf167e85fe8db9c49 Fix issue 11594: Check if the monitor is null in

Re: Checked vs unchecked exceptions

2017-07-06 Thread Marco Leise via Digitalmars-d
Am Thu, 06 Jul 2017 01:31:44 + schrieb Moritz Maxeiner : > But to be clear (and the title and description of any DIP > addressing this should reflect this): > These are not checked exceptions, because checked exceptions > would require bar to declare its exception set

Re: Foreach loops on static arrays error message

2017-07-06 Thread Ola Fosheim Grøstad via Digitalmars-d
On Thursday, 6 July 2017 at 08:26:42 UTC, Guillaume Chatelet wrote: A correct lowering would be: ubyte[256] data; for(ubyte i = 0;;++i) { ubyte x = data[i]; ... if(i==255) break; } That could lead to two branches in machine language, try to think about it in terms of if and

Re: DCompute development

2017-07-06 Thread Sönke Ludwig via Digitalmars-d
Am 05.07.2017 um 11:41 schrieb Nicholas Wilson: Hi all, Now that I've (finally) finished my honours thesis, I've got time to start working on dcompute again. I'd like to invite anyone interested in helping to develop and/or document (or just interested in general) the drivers for

[Issue 11594] synchronized causing segfault instead of Error.

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11594 github-bugzi...@puremagic.com changed: What|Removed |Added Resolution|WORKSFORME |FIXED --

Re: Vibe.d - very low performance

2017-07-06 Thread Sönke Ludwig via Digitalmars-d
Am 06.07.2017 um 09:27 schrieb Marek: https://www.techempower.com/benchmarks/#section=data-r14=ph=plaintext C++, Java and Go frameworks have very high performance. Vibe.d is supposed to have similar performance, but in fact vibe.d performance is very low. Why? This is a scalability issue,

Re: Need simple sound

2017-07-06 Thread Sebastiaan Koppe via Digitalmars-d-learn
On Thursday, 6 July 2017 at 10:47:53 UTC, FoxyBrown wrote: On Wednesday, 5 July 2017 at 07:21:45 UTC, Sebastiaan Koppe wrote: On Wednesday, 5 July 2017 at 05:34:37 UTC, FoxyBrown wrote: On Tuesday, 4 July 2017 at 20:37:44 UTC, Sebastiaan Koppe wrote: Portaudio is simple as well. And nice

[Issue 17369] [Module std.traits] Documentation lists ditto in table

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17369 RazvanN changed: What|Removed |Added CC|

Re: Foreach loops on static arrays error message

2017-07-06 Thread Nemanja Boric via Digitalmars-d
On Thursday, 6 July 2017 at 08:49:33 UTC, Stefan Koch wrote: On Thursday, 6 July 2017 at 08:26:42 UTC, Guillaume Chatelet wrote: [...] I'd say this is not often encoutered. One should avoid using a different type then size_t for the index, as it can have negative performance implications.

Re: Foreach loops on static arrays error message

2017-07-06 Thread Guillaume Chatelet via Digitalmars-d
On Thursday, 6 July 2017 at 09:00:47 UTC, Andrea Fontana wrote: On Thursday, 6 July 2017 at 08:26:42 UTC, Guillaume Chatelet wrote: From the programmer's point of view the original code makes sense. A correct lowering would be: ubyte[256] data; for(ubyte i = 0;;++i) { ubyte x = data[i];

Re: Foreach loops on static arrays error message

2017-07-06 Thread Anonymouse via Digitalmars-d
On Thursday, 6 July 2017 at 08:49:33 UTC, Stefan Koch wrote: I'd say this is not often encoutered. One should avoid using a different type then size_t for the index, as it can have negative performance implications. I thought size_t was what it lowered down to using if you used something

Re: Need simple sound

2017-07-06 Thread FoxyBrown via Digitalmars-d-learn
On Wednesday, 5 July 2017 at 07:21:45 UTC, Sebastiaan Koppe wrote: On Wednesday, 5 July 2017 at 05:34:37 UTC, FoxyBrown wrote: On Tuesday, 4 July 2017 at 20:37:44 UTC, Sebastiaan Koppe wrote: Portaudio is simple as well. And nice cross platform. are there any bindings? Sure, see

Re: Checked vs unchecked exceptions

2017-07-06 Thread crimaniak via Digitalmars-d
On Thursday, 6 July 2017 at 01:31:44 UTC, Moritz Maxeiner wrote: --- void foo() throws AException throws BException { ... } vod bar() { foo(); } --- works and bar's exception is inferred by the compiler to contain AException and BException. But to be clear (and the title and description of

[Issue 17227] deprecation messages building Phobos

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17227 Seb changed: What|Removed |Added Status|NEW |RESOLVED CC|

Re: Compilation times and idiomatic D code

2017-07-06 Thread Jacob Carlborg via Digitalmars-d
On 2017-07-05 22:12, H. S. Teoh via Digitalmars-d wrote: Over time, what is considered "idiomatic D" has changed, and nowadays it seems to be leaning heavily towards range-based code with UFCS chains using std.algorithm and similar reusable pieces of code. It's not UFCS per say that causes the

Re: Check if a variadic argument is numeric?

2017-07-06 Thread Hamborg via Digitalmars-d-learn
On Thursday, 6 July 2017 at 08:35:05 UTC, Andrea Fontana wrote: On Thursday, 6 July 2017 at 08:22:44 UTC, Hamborg wrote: But how would I check _arguments[i]? When I do (isNumeric!_arguments[i]) I get an error saying: "Error: template instance isNumeric!(_arguments) does not match template

AutoDLL

2017-07-06 Thread FoxyBrown via Digitalmars-d-learn
A DLL Loader prototype that loads DLL's, just specify the declaration. Probably should be worked up so it is easy to load DLL's. Example: import portaudio; import std.conv, std.stdio; import core.stdc.stdio; //pragma(lib, "portaudio_x86.lib"); // Doesn't work because libs are invalid

[Issue 17440] Nullable.nullify() resets referenced object

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 --- Comment #6 from RazvanN --- (In reply to Marenz from comment #5) > Closing? Well.. It is _very_ unexpected that Nullable would just follow a > reference and kills everything. It's like you add a pointer to an array and

[Issue 17440] Nullable.nullify() resets referenced object

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 --- Comment #4 from RazvanN --- Eveyone ok with closing this? --

[Issue 17440] Nullable.nullify() resets referenced object

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 RazvanN changed: What|Removed |Added Status|NEW |RESOLVED

Re: Check if a variadic argument is numeric?

2017-07-06 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 6 July 2017 at 12:26:11 UTC, Andrea Fontana wrote: I think you should provide a code snippet then. I think I missed something about your question. You did - this question is about a runtime variadic which gives you an array of TypeInfo objects, but all the answers are giving

Re: Undefined symbol for, apparently, valid code?

2017-07-06 Thread Arafel via Digitalmars-d-learn
Well, it happened to me once [1], and the reason is that templated functions are final by default (since, as you said, it doesn't make sense for them to be anything else). This way the body of the function is assumed to be in a different compilation unit (which is not, hence the linker

[Issue 4851] Three suggestions for std.random

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4851 RazvanN changed: What|Removed |Added Status|ASSIGNED|RESOLVED

Re: Checked vs unchecked exceptions

2017-07-06 Thread Moritz Maxeiner via Digitalmars-d
On Thursday, 6 July 2017 at 11:01:26 UTC, Marco Leise wrote: Am Thu, 06 Jul 2017 01:31:44 + schrieb Moritz Maxeiner : But to be clear (and the title and description of any DIP addressing this should reflect this): These are not checked exceptions, because checked

[Issue 17440] Nullable.nullify() resets referenced object

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 --- Comment #2 from Vladimir Panteleev --- (In reply to Marenz from comment #0) > I am not sure if it is desired, but it was highly unintuitive and unexpected > for me: > > If you use Nullable with a class type

[Issue 17600] implicit float->int cast using += operator

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17600 --- Comment #2 from Simon --- I expected "x += y" to be equivalent to "x = x + y" (in which case an error is generated). Sorry I didn't check the spec, everything is actually correct. (but really surprising behavior

Re: Need simple sound

2017-07-06 Thread FoxyBrown via Digitalmars-d-learn
On Wednesday, 5 July 2017 at 07:21:45 UTC, Sebastiaan Koppe wrote: On Wednesday, 5 July 2017 at 05:34:37 UTC, FoxyBrown wrote: On Tuesday, 4 July 2017 at 20:37:44 UTC, Sebastiaan Koppe wrote: Portaudio is simple as well. And nice cross platform. are there any bindings? Sure, see

Re: dub + local dependencies

2017-07-06 Thread Jolly James via Digitalmars-d-learn
On Thursday, 6 July 2017 at 00:12:25 UTC, Mike Parker wrote: On Thursday, 6 July 2017 at 00:09:46 UTC, Mike Parker wrote: You have a few options: * Use a path dependency: "dependencies": { "xyz": { "path": "path/to/xyz" } } * Use add-local with a version on the command

[Issue 17599] Abbreviate too long type definitions in error messages

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17599 Vladimir Panteleev changed: What|Removed |Added Keywords|

Re: Remove instance from array

2017-07-06 Thread Jolly James via Digitalmars-d-learn
On Thursday, 6 July 2017 at 08:15:10 UTC, Andrea Fontana wrote: On Wednesday, 5 July 2017 at 16:17:29 UTC, Jolly James wrote: On Wednesday, 5 July 2017 at 16:04:16 UTC, Jolly James wrote: [...] Part of CoreCLR's 'List': [...] If there isn't already, maybe something similar to this

Re: Compilation times and idiomatic D code

2017-07-06 Thread Atila Neves via Digitalmars-d
On Thursday, 6 July 2017 at 12:00:29 UTC, Jacob Carlborg wrote: On 2017-07-05 22:12, H. S. Teoh via Digitalmars-d wrote: [...] It's not UFCS per say that causes the problem. If you're using the traditional calling syntax it would generate the same symbols. [...] Yeah, it's usually all

Experience with https://www.patreon.com

2017-07-06 Thread Andrei Alexandrescu via Digitalmars-d
Does anyone have experience with https://www.patreon.com either as a patron or creator? Thanks! -- Andrei

Re: Experience with https://www.patreon.com

2017-07-06 Thread Joel Nilsson via Digitalmars-d
On Thursday, 6 July 2017 at 13:53:08 UTC, Andrei Alexandrescu wrote: Does anyone have experience with https://www.patreon.com either as a patron or creator? Thanks! -- Andrei I support several creators on there. I think it works great.

Re: Check if a variadic argument is numeric?

2017-07-06 Thread Andrea Fontana via Digitalmars-d-learn
On Thursday, 6 July 2017 at 12:15:56 UTC, Hamborg wrote: That compiles, but it returns false when I pass in a numeric value... :( I think you should provide a code snippet then. I think I missed something about your question. Andrea

[Issue 17440] Nullable.nullify() resets referenced object

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 --- Comment #3 from Marenz --- >Is there any particular reason you need to use Nullify with a class type >instead of simply using the class type directly and use "null" to indicate the >unset state? There is no

[Issue 17440] Nullable.nullify() resets referenced object

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 --- Comment #5 from Marenz --- Closing? Well.. It is _very_ unexpected that Nullable would just follow a reference and kills everything. It's like you add a pointer to an array and after setting it to null your pointed

[Issue 17596] dmd d 2.073.2 and 2.074.1 interim generated dmd segfaults on FreeBSD 12-CURRENT

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17596 --- Comment #4 from Vladimir Panteleev --- (In reply to Cy Schubert from comment #3) > The implementer of inode64 has done a great job of avoiding ABI breakage. > Applications built before inode64 continue to run

Webassembly?

2017-07-06 Thread Wulfklaue via Digitalmars-d
Is there a future where we can see WebAssembly as part of D? Seeing Rusts backbone already producing wasm is impressive. WebAssembly currently does not support a GC ...so it fair the assume that this will be the main issue for LDC? I see the move towards one language for back and front-end

Re: Undefined symbol for, apparently, valid code?

2017-07-06 Thread Arafel via Digitalmars-d-learn
On 07/06/2017 05:11 PM, unleashy wrote: Maybe it was an error on my part for not declaring the function as abstract? My view was that the abstract attribute on a class marks all its members as virtual unless they have a body, which is how it works in, say, Java. Still, kinda odd that the

[Issue 17602] improve message for deprecated enum comparison

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17602 Vladimir Panteleev changed: What|Removed |Added Keywords|

Re: Checked vs unchecked exceptions

2017-07-06 Thread Crayo List via Digitalmars-d
On Wednesday, 5 July 2017 at 21:05:04 UTC, Ola Fosheim Grøstad wrote: On Wednesday, 5 July 2017 at 15:48:33 UTC, Crayo List wrote: What happens to the 3000 direct and indirect calls to open() ? Notice how the 'interface' has not changed, only the implementation. No, the exception spec is

[Issue 17605] __traits(compiles, closure) adds link-time reference to _d_allocmemory

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17605 Adam D. Ruppe changed: What|Removed |Added CC|

  1   2   >