Why can't we use strings in C++ methods?

2023-11-03 Thread Dadoum via Digitalmars-d-learn
I was wondering why C++ linkage forbids strings as arguments while we can with the C one. With C linkage, it's translated to a template that's defined in the automatically generated header, but it just doesn't compile in C++.

Re: DUB: Is it possible to set release as a default build for a dub package?

2023-11-03 Thread Andrey Zherikov via Digitalmars-d-learn
On Friday, 3 November 2023 at 19:21:42 UTC, BoQsc wrote: However I would want to try to enforce this behaviour from the `dub.json` or `dub.sdl` file. IMHO this is not something that should be enforced from package build configuration, however there can be a way to configure it on system

Re: Keyword "package" prevents from importing a package module "package.d"

2023-11-03 Thread Andrey Zherikov via Digitalmars-d-learn
On Friday, 3 November 2023 at 18:04:58 UTC, Jonathan M Davis wrote: - Jonathan M Davis Thanks a lot for detailed explanation!

DUB: Is it possible to set release as a default build for a dub package?

2023-11-03 Thread BoQsc via Digitalmars-d-learn
While using `dub`, you might notice that after running `dub` or `dub run` command you will end up with notice: ``` Starting Performing "debug" build using C:\D\dmd2\windows\bin64\dmd.exe for x86_64. ``` Example output: ``` C:\Users\Windows10\Documents\Dlang winsock\datatypes>dub

Re: Keyword "package" prevents from importing a package module "package.d"

2023-11-03 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, November 3, 2023 5:20:56 AM MDT Andrey Zherikov via Digitalmars-d- learn wrote: > On Friday, 3 November 2023 at 00:52:18 UTC, H. S. Teoh wrote: > > Supposedly you can do this: > > /* Original: */ > > > > // pkg/mymodule.d > > module mymodule; > > ... // code here > > > >

Re: why remove octal literal support?

2023-11-03 Thread Steven Schveighoffer via Digitalmars-d-learn
On Friday, 3 November 2023 at 15:07:41 UTC, d007 wrote: dlang is know for compile speed, but in reality d project compile slow because so much ctfe and tempalte. Why bring more ctfe call by remmove octal literal ? octal literals are extremely error prone, because people sometimes use

Re: performance issues with SIMD function

2023-11-03 Thread Sergey via Digitalmars-d-learn
On Friday, 3 November 2023 at 15:11:31 UTC, Bogdan wrote: Hi everyone, I was playing around with the intel-intrinsics library, trying to improve the speed of a simple area function. I could not see any performance improvements from the non-SIMD implementation. The SIMD version is a little

Re: Function Overloading

2023-11-03 Thread Gaurav Negi via Digitalmars-d-learn
On Tuesday, 31 October 2023 at 20:09:44 UTC, Salih Dincer wrote: ```d struct Calculate {   int memory; string result;    auto toString() => result;    this(string str)    {        add(str);    }    this(int num) {        add(num); } import std.string : format;    

Re: performance issues with SIMD function

2023-11-03 Thread Imperatorn via Digitalmars-d-learn
On Friday, 3 November 2023 at 15:17:43 UTC, Imperatorn wrote: On Friday, 3 November 2023 at 15:11:31 UTC, Bogdan wrote: Hi everyone, I was playing around with the intel-intrinsics library, trying to improve the speed of a simple area function. I could not see any performance improvements

Re: performance issues with SIMD function

2023-11-03 Thread Imperatorn via Digitalmars-d-learn
On Friday, 3 November 2023 at 15:11:31 UTC, Bogdan wrote: Hi everyone, I was playing around with the intel-intrinsics library, trying to improve the speed of a simple area function. I could not see any performance improvements from the non-SIMD implementation. The SIMD version is a little

Re: why remove octal literal support?

2023-11-03 Thread Adam D Ruppe via Digitalmars-d-learn
On Friday, 3 November 2023 at 15:07:41 UTC, d007 wrote: dlang is know for compile speed, but in reality d project compile slow because so much ctfe and tempalte. Some ctfe and templates are slow. Usually larger functions or array/string append loops end up being to blame. Octal literals

Re: why remove octal literal support?

2023-11-03 Thread Imperatorn via Digitalmars-d-learn
On Friday, 3 November 2023 at 15:07:41 UTC, d007 wrote: dlang is know for compile speed, but in reality d project compile slow because so much ctfe and tempalte. Why bring more ctfe call by remmove octal literal ? What are you even saying?

performance issues with SIMD function

2023-11-03 Thread Bogdan via Digitalmars-d-learn
Hi everyone, I was playing around with the intel-intrinsics library, trying to improve the speed of a simple area function. I could not see any performance improvements from the non-SIMD implementation. The SIMD version is a little bit slower even with LDC2 and --o3. Can anyone help me to

why remove octal literal support?

2023-11-03 Thread d007 via Digitalmars-d-learn
dlang is know for compile speed, but in reality d project compile slow because so much ctfe and tempalte. Why bring more ctfe call by remmove octal literal ?

Re: Keyword "package" prevents from importing a package module "package.d"

2023-11-03 Thread Adam D Ruppe via Digitalmars-d-learn
On Friday, 3 November 2023 at 00:19:48 UTC, Andrey Zherikov wrote: Is there any guide how one can refactor single-module package into multi-module package with distinction between public and private modules? Call the modules literally anything else and it works better. So say you have module

Re: Keyword "package" prevents from importing a package module "package.d"

2023-11-03 Thread Andrey Zherikov via Digitalmars-d-learn
On Friday, 3 November 2023 at 00:52:18 UTC, H. S. Teoh wrote: Supposedly you can do this: /* Original: */ // pkg/mymodule.d module mymodule; ... // code here // main.d import mymodule; void main() { ... } /* Split */ //

Re: win32 api & lib issue

2023-11-03 Thread Imperatorn via Digitalmars-d-learn
On Friday, 3 November 2023 at 00:57:30 UTC, Peter Hu wrote: On Thursday, 2 November 2023 at 17:38:33 UTC, Imperatorn wrote: On Thursday, 2 November 2023 at 13:40:14 UTC, Peter Hu wrote: [...] I put it on dub now so you can just do "dub add dfl". In Entice designer you can then change your