Octal Prime Numbers (challenge)

2024-06-24 Thread Salih Dincer via Digitalmars-d-learn
Hello, I discovered something about octal prime numbers. I don't know if anyone has dealt with this before, but thanks to the power of the D programming language, it was very easy. So, by defining a range with the empty(), front() and popFront() functions, I produced an output, something like t

Re: Why `foo.x.saa.aa` and `foo.y.saa.aa` is the same? `shared_AA.saa` should still be instance variable, not class variable, right?

2024-06-24 Thread Kagamin via Digitalmars-d-learn
It's a bug.

Re: Why `foo.x.saa.aa` and `foo.y.saa.aa` is the same? `shared_AA.saa` should still be instance variable, not class variable, right?

2024-06-24 Thread mw via Digitalmars-d-learn
On Tuesday, 25 June 2024 at 02:25:14 UTC, Richard (Rikki) Andrew Cattermole wrote: On 25/06/2024 2:16 PM, mw wrote: struct shared_AA {   shared_AA_class saa = new shared_AA_class();  // by this syntax `saa` is still instance variable?   alias saa this; } When you specify an initializer lik

Re: Why `foo.x.saa.aa` and `foo.y.saa.aa` is the same? `shared_AA.saa` should still be instance variable, not class variable, right?

2024-06-24 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 25/06/2024 2:16 PM, mw wrote: struct shared_AA {   shared_AA_class saa = new shared_AA_class();  // by this syntax `saa` is still instance variable?   alias saa this; } When you specify an initializer like this, that instance of ``shared_AA_class`` gets put into the .init of ``shared_AA

Why `foo.x.saa.aa` and `foo.y.saa.aa` is the same? `shared_AA.saa` should still be instance variable, not class variable, right?

2024-06-24 Thread mw via Digitalmars-d-learn
Sorry about the silly code, but I just tried this: ``` $ cat shared_aa.d import std; synchronized class shared_AA_class { private: int[int] aa; alias aa this; public: void print() { writeln(&aa, aa); } } struct shared_AA { shared_AA_class saa = new shared_AA_class(); //

Re: Call an external program from CTFE

2024-06-24 Thread realhet via Digitalmars-d-learn
On Sunday, 23 June 2024 at 16:42:43 UTC, Richard (Rikki) Andrew Cattermole wrote: See above why the string imports was designed that way. I totally forgot the name "string imports". Now I remember, thanks. That's one data direction of the 2.

Re: Call an external program from CTFE

2024-06-24 Thread realhet via Digitalmars-d-learn
On Sunday, 23 June 2024 at 16:46:05 UTC, monkyyy wrote: On Sunday, 23 June 2024 at 16:33:54 UTC, realhet wrote: realistically you should just write a build script with two stages fun thought experiment time, if you found a programmable "FUSE"(file system api) database of some sort, mixed `-J`