Re: Coding Challenges - Dlang or Generic

2023-01-18 Thread matheus via Digitalmars-d-learn
On Wednesday, 18 January 2023 at 01:05:58 UTC, Siarhei Siamashka wrote: 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

Re: Coding Challenges - Dlang or Generic

2023-01-18 Thread matheus via Digitalmars-d-learn
On Wednesday, 18 January 2023 at 04:51:11 UTC, Salih Dincer wrote: 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

Re: Problem with ImportC example?

2023-01-18 Thread Salih Dincer via Digitalmars-d-learn
On Wednesday, 18 January 2023 at 13:45:04 UTC, DLearner wrote: On Tuesday, 17 January 2023 at 22:11:46 UTC, Ali Çehreli wrote: [...] dmd relies on system compiler programs for its ImportC feature. cl.exe seems to be the compiler. I think it is the compiler. Can you run that program from the

Re: Problem with ImportC example?

2023-01-18 Thread DLearner via Digitalmars-d-learn
On Wednesday, 18 January 2023 at 14:18:58 UTC, Salih Dincer wrote: On Wednesday, 18 January 2023 at 13:45:04 UTC, DLearner wrote: On Tuesday, 17 January 2023 at 22:11:46 UTC, Ali Çehreli wrote: [...] dmd relies on system compiler programs for its ImportC feature. cl.exe seems to be the

Re: Problem with ImportC example?

2023-01-18 Thread DLearner via Digitalmars-d-learn
On Tuesday, 17 January 2023 at 22:11:46 UTC, Ali Çehreli wrote: [...] dmd relies on system compiler programs for its ImportC feature. cl.exe seems to be the compiler. I think it is the compiler. Can you run that program from the command line? Fails with: ``` C:\Users\SoftDev>c1.exe 'c1.exe'

Re: Problem with ImportC example?

2023-01-18 Thread bachmeier via Digitalmars-d-learn
On Wednesday, 18 January 2023 at 16:37:17 UTC, Ali Çehreli wrote: On 1/18/23 08:04, DLearner wrote: > Unfortunately, neither works: > ``` > C:\Users\SoftDev>cl.exe > 'cl.exe' is not recognized as an internal or external command, > operable program or batch file. That supports the theory that

Re: Why not allow elementwise operations on tuples?

2023-01-18 Thread JG via Digitalmars-d-learn
On Monday, 16 January 2023 at 08:30:15 UTC, Sergei Nosov wrote: On Friday, 13 January 2023 at 15:27:26 UTC, H. S. Teoh wrote: [...] Yeah, that's clear that such an implementation is rather straightforward. Although, I'm a bit confused with your implementation - 1. it doesn't seem to use

Re: Problem with ImportC example?

2023-01-18 Thread Ali Çehreli via Digitalmars-d-learn
On 1/18/23 08:04, DLearner wrote: > Unfortunately, neither works: > ``` > C:\Users\SoftDev>cl.exe > 'cl.exe' is not recognized as an internal or external command, > operable program or batch file. That supports the theory that you don't have a C compiler installed that dmd can use for

Re: Problem with ImportC example?

2023-01-18 Thread bachmeier via Digitalmars-d-learn
On Wednesday, 18 January 2023 at 16:51:27 UTC, bachmeier wrote: On Wednesday, 18 January 2023 at 16:37:17 UTC, Ali Çehreli wrote: On 1/18/23 08:04, DLearner wrote: > Unfortunately, neither works: > ``` > C:\Users\SoftDev>cl.exe > 'cl.exe' is not recognized as an internal or external >

Re: Coding Challenges - Dlang or Generic

2023-01-18 Thread Siarhei Siamashka via Digitalmars-d-learn
On Wednesday, 18 January 2023 at 11:10:01 UTC, matheus wrote: On Wednesday, 18 January 2023 at 01:05:58 UTC, Siarhei Siamashka wrote: 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

Are there more up-to-date D template tutorials?

2023-01-18 Thread thebluepandabear via Digitalmars-d-learn
Hello, The GitHub repo which helps introduce new users about D templates (https://github.com/PhilippeSigaud/D-templates-tutorial) seems to be quite outdated. As a beginner to D I have been struggling to learn about D templates, I haven't been able to find any up-to-date D template

Re: Coding Challenges - Dlang or Generic

2023-01-18 Thread Salih Dincer via Digitalmars-d-learn
On Wednesday, 18 January 2023 at 11:20:11 UTC, matheus wrote: Could you please run your version vs mine (Changing to print one column, line 70: draw_year(2023,1); ) and tell us the result? When implementing MyCalendar(), it was not designed to output multiple columns. Therefore, we cannot

Re: Are there more up-to-date D template tutorials?

2023-01-18 Thread thebluepandabear via Digitalmars-d-learn
Help would be appreciated. Regards, thebluepandabear A bit off topic/ranty but I did find the book by Ali on D extremely useful, but it was good as an 'introduction'. I feel like when it comes to more advanced features (such as templates, mixins, ranges, concurrency, etc) there are no