On Sunday, 21 January 2024 at 16:05:40 UTC, Gavin Gray wrote:
The following code:
ulong charlie = 11;
long johnstone = std.algorithm.comparison.max(0, -charlie);
writeln(format!"johnstone %s"(johnstone));
Results in (without any warning(s)):
johnstone -11
However you choose to look at
Gavin Gray via Digitalmars-d-learn wrote:
The following code:
ulong charlie = 11;
long johnstone = std.algorithm.comparison.max(0, -charlie);
writeln(format!"johnstone %s"(johnstone));
Results in (without any warning(s)):
johnstone -11
However you choose to look at it, this means -11
On Monday, 22 January 2024 at 01:14:06 UTC, Steven Schveighoffer
wrote:
On Sunday, 21 January 2024 at 16:05:40 UTC, Gavin Gray wrote:
The following code:
ulong charlie = 11;
long johnstone = std.algorithm.comparison.max(0, -charlie);
writeln(format!"johnstone %s"(johnstone));
Results in
On Sunday, 21 January 2024 at 16:05:40 UTC, Gavin Gray wrote:
The following code:
ulong charlie = 11;
long johnstone = std.algorithm.comparison.max(0, -charlie);
writeln(format!"johnstone %s"(johnstone));
Results in (without any warning(s)):
johnstone -11
However you choose to look at
On Sunday, 21 January 2024 at 18:38:42 UTC, atzensepp wrote:
What if you add more lines to the file. Does it crash then
later?
It's a problem with `vectors`. `vector!string` has a problem , I
just use 'string []', and it's OK.
The `vector` is unstable, possibly because the `later data`
On Sunday, 21 January 2024 at 20:13:38 UTC, An Pham wrote:
On Saturday, 20 January 2024 at 15:59:59 UTC, Anonymouse wrote:
I remember reading this was an issue and now I ran into it
myself.
```d
import std.stdio;
void main()
{
auto names = [ "foo", "bar", "baz" ];
void delegate()[]
In Ocaml this would look as:
```d
let names =["foo";"bar";"baz"] in
let funmap = List.map ( fun name -> ( fun () -> print_endline
name)) names in
List.iter ( fun f -> f () ) funmap
;;
~
```
I think in the D-example it is basically one function and not 3.
On Sunday, 21 January 2024 at 20:13:38 UTC, An Pham wrote:
On Saturday, 20 January 2024 at 15:59:59 UTC, Anonymouse wrote:
I remember reading this was an issue and now I ran into it
myself.
```d
import std.stdio;
void main()
{
auto names = [ "foo", "bar", "baz" ];
void delegate()[]
On Saturday, 20 January 2024 at 15:59:59 UTC, Anonymouse wrote:
I remember reading this was an issue and now I ran into it
myself.
```d
import std.stdio;
void main()
{
auto names = [ "foo", "bar", "baz" ];
void delegate()[] dgs;
foreach (name; names)
{
dgs ~= () =>
On Sunday, 21 January 2024 at 14:52:45 UTC, Renato wrote:
On Saturday, 20 January 2024 at 16:53:12 UTC, ryuukk_ wrote:
This is the workaround according to:
https://issues.dlang.org/show_bug.cgi?id=21929#c9
Go used to have the same issue [but they fixed
On Sunday, 21 January 2024 at 03:54:35 UTC, zjh wrote:
On Thursday, 18 January 2024 at 03:07:13 UTC, zjh wrote:
```d
void toV(string a,ref vector!string b){
auto f=File(a,"r");
while(!f.eof()){
string l=strip(f.readln());push(b,l);
}
Qwk(b);
}//
```
There is an issue
Dne so 20. 1. 2024 21:21 uživatel Renato via Digitalmars-d-learn <
digitalmars-d-learn@puremagic.com> napsal:
> On Saturday, 20 January 2024 at 19:45:19 UTC, Daniel Kozak wrote:
> > On Sat, Jan 20, 2024 at 2:11 PM Renato via Digitalmars-d-learn
> > < digitalmars-d-learn@puremagic.com> wrote:
> >
The following code:
ulong charlie = 11;
long johnstone = std.algorithm.comparison.max(0, -charlie);
writeln(format!"johnstone %s"(johnstone));
Results in (without any warning(s)):
johnstone -11
However you choose to look at it, this means -11 > 0 (regardless
of all arguments concerning
On Saturday, 20 January 2024 at 21:12:12 UTC, ryuukk_ wrote:
dub might not be passing this flag down to dependencies..
Try this env variable:
``LDFLAGS="$LDFLAGS -Wl,-ld_classic" dub build``
That didn't help.
If that doesn't work, try this one:
``MACOSX_DEPLOYMENT_TARGET=11 dub build``
On Saturday, 20 January 2024 at 16:32:42 UTC, FeepingCreature
wrote:
```
foreach (name; names)
{
dgs ~= ((name) => () => writeln(name))(name);
}
```
lol
Thanks, I'll try that.
On Thursday, 5 January 2023 at 13:47:24 UTC, Adam D Ruppe wrote:
On Thursday, 5 January 2023 at 13:27:23 UTC, Vijay Nayar wrote:
Why is this error only found when declaring a class in the
unittest?
A unittest is just a special function, it can run code and have
local variables.
classes and
16 matches
Mail list logo