Re: How to unit-test a phobos module?

2020-11-26 Thread Q. Schroll via Digitalmars-d-learn
On Thursday, 26 November 2020 at 05:29:16 UTC, Mike Parker wrote: On Wednesday, 25 November 2020 at 21:36:36 UTC, Q. Schroll wrote: [1] https://wiki.dlang.org/Building_under_Windows You might try Digger. That will hide all the tedious bits. https://code.dlang.org/packages/digger I think

Re: Ways to parse D code.

2020-11-26 Thread Jacob Carlborg via Digitalmars-d-learn
On 2020-11-25 17:27, Jan Hönig wrote: dmd has to do it somewhere as well. Although I don't know exactly where. I do know ldc uses dmd's frontend for parsing. https://dlang.org/phobos/dmd_parse.html Using DMD as a library will be most accurate and up to date. Because it's the same code as

Re: Simulating computed goto

2020-11-26 Thread NonNull via Digitalmars-d-learn
On Thursday, 26 November 2020 at 04:42:08 UTC, Dukc wrote: On Wednesday, 25 November 2020 at 18:44:52 UTC, NonNull wrote: Is there a good way to simulate computed goto in D? I haven't used assembly myself, but it's possible that you can define a mixin that does this, using inline assembly.

Re: Simulating computed goto

2020-11-26 Thread NonNull via Digitalmars-d-learn
On Wednesday, 25 November 2020 at 18:57:35 UTC, Paul Backus wrote: On Wednesday, 25 November 2020 at 18:44:52 UTC, NonNull wrote: How good is optimization in ldc2, gdc, dmd at compiling chained jumps into one jump each time? The easiest way to find the answer to a question like this is to

Re: Automatic update system

2020-11-26 Thread Andre Pany via Digitalmars-d-learn
On Thursday, 26 November 2020 at 12:13:59 UTC, vnr wrote: Hello, I have a program written in D which is open-source on GitHub. I would appreciate it if, when I release a new version, users would be notified by the program and that it offers an automatic update, i.e. the user doesn't have to

Re: Automatic update system

2020-11-26 Thread Dukc via Digitalmars-d-learn
On Thursday, 26 November 2020 at 12:13:59 UTC, vnr wrote: Hello, I have a program written in D which is open-source on GitHub. I would appreciate it if, when I release a new version, users would be notified by the program and that it offers an automatic update, i.e. the user doesn't have to

Re: How to unit-test a phobos module?

2020-11-26 Thread Steven Schveighoffer via Digitalmars-d-learn
On 11/25/20 7:17 PM, Q. Schroll wrote: On Wednesday, 25 November 2020 at 21:57:12 UTC, H. S. Teoh wrote: On Wed, Nov 25, 2020 at 09:49:12PM +, Paul Backus via Digitalmars-d-learn wrote: On Wednesday, 25 November 2020 at 21:16:06 UTC, Q. Schroll wrote: > On Wednesday, 25 November 2020 at

Re: Simulating computed goto

2020-11-26 Thread Dukc via Digitalmars-d-learn
On Wednesday, 25 November 2020 at 20:05:28 UTC, NonNull wrote: So to simulate computed goto have to 1. wrap switch(x) in a loop [ while(0) ] 2. inside each case recompute x (instead of jump to computed y) 3. jump back to execute switch again [ continue ] It does look as if a nested switch can

Automatic update system

2020-11-26 Thread vnr via Digitalmars-d-learn
Hello, I have a program written in D which is open-source on GitHub. I would appreciate it if, when I release a new version, users would be notified by the program and that it offers an automatic update, i.e. the user doesn't have to reinstall the whole repository himself, but that it is