I have a separate version for flatpak builds in my app. Let's say
I have a large project that builds with dub that goes like this:
import std.stdio;
void main()
{
version (flatpak) {
writeln(`Flatpak build`);
} else {
writeln("Edit source/app.d to
On 7/6/20 5:44 PM, Marcone wrote:
On Tuesday, 7 July 2020 at 00:42:40 UTC, Ali Çehreli wrote:
On 7/6/20 5:35 PM, Marcone wrote:
Hi, I study Dlang for one year, and I can't understand alias this. I
need an Easy example to understand Alias This.
Is the following example useful?
http://ddili.
On 7/6/20 5:35 PM, Marcone wrote:
Hi, I study Dlang for one year, and I can't understand alias this. I
need an Easy example to understand Alias This.
Is the following example useful?
http://ddili.org/ders/d.en/alias_this.html
Ali
On Tuesday, 7 July 2020 at 00:42:40 UTC, Ali Çehreli wrote:
On 7/6/20 5:35 PM, Marcone wrote:
Hi, I study Dlang for one year, and I can't understand alias
this. I need an Easy example to understand Alias This.
Is the following example useful?
http://ddili.org/ders/d.en/alias_this.html
Ali
Hi, I study Dlang for one year, and I can't understand alias
this. I need an Easy example to understand Alias This.
See implementation of data structure here:
https://github.com/ZILtoid1991/collections-d/blob/master/source/collections/treemap.d#L565
If I try to compile this code, it'll fail, limiting it's usecase:
@safe pure unittest {
alias IntMap = TreeMap!(int, int, false);
IntMap test;
On Monday, 6 July 2020 at 22:02:37 UTC, Kayomn wrote:
On Monday, 6 July 2020 at 21:09:57 UTC, kinke wrote:
Similar case here; the 'varargs' end up in a GC-allocated
array. I've recently changed `scope` slice params, so that
array literal arguments are allocated on the caller's stack
instead; s
https://dlang.org/spec/pragma.html#mangle
pragma(mangle, "body")
extern(C) void body_func();
Is there a special mechanism in D for handling this problem,
where an existing C function might be a name that is reserved in
D? Of course I could write a wrapper function in C and call that.
On Monday, 6 July 2020 at 21:09:57 UTC, kinke wrote:
Similar case here; the 'varargs' end up in a GC-allocated
array. I've recently changed `scope` slice params, so that
array literal arguments are allocated on the caller's stack
instead; so adding `scope` for these variadics *should*
probably
On Monday, 6 July 2020 at 20:25:11 UTC, Kayomn wrote:
Though, admittedly I'm kind of used to seeing this error
message since it appears any time you try and do something that
relies on type info in betterC, intentionally or not. A notable
example is forgetting to supply an arrange length when
Ok yeah it starts up a server and opens a webpage, great, but
where are the docs? Cant find any info on command line switches
for dub or ddox on how to get it to just dump the docs in a
folder.
On Monday, 6 July 2020 at 20:25:11 UTC, Kayomn wrote:
example is forgetting to supply an arrange length when
array length*
On Monday, 6 July 2020 at 20:20:44 UTC, Stanislav Blinov wrote:
I'd say the original error should be reported on bugzilla, if
it isn't already; if only for the error message which is
ridiculously obscure.
Yeah, you're tellin' me lol. I spent the better part of the day
tracking this one down,
On Monday, 6 July 2020 at 20:06:51 UTC, Kayomn wrote:
Something discovered in the D Language Code Club Discord server
with the help of Wild is that the following code:
struct Test { ~this() {} }
void tester(Test test, Test[] tests...) { }
extern(C) void main() {
tester(Test(), Test());
}
Something discovered in the D Language Code Club Discord server
with the help of Wild is that the following code:
struct Test { ~this() {} }
void tester(Test test, Test[] tests...) { }
extern(C) void main() {
tester(Test(), Test());
}
Raises the "TypeInfo cannot be used with ~betterC" erro
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?
I think your best bet is a tuple of pairs, because then you're
not limited to compile time values, but it won't look pretty:
im
On Monday, 6 July 2020 at 01:43:43 UTC, user1234 wrote:
---
import std;
struct AA
{
void opIndexAssign(int v, string k) @nogc
{}
}
void main(string[] args) @nogc
{
AA myCustom;
enum literal = ["one":1, "two":2].stringof[1..$-1];
enum pairs = literal.split(',').array;
On Monday, 6 July 2020 at 11:51:19 UTC, Jacob Carlborg wrote:
On Monday, 6 July 2020 at 01:43:43 UTC, user1234 wrote:
Hereh we go ;)
---
import std;
struct AA
{
void opIndexAssign(int v, string k) @nogc
{}
}
void main(string[] args) @nogc
{
AA myCustom;
enum literal = ["one"
On Monday, 6 July 2020 at 01:43:43 UTC, user1234 wrote:
Hereh we go ;)
---
import std;
struct AA
{
void opIndexAssign(int v, string k) @nogc
{}
}
void main(string[] args) @nogc
{
AA myCustom;
enum literal = ["one":1, "two":2].stringof[1..$-1];
enum pairs = literal.split
20 matches
Mail list logo