On Friday, 31 July 2020 at 22:26:26 UTC, jeff thompson wrote:
On Friday, 31 July 2020 at 20:07:26 UTC, Dennis wrote:
On Friday, 31 July 2020 at 14:17:14 UTC, jeff thompson wrote:
dlib.lib(dlib.audio.io.wav.obj) : error LNK2019: unresolved
external symbol
_D4core8internal7switch___T14__switch_e
On Monday, 3 August 2020 at 03:00:08 UTC, Cecil Ward wrote:
When practically speaking would you use UDAs? A real-world
use-case?
They are useful when you want to attach some kind of metadata to
the declarations for a library to read. For example, my script.d
looks for `@scriptable` for method
When practically speaking would you use UDAs? A real-world
use-case? I’ve seen them in use already for core language
features instead of keywords like "pure", and I suppose this
choice keeps the number of keywords down and the result is
perhaps easier to extend. The motivation for these usages
On Saturday, 1 August 2020 at 19:23:00 UTC, Iain Buclaw wrote:
On Saturday, 1 August 2020 at 02:36:41 UTC, Cecil Ward wrote:
On Thursday, 30 July 2020 at 07:05:39 UTC, Iain Buclaw wrote:
[...]
Ah. I wasn’t thinking about pure, although I do use it
everywhere I can as a matter of course. The
On Sunday, 2 August 2020 at 19:19:51 UTC, Andy Balba wrote:
I'm not a gitHub fan, but I like the mir functions; and it
looks like I have to download mir before using it.
mir has quite a few .d files..Is there a quick way to download
it ?
dub [1] is now packaged with dmd, which is the easies
Is there a reason why ceil, floor, round, and friends return
floats instead of an integer? There are l' variants for some of
these, but I'd imagine template implementations of these
operations would be better. Too much bloat?
Naively, you'd have for ceil...
// Return type would be numeric but
On Sunday, 2 August 2020 at 06:37:06 UTC, tastyminerals wrote:
You haven't said anything about efficiency because if you care
and your arrays are rather big, you better go with
https://github.com/libmir/mir-algorithm as mentioned above. It
might be a little finicky at the start but this post:
On 8/1/20 7:00 PM, Andy Balba wrote:
>> >> ubyte[3][4] c = [ [5, 5, 5], [15, 15,15], [25, 25,25], [35,
>> 35,35] ];
> Although not detailed in my original question, in my actual app
> I have array ubyte [1000][3] Big which consists of research data I
> obtained,
> and from which I want to ran
import std;
void f0(int[] a, int[] b, int[] dst) @safe {
dst[] = a[] + b[];
}
void f1(int[] a, int[] b, int[] dst) @trusted {
const minLen = min(a.length, b.length, dst.length);
dst[0..minLen] = a[0..minLen] + b[0..minLen];
assert(dst.length == minLen);
}
I was surprised that f0
On Sunday, 2 August 2020 at 16:31:50 UTC, Adam D. Ruppe wrote:
On Sunday, 2 August 2020 at 16:05:07 UTC, Ronoroa wrote:
That doesn't seem to stringize the args part like in
#__VA_ARGS__
oh yeah i missed that part.
D basically can't do that exactly, but if you pass the args as
template things
On Sunday, 2 August 2020 at 16:05:07 UTC, Ronoroa wrote:
That doesn't seem to stringize the args part like in
#__VA_ARGS__
oh yeah i missed that part.
D basically can't do that exactly, but if you pass the args as
template things directly you can do this:
---
void main(string[] args) {
On Sunday, 2 August 2020 at 15:48:34 UTC, Adam D. Ruppe wrote:
On Sunday, 2 August 2020 at 15:30:27 UTC, Ronoroa wrote:
void dbg(Args...)(Args args, size_t line = __LINE__) {
writeln(line, args, " = ", print_func(args));
}
That doesn't seem to stringize the args part like in #__VA_ARGS__
I
On Sunday, 2 August 2020 at 15:30:27 UTC, Ronoroa wrote:
How do I achieve equivalent semantics of following C++ code?
```
#define dbg(...) std::cout << __LINE__ << #__VA_ARGS__ << " = "
<< print_func(__VA_ARGS__) << std::endl;
```
You probably just want
void dbg(Args...)(Args args, size_t
How do I achieve equivalent semantics of following C++ code?
```
#define dbg(...) std::cout << __LINE__ << #__VA_ARGS__ << " = "
<< print_func(__VA_ARGS__) << std::endl;
```
On Wednesday, 22 January 2020 at 15:11:09 UTC, Jacob Carlborg
wrote:
BTW, why don't you implement `opCmp` with the built-in
comparison operators. Those are going to get lower to a call to
`__cmp`. Something like this:
int opCmp()(const scope typeof(this) that) const @nogc
{
auto a = this[]
On 31.07.20 06:28, Ali Çehreli wrote:
On 7/30/20 4:42 PM, wjoe wrote:
> So .capacity can't be assigned a value like length to reserve the RAM ?
Yes, a read-only property...
>> auto a = b;
>> b = b[0 .. $-1];
>> b ~= someT;
>>
>> If that last line is done in-place, then it overwrites a[$-
16 matches
Mail list logo