A few things.
Module names should be lower case.
Each file, needs the full module declaration.
source/foo/bar.d:
```d
module foo.bar;
```
source/app.d:
```d
module app;
import foo.bar;
```
Directories matter, this allows the import path search (via the use of
the -I switch) to loca
others. I
got the following errors when trying to compile all 3 files with
DMD, and the same errors after switching to DUB.
```
source/Unit.d(6,17): Error: import `Unit.Map` is used as a type
source/Unit.d(16,5): Error: import `Unit.Map` is used as a type
source/Tile.d(9,15): Error: import
Looks like the context is currently passed for nested functions,
not for nested classes.
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
On Wednesday, 1 November 2023 at 16:24:04 UTC, BoQsc wrote:
**Error:**
```
rdmd testimport.d
testimport.d(2): Error: module `next` from file waffle\next.d
must be imported with 'import next;'
```
You import 'waffle.next', but the module is inferred to be
'next
;test", testing);
}
```
**./waffle/next.d**:
```
int testing = 5;
```
**Error:**
```
rdmd testimport.d
testimport.d(2): Error: module `next` from file waffle\next.d
must be imported with 'import next;'
```
On 17/10/2023 4:18 PM, mw wrote:
Is string basic types? as I showed one earlier Foo {one string and two
ints}, my other struct only has double and long, it also has the same
link errors about toHash and opEquals.
string is not a basic type, its a slice, which means pointer.
On Tuesday, 17 October 2023 at 01:54:12 UTC, Richard (Rikki)
Andrew Cattermole wrote:
On 17/10/2023 2:15 PM, mw wrote:
On Tuesday, 17 October 2023 at 01:11:13 UTC, Richard (Rikki)
Andrew Cattermole wrote:
They are for structs as well.
Ah?! I use quite a few struts, but I never have provided s
On 17/10/2023 2:17 PM, mw wrote:
It's just my own module and type name, nothing special or interesting.
Doesn't matter.
Because I now can't demangle it and figure out what its trying to find
without doing that by hand. Every character in a symbol name is
significant, you can't remove some of
On 17/10/2023 2:15 PM, mw wrote:
On Tuesday, 17 October 2023 at 01:11:13 UTC, Richard (Rikki) Andrew
Cattermole wrote:
They are for structs as well.
Ah?! I use quite a few struts, but I never have provided such two methods.
Indeed, they are generated by the compiler, not user provided.
They
On Tuesday, 17 October 2023 at 01:14:04 UTC, Richard (Rikki)
Andrew Cattermole wrote:
On 17/10/2023 1:58 PM, mw wrote:
Oh the <_My_struct> part is my simplification, it is mangled
as something like :
_D6..<_My_struct>..__xtoHashFNbNeKxSQBlQBoQBiZm
When dealing with linker errors, please do no
On Tuesday, 17 October 2023 at 01:11:13 UTC, Richard (Rikki)
Andrew Cattermole wrote:
They are for structs as well.
Ah?! I use quite a few struts, but I never have provided such two
methods.
On 17/10/2023 1:58 PM, mw wrote:
Oh the <_My_struct> part is my simplification, it is mangled as
something like : _D6..<_My_struct>..__xtoHashFNbNeKxSQBlQBoQBiZm
When dealing with linker errors, please do not simplify, it can make
problems unsolvable.
They are for structs as well.
On Tuesday, 17 October 2023 at 00:44:17 UTC, Richard (Rikki)
Andrew Cattermole wrote:
xtoHash and xopEquals are generated by the compiler
automatically.
These two are for `class`, but shouldn't be generated for
`struct`, right?
that generated the linker error.
Oh the <_My_struct> part is my simplification, it is mangled as
something like : _D6..<_My_struct>..__xtoHashFNbNeKxSQBlQBoQBiZm
xtoHash and xopEquals are generated by the compiler automatically.
Curiously those two symbol names are not demangling.
Given this, I suspect the best thing to do is file a bug report with ldc
with the code that generated the linker error.
On Monday, 16 October 2023 at 21:20:39 UTC, mw wrote:
It's very hard to isolate the problem. I have comment out that
piece part of code for now (non-essential part of my program):
comment out where the struct is used, not the struct definition.
Anyway, I will try some time later.
BTW, the st
It's very hard to isolate the problem. I have comment out that
piece part of code for now (non-essential part of my program):
comment out where the struct is used, not the struct definition.
Anyway, I will try some time later.
On Monday, 16 October 2023 at 20:06:02 UTC, ryuukk_ wrote:
On Monday, 16 October 2023 at 19:36:07 UTC, Imperatorn wrote:
On Monday, 16 October 2023 at 18:20:27 UTC, mw wrote:
[...]
Show your code here on in Discord
https://discord.gg/wKTvGNpc
No, show your code here on the forum, don't nee
On Monday, 16 October 2023 at 19:36:07 UTC, Imperatorn wrote:
On Monday, 16 October 2023 at 18:20:27 UTC, mw wrote:
Hi,
I just encountered a strange link error: I have a `struct`
type `My_struct`, the program compiles fine, but at link time,
it errors out:
undefined reference to
On Monday, 16 October 2023 at 18:20:27 UTC, mw wrote:
Hi,
I just encountered a strange link error: I have a `struct` type
`My_struct`, the program compiles fine, but at link time, it
errors out:
undefined reference to _My_struct__xtoHashFNbNeKxSQBlQBoQBiZm
undefined reference to
Hi,
I just encountered a strange link error: I have a `struct` type
`My_struct`, the program compiles fine, but at link time, it
errors out:
undefined reference to _My_struct__xtoHashFNbNeKxSQBlQBoQBiZm
undefined reference to _My_struct__xopEqualsMxFKxSQBlQBoQBiZb
looks like it treats
I was using a different version of dmd. Problem solved. thank you
code:
```d
auto req = new ApplyContact();
data.fromProtobuf!ApplyContact(req);
```
protobuf:
```d
class ApplyContact
{
@Proto(1) string fromId = protoDefaultValue!string;
@Proto(2) string toId = protoDefaultValue!string;
@Proto(3) string message = protoDefaultValue!string;
@Proto
On 10/5/23 1:49 AM, ag0aep6g wrote:
For some further reading, there's an open issue about the unexpected
slicing: https://issues.dlang.org/show_bug.cgi?id=14619
Thank you I had forgotten about that issue!
-Steve
On 03.10.23 20:26, Paul Backus wrote:
Naturally, this lowering is completely absent from [the language spec's
section on `foreach`.][1] According to the spec, the only ways to
iterate over a `struct` type are `opApply` and the input range interface.
I think it would probably be less confusing
On Wednesday, 4 October 2023 at 08:11:12 UTC, Joel wrote:
What am I missing?
Splitter returns a forward range so you can't slice the result.
You can use take() and drop() instead. Also, converting a string
range to int[] doesn't seem to work, but I don't know if it
should. Here is a version
What am I missing?
```d
import std;
void main() {
struct DateRem {
Date date;
string rem;
string toString() const => text(date.toSimpleString, " ",
rem);
}
DateRem[] daterem;
data
.splitter('\n')
.filter!(l => l.length && l[0].isDigit)
On Tuesday, 3 October 2023 at 17:05:46 UTC, Steven Schveighoffer
wrote:
```d
void main()
{
S s = 0;
{
scope int[] __r3 = s.opIndex()[];
ulong __key4 = 0LU;
for (; __key4 < __r3.length; __key4 += 1LU)
{
On 10/3/23 11:12 AM, Joel wrote:
The following program crashes, but doesn’t if I change (see title) T[]
to auto. The program doesn’t even use that method/function. What’s the
story?
It's a stack overflow.
when doing foreach on your type, the compiler *always* uses a slice
first if it compile
On Tuesday, 3 October 2023 at 15:12:34 UTC, Joel wrote:
The following program crashes, but doesn’t if I change (see
title) T[] to auto. The program doesn’t even use that
method/function. What’s the story?
```d
// Adding program - literal functions
import std;
struct List(T) {
class Node
The following program crashes, but doesn’t if I change (see
title) T[] to auto. The program doesn’t even use that
method/function. What’s the story?
```d
// Adding program - literal functions
import std;
struct List(T) {
class Node {
T data;
Node next;
this(T data)
On 9/23/23 8:07 AM, j...@bloow.edu wrote:
I'm using download(url, filename) to download files in vibe.d.
The issue is that I do not know when the download is finished or errors.
There is a callback for the streaming side but not for the file download.
You might misunderstand how vibe is doi
rrors. There is a callback for the streaming side but not for the
file download.
A small test program shows, that if the function return normally the
transfer was done (and the file saved).
The function raises an exception if there is e,g, an http error status
communicated.
I am not sure what ha
rrors. There is a callback for the streaming side but not for the
file download.
A small test program shows, that if the function return normally the
transfer was done (and the file saved).
The function raises an exception if there is e,g, an http error status
communicated.
I am not sure what ha
side but not
for the file download.
A small test program shows, that if the function return
normally the transfer was done (and the file saved).
The function raises an exception if there is e,g, an http error
status communicated.
I am not sure what happens if the download is interrupted in
On Saturday, 23 September 2023 at 15:09:13 UTC, Elias wrote:
On Saturday, 23 September 2023 at 12:07:38 UTC, Joe wrote:
I'm using download(url, filename) to download files in vibe.d.
The issue is that I do not know when the download is finished
or errors. There is a callback for the streaming
On Saturday, 23 September 2023 at 12:07:38 UTC, Joe wrote:
I'm using download(url, filename) to download files in vibe.d.
The issue is that I do not know when the download is finished
or errors. There is a callback for the streaming side but not
for the file download.
If you want an asynchro
f the function return normally the
transfer was done (and the file saved).
The function raises an exception if there is e,g, an http error status
communicated.
I am not sure what happens if the download is interrupted in the middle.
I guess there will be an exception, but the file might be wr
On Saturday, 23 September 2023 at 12:07:38 UTC, Joe wrote:
I'm using download(url, filename) to download files in vibe.d.
The issue is that I do not know when the download is finished
or errors. There is a callback for the streaming side but not
for the file download.
You don’t need a callba
I'm using download(url, filename) to download files in vibe.d.
The issue is that I do not know when the download is finished or
errors. There is a callback for the streaming side but not for
the file download.
On Friday, 8 September 2023 at 13:34:42 UTC, Richard (Rikki)
Andrew Cattermole wrote:
In case you didn't know, all you need to get unittests working
in -betterC is:
```d
foreach (module_; allModules) {
foreach (unitTest; __traits(getUnitTe
On Saturday, 9 September 2023 at 10:54:34 UTC, bachmeier wrote:
Hate to be that guy, but I posted a link to a stackoverflow
question with the exact error message you were getting, and the
solution. And I told you I had experienced the same error and
that question fixed it.
No reason to not
On Saturday, 9 September 2023 at 09:30:10 UTC, rempas wrote:
Bingo! You and Brad found out!
Hate to be that guy, but I posted a link to a stackoverflow
question with the exact error message you were getting, and the
solution. And I told you I had experienced the same error and
that
On Saturday, 9 September 2023 at 09:56:59 UTC, H. S. Teoh wrote:
libc doesn't know what you intended. All it knows is that you
asked it for 20 bytes (even though you actually needed 40),
then later on its internal structures are corrupted (because
you thought you got 40 bytes; storing data past
s. What did you overwrite? Probably some internal malloc
implementation structure. Then it later noticed "hey, this
structure doesn't make sense, I'm going to report it to the
user!" That's why you see the message.
Memory problems are very difficult to find, and typically
On Sat, Sep 09, 2023 at 09:21:32AM +, rempas via Digitalmars-d-learn wrote:
> On Saturday, 9 September 2023 at 08:54:14 UTC, Brad Roberts wrote:
> > I'm pretty sure this is your problem. You're allocating size bytes
> > which is only going to work where sizeof(T) == 1. Changing to
> > malloc(
.
What did you overwrite? Probably some internal malloc
implementation structure. Then it later noticed "hey, this
structure doesn't make sense, I'm going to report it to the
user!" That's why you see the message.
Memory problems are very difficult to find, and t
On Saturday, 9 September 2023 at 09:04:18 UTC, Steven
Schveighoffer wrote:
This is not ideal. Why? Because 99% of the time, a poster has
come here with a problem they don't know how to solve, and have
focused in on where they *think* the problem is. However, the
problem isn't there. But us read
On Saturday, 9 September 2023 at 08:54:14 UTC, Brad Roberts wrote:
I'm pretty sure this is your problem. You're allocating size
bytes which is only going to work where sizeof(T) == 1.
Changing to malloc(size * sizeof(T)) is likely going to work
better.
Oh man That was it! I had forget a
ums.
So, some times, this work will works, some others, it will give
me the following error:
`Fatal glibc error: malloc.c:2594 (sysmalloc): assertion
failed: (old_top == initial_top (av) && old_size == 0) ||
((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top)
&am
On 9/8/2023 12:59 AM, rempas via Digitalmars-d-learn wrote:
u64 _cap = 0; // Total amount of elements (not bytes) we can
this._ptr = cast(T*)malloc(size);
I'm pretty sure this is your problem. You're allocating size bytes
which is only going to work where sizeof(T) == 1. Changing to
ma
default
post-blitting may happen you can add
```d
@disable this(this);
```
to the struct.
Thank you! I did and I got a bunch of errors! Seeing where they
are located, it doesn't seem to be in the file and instances that
give me the error. Something really weird happens.
I'll proba
On Friday, 8 September 2023 at 19:14:47 UTC, H. S. Teoh wrote:
The error message looks to me like a corruption of the malloc
heap. These kinds of bugs are very hard to trace, because they
may go undetected and only show up in specific circumstances,
so small perturbations of completely
On Friday, 8 September 2023 at 19:14:47 UTC, H. S. Teoh wrote:
My guess is that you have a double-free somewhere, or there's a
buffer overrun. Or maybe some bad interaction with the GC, e.g.
if you tried to free a pointer from the GC heap. (Note that
this may not immediately show up; free() c
On Friday, 8 September 2023 at 16:17:15 UTC, Richard (Rikki)
Andrew Cattermole wrote:
I would strongly suggest that you log all memory sizes that are
allocated, and double check that you do free.
Also turn on ASAN in ldc.
http://johanengelen.github.io/ldc/2017/12/25/LDC-and-AddressSanitizer.
On Friday, 8 September 2023 at 19:14:47 UTC, H. S. Teoh wrote:
[...]
My guess is that you have a double-free somewhere, or there's a
buffer overrun. Or maybe some bad interaction with the GC, e.g.
if you tried to free a pointer from the GC heap.
That cant be a GC problem as rempas project is
On Friday, 8 September 2023 at 18:59:21 UTC, rempas wrote:
On Friday, 8 September 2023 at 16:02:36 UTC, Basile B. wrote:
Could this be a problem of copy construction ?
I don't think so.
My idea was that if you dont have defined a copy constructor and
if an instance is assigned to another,
loc` is used.
> And when I assert the result in the `_ptr` field. Really weird...
The error message looks to me like a corruption of the malloc heap.
These kinds of bugs are very hard to trace, because they may go
undetected and only show up in specific circumstances, so small
perturbations of compl
On Friday, 8 September 2023 at 16:02:36 UTC, Basile B. wrote:
Could this be a problem of copy construction ?
I don't think so. The assertion seems to be violated when
`malloc` is used. And when I assert the result in the `_ptr`
field. Really weird...
On 08/09/2023 7:59 PM, rempas wrote:
|Fatal glibc error: malloc.c:2594 (sysmalloc): assertion failed:
(old_top == initial_top (av) && old_size == 0) || ((unsigned long)
(old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long)
old_end & (pagesize - 1)) ==
On Friday, 8 September 2023 at 07:59:37 UTC, rempas wrote:
I do have the following struct:
[...]
Is there any possible that there is a compiler bug? I do use
ldc2 and `betterC`!
Could this be a problem of copy construction ?
On Friday, 8 September 2023 at 07:59:37 UTC, rempas wrote:
[I do have ... I do use ldc2 and `betterC`!]
For anyone who is still following, first of all thanks! Second, I
have bad news and good news!
The bad news is that I tested in an Linux Mint system (mine is an
Arch Linux) and the it sti
On Friday, 8 September 2023 at 14:40:13 UTC, Richard (Rikki)
Andrew Cattermole wrote:
No, for this you need ModuleInfo. The order is sequential on
what it sees first.
Personally I test using full D rather than -betterC.
For dub:
```json
"configurations": [
{
"name": "l
On Friday, 8 September 2023 at 14:50:17 UTC, Kagamin wrote:
Did you run this example program above? Does it crash?
I didn't as I suppose that it would had no problems as it works
for you. Either that, or it will be indeed a problem with my
Glibc.
I did run it now after your reply and it wo
```
ptr = 0x55cb701de2a0
vec ptr = 0x55cb701de2a3
vec local = 0x7fffa1542258
vec[3] = h
--
00010400
run ok
```
I have made a search on the web and I found out one thread that
pointed out that it may be a Glibc error. However, because like
I said the problem only happens when I assign the r
On 09/09/2023 2:20 AM, rempas wrote:
Do they have automatic symbol order resolution? Which is, testing
symbols that other symbol depend on first? Or is it random?
No, for this you need ModuleInfo. The order is sequential on what it
sees first.
Personally I test using full D rather than -bett
On Friday, 8 September 2023 at 13:34:42 UTC, Richard (Rikki)
Andrew Cattermole wrote:
In case you didn't know, all you need to get unittests working
in -betterC is:
```d
foreach (module_; allModules) {
foreach (unitTest; __traits(getUnitTe
In case you didn't know, all you need to get unittests working in
-betterC is:
```d
foreach (module_; allModules) {
foreach (unitTest; __traits(getUnitTests,
module_)) {
unitTest();
3
vec local = 0x7fffa1542258
vec[3] = h
--
00010400
run ok
```
As D's "uninttest" feature is disabled on BetterC, I have wrote
my own testing suit (with is very simple). I just said that to
point out that I'm testing this data structure (along side other
things) and
null terminator
this._ptr = cast(T*)malloc(size);
}
}
```
That's some minimal code that I do have just to showcase it.
So, some times, this work will works, some others, it will give
me the following error:
`Fatal glibc error: malloc.c:2594 (sysmalloc): assertion
failed: (ol
On Friday, 8 September 2023 at 11:50:52 UTC, rempas wrote:
That's interesting, I wasn't able to find something else! The
bug happens when I run the testing suit and well... the tests
before pass so I cannot find anything that goes wrong except
for the fact that I do not free the memory that i
On Friday, 8 September 2023 at 09:25:59 UTC, Hipreme wrote:
Hello, not completely unrelated to your problem, I have also
done something like that, and when you're in D, don't use
simply a pointer and length like that, use the `slice` operator.
See references:
https://tour.dlang.org/tour/en/
On Friday, 8 September 2023 at 09:07:12 UTC, evilrat wrote:
Hard to tell from that code but it is quite unlikely there is a
compiler bug in such simple use case.
I assume you already tried debugging your program, right?
Yep! I have spent days and it's these kinds of bugs that burn me
off a
null terminator
this._ptr = cast(T*)malloc(size);
}
}
```
That's some minimal code that I do have just to showcase it.
So, some times, this work will works, some others, it will give
me the following error:
`Fatal glibc error: malloc.c:2594 (sysmalloc): assertion
failed: (ol
null terminator
this._ptr = cast(T*)malloc(size);
}
}
```
That's some minimal code that I do have just to showcase it.
So, some times, this work will works, some others, it will give
me the following error:
`Fatal glibc error: malloc.c:2594 (sysmalloc): assertion
failed: (ol
);
}
}
```
That's some minimal code that I do have just to showcase it. So,
some times, this work will works, some others, it will give me
the following error:
`Fatal glibc error: malloc.c:2594 (sysmalloc): assertion failed:
(old_top == initial_top (av) && old_size == 0) || ((u
On Wednesday, 30 August 2023 at 09:24:21 UTC, Paolo Invernizzi
wrote:
src/api3.d(49):called from here:
`checkSql(Schema("public",
src/dget/db.d(276): Error: template instance
`api3.forgeSqlCheckerForSchema!(Schema("public", **BAZILLIONS of lines**> error in
Hello everybody,
If a compilation error is thrown with CTFE involved, the 'called
from here' is like:
```
src/api3.d(2010): Error: uncaught CTFE exception
`object.Exception("42703: column \"system_timestamp_ms\" does not
exist. SQL: select coalesce(count(sys
e
while trying to come up with something that might seemingly work.
I've encountered this error:
### Error
```
C:\Users\Windows10\Desktop\interpreter>dmd WindowsGetUserName.d
lld-link: error: undefined symbol: GetUserNameA
referenced by WindowsGetUserName.obj:(_Dmain)
Error: link
uot;, referenced from:
__Dmain in curl_download.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
Error: /usr/bin/cc failed with status: 1
Am I missing something?
You need to link the library that contains photon.
-Steve
l_download.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to
see invocation)
Error: /usr/bin/cc failed with status: 1
Am I missing something?
--
Dmitry Olshansky
https://olshansky.me
On Thursday, 15 June 2023 at 01:20:50 UTC, H. S. Teoh wrote:
On Thu, Jun 15, 2023 at 12:49:30AM +, mw via
Digitalmars-d-learn wrote:
Hi,
Recently encountered a similar problem, ultimately the cause
was that my library paths turned out to be wrongly set, so it
was picking up the wrong vers
On Thu, Jun 15, 2023 at 12:49:30AM +, mw via Digitalmars-d-learn wrote:
> Hi,
>
> I switched to a different machine to build my project, suddenly I got
> lots of link errors. (It builds fine on the old machine, and my
> software version are the same on both machines LDC - the LLVM D
> compiler
Hi,
I switched to a different machine to build my project, suddenly I
got lots of link errors. (It builds fine on the old machine, and
my software version are the same on both machines LDC - the LLVM
D compiler (1.32.2))
e.g.:
```
...
/usr/bin/ld:
/home//.dub/cache/cachetools/0.3.1/build/li
On Tuesday, 30 May 2023 at 04:11:00 UTC, Cecil Ward wrote:
static immutable T foo;
T bar() {
return foo;
}
Should we get an error from the D compiler here as the
initialiser has been forgotten? What do you think ?
No.
There are no un-initialized values in D.
It gets its default value
On Tuesday, 30 May 2023 at 08:54:33 UTC, Gimbles wrote:
On Tuesday, 30 May 2023 at 08:47:16 UTC, user456 wrote:
On Tuesday, 30 May 2023 at 08:42:38 UTC, Gimbles wrote:
My code is this
[...]
Should I make an issue for this as it suggests?
100% yes. This an "Internal Compiler Error&
On Tuesday, 30 May 2023 at 08:47:16 UTC, user456 wrote:
On Tuesday, 30 May 2023 at 08:42:38 UTC, Gimbles wrote:
My code is this
[...]
Should I make an issue for this as it suggests?
100% yes. This an "Internal Compiler Error" (ICE), meaning the
compiler has crashed.
Open a t
On Tuesday, 30 May 2023 at 08:42:38 UTC, Gimbles wrote:
My code is this
[...]
Should I make an issue for this as it suggests?
100% yes. This an "Internal Compiler Error" (ICE), meaning the
compiler has crashed.
Open a ticket here :
https://issues.dlang.org/show_bug.cgi?id=2393
On Tuesday, 30 May 2023 at 08:42:38 UTC, Gimbles wrote:
My code is this
```d
struct ConstValueIndex
{
ushort const_value_index;
}
[...]
https://gist.github.com/run-dlang/5dd783c750f04329405af1b1e4a83cde
Here's the full source
{
ElementValue[] values;
}
alias ElementValue = SumType!(
ConstValueIndex,
EnumConstValue,
ClassInfoIndex,
AnnotationValue,
ArrayValue,
);
```
It results in quite a cryptic error
```d
Error: unknown, please file report on issues.dlang.org
/usr/include/dlang/dmd/std/meta.d
On Saturday, 20 May 2023 at 18:27:47 UTC, Ali Çehreli wrote:
[...]
And I've just discovered something.
Me2! The serial version using array indexing
void vec_op_naive0 (double [] outp, const double [] inp,
double function (double) fp)
{
enforce (inp.length == outp.length);
On Saturday, 20 May 2023 at 18:27:47 UTC, Ali Çehreli wrote:
On 5/20/23 04:21, kdevel wrote:
And I've just discovered something. Which one of the following
is the expected documentation?
https://dlang.org/library/std/parallelism.html
https://dlang.org/phobos/std_parallelism.html
What pat
On 5/20/23 04:21, kdevel wrote:
> Thanks for your explications!
>
> On Friday, 19 May 2023 at 21:18:28 UTC, Ali Çehreli wrote:
>> [...]
>> - std.range.zip can be used instead but it does not provide 'ref'
>> access to its elements.
>
> How/why does sort [1] work with zipped arrays?
I don't know b
Thanks for your explications!
On Friday, 19 May 2023 at 21:18:28 UTC, Ali Çehreli wrote:
[...]
- std.range.zip can be used instead but it does not provide
'ref' access to its elements.
How/why does sort [1] work with zipped arrays?
[...]
The following amap example there may be useful for y
On 5/19/23 02:17, kdevel wrote:
Should this compile? dmd says
Multiple points:
- lockstep works only with foreach loops but it's not a range.
- std.range.zip can be used instead but it does not provide 'ref' access
to its elements.
- However, since slices are already references to groups
```
import std.range;
import std.parallelism;
void vec_op (double [] outp, const double [] inp,
double function (double) f)
{
foreach (ref a, b; parallel (lockstep (outp, inp)))
a = f (b);
}
```
Should this compile? dmd says
```
[...]/src/phobos/std/parallelism.d(4094): Error
On Friday, 21 April 2023 at 20:46:36 UTC, Ben Jones wrote:
I'm trying to update an app from an older version of Vibe.d to
a newer version that supports modern Mongo (0.9.7-alpha2)
[...]
Update: https://github.com/vibe-d/vibe.d/pull/2729
piles, but I'm
getting a runtime error:
```Passed in a regular document into a place where only updates
are expected. Maybe you want to call replaceOne instead? (this
update call would otherwise replace the entire matched object
with the passed in update object)```
On this command
_re
101 - 200 of 1001 matches
Mail list logo