On Sunday, 22 September 2019 at 04:15:53 UTC, lili wrote:
Hi:
yesterday I saw some d code, where is an .fn() call syntax,
what is it mean.
It means that `fn` is looked up in the module's top-level scope.
Source: https://dlang.org/spec/expression.html#identifier
Hi:
yesterday I saw some d code, where is an .fn() call syntax,
what is it mean.
On Saturday, September 21, 2019 12:52:23 PM MDT Dennis via Digitalmars-d-
learn wrote:
> Since I marked the method as const, `auto a = head` got the type
> const(Node!T) and `a = a.next` no longer compiled. With structs
> you can declare a const(Node!T)* (mutable pointer to const node),
> but I
Sorry. I posted the wrong file. This is the one that works:
```
import std.stdio;
import std.conv;
class TabList
{
private:
Tab _head;
int _lastUniqueID = 0;
string labelText;
this()
{
append();
}
On Saturday, 21 September 2019 at 18:52:23 UTC, Dennis wrote:
On Saturday, 21 September 2019 at 08:34:09 UTC, Ron Tarrant
wrote:
Thanks, Dennis. Not performant... It doesn't work? I was
hoping for a complete, working example, but maybe this'll help.
Bad word choice (it appears it's debatable
On Saturday, 21 September 2019 at 08:34:09 UTC, Ron Tarrant wrote:
Thanks, Dennis. Not performant... It doesn't work? I was hoping
for a complete, working example, but maybe this'll help.
Bad word choice (it appears it's debatable whether 'performant'
even is a word), I meant it was a simple
Thanks for all the responses, y'all.
I got it figured out thanks to ag0aep6g pointing out something I
forgot about the nature of class objects in D (Damn my failing
memory). The results will show up on the gtkDcoding blog sometime
in (I'm guessing) November as part of the the Notebook
On Saturday, 21 September 2019 at 13:42:09 UTC, Bogdan wrote:
Well, this seems to be working:
float[4] doSimd(float[4] values, float delta)
{
float4 v_delta = delta;
float4 v_values = __simd(XMM.ADDPS,
__simd(XMM.LODAPS, values[0]),
Well, this seems to be working:
float[4] doSimd(float[4] values, float delta)
{
float4 v_delta = delta;
float4 v_values = __simd(XMM.ADDPS,
__simd(XMM.LODAPS, values[0]),
v_delta);
return [v_values[0],
Here's a cleaned up version:
```
import std.stdio;
import core.simd;
void main()
{
float[4] values = [1.0f, 2.0f, 3.0f, 4.0f];
float delta = 15.0f;
writeln(doSimd(values, delta));
}
float[4] doSimd(float[4] values, float delta)
{
float4 v_delta = delta;
float4 v_values = values;
I'm trying to understand how to use the `core.simd`
functionality, and I'm having trouble initializing a float4
vector.
Here's my example code:
```
import std.stdio;
import core.simd;
void main()
{
float[4] values = [1.0f, 2.0f, 3.0f, 4.0f];
float delta = 15.0f;
writeln(doSimd(values,
On Friday, 20 September 2019 at 20:26:03 UTC, Ron Tarrant wrote:
Hi guys,
I've been banging my head on the screen with this one for the
last week or so. For whatever reason, I'm having major problems
understanding how to implement a doubly-linked list in D. I
don't know if it's because I'm
On Saturday, 21 September 2019 at 09:03:13 UTC, Ron Tarrant wrote:
Ah! Thanks, ag0aep6g. I was wondering about that when I was
writing the code. (If I already knew this, I'd forgotten.) I
did as you suggested, took out all '*' and '&' and it works
perfectly.
Is this what you want?
---
Hi,
I've got a dub package with the following configuration file
---
{
"description": "A minimal D application.",
"license": "proprietary",
"authors": [
"me"
],
"copyright": "Copyright © 2019, me",
"name": "test",
"targetType" : "none",
"dependencies": {
On Saturday, 21 September 2019 at 08:49:48 UTC, ag0aep6g wrote:
On 21.09.19 10:34, Ron Tarrant wrote:
Here's a question for the room:
Does a doubly-linked list always have to be done with structs?
Can it be classes instead? (Maybe that's why I can't get it to
work, because I've been trying
On 21.09.19 10:34, Ron Tarrant wrote:
Here's a question for the room:
Does a doubly-linked list always have to be done with structs? Can it be
classes instead? (Maybe that's why I can't get it to work, because I've
been trying to make an OOP version?)
It can be done with classes.
When I
On Friday, 20 September 2019 at 20:35:41 UTC, H. S. Teoh wrote:
Not a minimal example by any means, but Phobos *does* come with
a doubly-linked list implementation: std.container.dlist.
Thanks, H.S. I did come across that in my search. Trouble is,
with all the extra stuff in there, I'm
On Friday, September 20, 2019 7:08:03 AM MDT Joseph Rushton Wakeling via
Digitalmars-d-learn wrote:
> On Thursday, 19 September 2019 at 22:55:55 UTC, Jonathan M Davis
>
> wrote:
> > For better or worse, ranges were more or less set up as a
> > linear hierarchy, and it's unlikely that use cases
18 matches
Mail list logo