On Thursday, 4 April 2024 at 21:23:00 UTC, user1234 wrote:
On Thursday, 4 April 2024 at 19:56:50 UTC, Ferhat Kurtulmuş
wrote:
[...]
```d
module runnable;
import std.stdio : writeln;
import std.range : chain;
void main() @nogc
{
auto s = chain("as ", "df ", "j"); // s is lazy
On Thursday, 4 April 2024 at 19:56:50 UTC, Ferhat Kurtulmuş wrote:
My favorite d feature is lazy ranges. No allocation here.
```d
auto s = chain("as ", "df ", "j"); // s is lazy
writeln(s);
```
```d
import std.range : chain;
void main()
{
string word = "hello";
auto noError = chain(word,
On Thursday, 4 April 2024 at 19:56:50 UTC, Ferhat Kurtulmuş wrote:
On Thursday, 4 April 2024 at 18:14:54 UTC, BoQsc wrote:
I'm looking for more readable standard function to add a
**character** literal to a **string**.
The `~` operator is clearly not great while reading a source
code.
I'm
On Thursday, 4 April 2024 at 18:14:54 UTC, BoQsc wrote:
I'm looking for more readable standard function to add a
**character** literal to a **string**.
The `~` operator is clearly not great while reading a source
code.
I'm not here to discuss that. I'm looking for a function inside
standard
On Thursday, 4 April 2024 at 18:14:54 UTC, BoQsc wrote:
I'm looking for more readable standard function to add a
**character** literal to a **string**.
The `~` operator is clearly not great while reading a source
code.
I'm not here to discuss that. I'm looking for a function inside
standard
I'm looking for more readable standard function to add a
**character** literal to a **string**.
The `~` operator is clearly not great while reading a source code.
I'm not here to discuss that. I'm looking for a function inside
standard library.
The function should be straightforward, up to
On Thursday, 4 April 2024 at 15:47:53 UTC, Richard (Rikki) Andrew
Cattermole wrote:
Oh hey!
https://github.com/dlang/dmd/pull/16250
It was implemented literally 2 weeks ago!
Nightly should have it
https://github.com/dlang/dmd/releases/tag/nightly
Good news, thanks...
SDB@79
On Thursday, 4 April 2024 at 15:47:53 UTC, Richard (Rikki) Andrew
Cattermole wrote:
Oh hey!
https://github.com/dlang/dmd/pull/16250
It was implemented literally 2 weeks ago!
Nightly should have it
https://github.com/dlang/dmd/releases/tag/nightly
Wow! Happy that's in. It was a bit
Oh hey!
https://github.com/dlang/dmd/pull/16250
It was implemented literally 2 weeks ago!
Nightly should have it https://github.com/dlang/dmd/releases/tag/nightly
On Thursday, 4 April 2024 at 15:07:21 UTC, Richard (Rikki) Andrew
Cattermole wrote:
Ah yes, I forgot about that particular thing, doesn't see much
use as far as I'm aware.
It should be working though.
```D
enum X = computeX("A message");
string computeX(string msg) {
auto s = "CTFE
On Thursday, 4 April 2024 at 14:06:19 UTC, Richard (Rikki) Andrew
Cattermole wrote:
```d
static assert(0, "message");
```
Or if it is known to be CTFE'd
```d
assert(0, "message");
```
Just a warning, its a one time use only for both.
No other way to do it.
That's ... unfortunate.
Some
On 05/04/2024 4:04 AM, Carl Sturtivant wrote:
On Thursday, 4 April 2024 at 14:06:19 UTC, Richard (Rikki) Andrew
Cattermole wrote:
```d
static assert(0, "message");
```
Or if it is known to be CTFE'd
```d
assert(0, "message");
```
Just a warning, its a one time use only for both.
No other
On 05/04/2024 3:29 AM, WhatMeWorry wrote:
Error: Unresolvable dependencies to package bindbc-loader:
bindbc-opengl 0.13.0 depends on bindbc-loader ~>0.3.0
bindbc-sdl 1.4.7 depends on bindbc-loader ~>1.1.0
https://github.com/BindBC/bindbc-opengl/issues/47
On 05/04/2024 2:54 AM, Carl Sturtivant wrote:
I'm writing CTFE on Windows, latest DMD compiler. How should I write a
message to the console (stderr) from a CTFE function call during
compilation?
```d
static assert(0, "message");
```
Or if it is known to be CTFE'd
```d
assert(0, "message");
Error: Unresolvable dependencies to package bindbc-loader:
bindbc-opengl 0.13.0 depends on bindbc-loader ~>0.3.0
bindbc-sdl 1.4.7 depends on bindbc-loader ~>1.1.0
Hi,
You should have a look at the decorator design pattern, it
reduces the amount of classes to implement if you need to combine
different effects such as elemental damage to your weapons (e.g.
if you want flame arrows).
https://en.wikipedia.org/wiki/Decorator_pattern
16 matches
Mail list logo