On Tuesday, 18 January 2022 at 04:42:45 UTC, frame wrote:
At the very top of my module I have this declaration:
```d
static if (__VERSION__ >= 2098)
{
alias Foo = TypeA;
}
else
{
alias Foo = TypeB;
}
```
No problem inside the module itself but this doesn't work when
imported from
On Tuesday, 18 January 2022 at 12:05:38 UTC, Paul Backus wrote:
On Tuesday, 18 January 2022 at 04:42:45 UTC, frame wrote:
At the very top of my module I have this declaration:
```d
static if (__VERSION__ >= 2098)
{
alias Foo = TypeA;
}
else
{
alias Foo = TypeB;
}
```
No problem inside
On Tue, Jan 18, 2022 at 05:20:04PM +, Anonymouse via Digitalmars-d-learn
wrote:
> On Tuesday, 18 January 2022 at 16:43:52 UTC, H. S. Teoh wrote:
> > What's the dustmite command you used? In such cases, it's useful to
> > check for this specific error message in your dustmite command, so
> >
On Monday, 17 January 2022 at 22:48:17 UTC, H. S. Teoh wrote:
On Mon, Jan 17, 2022 at 10:35:30PM +, forkit via
Digitalmars-d-learn wrote:
On Monday, 17 January 2022 at 22:28:10 UTC, H. S. Teoh wrote:
> [...]
[...]
If I were able to write a compiler, my compiler would warn you:
"This is
I did a big sweep through my project and changed all `writefln`s
and `format`s and the such to take their format patterns as
compile-time parameters, and now ldc can no longer build it on
Windows. It works on linux, and dmd has no problems with it.
There is no error message beyond "failed
On Tuesday, 18 January 2022 at 16:43:52 UTC, H. S. Teoh wrote:
What's the dustmite command you used? In such cases, it's
useful to check for this specific error message in your
dustmite command, so that it doesn't reduce it past the actual
problem case.
T
Yes, but the only thing I have
On Tue, Jan 18, 2022 at 04:25:45PM +, Anonymouse via Digitalmars-d-learn
wrote:
> I did a big sweep through my project and changed all `writefln`s and
> `format`s and the such to take their format patterns as compile-time
> parameters, and now ldc can no longer build it on Windows. It works
On Friday, 14 January 2022 at 18:04:35 UTC, kyle wrote:
Thanks Adam. We need a repository of articles about stuff that
doesn't do what people expect.
I put this as a tip of the week in my late post:
http://dpldocs.info/this-week-in-d/Blog.Posted_2022_01_10.html#tip-of-the-week
My blog
On Tuesday, 18 January 2022 at 16:02:42 UTC, Tejas wrote:
Newer languages nowadays use `start..intent, think it's something we should follow?
I've decided to avoid using number ranges 'directly', and instead
use a wrapper function...
auto range(T:T)(T a, T b)
{
import std.range :
On Tue, Jan 18, 2022 at 04:02:42PM +, Tejas via Digitalmars-d-learn wrote:
[...]
> Newer languages nowadays use `start.. it's something we should follow?
I've never seen that before. Which languages use that?
T
--
"If you're arguing, you're losing." -- Mike Thomas
On 1/18/22 12:43, forkit wrote:
> wrapper function...
>
>
> auto range(T:T)(T a, T b)
> {
> import std.range : iota;
> return iota(a, (b+1));
> }
Needs a little more work to be correct. The following produces and empty
range. ;)
range(uint.min, uint.max)
Also, is it important
On Tuesday, 18 January 2022 at 17:37:27 UTC, H. S. Teoh wrote:
Bypassing dub and calling the raw ldc command gives no output.
What else can I do?
What does `echo $?` print immediately after you run the raw ldc
command?
T
It exits with 5. I could look for that, certainly.
On Tue, Jan 18, 2022 at 05:41:34PM +, Anonymouse via Digitalmars-d-learn
wrote:
> On Tuesday, 18 January 2022 at 17:37:27 UTC, H. S. Teoh wrote:
> > > Bypassing dub and calling the raw ldc command gives no output.
> > > What else can I do?
> >
> > What does `echo $?` print immediately after
Compiling the project without: version "Colours" works
So the problem lies here in this struct:
https://github.com/zorael/kameloso/blob/9ccff29ead6ca2e80e2db0f06085c751326ed578/source/kameloso/constants.d#L320
On Tue, Jan 18, 2022 at 10:04:15PM +, forkit via Digitalmars-d-learn wrote:
> so I use this compile command (on Windows, using ldc)
>
> -link-defaultlib-shared=true
>
> Then (in simple example) the size of my compiled .exe:
>
> From 806KB down to 18KB
>
> Oh. That's so much nicer on my SSD
On Tuesday, 18 January 2022 at 16:25:45 UTC, Anonymouse wrote:
What can I *reasonably* do here? Do I *have* to compile LDC
from source, to get debug symbols? How else can I reduce it
when it doesn't say what goes wrong?
[-1073741819 == 0xc005 => access violation]
Some options:
1. This
so I use this compile command (on Windows, using ldc)
-link-defaultlib-shared=true
Then (in simple example) the size of my compiled .exe:
From 806KB down to 18KB
Oh. That's so much nicer on my SSD ;-)
(yes, I understand the implictions here of dynamic sharing, but I
test/compile/debug so
On Tuesday, 18 January 2022 at 22:09:18 UTC, Adam D Ruppe wrote:
On Tuesday, 18 January 2022 at 22:04:15 UTC, forkit wrote:
so I use this compile command (on Windows, using ldc)
On Linux dmd can do `-defaultlib=libphobos2.so` for the same
thing.
On Windows, dmd cannot handle a shared
On Tuesday, 18 January 2022 at 20:50:06 UTC, Ali Çehreli wrote:
Needs a little more work to be correct. The following produces
and empty range. ;)
range(uint.min, uint.max)
Also, is it important for the result to be the same as T? For
example, even if T is ubyte, because b+1 is 'int',
On Tuesday, 18 January 2022 at 22:04:15 UTC, forkit wrote:
so I use this compile command (on Windows, using ldc)
On Linux dmd can do `-defaultlib=libphobos2.so` for the same
thing.
On Windows, dmd cannot handle a shared druntime.
On Tuesday, 18 January 2022 at 22:35:08 UTC, H. S. Teoh wrote:
On Tue, Jan 18, 2022 at 10:04:15PM +, forkit via
Digitalmars-d-learn wrote:
so I use this compile command (on Windows, using ldc)
-link-defaultlib-shared=true
Then (in simple example) the size of my compiled .exe:
From 806KB
On 1/18/22 14:08, forkit wrote:
> never use number ranges.. not ever! ;-)
>
> (except in combination with iota)
Indeed, the following is an elegant but slow (tested with dmd)
implementation with Phobos:
auto range(T)(T a, T b)
in (a <= b) {
import std.range : chain, iota, only;
return
On Tuesday, 18 January 2022 at 17:58:54 UTC, H. S. Teoh wrote:
On Tue, Jan 18, 2022 at 04:02:42PM +, Tejas via
Digitalmars-d-learn wrote: [...]
Newer languages nowadays use `start..intent, think it's something we should follow?
I've never seen that before. Which languages use that?
T
On Tuesday, 18 January 2022 at 20:43:08 UTC, forkit wrote:
On Tuesday, 18 January 2022 at 16:02:42 UTC, Tejas wrote:
Newer languages nowadays use `start..intent, think it's something we should follow?
I've decided to avoid using number ranges 'directly', and
instead use a wrapper
On Wednesday, 19 January 2022 at 03:00:49 UTC, Tejas wrote:
On Tuesday, 18 January 2022 at 20:43:08 UTC, forkit wrote:
On Tuesday, 18 January 2022 at 16:02:42 UTC, Tejas wrote:
Newer languages nowadays use `start..intent, think it's something we should follow?
I've decided to avoid using
On Monday, 17 January 2022 at 22:28:10 UTC, H. S. Teoh wrote:
This will immediately make whoever reads the code (i.e., myself
after 2 months :D) wonder, "why +1?" And the answer will become
clear and enlightenment ensues. ;-)
In those cases i find myself rewriting said code. Generally to
I have separated my project in a bunch of modules to be compiled
separated. But it seems I have lost my debugging power since
then. I would like to know if there is any workaround beside not
using it as a lib.
I'm using it from dub and it is has the debug options on them:
```
"buildOptions":
On 1/18/22 7:19 AM, vit wrote:
On Tuesday, 18 January 2022 at 12:05:38 UTC, Paul Backus wrote:
On Tuesday, 18 January 2022 at 04:42:45 UTC, frame wrote:
At the very top of my module I have this declaration:
```d
static if (__VERSION__ >= 2098)
{
alias Foo = TypeA;
}
else
{
alias Foo =
On Wednesday, 19 January 2022 at 04:15:54 UTC, Steven
Schveighoffer wrote:
On 1/18/22 7:19 AM, vit wrote:
On Tuesday, 18 January 2022 at 12:05:38 UTC, Paul Backus wrote:
On Tuesday, 18 January 2022 at 04:42:45 UTC, frame wrote:
At the very top of my module I have this declaration:
```d
29 matches
Mail list logo