On Saturday, 25 May 2019 at 22:18:16 UTC, Andre Pany wrote:
On Saturday, 25 May 2019 at 08:32:08 UTC, BoQsc wrote:
I have a simple standard .d script and I'm getting annoyed
that it takes 2-3 seconds to run and see the results via rdmd.
Also please keep in mind there could be other factors
Hello,
Is it possible to extract code of some function into string
variable using CT reflextion?
For example:
int test(bool flag)
{
return flag ? 100 : getRandom();
}
enum string code = GetFunctionCode!test; // "return flag ? 100
: getRandom();"
On 2019-05-26 19:46, Andrey wrote:
Hello,
Is it possible to extract code of some function into string variable
using CT reflextion?
For example:
int test(bool flag)
{
return flag ? 100 : getRandom();
}
enum string code = GetFunctionCode!test; // "return flag ? 100 :
getRandom();"
No,
On Sunday, 26 May 2019 at 18:14:23 UTC, Jacob Carlborg wrote:
No, that's not possible.
Some hacky solutions are possible by importing a source file as a
string and parsing it manually. dglsl actually extracts D
function code to put into glsl shaders. Here's the snippet. See:
I have been using Orange SerDes library for an application and
have run in to a major hurdle. I have the need to SerDes a
templated class. It seems Orange can only Serialize the class but
when it attempts to deserialize it at runtime it cannot build the
class.
It represents the type in the
On Sunday, 26 May 2019 at 17:46:35 UTC, Andrey wrote:
Hello,
Is it possible to extract code of some function into string
variable using CT reflextion?
For example:
int test(bool flag)
{
return flag ? 100 : getRandom();
}
enum string code = GetFunctionCode!test; // "return flag ? 100
:
On Monday, 20 May 2019 at 12:09:02 UTC, Alex wrote:
given some array, is there some way to easily impose structure
on that array at runtime?
void* data;
auto x = cast(byte[A,B,C])data;
X is then an AxBxC matrix.
I'm having to compute the index myself and it just seems
unnecessary. A and B
On Sunday, 26 May 2019 at 18:21:23 UTC, Dennis wrote:
On Sunday, 26 May 2019 at 18:14:23 UTC, Jacob Carlborg wrote:
No, that's not possible.
Some hacky solutions are possible by importing a source file as
a string and parsing it manually. dglsl actually extracts D
function code to put into