Hi folks,
Working on a side project I have the need to generate text files
(mainly D source code) via a templating system. My use case is to
have some JSON data populated at runtime from an API and fill-in
placeholders in the text with the ability of doing loops over
arrays, simple conditions
On Monday, 11 March 2024 at 14:26:01 UTC, Andrea wrote:
Hi folks,
Working on a side project I have the need to generate text
files (mainly D source code) via a templating system. My use
case is to have some JSON data populated at runtime from an API
and fill-in placeholders in the text with t
On Monday, 11 March 2024 at 14:26:01 UTC, Andrea wrote:
Opinions ?
Many thanks
There is also diet : https://code.dlang.org/packages/diet-ng
On Monday, 11 March 2024 at 15:22:39 UTC, Sergey wrote:
On Monday, 11 March 2024 at 14:26:01 UTC, Andrea wrote:
Opinions ?
Many thanks
There is also diet : https://code.dlang.org/packages/diet-ng
Is'nt `diet` specific for HTML / XML structured text ?
On Monday, 11 March 2024 at 14:59:52 UTC, Ferhat Kurtulmuş wrote:
You have already mentioned mustache-d. If it compiles with the
recent compilers go for it. I used it some time a go for a
similar task involving in d code gen.
I found mustache-d easy enough and good enough for my needs. I
hav
Leveraging my knowledge of C, I assumed a "static" function would
be hidden outside of its own source file. I can't find any
statement about the semantics of a static function in the
documentation, and in practice (ldc2 on Linux) it doesn't hide
the function?
file tst.d:
import std.stdio :
On Monday, 11 March 2024 at 15:34:11 UTC, Andrea wrote:
There is also diet : https://code.dlang.org/packages/diet-ng
Is'nt `diet` specific for HTML / XML structured text ?
right. Just mentioned Go library also mostly for HTML generation.
On Monday, 11 March 2024 at 15:50:28 UTC, bachmeier wrote:
I found mustache-d easy enough and good enough for my needs. I
haven't used it with a recent compiler, but it's hard to see
how it would need much maintenance.
just trying it out and kinda fits my needs; the main issues are
lack of
On Monday, March 11, 2024 9:56:24 AM MDT Andy Valencia via Digitalmars-d-learn
wrote:
> Leveraging my knowledge of C, I assumed a "static" function would
> be hidden outside of its own source file. I can't find any
> statement about the semantics of a static function in the
> documentation, and i
On Monday, 11 March 2024 at 16:25:13 UTC, Jonathan M Davis wrote:
...
But what exactly static means varies based on the context.
Thank you for the list! But none of those appear to apply to a
function defined in the outermost scope of the module. Is static
accepted here--but has no actual e
On Monday, 11 March 2024 at 16:51:48 UTC, Andy Valencia wrote:
On Monday, 11 March 2024 at 16:25:13 UTC, Jonathan M Davis
wrote:
...
But what exactly static means varies based on the context.
Thank you for the list! But none of those appear to apply to a
function defined in the outermost sco
On Monday, March 11, 2024 10:51:48 AM MDT Andy Valencia via Digitalmars-d-
learn wrote:
> On Monday, 11 March 2024 at 16:25:13 UTC, Jonathan M Davis wrote:
> > ...
> > But what exactly static means varies based on the context.
>
> Thank you for the list! But none of those appear to apply to a
> fu
I use eventcore latest version write an echo server for test.
some error of build.
my D code:
```D
import eventcore.core;
import std.functional : toDelegate;
import std.socket : InternetAddress;
import std.exception : enforce;
import core.time : Duration;
import std.stdio : writeln;
void main
I am in need of a data type for holding direction information;
one of 8 directions on a single axis. They are named in terms of
compass directions. If D had a 4-bit datatype, I would just use
this and do `+=2` whenever I want to change the datatype, but it
doesn't.
Perhaps this would be a goo
Hi, my application use writeln in docker don't display.
Python add -u disable it.
https://stackoverflow.com/questions/29663459/why-doesnt-python-app-print-anything-when-run-in-a-detached-docker-container
By taking advantage of integer wrapping and a bitwise and, its quite a
simple problem to solve!
Challenge for the reader: add support for binary operations and toString
support.
https://dlang.org/spec/operatoroverloading.html
```d
struct Direction {
private int value;
Direction opUn
On D's side you can use ``stdout.flush;`` to force it to flush.
I don't think there is a way to force flushing via CLI.
17 matches
Mail list logo