On Sunday, 22 January 2023 at 04:42:09 UTC, dan wrote:
I would like to write a function which takes an array as input,
and returns a sorted array without duplicates.
```d
private S[] _sort_array( S )( S[] x ) {
import std.algorithm;
auto y = x.dup;
y.sort;
auto z =
I would like to write a function which takes an array as input,
and returns a sorted array without duplicates.
In fact, i have a function which does this, but i think it may
have some extra unnecessary steps.
```d
private S[] _sort_array( S )( S[] x ) {
import std.algorithm;
a
```D
TestStruct ts = {
a: 2, b: 3,
op: (s) {
return s.a + s.b;
}
};
```
This simple! just like with C's designated initializers
Oops i clicked "Send" too fast
On Saturday, 21 January 2023 at 22:53:19 UTC, Matt wrote:
I am trying to write a graphics engine for my university
capstone project, and really wanted to give it a try in D, as
both a talking point, and because I love the language. I'm
using dub to build the library, and the demo application
t
On 1/21/23 5:53 PM, Matt wrote:
I am trying to write a graphics engine for my university capstone
project, and really wanted to give it a try in D, as both a talking
point, and because I love the language. I'm using dub to build the
library, and the demo application that'll use it.
However, I
Hi,
I am trying to create a struct with a settable method that has
access to the struct scope.
Is this the only way?
Is there a way to give access without explicitly passing `this`?
```d
import std.stdio;
struct TestStruct{
float /*--*/ a;
float /*--*/
On Saturday, 21 January 2023 at 22:53:19 UTC, Matt wrote:
but what is the D equivalent to header files, and what do I
have to do to prepare and use my library in another project?
The most common and easiest thing in D is to just distribute the
source files, the compiler can pull whatever it ne
I am trying to write a graphics engine for my university capstone
project, and really wanted to give it a try in D, as both a
talking point, and because I love the language. I'm using dub to
build the library, and the demo application that'll use it.
However, I've come across a problem. In C/C
Thanks for all the suggestions folks!
I will take a look. Cheers.
```
call dutyl#register#tool('dcd-client','dcd-client')
call dutyl#register#tool('dcd-server','dcd-server')
call deoplete#custom#option('auto_complete_delay',200)
```
I managed after some tuning.
cat coc-settings.json
```
{
"languageserver": {
"d": {
"command": "/usr/home/x/serve-d/serve-d",
"filetypes": ["d"],
"trace.server": "on",
"r
On Saturday, 21 January 2023 at 13:17:44 UTC, Alain De Vos wrote:
Let's say i write
"write" press tab in neovim i want it to guess "writeln".
How to configure neovim for this.
[ Note "ncm2" lets my neovim crash. But maybe there are
alternatives ]
[ vscode is not an option as compiling electron
Let's say i write
"write" press tab in neovim i want it to guess "writeln".
How to configure neovim for this.
[ Note "ncm2" lets my neovim crash. But maybe there are
alternatives ]
[ vscode is not an option as compiling electron takes ages]
14 matches
Mail list logo