Re: Coding Challenges - Dlang or Generic

2023-01-17 Thread Salih Dincer via Digitalmars-d-learn
On Tuesday, 17 January 2023 at 21:50:06 UTC, matheus wrote: Have you compared the timings between this way (With ranges) and a normal way (Without ranges)? Of course it is possible to speed it up. However, even as it is, it is enough to see the power of intervals. I would argue that you'll

Re: Problem with ImportC example?

2023-01-17 Thread zjh via Digitalmars-d-learn
On Wednesday, 18 January 2023 at 02:05:34 UTC, zjh wrote: < ... `nightly`: Unresolved external symbol `__va_start`, function `_fwprintf_`. link error.

Re: Problem with ImportC example?

2023-01-17 Thread zjh via Digitalmars-d-learn
On Tuesday, 17 January 2023 at 11:16:25 UTC, DLearner wrote: With the latest version of 'dmd101.2',`dmd a.c`, I get: C:\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt_wstdio.h|1208| Error: function `a.__vswprintf_l` redeclaration with different type C:\Windows

Re: Coding Challenges - Dlang or Generic

2023-01-17 Thread Siarhei Siamashka via Digitalmars-d-learn
On Tuesday, 17 January 2023 at 23:27:03 UTC, matheus wrote: I ran in two sites: https://onecompiler.com/d and then https://godbolt.org/, with the latter I set LDC with -O2. My version (Source in the end) ran about 2x faster than the version with ranges. Well, the use of ranges is not the

Re: Coding Challenges - Dlang or Generic

2023-01-17 Thread matheus via Digitalmars-d-learn
On Tuesday, 17 January 2023 at 23:08:19 UTC, Siarhei Siamashka wrote: On Tuesday, 17 January 2023 at 21:50:06 UTC, matheus wrote: Question: Have you compared the timings between this way (With ranges) and a normal way (Without ranges)? If you are intensively using ranges, UFCS or the other

Re: Coding Challenges - Dlang or Generic

2023-01-17 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Jan 17, 2023 at 11:08:19PM +, Siarhei Siamashka via Digitalmars-d-learn wrote: > On Tuesday, 17 January 2023 at 21:50:06 UTC, matheus wrote: > > Question: Have you compared the timings between this way (With > > ranges) and a normal way (Without ranges)? > > If you are intensively

Re: Coding Challenges - Dlang or Generic

2023-01-17 Thread Siarhei Siamashka via Digitalmars-d-learn
On Tuesday, 17 January 2023 at 21:50:06 UTC, matheus wrote: Question: Have you compared the timings between this way (With ranges) and a normal way (Without ranges)? If you are intensively using ranges, UFCS or the other convenient high level language features, then the compiler choice does

Re: Problem with ImportC example?

2023-01-17 Thread Ali Çehreli via Digitalmars-d-learn
On 1/17/23 12:02, DLearner wrote: C:\Users\SoftDev\Documents\BDM\D\ImportC>dmd ex01.c failed launching cl.exe /P /Zc:preprocessor [...] I don't use Windows for development but that error message makes me think cl.exe is not found to be executed. dmd relies on system compiler

Re: Coding Challenges - Dlang or Generic

2023-01-17 Thread matheus via Digitalmars-d-learn
On Friday, 13 January 2023 at 21:12:17 UTC, Salih Dincer wrote: On Friday, 13 January 2023 at 18:59:01 UTC, matheus wrote: Unfortunately it's not working for me Yeah, it was an old development version. I also implemented another version the same day: * [Nested

Re: Problem with ImportC example?

2023-01-17 Thread DLearner via Digitalmars-d-learn
On Tuesday, 17 January 2023 at 19:17:31 UTC, DLearner wrote: On Tuesday, 17 January 2023 at 17:36:41 UTC, ryuukk_ wrote: On Tuesday, 17 January 2023 at 17:12:49 UTC, DLearner wrote: On Tuesday, 17 January 2023 at 15:55:40 UTC, bachmeier wrote: [...] Downloaded latest dmd for windows from

Re: Problem with ImportC example?

2023-01-17 Thread DLearner via Digitalmars-d-learn
On Tuesday, 17 January 2023 at 17:36:41 UTC, ryuukk_ wrote: On Tuesday, 17 January 2023 at 17:12:49 UTC, DLearner wrote: On Tuesday, 17 January 2023 at 15:55:40 UTC, bachmeier wrote: On Tuesday, 17 January 2023 at 13:21:37 UTC, DLearner wrote: On Tuesday, 17 January 2023 at 11:21:08 UTC,

Re: Problem with ImportC example?

2023-01-17 Thread ryuukk_ via Digitalmars-d-learn
On Tuesday, 17 January 2023 at 17:12:49 UTC, DLearner wrote: On Tuesday, 17 January 2023 at 15:55:40 UTC, bachmeier wrote: On Tuesday, 17 January 2023 at 13:21:37 UTC, DLearner wrote: On Tuesday, 17 January 2023 at 11:21:08 UTC, Dennis wrote: On Tuesday, 17 January 2023 at 11:16:25 UTC,

Re: Problem with ImportC example?

2023-01-17 Thread DLearner via Digitalmars-d-learn
On Tuesday, 17 January 2023 at 15:55:40 UTC, bachmeier wrote: On Tuesday, 17 January 2023 at 13:21:37 UTC, DLearner wrote: On Tuesday, 17 January 2023 at 11:21:08 UTC, Dennis wrote: On Tuesday, 17 January 2023 at 11:16:25 UTC, DLearner wrote: ``` C:\Users\SoftDev\Documents\BDM\D\ImportC>dmd

Re: Problem with ImportC example?

2023-01-17 Thread bachmeier via Digitalmars-d-learn
On Tuesday, 17 January 2023 at 13:21:37 UTC, DLearner wrote: On Tuesday, 17 January 2023 at 11:21:08 UTC, Dennis wrote: On Tuesday, 17 January 2023 at 11:16:25 UTC, DLearner wrote: ``` C:\Users\SoftDev\Documents\BDM\D\ImportC>dmd ex01.c ex01.c(1): Error: C preprocessor directive `#include` is

Re: Problem with ImportC example?

2023-01-17 Thread DLearner via Digitalmars-d-learn
On Tuesday, 17 January 2023 at 11:21:08 UTC, Dennis wrote: On Tuesday, 17 January 2023 at 11:16:25 UTC, DLearner wrote: ``` C:\Users\SoftDev\Documents\BDM\D\ImportC>dmd ex01.c ex01.c(1): Error: C preprocessor directive `#include` is not supported ex01.c(1): Error: no type for declarator

Re: Problem with ImportC example?

2023-01-17 Thread Dennis via Digitalmars-d-learn
On Tuesday, 17 January 2023 at 11:16:25 UTC, DLearner wrote: ``` C:\Users\SoftDev\Documents\BDM\D\ImportC>dmd ex01.c ex01.c(1): Error: C preprocessor directive `#include` is not supported ex01.c(1): Error: no type for declarator before `#` ex01.c(5): Error: no type for declarator before

Problem with ImportC example?

2023-01-17 Thread DLearner via Digitalmars-d-learn
This relates to the first example under 41.1 Quick Examples. Stored as ex01.c, run as shown. ``` #include int main() { printf("hello world\n"); return 0; } ``` Produced: ``` C:\Users\SoftDev\Documents\BDM\D\ImportC>dmd ex01.c ex01.c(1): Error: C preprocessor directive `#include` is