On Friday, 24 January 2020 at 16:21:48 UTC, Jan Hönig wrote:
I am looking for a detailed explanation or showcase regarding
CTFE and string mixins.
I want to play with D a little bit regarding code generation.
I would like to have a pseudo-AST, consisting of a few classes,
to represent some
On Friday, 24 January 2020 at 18:43:14 UTC, H. S. Teoh wrote:
CTFE in general cannot use global variables. Any state you
need must be created inside a CTFE function, and accessed from
within that calling context. You *can* assign values produced
by CTFE to compile-time symbols via 'enum',
On Fri, Jan 24, 2020 at 08:26:50PM +0100, Jacob Carlborg via
Digitalmars-d-learn wrote:
> On 2020-01-24 19:43, H. S. Teoh wrote:
>
> > (enums cannot take AA's or class objects as values, also, once
> > assigned they are immutable).
>
> AA enums work.
Ah you're right, it's
On 2020-01-24 19:43, H. S. Teoh wrote:
(enums cannot take AA's or
class objects as values, also, once assigned they are immutable).
AA enums work. Class objects kind of work. One can use static
const/immutable instead. The following snippet compiles:
class A
{
int a = 3;
}
const bar =
On Fri, Jan 24, 2020 at 04:21:48PM +, Jan Hönig via Digitalmars-d-learn
wrote:
> I am looking for a detailed explanation or showcase regarding CTFE and
> string mixins.
> I want to play with D a little bit regarding code generation.
> I would like to have a pseudo-AST, consisting of a few
On Friday, 24 January 2020 at 16:59:53 UTC, Marco de Wild wrote:
For CTFE: functions should be pure. Therefore you cannot use
global or static variables. Constants (enums) are perfectly
fine to use though. I don't know the state of the GC and CTFE.
I recall that there might be some complexity
On Friday, 24 January 2020 at 16:21:48 UTC, Jan Hönig wrote:
I am looking for a detailed explanation or showcase regarding
CTFE and string mixins.
I want to play with D a little bit regarding code generation.
I would like to have a pseudo-AST, consisting of a few classes,
to represent some
I am looking for a detailed explanation or showcase regarding
CTFE and string mixins.
I want to play with D a little bit regarding code generation.
I would like to have a pseudo-AST, consisting of a few classes,
to represent some calculation. Think of a loop, some statements,
and expressions.
On 1/24/20 9:58 AM, drug wrote:
On 1/24/20 4:37 PM, Andrey wrote:
Hello,
I'm trying to bind C library for Tcl/Tk in D code. There is a function
called "Tcl_CreateInterp()" which I declared as extent(C). When I call
this function then layout of memory become broken - one of my global
wstring
On 1/24/20 8:37 AM, Andrey wrote:
Hello,
I'm trying to bind C library for Tcl/Tk in D code. There is a function
called "Tcl_CreateInterp()" which I declared as extent(C). When I call
this function then layout of memory become broken - one of my global
wstring variables loses it's value.
I
On 1/24/20 4:37 PM, Andrey wrote:
Hello,
I'm trying to bind C library for Tcl/Tk in D code. There is a function
called "Tcl_CreateInterp()" which I declared as extent(C). When I call
this function then layout of memory become broken - one of my global
wstring variables loses it's value.
I
On 1/24/20 8:37 AM, Andrey wrote:
Hello,
I'm trying to bind C library for Tcl/Tk in D code. There is a function
called "Tcl_CreateInterp()" which I declared as extent(C). When I call
this function then layout of memory become broken - one of my global
wstring variables loses it's value.
I
On Friday, 24 January 2020 at 12:22:49 UTC, Dennis wrote:
You can pass the -X flag to dmd, which makes it generate a
.json file describing the compiled file.
Great, that's what I was looking for - although it's also good to
know the __traits approach!
Thanks!
Hello,
I'm trying to bind C library for Tcl/Tk in D code. There is a
function called "Tcl_CreateInterp()" which I declared as
extent(C). When I call this function then layout of memory become
broken - one of my global wstring variables loses it's value.
I don't know why it is happens. If I
On Thursday, 23 January 2020 at 17:10:29 UTC, berni44 wrote:
I'd like to get a list of all items (public, package, private)
that are defined in a D file. Is there a simple way, to get
them?
You can pass the -X flag to dmd, which makes it generate a .json
file describing the compiled file.
On Saturday, 16 December 2017 at 20:51:09 UTC, kerdemdemir wrote:
While calling this function :
bool PublicMarketCall( ref Json result )
{
string fullUrl =
"https://www.delta.exchange/futures-guide-bitcoin;;
Json data;
try
{
requestHTTP(fullUrl,
(scope req) {
16 matches
Mail list logo