Re: Introducing alid

2022-09-15 Thread Ali Çehreli via Digitalmars-d-announce
On 9/15/22 02:18, Salih Dincer wrote: On Thursday, 15 September 2022 at 02:30:43 UTC, Ali Çehreli wrote: On 9/14/22 12:08, Ali Çehreli wrote:   import alid;  // WRONG - Could not make it work   import alid.alid; // Worked with package.d file What's objection with combining all the code in

Re: Introducing alid

2022-09-15 Thread Salih Dincer via Digitalmars-d-announce
On Thursday, 15 September 2022 at 02:30:43 UTC, Ali Çehreli wrote: On 9/14/22 12:08, Ali Çehreli wrote: import alid; // WRONG - Could not make it work import alid.alid; // Worked with package.d file What's objection with combining all the code in the package into one module? SDB@79

Re: Introducing alid

2022-09-14 Thread Ali Çehreli via Digitalmars-d-announce
On 9/14/22 12:08, Ali Çehreli wrote: >- Subpackage design (thinking about it...) Ok, I think I fixed that one as well. I think my main problem was trying to import 'alid': import alid; // WRONG - Could not make it work import alid.alid; // Worked with package.d file I think

Re: Introducing alid

2022-09-14 Thread Ali Çehreli via Digitalmars-d-announce
On 9/12/22 02:15, Ali Çehreli wrote: > I am happy to publish on code.dlang.org for the first time: > >https://code.dlang.org/packages/alid I've fixed 2 of the 3 issues reported here: - Removed gratuitous function attributes - Fixed Salih's .cycle use case - Subpackage design

Re: Introducing alid

2022-09-14 Thread rikki cattermole via Digitalmars-d-announce
On 14/09/2022 8:44 PM, Ali Çehreli wrote: On 9/12/22 09:34, rikki cattermole wrote: > dub.json > errornogc/alid/errornogc.d > circularblocks/alid/circularblocks.d Considering I may want to let the users import the entire package as well with   import alid; how can I achieve my goal

Re: Introducing alid

2022-09-14 Thread Adam D Ruppe via Digitalmars-d-announce
On Wednesday, 14 September 2022 at 08:44:48 UTC, Ali Çehreli wrote: Considering I may want to let the users import the entire package as well with dub is poorly designed and doesn't cooperate well with D features. There's no good solution - hence the hundreds of lines long dub.json trying to

Re: Introducing alid

2022-09-14 Thread Ali Çehreli via Digitalmars-d-announce
On 9/12/22 09:34, rikki cattermole wrote: > dub.json > errornogc/alid/errornogc.d > circularblocks/alid/circularblocks.d Considering I may want to let the users import the entire package as well with import alid; how can I achieve my goal of subpackages? Telling me to forget about

Re: Introducing alid

2022-09-13 Thread Salih Dincer via Digitalmars-d-announce
On Wednesday, 14 September 2022 at 02:58:07 UTC, rikki cattermole wrote: Of course you are free to lie and say its mutable, but you can't lie to the cpu. It'll error if you try to write to it, resulting in the end of a process. I agree with what you said. Moreover, I sign it as an electronics

Re: Introducing alid

2022-09-13 Thread rikki cattermole via Digitalmars-d-announce
On 14/09/2022 2:48 PM, Salih Dincer wrote: I'm far from making a solid recommendation.  Immutable with const still doesn't make sense to me.  I claim we can live without them. Immutable confuses me a lot. I think we should take control by creating our own types.  D Language should be

Re: Introducing alid

2022-09-13 Thread Salih Dincer via Digitalmars-d-announce
On Tuesday, 13 September 2022 at 15:24:20 UTC, Ali Çehreli wrote: On 9/12/22 22:24, Salih Dincer wrote: 2) This point is about a topic that I brought up recently: Types gain a 'const' eagerly (and they have to, understandably). For example, in your example you are caching an 'int', but my

Re: Introducing alid

2022-09-13 Thread Ali Çehreli via Digitalmars-d-announce
On 9/12/22 22:24, Salih Dincer wrote: > `source.CachedRange!(ElementCache!(Result)).CachedRange.front` is not > callable using a `const` object This exposes at least two issues: 1) The error was because I did not define cached's front as const because it has to expand the underlying buffer (a

Re: Introducing alid

2022-09-13 Thread Salih Dincer via Digitalmars-d-announce
On Tuesday, 13 September 2022 at 07:25:18 UTC, SDB@79 wrote: Is it the same with the new D versions? Now I replaced the cycle() to the leftward and tried it with the current version. It works great! ```d 0.iota!double(1,.1).cycle.cached.take(30).writeln; // [0, 0.1, 0.2, 0.3, 0.4, 0.5,

Re: Introducing alid

2022-09-12 Thread Salih Dincer via Digitalmars-d-announce
On Monday, 12 September 2022 at 09:15:34 UTC, Ali Çehreli wrote: I am happy to publish on code.dlang.org for the first time: https://code.dlang.org/packages/alid Thanks to everyone who made registering a dub package so easy! :) Hoş geldin AliD :) Thank you very much for bringing these

Re: Introducing alid

2022-09-12 Thread rikki cattermole via Digitalmars-d-announce
On 13/09/2022 4:25 AM, Ali Çehreli wrote: On 9/12/22 07:43, rikki cattermole wrote: Looks pretty well tested, nice! Thanks! Proud with 100% coverage. :) I was going to ask about coverage, that is awesome! But in other less nice things, I take it you did not test with GDC? GDC does not

Re: Introducing alid

2022-09-12 Thread Ali Çehreli via Digitalmars-d-announce
On 9/12/22 07:43, rikki cattermole wrote: Looks pretty well tested, nice! Thanks! Proud with 100% coverage. :) But in other less nice things, I take it you did not test with GDC? GDC does not support cli args with the same names as dmd. One of these is -mv. So far, I started learning by

Re: Introducing alid

2022-09-12 Thread rikki cattermole via Digitalmars-d-announce
Looks pretty well tested, nice! But in other less nice things, I take it you did not test with GDC? GDC does not support cli args with the same names as dmd. One of these is -mv. The file structure of subPackage/alid/subPackage will not require it and you will not have the cross import

Introducing alid

2022-09-12 Thread Ali Çehreli via Digitalmars-d-announce
I am happy to publish on code.dlang.org for the first time: https://code.dlang.org/packages/alid Thanks to everyone who made registering a dub package so easy! :) 1) Currently, the main module in `alid` is `cached`, which - caches range elements to ensure each is executed once (most