Hi All,
Isn't there a save feature for `iota()`?
```d
import std.stdio;
import std.range;
void main()
{
foreach(num; iota!char('a', 'f').chunks(3)/*
"onetwosixfour".chunks(3)//*/
) {
//auto n = num.save();
num.writeln(": ", num.walkLength);
}
On Thursday, 3 November 2022 at 06:02:13 UTC, Mike Parker wrote:
are in C++. D enforces the distinction that C++
...that C++ programmers often follow by convention.
On Thursday, 3 November 2022 at 05:41:06 UTC, Siarhei Siamashka
wrote:
Thanks for the link and also thanks for confirming that you
have no clue what's going on. I think that what actually
That's not necessary. He does know what's going on and pointed
you to the correct place. The second para
On Thursday, 3 November 2022 at 05:10:06 UTC, matheus wrote:
https://dlang.org/spec/class.html
Thanks for the link and also thanks for confirming that you have
no clue what's going on. I think that what actually happens is
that the D code
```D
A a2;
a2.foo();
```
is roughly equivalent
On Thursday, 3 November 2022 at 04:41:14 UTC, Siarhei Siamashka
wrote:
...
https://dlang.org/spec/class.html
Matheus.
C++ code:
```C++
#include
class A {
public:
void foo() { std::cout << "foo" << std::endl; }
};
int main() {
auto a1 = new A;
a1->foo(); // prints "foo"
A a2;
a2.foo(); // prints "foo"
delete a1;
}
```
D code:
```D
@safe:
import std.stdio;
class A {
void foo() { writeln("foo"); }
}
why foo2 is not inferred as scope which is shorter scope then
foo1?
import std.stdio;
@safe:
class Obj {@safe: override string toString() { return "obj";
} }
struct Foo1
{@safe:
this(Obj obj) { this._obj = obj; }
~this() { _obj = null; } // do something with
On 02.11.22 17:24, Kagamin wrote:
Another idea is to separate the script and interpreter then compile them
together.
```
--- interp.d ---
import script;
import ...more stuff
...boilerplate code
int main()
{
interpret(script.All);
return 0;
}
--- script.d ---
#! ?
module script;
import min
On 02.11.22 20:16, H. S. Teoh wrote:
On Wed, Nov 02, 2022 at 03:08:36PM +, JN via Digitalmars-d-learn wrote:
On Tuesday, 1 November 2022 at 23:40:22 UTC, Christian Köstlin wrote:
sh("touch %s".format(t.name));
One of the problems of many Make-like tools is that they offe
On Wed, Nov 02, 2022 at 03:08:36PM +, JN via Digitalmars-d-learn wrote:
> On Tuesday, 1 November 2022 at 23:40:22 UTC, Christian Köstlin wrote:
> > sh("touch %s".format(t.name));
>
> One of the problems of many Make-like tools is that they offer lots of
> freedom, especially w
Another idea is to separate the script and interpreter then
compile them together.
```
--- interp.d ---
import script;
import ...more stuff
...boilerplate code
int main()
{
interpret(script.All);
return 0;
}
--- script.d ---
#! ?
module script;
import mind;
auto All=Task(...);
...more decla
But embedded sdl is likely to be dwarfed by the actual code
anyway.
On Tuesday, 1 November 2022 at 23:40:22 UTC, Christian Köstlin
wrote:
I am still trying to find answers to the following questions:
1. Is it somehow possible to get rid of the dub single file
scheme, and
e.g. interpret a full dlang script at runtime?
If there was an interpreter like
```
#!
On Tuesday, 1 November 2022 at 23:40:22 UTC, Christian Köstlin
wrote:
sh("touch %s".format(t.name));
One of the problems of many Make-like tools is that they offer
lots of freedom, especially when allowing you to launch arbitrary
shell commands. But this also comes with drawb
On 02.11.22 04:07, rikki cattermole wrote:
Something to consider:
dub can be used as a library.
You can add your own logic in main to allow using your build
specification to generate a dub file (either in memory or in file system).
Nice ... I will perhaps give that a try!
Kind regards,
Chris
On 02.11.22 03:25, Tejas wrote:
On Tuesday, 1 November 2022 at 23:40:22 UTC, Christian Köstlin wrote:
Dear dlang-folk,
one of the tools I always return to is rake
(https://ruby.github.io/rake/). For those that do not know it, its a
little like make in the
sense that you describe your build a
On 02.11.22 00:51, Adam D Ruppe wrote:
I don't have specific answers to your questions but your goal sounds
similar to Atila's reggae project so it might be good for you to take a
look at:
https://code.dlang.org/packages/reggae
Hi Adam,
thanks for the pointer. I forgot about reggae ;-)
From
On Tuesday, 1 November 2022 at 17:05:03 UTC, ryuukk_ wrote:
This reminds me of an issue i reported last year...
https://issues.dlang.org/show_bug.cgi?id=22583
This seems to be very similar to the bug I am facing, mostly the
same underlying issue. Should we somehow link the 2 issues and
escal
On Tuesday, 1 November 2022 at 16:39:57 UTC, Steven Schveighoffer
wrote:
100% this is a bug in DMD. It should be filed.
I ran some more tests, removing almost any of the parameters or
changing their types seems to avoid the problem.
I also added a parameter name for the second parameter, and
19 matches
Mail list logo