Re: D Mir: standard deviation speed

2020-07-15 Thread 9il via Digitalmars-d-learn
On Wednesday, 15 July 2020 at 06:55:51 UTC, 9il wrote: On Wednesday, 15 July 2020 at 06:00:46 UTC, tastyminerals wrote: On Wednesday, 15 July 2020 at 02:08:48 UTC, 9il wrote: On Tuesday, 14 July 2020 at 19:04:45 UTC, tastyminerals wrote: @fastmath private double sd0(T)(Slice!(T*, 1) flatMatrix

Re: D Mir: standard deviation speed

2020-07-15 Thread 9il via Digitalmars-d-learn
On Wednesday, 15 July 2020 at 06:00:46 UTC, tastyminerals wrote: On Wednesday, 15 July 2020 at 02:08:48 UTC, 9il wrote: On Tuesday, 14 July 2020 at 19:04:45 UTC, tastyminerals wrote: @fastmath private double sd0(T)(Slice!(T*, 1) flatMatrix) @fastmath shouldn't be really used with summation al

Re: Error: `std.uni.isUpper` conflicts with `std.ascii.isUpper`

2020-07-15 Thread WebFreak001 via Digitalmars-d-learn
On Tuesday, 14 July 2020 at 20:37:53 UTC, Marcone wrote: import std: isUpper, writeln; void main(){ writeln(isUpper('A')); } Why I get this error? How can I use isUpper()? Additionally to the other answers telling you how to fix it, it's important to know why it happens in the first

Using_string_mixins_for_logging error

2020-07-15 Thread Vitalii via Digitalmars-d-learn
Hello everyone! I try to compile this recipe with dmd (2.089.0), ldc2 (1.18.0): https://wiki.dlang.org/Using_string_mixins_for_logging but get the same error: mixin_log.d(64): Error: basic type expected, not __FUNCTION__ mixin_log.d(64): Error: declaration expected, not __FUNCTION__ in that par

Re: getopt: How does arraySep work?

2020-07-15 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 14 July 2020 at 15:48:59 UTC, Andre Pany wrote: On Tuesday, 14 July 2020 at 14:33:47 UTC, Steven Schveighoffer wrote: On 7/14/20 10:22 AM, Steven Schveighoffer wrote: The documentation needs updating, it should say "parameters are added sequentially" or something like that, instead

Re: D Mir: standard deviation speed

2020-07-15 Thread tastyminerals via Digitalmars-d-learn
On Wednesday, 15 July 2020 at 06:57:21 UTC, 9il wrote: On Wednesday, 15 July 2020 at 06:55:51 UTC, 9il wrote: On Wednesday, 15 July 2020 at 06:00:46 UTC, tastyminerals wrote: On Wednesday, 15 July 2020 at 02:08:48 UTC, 9il wrote: On Tuesday, 14 July 2020 at 19:04:45 UTC, tastyminerals wrote:

Re: Using_string_mixins_for_logging error

2020-07-15 Thread WebFreak001 via Digitalmars-d-learn
On Wednesday, 15 July 2020 at 07:07:55 UTC, Vitalii wrote: Hello everyone! I try to compile this recipe with dmd (2.089.0), ldc2 (1.18.0): https://wiki.dlang.org/Using_string_mixins_for_logging but get the same error: mixin_log.d(64): Error: basic type expected, not __FUNCTION__ mixin_log.d(64)

Re: Using_string_mixins_for_logging error

2020-07-15 Thread Vitalii via Digitalmars-d-learn
Many thanks!

Re: D Mir: standard deviation speed

2020-07-15 Thread 9il via Digitalmars-d-learn
On Wednesday, 15 July 2020 at 07:34:59 UTC, tastyminerals wrote: On Wednesday, 15 July 2020 at 06:57:21 UTC, 9il wrote: On Wednesday, 15 July 2020 at 06:55:51 UTC, 9il wrote: On Wednesday, 15 July 2020 at 06:00:46 UTC, tastyminerals wrote: On Wednesday, 15 July 2020 at 02:08:48 UTC, 9il wrote:

Re: Question about publishing a useful function I have written

2020-07-15 Thread Cecil Ward via Digitalmars-d-learn
On Tuesday, 14 July 2020 at 23:10:28 UTC, Max Haughton wrote: On Tuesday, 14 July 2020 at 21:58:49 UTC, Cecil Ward wrote: I have written something which may or may not be novel and I’m wondering about how to distribute it to as many users as possible, hoping others will find it useful. What’s t

Re: Question about publishing a useful function I have written

2020-07-15 Thread Cecil Ward via Digitalmars-d-learn
On Wednesday, 15 July 2020 at 02:25:42 UTC, 9il wrote: On Tuesday, 14 July 2020 at 21:58:49 UTC, Cecil Ward wrote: Does anyone know if this has already been published by someone else? https://github.com/libmir/mir-core/blob/master/source/mir/utility.d#L29 We test LDC and DMC. CI needs an

Re: D Mir: standard deviation speed

2020-07-15 Thread jmh530 via Digitalmars-d-learn
On Wednesday, 15 July 2020 at 05:57:56 UTC, tastyminerals wrote: [snip] Here is a (WIP) project as of now. Line 160 in https://github.com/tastyminerals/mir_benchmarks_2/blob/master/source/basic_ops.d std of [60, 60] matrix 0.0389492 (> 0.001727) std of [300, 300] matrix 1.03592 (> 0.043452) s

Re: Error: `std.uni.isUpper` conflicts with `std.ascii.isUpper`

2020-07-15 Thread aberba via Digitalmars-d-learn
On Wednesday, 15 July 2020 at 07:01:34 UTC, WebFreak001 wrote: On Tuesday, 14 July 2020 at 20:37:53 UTC, Marcone wrote: [...] Additionally to the other answers telling you how to fix it, it's important to know why it happens in the first place: [...] Without reading this very explanation,

Re: D Mir: standard deviation speed

2020-07-15 Thread 9il via Digitalmars-d-learn
On Wednesday, 15 July 2020 at 11:23:00 UTC, jmh530 wrote: On Wednesday, 15 July 2020 at 05:57:56 UTC, tastyminerals wrote: [snip] Here is a (WIP) project as of now. Line 160 in https://github.com/tastyminerals/mir_benchmarks_2/blob/master/source/basic_ops.d std of [60, 60] matrix 0.0389492 (

Re: D Mir: standard deviation speed

2020-07-15 Thread jmh530 via Digitalmars-d-learn
On Wednesday, 15 July 2020 at 11:26:19 UTC, 9il wrote: [snip] @fmamath private double sd(T)(Slice!(T*, 1) flatMatrix) @fastmath violates all summation algorithms except `"fast"`. The same bug is in the original author's post. I hadn't realized that @fmamath was the problem, rather than @fa

Re: Error: `std.uni.isUpper` conflicts with `std.ascii.isUpper`

2020-07-15 Thread WebFreak001 via Digitalmars-d-learn
On Wednesday, 15 July 2020 at 11:25:34 UTC, aberba wrote: On Wednesday, 15 July 2020 at 07:01:34 UTC, WebFreak001 wrote: On Tuesday, 14 July 2020 at 20:37:53 UTC, Marcone wrote: [...] Additionally to the other answers telling you how to fix it, it's important to know why it happens in the fi

Re: Choosing a non-default linker for dmd (via dub)

2020-07-15 Thread Jacob Carlborg via Digitalmars-d-learn
On 2020-07-12 18:36, Per Nordlöw wrote: The line dflags "-linker=gold" platform="linux-ldc" # use GNU gold linker in dub.sdl enables me to change linker for LDC. Is it possible to choose a specific linker for DMD aswell in a similar way? I only find the flag `-L` that sets flags but no linke

Re: Bind C++ class to DLang : undefined reference to `Canvas::Foo()'

2020-07-15 Thread Jacob Carlborg via Digitalmars-d-learn
On 2020-07-14 05:33, Boris Carvajal wrote: Can you try passing -D_GLIBCXX_USE_CXX11_ABI=0 to g++ and -version=_GLIBCXX_USE_CXX98_ABI to dmd. That comes from: https://dlang.org/changelog/2.088.0.html#std_string C++11 ABI is currently not supported. I based on previous messages and the usage

Re: D Mir: standard deviation speed

2020-07-15 Thread 9il via Digitalmars-d-learn
On Wednesday, 15 July 2020 at 11:37:23 UTC, jmh530 wrote: On Wednesday, 15 July 2020 at 11:26:19 UTC, 9il wrote: [snip] @fmamath private double sd(T)(Slice!(T*, 1) flatMatrix) @fastmath violates all summation algorithms except `"fast"`. The same bug is in the original author's post. I hadn

Re: misc questions about a DUB package

2020-07-15 Thread Jacob Carlborg via Digitalmars-d-learn
On 2020-07-15 04:20, 9il wrote: No. Usually, a DUB package supports a range of C library version or just a fixes set of C API. The version behavior of the dub package is up to you. Usually, D API changes more frequently than the underlying C library. If you support a specific version of the C A

Re: Question about publishing a useful function I have written

2020-07-15 Thread Jacob Carlborg via Digitalmars-d-learn
On 2020-07-14 23:58, Cecil Ward wrote: What’s the best way to publish a D routine ? As others have already said, on GitHub. Then as a Dub package as well [1]. [1] https://code.dlang.org -- /Jacob Carlborg

Re: D Mir: standard deviation speed

2020-07-15 Thread jmh530 via Digitalmars-d-learn
On Wednesday, 15 July 2020 at 11:41:35 UTC, 9il wrote: [snip] Ah, no, my bad! You write @fmamath, I have read it as @fastmath. @fmamath is OK here. I've mixed up @fastmath and @fmamath as well. No worries.

Re: Question about publishing a useful function I have written

2020-07-15 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 15 July 2020 at 09:31:27 UTC, Cecil Ward wrote: On Tuesday, 14 July 2020 at 23:10:28 UTC, Max Haughton wrote: On Tuesday, 14 July 2020 at 21:58:49 UTC, Cecil Ward wrote: I have written something which may or may not be novel and I’m wondering about how to distribute it to as many

Forcing inline functions (again) - groan

2020-07-15 Thread Cecil Ward via Digitalmars-d-learn
I recently noticed pragma(inline, true) which looks extremely useful. A couple of questions : 1. Is this cross-compiler compatible? 2. Can I declare a function in one module and have it _inlined_ in another module at the call site? I’m looking to write functions that expand to approx one

Re: Forcing inline functions (again) - groan

2020-07-15 Thread Stefan Koch via Digitalmars-d-learn
On Wednesday, 15 July 2020 at 13:38:34 UTC, Cecil Ward wrote: I recently noticed pragma(inline, true) which looks extremely useful. A couple of questions : 1. Is this cross-compiler compatible? 2. Can I declare a function in one module and have it _inlined_ in another module at the call si

Re: Choosing a non-default linker for dmd (via dub)

2020-07-15 Thread kinke via Digitalmars-d-learn
On Wednesday, 15 July 2020 at 11:38:47 UTC, Jacob Carlborg wrote: There's an environment variable "CC" that can be used to select which C compiler is used. Is there any equivalence for selecting the linker, "LD" perhaps? You normally just add -fuse-ld=gold to the C compiler cmdline, e.g., via

Re: Forcing inline functions (again) - groan

2020-07-15 Thread kinke via Digitalmars-d-learn
On Wednesday, 15 July 2020 at 13:38:34 UTC, Cecil Ward wrote: I recently noticed pragma(inline, true) which looks extremely useful. A couple of questions : 1. Is this cross-compiler compatible? Works for LDC and DMD, not sure about GDC, but if it doesn't support it, it's definitely on Iai

Contributing to D wiki

2020-07-15 Thread aberba via Digitalmars-d-learn
So I'm looking to make changes to the D wiki but I'm not sure who to talk to about such changes. Currently: Move all other IDEs low-quality down (maybe to Others) and focus on just the few that really works (IntelliJ, Visual Studio Code and Visual Studio). Instead of many options that don't w

[OT] Re: D Mir: standard deviation speed

2020-07-15 Thread Schrom, Brian T via Digitalmars-d-learn
> I've mixed up @fastmath and @fmamath as well. No worries. Seems like this might be a good awareness opportunity to change one of the names to be more descriptive and more distinctive. FWIW, I read half way through threw the thread before I caught onto the distinction. I can imagine making that

Re: Vibe.d and NodeJs with Express

2020-07-15 Thread aberba via Digitalmars-d-learn
On Wednesday, 15 July 2020 at 04:19:57 UTC, bauss wrote: On Sunday, 12 July 2020 at 19:16:32 UTC, aberba wrote: 3) packages, now it might be better though. But I've always felt that there's not a lot of people using D for complete web dev projects... I implement most things I need myself;

Re: Contributing to D wiki

2020-07-15 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Jul 15, 2020 at 04:04:56PM +, aberba via Digitalmars-d-learn wrote: > So I'm looking to make changes to the D wiki but I'm not sure who to > talk to about such changes. > > Currently: Move all other IDEs low-quality down (maybe to Others) and > focus on just the few that really works (

Re: Contributing to D wiki

2020-07-15 Thread tastyminerals via Digitalmars-d-learn
On Wednesday, 15 July 2020 at 16:04:56 UTC, aberba wrote: So I'm looking to make changes to the D wiki but I'm not sure who to talk to about such changes. Currently: Move all other IDEs low-quality down (maybe to Others) and focus on just the few that really works (IntelliJ, Visual Studio Cod

Re: Contributing to D wiki

2020-07-15 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Jul 15, 2020 at 09:27:22PM +, tastyminerals via Digitalmars-d-learn wrote: [...] > D wiki is badly outdated. This is not a fact but a gut feeling after > reading through some of its pages. I was wondering who's owning it > myself but never actually dared to just go and update. Why not

Re: misc questions about a DUB package

2020-07-15 Thread DanielG via Digitalmars-d-learn
On Wednesday, 15 July 2020 at 11:49:09 UTC, Jacob Carlborg wrote: The plus sign and anything after is ignored by Dub. Good to know, thank you.

Re: getopt: How does arraySep work?

2020-07-15 Thread Jon Degenhardt via Digitalmars-d-learn
On Wednesday, 15 July 2020 at 07:12:35 UTC, Andre Pany wrote: On Tuesday, 14 July 2020 at 15:48:59 UTC, Andre Pany wrote: On Tuesday, 14 July 2020 at 14:33:47 UTC, Steven Schveighoffer wrote: On 7/14/20 10:22 AM, Steven Schveighoffer wrote: The documentation needs updating, it should say "param

Re: D Mir: standard deviation speed

2020-07-15 Thread tastyminerals via Digitalmars-d-learn
On Wednesday, 15 July 2020 at 07:51:31 UTC, 9il wrote: On Wednesday, 15 July 2020 at 07:34:59 UTC, tastyminerals wrote: On Wednesday, 15 July 2020 at 06:57:21 UTC, 9il wrote: On Wednesday, 15 July 2020 at 06:55:51 UTC, 9il wrote: On Wednesday, 15 July 2020 at 06:00:46 UTC, tastyminerals wrote: