On Sunday, 12 December 2021 at 11:57:43 UTC, vit wrote:
Hello, why does this code fail to compile?
```d
struct Foo(T){
this(Rhs, this This)(scope Rhs rhs){
}
this(ref scope typeof(this) rhs){
}
}
struct Bar{
Foo!int foo;
}
void main(){
}
```
error: Segmentation
On Sunday, 5 December 2021 at 12:54:21 UTC, Tim wrote:
DQt contains new experimental bindings for using a subset of Qt
with D.
Qt is a library for writing cross-platform graphical user
interfaces.
Currently bindings exist for the Qt modules core, gui and
widgets. The
bindings use extern(C++)
On Sunday, 28 November 2021 at 16:44:38 UTC, russhy wrote:
On Sunday, 28 November 2021 at 14:53:17 UTC, user1234 wrote:
...
there is a plugin to demangle things automatically
https://github.com/ANtlord/gdb-ddemangle
That's off-topic. The point here is that you can (unfortunately)
On Saturday, 27 November 2021 at 14:17:11 UTC, Eduard Staniloiu
wrote:
Hello,
I'm trying to use `gdb` to debug D binaries, but I'm having
trouble accessing the methods of a struct or class. It seems
that `gdb` doesn't see them.
[...]
Looking forward to your answers,
Edi
[0] -
On Saturday, 27 November 2021 at 11:15:45 UTC, Igor wrote:
Two years ago there was a [Google Summer of Code
project](https://forum.dlang.org/thread/izaufklyvmktnwsrm...@forum.dlang.org) to implement these primitives in pure D for various reason. It was concluded the project isn't viable and was
On Sunday, 14 November 2021 at 05:12:58 UTC, Andrey Zherikov
wrote:
Here is my code:
[...]
`W()` (2) works as expected but is it possible to achieve the
same without parenthesis so `getAttributes` trait returns
`tuple(L("app.d", 16LU))` for (1)?
No, without parens this is really the function
On Sunday, 31 October 2021 at 17:51:45 UTC, data pulverizer wrote:
On Sunday, 31 October 2021 at 17:35:35 UTC, Ali Çehreli wrote:
On 10/31/21 7:07 AM, Salih Dincer wrote:
> [...]
because I
> [...]
Makes sense because e.g. the following works:
struct S {
auto i = 42;
}
I bet the problem
On Friday, 22 October 2021 at 05:54:21 UTC, Kirill wrote:
I am not a compiler expert, but I genuinely would like to know
why we have Dmain.
I've been looking at the generated assembly code recently and
noticed the _Dmain function. I didn't notice it before. Then
there is main, where Dmain is
On Sunday, 17 October 2021 at 21:00:19 UTC, Steven Schveighoffer
wrote:
On 10/16/21 6:47 PM, solidstate1991 wrote:
When I make this call
```
format(" %3.3f"w, avgFPS);
```
my program immediately crashes with an access violation error.
The debugger out is different between x86 and x86-64.
On Wednesday, 22 September 2021 at 15:27:23 UTC, wjoe wrote:
Is there a convenient way to exclude it from coverage ?
Because adjusting the -cov=xx percentage is kind of annoying
and may omit other things as well.
Do you care and if yes how do you handle it ?
You have several options
1.
On Monday, 13 September 2021 at 18:06:42 UTC, NonNull wrote:
On Monday, 13 September 2021 at 14:42:42 UTC, jfondren wrote:
On Monday, 13 September 2021 at 14:33:03 UTC, user1234 wrote:
- condition al expression ` cond ? exp : exp `
And many other boolean operators, unary !, binary && and ||
On Monday, 13 September 2021 at 17:54:43 UTC, eugene wrote:
On Monday, 13 September 2021 at 17:40:41 UTC, user1234 wrote:
The problems seems to lies in `newSignal()` which "would" not
allocate using the GC.
final Signal newSignal(int signum) {
Signal sg = new Signal(signum);
On Monday, 13 September 2021 at 17:18:30 UTC, eugene wrote:
[...]
At first glance and given the fact that some code necessary to
diagnose the problem accurately is missing:
`new Stopper` allocates using the GC. it's then a "GC range",
it's content will be scanned and handled by the GC,
On Monday, 13 September 2021 at 17:40:41 UTC, user1234 wrote:
On Monday, 13 September 2021 at 17:18:30 UTC, eugene wrote:
[...]
At first glance and given the fact that some code necessary to
diagnose the problem accurately is missing:
`new Stopper` allocates using the GC. it's then a "GC
On Monday, 13 September 2021 at 14:59:38 UTC, Paul Backus wrote:
On Monday, 13 September 2021 at 14:42:42 UTC, jfondren wrote:
On Monday, 13 September 2021 at 14:33:03 UTC, user1234 wrote:
- condition al expression ` cond ? exp : exp `
And many other boolean operators, unary !, binary && and
On Monday, 13 September 2021 at 15:29:05 UTC, user1234 wrote:
[...]
so this is a bit like the postincr case.
i.e "prevent the semantics to be hijacked".
On Monday, 13 September 2021 at 14:42:42 UTC, jfondren wrote:
On Monday, 13 September 2021 at 14:33:03 UTC, user1234 wrote:
- condition al expression ` cond ? exp : exp `
And many other boolean operators, unary !, binary && and ||
They are all indirectly supported if `opCast` is overloaded:
On Monday, 13 September 2021 at 14:33:03 UTC, user1234 wrote:
what else ?
when you have
```d
alias AA1 = int[int];
alias AA2 = AA1[int];
```
then you can write
```d
AA2 aa;
aa[0] = [0 : 0];
aa[0][0] = 0;
```
The `[0][0]` cannot be expressed using operator overloads (and a
custom map type
On Monday, 13 September 2021 at 14:12:36 UTC, NonNull wrote:
Which operators cannot be overloaded and why not?
Let's start the list.
- `new` and `delete`
Because operators are overloaded in aggregates
new was supported but not anymore, the idea is
that a an aggregate should not be tied a
On Wednesday, 1 September 2021 at 23:04:18 UTC, Per Nordlöw wrote:
On Wednesday, 1 September 2021 at 22:51:40 UTC, Per Nordlöw
wrote:
Can somebody explain the need for
Ok, `__traits(isSame)` always returns false for values.
This is very unfortunate as `std.traits.isSame` is one of the
most
On Wednesday, 1 September 2021 at 22:51:40 UTC, Per Nordlöw wrote:
Can somebody explain the need for
```d
private template isSame(alias a, alias b)
{
static if (!is(typeof( && )) // at least one is an
rvalue
&& __traits(compiles, { enum isSame = a == b; }))
// c-t comparable
On Wednesday, 1 September 2021 at 18:20:59 UTC, Paul Backus wrote:
On Monday, 30 August 2021 at 16:12:57 UTC, Adam D Ruppe wrote:
On Monday, 30 August 2021 at 16:03:29 UTC, Guillaume Piolat
wrote:
Hyped by ProtoObject, this is our hope for a nothrow @nogc
.destroy eventually!
This fails
On Wednesday, 1 September 2021 at 22:01:12 UTC, user1234 wrote:
On Wednesday, 1 September 2021 at 20:59:15 UTC, james.p.leblanc
wrote:
[...]
The question is if there is a way to enable UFCS without such
wrapper
sorry my attention got stuck on the singleton.
So my suggestion is rather to
On Wednesday, 1 September 2021 at 20:59:15 UTC, james.p.leblanc
wrote:
[...]
The question is if there is a way to enable UFCS without such
wrapper
sorry my attention got stuck on the singleton.
So my suggestion is rather to only enable the ufcs style. This
highlights the fact that the class
On Wednesday, 1 September 2021 at 16:02:47 UTC, james.p.leblanc
wrote:
Dear D-ers,
For simple plotting using a gnuplot process, I have created a
singleton object (a stripped
down minimal working example is below.)
[...]
**However, those wrapper functions in the gnuplot_mod module
looks a
On Monday, 16 August 2021 at 14:14:27 UTC, DLearner wrote:
Is there a compiler option that would warn that variable 'j' is
defined but not used?
Best regards
No in DMD but you can use
[D-Scanner](https://code.dlang.org/packages/dscanner) for that.
The check works reasonably as long as
On Saturday, 14 August 2021 at 04:09:34 UTC, Tejas wrote:
[...]
Oh right, the ```.``` operator will reference variable in the
_module_ scope, not just the _immediate outer scope_,
you can use the module name to disambiguate as well. To extend
Mike answer, the general rule is that if you can
On Friday, 13 August 2021 at 23:33:05 UTC, Paul Backus wrote:
On Friday, 13 August 2021 at 23:23:55 UTC, Marcone wrote:
writeln("Hello World!"[x.indexOf("e")..x.indexOf("r")]);
indexOf()is just a simple example, not the goal. I want handle
literal inside [] like it bellow, but in literal:
On Friday, 13 August 2021 at 21:05:22 UTC, Marcone wrote:
How to extend the string class to return this inside the square
bracket the same way opDollar $ returns the length of the
string? Thank you.
import std;
void main(){
writeln("Hello World!"[0..this.indexOf("o")]);
}
On Sunday, 8 August 2021 at 11:58:42 UTC, Bogdan wrote:
Hi,
I tried to update my server from dmd v2.096.1 to v2.097 and I
started getting this linker error:
```
Linking...
/usr/bin/ld:
On Monday, 2 August 2021 at 14:31:45 UTC, Rekel wrote:
I recently found one can return function calls to void
functions, though I don't remember any documentation mentioning
this even though it doesn't seem trivial.
[...]
If this is intended, where could I find this in the docs? I
haven't
On Friday, 30 July 2021 at 23:48:41 UTC, solidstate1991 wrote:
I'm doing some audio-related work, and one thing I need is to
unregister from (and maybe later temporarily re-register to)
the GC, since it would cause some issues,
GC + audio is only a problem if its pauses (e.g in the audio
On Saturday, 31 July 2021 at 13:12:21 UTC, Tejas wrote:
```d
class A{
~this(){}
destructA(){
~this()
}
}
class B:A{
~this(){}
destructB(){
~this();
~super();
}
}
```
This could allow ```@nogc``` crowd to run destructors without
calling
On Wednesday, 28 July 2021 at 05:38:44 UTC, Tejas wrote:
When I initially saw it, I was hopeful that it would allow me
to bypass some of the restrictions of ```const``` , but it
literally just takes a type and strips the ```const``` from it,
you can't pass a variable to it in order to get rid
On Friday, 23 July 2021 at 20:24:02 UTC, Jim wrote:
Hello,
I've been playing with D and trying to understand how to work
with @nogc. I must be doing something wrong, because even
though I tagged the destructor for my class `@nogc`, I'm
getting the following error: `.\min.d(27): Error:
On Sunday, 25 July 2021 at 01:17:06 UTC, user1234 wrote:
That bypasses the runtime mechanism for classes construction
and destruction.
But `new` and `destroy` must not be called anymore, you must
get stick with your own system.
and of course `cast(Object)` should be prohibited (maybe `opCast`
On Friday, 23 July 2021 at 10:04:55 UTC, wjoe wrote:
Is there a way for the compiler to consider doc comments in
auto generated, mixed in code?
E.g.
```D
string fooImpl = q{
/// Bar does fancy things.
const void bar() { /*do something fancy*/ }
};
/// This is Foo
struct Foo(A, B, C) {
On Saturday, 3 July 2021 at 09:05:28 UTC, vnr wrote:
Hello,
I am trying to make a small generic lexer that bases its token
analysis on regular expressions. The principle I have in mind
is to define a token type table with its corresponding regular
expression, here is the code I currently
On Wednesday, 23 June 2021 at 17:26:04 UTC, data pulverizer wrote:
Hi Guys,
I recently gave a presentation (7 minutes since the conference
became very popular) introducing the D programming language to
the insurance industry:
On Wednesday, 5 May 2021 at 11:51:27 UTC, evilrat wrote:
On Wednesday, 5 May 2021 at 10:35:23 UTC, Dominikus Dittes
Scherkl wrote:
On Wednesday, 5 May 2021 at 10:01:13 UTC, user1234 wrote:
...
To answer both:
clang has lots of templates, sometimes not so trivial ones, its
code base filled
On Wednesday, 5 May 2021 at 06:50:29 UTC, evilrat wrote:
(Oh My) Gentool - Yet another C/C++ binding generator.
It is a tool to convert C/C++ code to D usable form. It takes
JSON config, basically all C++ compiler flags and switches, and
outputs extern(C++) declarations, (hopefully) in usable
On Saturday, 1 May 2021 at 13:04:15 UTC, sighoya wrote:
On Wednesday, 28 April 2021 at 22:41:03 UTC, Alain De Vos wrote:
What are the strengths and weaknesses comparing the two
languages ?
I can name a strength of dlang is the working binding to tk
and gtk.
Just to say, Crystal is a neat
On Friday, 30 April 2021 at 17:58:43 UTC, kdevel wrote:
dmd since 2.096.0 with ``t.d``
```t.d
module t;
class t {
}
```
and ``x.d``
```x.d
module x;
import t;
void main ()
{
t x = new t;
}
```
reports
$ dmd -i x.d
x.d(6): Error: import `x.t` is used as a type
x.d(6): Error:
On Thursday, 29 April 2021 at 06:38:53 UTC, evilrat wrote:
On Wednesday, 28 April 2021 at 19:46:00 UTC, Alain De Vos wrote:
It is rather clear what I want to achieve but virtual
functions give me headache because dlang does not now the word
virtual.
It's virtual by default. The opposite is
On Thursday, 1 April 2021 at 09:30:28 UTC, DLearner wrote:
On Wednesday, 31 March 2021 at 23:21:59 UTC, russhy wrote:
On Wednesday, 31 March 2021 at 17:54:38 UTC, DLearner wrote:
[...]
Can you show the print function?
Maybe the problem lies there?
Using rdmd, I believe the code below
On Wednesday, 17 March 2021 at 07:13:31 UTC, Chris Piker wrote:
On Wednesday, 17 March 2021 at 06:07:01 UTC, user1234 wrote:
[...]
Very handy example. Unfortunately it means that paths are
embedded
in scripts, which is usually a bad idea.
[...]
You can use a local registry too. That
On Wednesday, 17 March 2021 at 04:34:07 UTC, Chris Piker wrote:
On Wednesday, 17 March 2021 at 03:43:22 UTC, Chris Piker wrote:
Note: I'm aware of dub. This isn't a question about dub. I'm
making scripts for local use, not redistributable binaries, so
I would like to "install" mir-algorithm
On Thursday, 4 March 2021 at 09:21:12 UTC, Siemargl wrote:
On Thursday, 4 March 2021 at 06:43:57 UTC, user1234 wrote:
otherwise another solution is to check every two monthes the
sanity of your projects. E.g a montly cronjob on a CI service
and that uses latest DMD Docker image. If it fails
On Thursday, 4 March 2021 at 05:44:53 UTC, harakim wrote:
For the record, I was able to resolve all of my issues in about
7 hours. That included upgrading from DerelictSDL to bindbc and
converting to use dub instead of make.
I hope my above post does not lead people to believe that I
don't
On Thursday, 25 February 2021 at 17:34:29 UTC, Maxim wrote:
In my opinion, that happens because of DUB can't accept my
changes to the file. But how to make the manager admit it? I
apologize to everyone who understood me wrong.
If you use an ide to edit the DUB receipt maybe it's possible
On Friday, 5 February 2021 at 21:10:21 UTC, Rumbu wrote:
Can some C++ guru translate in D the template below?
I gave up after reading a lot, but I didn't manage to
understand the meaning "&& ..."
template static uint8_t
composite_index_size(Tables const&... tables) { return
On Wednesday, 13 January 2021 at 13:47:55 UTC, Roguish wrote:
On Wednesday, 13 January 2021 at 13:30:48 UTC, Roguish wrote:
Anything else I need to know when debugging on Linux, without
an IDE?
One specific question I have is: what's the difference between
-g and -debug and -d-debug?
Also,
On Monday, 7 December 2020 at 05:28:41 UTC, user1234 wrote:
On Monday, 7 December 2020 at 04:13:16 UTC, Andrew Edwards
wrote:
Given:
===
extern(C):
char*[] hldr;
enum I = (1<<0);
struct S { char* ft; char** fm; int f; }
void main(){}
===
How do I initialize an
On Monday, 7 December 2020 at 04:13:16 UTC, Andrew Edwards wrote:
Given:
===
extern(C):
char*[] hldr;
enum I = (1<<0);
struct S { char* ft; char** fm; int f; }
void main(){}
===
How do I initialize an instance of S at global scope?
You cant. At the global scope the
On Sunday, 6 December 2020 at 11:48:34 UTC, tejas89 wrote:
What compiler flags can be passed to a Dlang compiler?
Definition of compiler flag being something like say “—wall” or
“—werror” for example. I’m not sure what is available for the
language since I’m new to it and hope to learn D as
On Wednesday, 2 December 2020 at 11:46:26 UTC, Andre Pany wrote:
Hi,
I need to retrieve the parameter identifier but only empty
strings are returned:
tuple("", "")
``` d
alias fpt = extern(C) nothrow void function(int a, int b);
void main()
{
import std.traits :
On Monday, 9 November 2020 at 08:06:54 UTC, Andrey wrote:
Hello,
Are here any differences in creation of dynamic array with
known size?
auto array = new wchar[](111);
and
wchar[] array;
array.length = 111;
It's the same. If the two are valid then you are in a function.
So it's an
On Friday, 23 October 2020 at 13:57:41 UTC, Joseph Rushton
Wakeling wrote:
On Wednesday, 21 October 2020 at 22:50:27 UTC, matheus wrote:
Since (1.1).to!int = 1, shouldn't the string value
("1.1").to!int at least try to convert to float/double and
then to int?
The thing is, that's a great way
On Monday, 12 October 2020 at 10:24:44 UTC, FreeSlave wrote:
Let's say I use Flag type named 'myflagname' in API like this:
import std.typecons;
void func(Flag!"myflagname" flag)
{
//...
}
void main()
{
func(Yes.myflagname);
}
Later I realize that 'myflagname' is a bad name and I want to
On Sunday, 11 October 2020 at 15:52:19 UTC, Anonymouse wrote:
On Saturday, 26 September 2020 at 21:45:09 UTC, Martin Nowak
Binaries took a while to hit Arch repositories, but now they
did and I'm immediately pleasantly surprised.
2.093.1:
$ time dub build -c dev
Performing "debug" build
On Wednesday, 30 September 2020 at 11:45:53 UTC, Ferhat Kurtulmuş
wrote:
On Tuesday, 29 September 2020 at 21:22:21 UTC, WhatMeWorry
wrote:
module user;
export { int myAddSeven(int a, int b); }
[...]
it is better to use this template
https://github.com/dlang/dmd/tree/master/samples/mydll
On Thursday, 1 October 2020 at 07:02:12 UTC, Imperatorn wrote:
On Sunday, 27 September 2020 at 19:20:34 UTC, Daniel N wrote:
On Saturday, 26 September 2020 at 22:12:17 UTC, Imperatorn
wrote:
On Saturday, 26 September 2020 at 21:45:09 UTC, Martin Nowak
wrote:
Glad to announce D 2.094.0, ♥ to
On Thursday, 3 September 2020 at 10:47:04 UTC, Curious wrote:
Given the following:
=a==
void main(string[] args)
{
FILE* fp = fopen(args[1].ptr, "r");
if (!fp) throw new Exception("fopen");
}
=b==
void main(string[] args)
{
FILE* fp = fopen(args[1].dup.ptr, "r");
«Trivia:
- Silq is written in the D programming language.
- To install Silq via vscode, see:
https://silq.ethz.ch/install.
- A timeline of major developments in quantum computing:
»
On Tuesday, 1 September 2020 at 02:08:54 UTC, JG wrote:
Is there anyway to remove the boilerplate code of dealing with
tuples:
I find myself having to write things like this fairly often
auto someRandomName = f(...); //where f returns a tuple with
two parts
auto firstPart =
On Thursday, 20 August 2020 at 10:12:22 UTC, aberba wrote:
Wrote something on OpenSource.com
https://opensource.com/article/20/8/nesting-d
I'm not sure. A few notes on nesting.
1. context pointer can prevent inlining. you can nest static
funcs, but then what is the point
2. bad complexity.
On Tuesday, 18 August 2020 at 19:01:17 UTC, Marcone wrote:
When I compile the source .d code to .exe adding an icon using
resource .res file in dmd 2.089.0 and later, the .exe file show
SFX zip in it is properties and open with winRar. This ir
normal or is a Bug? See images below.
Se image
On Sunday, 9 August 2020 at 01:56:54 UTC, Bruce Carneal wrote:
On Sunday, 9 August 2020 at 01:03:51 UTC, Bruce Carneal wrote:
The .alignof attribute of __vector(ubyte[32]) is 32 but
initializing an array of such vectors via an assignment to
.length has given me 16 byte alignment (and
On Wednesday, 29 July 2020 at 23:57:21 UTC, Jean-Louis Leroy
wrote:
This works:
[...]
I may be missing the obvious...or it's a compiler bug???
Yes and it's just been fixed, see
https://github.com/dlang/dmd/pull/11431.
So uncommenting the second times works on ~master.
On Wednesday, 8 July 2020 at 15:55:58 UTC, Mitacha wrote:
Hello there,
I've been trying to setup bitbucket pipelines to submit
coverage to codecov, but with no luck.
I use `dub run -b unittest-cov` and it generates .lst files
correctly, then `bash <(curl -s https://codecov.io/bash) -t
On Sunday, 5 July 2020 at 21:38:12 UTC, Per Nordlöw wrote:
On Sunday, 5 July 2020 at 21:22:13 UTC, ikod wrote:
struct AA(K,V)
{
void opAssign(V[K] aa)
{
}
}
void main()
{
AA!(string, int) custom_aa;
custom_aa = ["one":1, "two":2];
}
Forget to mention that I want the
On Sunday, 5 July 2020 at 21:06:32 UTC, Per Nordlöw wrote:
Is there a way to construct a custom written hash-table
container (struct) from an AA-literal expression?
How about iterating the literal, e.g
---
foreach (k,v; ["one":1, "two":2])
{
myCustomAA[k] = v;
}
---
On Saturday, 4 July 2020 at 13:00:16 UTC, Rainer Schuetze wrote:
Hello,
after having passed the 10 year anniversary of public
availability recently, it is finally time to release version
1.0 of Visual D, the Visual Studio extension that adds D
language support to VS 2008-2019.
You can find
On Saturday, 4 July 2020 at 22:25:06 UTC, user1234 wrote:
On Saturday, 4 July 2020 at 13:00:16 UTC, Rainer Schuetze wrote:
This would have been worth a post in D.announce but D.learn is
nice too I suppose ;)
The post appears in the two sections for some reason so there's
no problem actually.
On Saturday, 4 July 2020 at 20:48:02 UTC, drathier wrote:
On Sunday, 28 June 2020 at 10:44:26 UTC, drathier wrote:
Is there a release schedule anywhere for DMD? Any list of
tasks to be the next release? I'm only finding 5+ year old
things when searching.
Yes:
On Friday, 3 July 2020 at 19:50:51 UTC, aberba wrote:
On Friday, 3 July 2020 at 15:27:54 UTC, user1234 wrote:
On Friday, 3 July 2020 at 11:10:25 UTC, Martin Nowak wrote:
On Wednesday, 24 June 2020 at 21:01:05 UTC, Martin Nowak
wrote:
Glad to announce the first beta for the 2.093.0 release, ♥
On Friday, 3 July 2020 at 11:10:25 UTC, Martin Nowak wrote:
On Wednesday, 24 June 2020 at 21:01:05 UTC, Martin Nowak wrote:
Glad to announce the first beta for the 2.093.0 release, ♥ to
the 53 contributors.
Release Candidate is live now.
thanks but Have you see that full changelog is still
On Tuesday, 23 June 2020 at 12:00:30 UTC, Mike Parker wrote:
On Tuesday, 23 June 2020 at 12:00:06 UTC, Mike Parker wrote:
Symmetry Autumn of Code 2020 is on! My latest news post on the
D Blog talks about that, some D Language Foundation finance
updates, and whispers on the wind.
And you can
On Monday, 22 June 2020 at 01:38:41 UTC, Manfred Nowak wrote:
https://dlang.org/spec/module.html#name_lookup contains under
4.3.4 only two sentences.
While the first sentence explains, that the search ends
"as soon as a matching symbol is found",
the second sentence implies that the search
On Monday, 22 June 2020 at 01:47:49 UTC, repr-man wrote:
Is there any way to pass an unknown number of slices into a
function? I'm trying to do something along the lines of:
void func(T)(T[] args...)
{
//...
}
That wasn't working,
[...]
Thanks for the help!
Can you provide more
On Wednesday, 17 June 2020 at 11:50:27 UTC, Per Nordlöw wrote:
Should a range-compliant aggregate type realizing a parser be
encoded as a struct or class? In dmd `Lexer` and `Parser` are
both classes.
In general how should I reason about whether an aggregate type
should be encoded as a
On Saturday, 13 June 2020 at 19:11:33 UTC, Andrei Alexandrescu
wrote:
https://github.com/ZigaSajovic/optimizing-the-memory-layout-of-std-tuple
Would be interesting to adapt it for std.tuple.
Look possible. At first glance, staticSort on the template
variadic argument based on a predicate
On Thursday, 4 June 2020 at 18:01:55 UTC, Martin Nowak wrote:
Glad to announce the first beta for the 2.092.1 point release,
♥ to the 8 contributors.
http://dlang.org/download.html#dmd_beta
http://dlang.org/changelog/2.092.1.html
As usual please report any bugs at
https://issues.dlang.org
On Tuesday, 19 May 2020 at 22:04:49 UTC, MaoKo wrote:
Hello. I just want to find what is exactly the difference
between:
alias _ = void function(int);
alias void _(int);
Because it's seem that the latter can't be used in the
declaration of an array (eg: _[] ...).
I think the first is a pointer
On Tuesday, 19 May 2020 at 10:29:51 UTC, wjoe wrote:
On Tuesday, 19 May 2020 at 10:08:37 UTC, user1234 wrote:
On Tuesday, 19 May 2020 at 10:01:34 UTC, wjoe wrote:
[...]
It has no purpose. In D many attributes are allowed even if
they have no meaning.
D-Scanner checks this kind of stuff, to
On Tuesday, 19 May 2020 at 10:01:34 UTC, wjoe wrote:
As I was reading a few source files of a library I found dozens
of final struct declarations like this:
final struct Foo {
const pure final nothrow bar() { ... }
}
What's this supposed to express ?
A final class is a class that can't
On Tuesday, 12 May 2020 at 07:52:29 UTC, Dmitry Olshansky wrote:
I find that I can vaguely amusing 100% of the day and I love
standup comedy...
"standup" lol.
That reminds mesomeone who likes this genre too but he's not here
anymore...
you see just in case of...
On Wednesday, 13 May 2020 at 07:29:54 UTC, Dmitry Olshansky wrote:
On Wednesday, 13 May 2020 at 07:02:20 UTC, Dmitry Olshansky
wrote:
On Tuesday, 12 May 2020 at 07:52:29 UTC, Dmitry Olshansky
wrote:
I find that I can vaguely amusing 100% of the day and I love
standup comedy...
And I’m too
On Wednesday, 29 April 2020 at 08:34:53 UTC, Ogi wrote:
struct R {}
int front(R r) { return 42; }
void popFront(R r) {}
bool empty(R r) { return false; }
void main() {
import std.range.primitives : isInputRange;
static assert(isInputRange!R);
}
Error: static assert:
On Friday, 17 April 2020 at 21:38:23 UTC, Quantium wrote:
Are there any libs which can be used to access cmd commands?
You can pipe cmd.exe:
---
import std.process : pipeProcess, ProcessPipes;
ProcessPipes pp = pipeProcess(["cmd.exe"]);
pp.stdin.writeln("echo foobar");
pp.stdin.close;
On Wednesday, 1 April 2020 at 18:47:38 UTC, drug wrote:
Is it true that user defined types are resolved to ScopeDsymbol
and basic types aren't?
a basic type does not need to introduce a scope since it has no
members. All operators on them are supported natively and are no
modifiable, so yes
On Wednesday, 12 February 2020 at 20:58:49 UTC, Marcel wrote:
Hello!
I have two questions:
1- How can I concatenate two type sequences?
alias Concatenated = AliasSeq!(TList1, TList2);
or maybe
alias Concatenated = AliasSeq!(TList1[0..$], TList2[0..$]);
since I don't remember if they nest
On Wednesday, 12 February 2020 at 15:28:57 UTC, Anonymouse wrote:
Maybe there are some hard design decisions again
$HOME/.dub/bin, unsure. It might be difficult to globally pull
off if programs expect the binary to be placed in the source
tree (for resources).
[1]:
On Monday, 20 January 2020 at 23:16:07 UTC, Henry Claesson wrote:
This isn't a D-specific "problem", but there may be D-specific
solutions.
I have a function `doSomething()` that returns a Voldemort
type, and this same function also throws. So, there's this:
try {
auto foo =
On Sunday, 19 January 2020 at 13:02:18 UTC, Andrey wrote:
On Saturday, 18 January 2020 at 21:44:35 UTC, Boris Carvajal
wrote:
I read that thread. But:
Deprecation: initialization of immutable variable from static
this is deprecated.
Use shared static this instead.
And we get? No CTFE with
On Wednesday, 8 January 2020 at 04:40:02 UTC, Guillaume Lathoud
wrote:
Hello,
One of my D applications grew from a simple main and a few
source
files to more than 200 files. Although I minimized usage of
templating and CTFE, the compiling time is now about a minute.
I did not find any
On Wednesday, 8 January 2020 at 00:23:48 UTC, Marcel wrote:
Hello!
I'm writing a library where under certain conditions i need all
the default constructors to be disabled. I would like to tell
the user why they can't instantiate the struct.
Is there a way to do that?
class Example
{
On Sunday, 5 January 2020 at 23:23:48 UTC, Oleg B wrote:
It's analog of bindbc, but without need write boilerplate code.
May be bindbc is designed for another cases, but I don't
understand need writing triple definition for one function
(pointer, loading, wrap-function).
ssll betterC
On Wednesday, 13 November 2019 at 11:07:12 UTC, IGotD- wrote:
I'm trying to find the rationale why GC pointers (should be
names managed pointers) are using the exact same type as any
other pointer.
Doesn't this limit the ability to change the default GC type?
Doesn't this confusion make GC
On Thursday, 31 October 2019 at 12:37:55 UTC, user1234 wrote:
On Thursday, 31 October 2019 at 12:29:28 UTC, Tobias Pankrath
wrote:
[...]
Try
struct S
{
S*[] children;
}
because otherwise when you declare the array the compiler has
not finished the semantic ana of S.
so S size is not
101 - 200 of 342 matches
Mail list logo