Hello, I was wondering why the following code does not compile.
```d
import std;
abstract class Range(T)
{
abstract T back();
abstract bool empty();
abstract T front();
abstract void popBack();
abstract void popFront();
}
class RangeWrapper(TRange) :
On Thursday, 19 January 2023 at 04:22:21 UTC, thebluepandabear
wrote:
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
On Thursday, 19 January 2023 at 04:22:21 UTC, thebluepandabear
wrote:
...
I also wrote this article[1] recently exploring how one of my D
libraries make use of templates and metaprogramming.
Unfortuantely the LinkedIn editor is complete trash and I got to
the point any change at all would
On Wednesday, 18 January 2023 at 16:42:00 UTC, JG wrote:
I guess such a method wouldn't be particularly generic since a
tuple does not need to consist of types that have the same
operations e.g. Tuple!(int,string) etc
That's where `areCompatibleTuples` function comes in!
On Thursday, 19 January 2023 at 04:22:21 UTC, thebluepandabear
wrote:
...
I presented a talk[1] at Dconf online 2021, which may or may not
be what you're looking for.
I know my mic audio is pretty bad, but honestly the slides
themselves have all the information you need, so you can just
On Thursday, 19 January 2023 at 12:54:39 UTC, davemo wrote:
Hello, I was wondering why the following code does not compile.
```d
import std;
[...]
It looks like the following change works fine.
```d
Range!A as()
{
return wrap(_bs.map!((b) { return cast(A) b; }));
}
```
On Friday, 20 January 2023 at 00:39:47 UTC, Seamus wrote:
Howdy folks
Honestly in my opinion PyD looks kinda abounded.
I don’t know how much effort you need to spend to run spaCy.
Just to be sure that you’ve seen this documentation
https://pyd.readthedocs.io/en/latest/index.html
Also
On 1/19/23 11:44 PM, seany wrote:
Hi
Howcan one add CSS and JS to vibe.d templates? Here is my setup (vibe.d
project initiated with dub using dub init myproject vibe.d):
./public:
main.css main.js
./source:
app.d
./views:
auth2fa.dt fail.dt login.dt pair.dt passfail.dt userfail.dt
roduct/learning-d/9781783552481?_ga=2.241359490.1811075590.1674153096-1605518740.1674153096
or Adam's book
https://www.packtpub.com/product/d-cookbook/9781783287215?_ga=2.198287279.1811075590.1674153096-1605518740.1674153096
They're older than 2019, but I don't think much of the material
Take this example:
```d
import std;
void main()
{
auto c = "a|b|c|d|e".splitter('|');
c.writeln;
string[] e = ["a", "b", "c", "d", "e"];
assert(c.equal(e));
typeof(c).stringof.writeln;
}
```
The program prints:
["a", "b", "c", "d", "e"]
Result
What is the purpose of this
On 1/19/23 10:11 PM, Ruby The Roobster wrote:
Take this example:
```d
import std;
void main()
{
auto c = "a|b|c|d|e".splitter('|');
c.writeln;
string[] e = ["a", "b", "c", "d", "e"];
assert(c.equal(e));
typeof(c).stringof.writeln;
}
```
The program prints:
["a", "b",
On Fri, Jan 20, 2023 at 03:11:33AM +, Ruby The Roobster via
Digitalmars-d-learn wrote:
> Take this example:
>
> ```d
> import std;
> void main()
> {
> auto c = "a|b|c|d|e".splitter('|');
> c.writeln;
> string[] e = ["a", "b", "c", "d", "e"];
> assert(c.equal(e));
>
On Friday, 20 January 2023 at 03:30:56 UTC, Steven Schveighoffer
wrote:
On 1/19/23 10:11 PM, Ruby The Roobster wrote:
...
The point is to be a range over the original input, evaluated
lazily. Using this building block, you can create an array, or
use some other algorithm, or whatever you
Hi
Howcan one add CSS and JS to vibe.d templates? Here is my setup
(vibe.d project initiated with dub using dub init myproject
vibe.d):
./public:
main.css main.js
./source:
app.d
./views:
auth2fa.dt fail.dt login.dt pair.dt passfail.dt userfail.dt
I am trying to add a css file
On 1/19/23 19:11, Ruby The Roobster wrote:
> typeof(c).stringof.writeln;
> The program prints:
>
> ["a", "b", "c", "d", "e"]
> Result
>
> What is the purpose of this 'Result' type?
Just to make sure, 'Result' is what the programmer of a Phobos algorithm
chose to name a struct type. It
On Friday, 20 January 2023 at 00:39:47 UTC, Seamus wrote:
Howdy folks
I am new around these parts and looking forward to getting
stuck into some D development. Really liking it so far, just
one some questions though... I am working on a project that did
not sit well with me when I tried it
On Friday, 20 January 2023 at 03:11:33 UTC, Ruby The Roobster
wrote:
Take this example:
```d
import std;
void main()
{
auto c = "a|b|c|d|e".splitter('|');
c.writeln;
string[] e = ["a", "b", "c", "d", "e"];
assert(c.equal(e));
typeof(c).stringof.writeln;
}
```
The program
On Friday, 20 January 2023 at 03:11:33 UTC, Ruby The Roobster
wrote:
What is the purpose of this 'Result' type? To serve as a
generic range? Because, it seems to only cause problems...
No.
When I first started learning this language, I thought the same
thing. However, such a designm
Hello
Please consider this diet template:
doctype html
html(lang="es", dir="ltr")
head
meta(name="viewport",
content="width=device-width, user-scalable=no, initial-scale=1.0")
meta(charset="utf-8")
On 1/19/23 6:24 PM, seany wrote:
Hello
Please consider this diet template:
doctype html
html(lang="es", dir="ltr")
head
meta(name="viewport", content="width=device-width,
user-scalable=no, initial-scale=1.0")
On Friday, 20 January 2023 at 01:32:04 UTC, Steven Schveighoffer
wrote:
On 1/19/23 6:24 PM, seany wrote:
[...]
Did you mean to include straight HTML here? I don't think that
is supported.
[...]
You are indeed right. The Link was a problem, and removing the
link actually have sorted the
Howdy folks
I am new around these parts and looking forward to getting stuck
into some D development. Really liking it so far, just one some
questions though... I am working on a project that did not sit
well with me when I tried it in Python. I need static typing
(above and beyond MyPy, as
On 1/19/23 10:34 PM, Ruby The Roobster wrote:
On Friday, 20 January 2023 at 03:30:56 UTC, Steven Schveighoffer wrote:
On 1/19/23 10:11 PM, Ruby The Roobster wrote:
...
The point is to be a range over the original input, evaluated lazily.
Using this building block, you can create an array, or
On Fri, Jan 20, 2023 at 03:34:43AM +, Ruby The Roobster via
Digitalmars-d-learn wrote:
> On Friday, 20 January 2023 at 03:30:56 UTC, Steven Schveighoffer wrote:
> > On 1/19/23 10:11 PM, Ruby The Roobster wrote:
> > ...
> >
> > The point is to be a range over the original input, evaluated
> >
On Friday, 20 January 2023 at 03:11:33 UTC, Ruby The Roobster
wrote:
Take this example:
[...]
What is the purpose of this 'Result' type? To serve as a
generic range?
Yes this is a lazy input range. Use `.array` to yield directly as
a concrete value,
then you can append using `~=`.
Note
25 matches
Mail list logo