On 28/02/2017 01:20, sarn wrote:
> On Monday, 27 February 2017 at 19:26:06 UTC, Christian Köstlin wrote:
>> How can I make sure, that the calculations are done at compile time?
>
> If you ever have doubts, you can always use something like this to check:
>
> assert (__ctfe);
Thanks a lot, actuall
On Friday, 24 February 2017 at 22:44:55 UTC, XavierAP wrote:
Hi I've looked at wiki.dlang.org/IDEs, and I see that Visual D
is linked from dlang.org/download.html. Still I was looking for
personal opinions and experiences beyond hard specs, I wonder
if one of the IDEs is already dominant at lea
On Tuesday, 28 February 2017 at 00:20:05 UTC, sarn wrote:
On Monday, 27 February 2017 at 19:26:06 UTC, Christian Köstlin
wrote:
How can I make sure, that the calculations are done at compile
time?
If you ever have doubts, you can always use something like this
to check:
assert (__ctfe);
S
On Monday, 27 February 2017 at 19:26:06 UTC, Christian Köstlin
wrote:
How can I make sure, that the calculations are done at compile
time?
If you ever have doubts, you can always use something like this
to check:
assert (__ctfe);
On 02/27/2017 06:26 AM, Oleg B wrote:
Hello. I have this code:
```d
import std.traits;
enum myuda;
class A { @myuda int x; }
class B : A
{
@myuda int some;
void foo() { foreach (s; getSymbolsByUDA!(typeof(this), myuda)) {} }
}
void main() { (new B).foo(); }
```
And have this error:
On Monday, 27 February 2017 at 16:04:00 UTC, Bastiaan Veelo wrote:
I get a bus error some time out in execution.
It could be that I am running out of stack space. I am on OS X,
and non-main threads are given a very limited stack size, they
say [1, 2]. This foreach of mine calls into itself, a
On Monday, 27 February 2017 at 19:26:06 UTC, Christian Köstlin
wrote:
Is it enough to put up static immutable modifiers?
How can I make sure, that the calculations are done at compile
time?
...
static immutable time = Unit("time", [Unit.Scale("ms", 1),
...
An initialization of a static varia
I have a small example, that can be used to express 3601000ms as 1h 1s
(a much more advanced version has already been done by
https://github.com/nordlow/units-d).
I would like to enforce that the precomputation (multiplying and
inverting the list of scale's) is done at compile time.
Is it enough
On Wednesday, 23 November 2016 at 21:04:38 UTC, Christian Köstlin
wrote:
std.concurrency contains the register function to associate a
name with
a Tid. This is stored internally in an associative array
namesByTid.
I see no accessors for this. Is there a way to get to the
associated
names of a
On Monday, February 27, 2017 14:07:21 Oleg B via Digitalmars-d-learn wrote:
> Hello. Is this behavior normal, or it's a bug? And if it's normal
> why it's normal? I want to use function with `package` visibility
> in same package where it's defined, but I don't.
>
> ```d
> module package_visible;
>
On Monday, 27 February 2017 at 11:53:09 UTC, ag0aep6g wrote:
You can generate wrapper functions that have no overloads:
static int wrap(alias f)(int arg) { return f(arg); }
enum addrOf(alias f) = &f;
enum fptrs = staticMap!(addrOf, staticMap!(wrap, funcs));
/* ... r and foreach as before ..
Hello. I have this code:
```d
import std.traits;
enum myuda;
class A { @myuda int x; }
class B : A
{
@myuda int some;
void foo() { foreach (s; getSymbolsByUDA!(typeof(this),
myuda)) {} }
}
void main() { (new B).foo(); }
```
And have this error:
```
% rdmd uda_symbols.d
/usr/includ
Hello. Is this behavior normal, or it's a bug? And if it's normal
why it's normal? I want to use function with `package` visibility
in same package where it's defined, but I don't.
```d
module package_visible;
package void foo() { }
void main() { foo(); }
```
```
% rdmd package_visible.d
packa
On 02/27/2017 10:52 AM, Bastiaan Veelo wrote:
On Monday, 27 February 2017 at 02:02:57 UTC, ag0aep6g wrote:
[...]
enum fptr(alias f) = &f;
(This is still a bit magical to me: it this a shorthand for a template?)
Yes, it's short for this:
template fptr(alias f) { enum fptr = &f; }
"addrOf" i
On Saturday, 25 February 2017 at 01:30:09 UTC, Minty Fresh wrote:
On Saturday, 25 February 2017 at 01:27:09 UTC, Minty Fresh
wrote:
On Wednesday, 22 February 2017 at 11:18:15 UTC, Martin
Tschierschke wrote:
[...]
Since structs are Plain-old Data and don't do inheritance, the
best option is a
On Monday, 27 February 2017 at 02:02:57 UTC, ag0aep6g wrote:
Make a range or an array of function pointers from the AliasSeq
of function aliases:
import std.meta: staticMap;
import std.range: only;
enum fptr(alias f) = &f;
enum fptrs = staticMap!(fptr, funcs);
auto r = only(fptrs);
forea
On Wednesday, 23 November 2016 at 21:04:38 UTC, Christian Köstlin
wrote:
std.concurrency contains the register function to associate a
name with
a Tid. This is stored internally in an associative array
namesByTid.
I see no accessors for this. Is there a way to get to the
associated
names of a
On Sunday, 26 February 2017 at 21:50:38 UTC, Jordan Wilson wrote:
auto readNumMatCsv2 (string filePath, string ndv, string
new_ndv){
double[][] p_numArray;
try {
auto lines = File(filePath,"r").byLine;
lines.popFront; // get read of header
p_numArray = lines.map!(
I really appriciate your comments and thoughts!
On Sunday, 26 February 2017 at 21:02:52 UTC, ag0aep6g wrote:
On Sunday, 26 February 2017 at 19:34:33 UTC, thorstein wrote:
* "no-data-value"?
No-data-values in data sets are common at least in geosciences:
raster images, spatial simulation o
19 matches
Mail list logo