ref.: https://x.com/MisterTechBlog/status/1798918878350950840
**Note:** Currently, ldc2 compiler only for
riscv/arm/sim[ulator]. gdc and dmd need PR!
**Preview - qemu-armv7a:nsh**
```bash
$ qemu-system-arm -cpu cortex-a7 -nographic -M
virt,virtualization=off,gic-version=2 -net none -chardev
https://issues.dlang.org/show_bug.cgi?id=10376
Nick Treleaven changed:
What|Removed |Added
CC||john.loughran.colvin@gmail.
https://issues.dlang.org/show_bug.cgi?id=15612
Nick Treleaven changed:
What|Removed |Added
Status|NEW |RESOLVED
CC|
https://issues.dlang.org/show_bug.cgi?id=24587
RazvanN changed:
What|Removed |Added
CC||razvan.nitu1...@gmail.com
--- Comment #1 from
On Thu, Jun 06, 2024 at 05:49:39PM +, Andy Valencia via Digitalmars-d-learn
wrote:
> I was using instance initialization which allocated a new object. My
> intention was this initialization would happen per-instance, but all
> instances appear to share the same sub-object? That
On Thursday, 6 June 2024 at 17:49:39 UTC, Andy Valencia wrote:
I was using instance initialization which allocated a new
object. My intention was this initialization would happen
per-instance, but all instances appear to share the same
sub-object? That is, f1.b and f2.b appear to point to a
https://issues.dlang.org/show_bug.cgi?id=10376
Nick Treleaven changed:
What|Removed |Added
See Also||https://issues.dlang.org/sh
https://issues.dlang.org/show_bug.cgi?id=2947
Nick Treleaven changed:
What|Removed |Added
CC||n...@geany.org
See Also|
On Thursday, 6 June 2024 at 17:49:39 UTC, Andy Valencia wrote:
I was using instance initialization which allocated a new
object. My intention was this initialization would happen
per-instance, but all instances appear to share the same
sub-object? That is, f1.b and f2.b appear to point to a
I was using instance initialization which allocated a new object.
My intention was this initialization would happen per-instance,
but all instances appear to share the same sub-object? That is,
f1.b and f2.b appear to point to a single object? Obviously I
moved the new into the initializer
On Tuesday, 4 June 2024 at 12:22:23 UTC, Eric P626 wrote:
I am currently trying to learn how to program in D. I thought
that I could start by trying some maze generation algorithms. I
have a maze stored as 2D array of structure defined as follow
which keep tracks of wall positions:
~~~
On Wednesday, 5 June 2024 at 18:31:12 UTC, Basile B. wrote:
On Wednesday, 5 June 2024 at 01:18:06 UTC, Paul Backus wrote:
On Tuesday, 4 June 2024 at 16:58:50 UTC, Basile B. wrote:
```d
void main(string[] args)
{
ushort a = 0b;
bool* b = cast(bool*)
setIt(*b);
https://issues.dlang.org/show_bug.cgi?id=24588
RazvanN changed:
What|Removed |Added
Status|NEW |RESOLVED
CC|
On Wednesday, 5 June 2024 at 10:36:50 UTC, Nick Treleaven wrote:
```d
import std.stdio;
alias s_cell = int;
void main()
{ writeln("Maze generation demo");
s_cell [5][5] maze;
int n;
foreach (i, row; maze)
foreach (j, col; row)
maze[i][j] = n++;
s_cell[][5]
https://issues.dlang.org/show_bug.cgi?id=24589
Issue ID: 24589
Summary: [std.sreaching] take functions seem to be missing
range overload/version
Product: D
Version: D2
Hardware: All
URL:
On Wednesday, 5 June 2024 at 01:18:06 UTC, Paul Backus wrote:
On Tuesday, 4 June 2024 at 16:58:50 UTC, Basile B. wrote:
```d
void main(string[] args)
{
ushort a = 0b;
bool* b = cast(bool*)
setIt(*b);
assert(a == 0b); // what actually happens
On Wednesday, 5 June 2024 at 06:22:34 UTC, Eric P626 wrote:
I tried the following signatures with the ref keyword and it
did not change anything:
~~~
void print_maze ( ref s_cell maze )
void print_maze ( ref s_cell [][] maze )
~~~
From what I found, arrays passed in parameters are always
https://issues.dlang.org/show_bug.cgi?id=24588
veronapressbuymagicmushrooms changed:
What|Removed |Added
URL||http://www.veronapress.com/
https://issues.dlang.org/show_bug.cgi?id=20010
Bolpat changed:
What|Removed |Added
CC||qs.il.paperi...@gmail.com
--- Comment #1 from
https://issues.dlang.org/show_bug.cgi?id=24587
Issue ID: 24587
Summary: Allow negated qualifiers in cast expressions
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
On Wednesday, 5 June 2024 at 11:27:32 UTC, Nick Treleaven wrote:
On Wednesday, 5 June 2024 at 09:24:23 UTC, evilrat wrote:
for simple cases like this it might work, but 2d array is not
even contiguous,
A 2D static array is contiguous:
https://dlang.org/spec/arrays.html#rectangular-arrays
D
On Wednesday, 5 June 2024 at 09:24:23 UTC, evilrat wrote:
for simple cases like this it might work, but 2d array is not
even contiguous,
A 2D static array is contiguous:
https://dlang.org/spec/arrays.html#rectangular-arrays
D static arrays, while using the same syntax, are implemented
as a
https://issues.dlang.org/show_bug.cgi?id=24582
Nick Treleaven changed:
What|Removed |Added
See Also||https://issues.dlang.org/sh
https://issues.dlang.org/show_bug.cgi?id=20148
Nick Treleaven changed:
What|Removed |Added
See Also||https://issues.dlang.org/sh
On Wednesday, 5 June 2024 at 10:27:47 UTC, Nick Treleaven wrote:
foreach (i, row; maze)
slices[i] = row;
Sorry that assignment was wrong (edited at last minute). Fixed:
```d
import std.stdio;
alias s_cell = int;
void main()
{ writeln("Maze generation demo");
s_cell [5][5]
On Wednesday, 5 June 2024 at 10:27:47 UTC, Nick Treleaven wrote:
//~ void print_maze ( s_cell [][] maze... )
I meant to delete that line!
On Tuesday, 4 June 2024 at 12:22:23 UTC, Eric P626 wrote:
~~~
void main()
{ writeln("Maze generation demo");
s_cell [5][5] maze;
print_maze (maze);
}
void print_maze ( s_cell [][] maze )
{
}
~~~
This is how to do it without GC allocations (I have used `int`
instead for demo
With accessor:
```
void main()
{
s_cell[] maze=make(5,5);
s_cell a=maze.get(1,2);
print_maze(maze);
}
void print_maze(s_cell[] maze)
{
}
s_cell[] make(int width, int height)
{
return new s_cell[width*height];
}
s_cell get(s_cell[] maze, int x, int y)
{
return maze[5*y+x];
On Wednesday, 5 June 2024 at 06:22:34 UTC, Eric P626 wrote:
Now according to the book, it's possible to assign a slice from
a fixed array. This code will compile:
~~~
int[12] monthDays = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31,
30, 31 ];
int[] a_slice = monthDays;
~~~
The element types
On Tuesday, 4 June 2024 at 12:22:23 UTC, Eric P626 wrote:
I try to create a 2D array of fixed length and pass it in
parameter as a reference. Normally, in C, I would have used a
pointer as parameter, and pass the address of the array.
Not obvious what you're trying to do. How would you do it
On Wednesday, 5 June 2024 at 06:22:34 UTC, Eric P626 wrote:
On Tuesday, 4 June 2024 at 16:19:39 UTC, Andy Valencia wrote:
On Tuesday, 4 June 2024 at 12:22:23 UTC, Eric P626 wrote:
Thanks for the comments. So far, I only managed to make it work
by creating a dynamic array and keeping the same
On Wednesday, 5 June 2024 at 09:09:40 UTC, Kagamin wrote:
On Wednesday, 5 June 2024 at 01:18:06 UTC, Paul Backus wrote:
The only safe values for a `bool` are 0 (false) and 1 (true).
AFAIK that was fixed and now full 8-bit range is safe.
`cast(bool) someByte` is fine - that doesn't
On Wednesday, 5 June 2024 at 01:18:06 UTC, Paul Backus wrote:
The only safe values for a `bool` are 0 (false) and 1 (true).
AFAIK that was fixed and now full 8-bit range is safe.
Basile B. kirjoitti 4.6.2024 klo 19.58:
I understand that the notion of `bool` doesn't exist on X86, hence what
will be used is rather an instruction that write on the lower 8 bits,
but with a 7 bits corruption.
Do I corrupt memory here or not ?
Is that a safety violation ?
Viewing a valid
On Tuesday, 4 June 2024 at 16:19:39 UTC, Andy Valencia wrote:
On Tuesday, 4 June 2024 at 12:22:23 UTC, Eric P626 wrote:
I tried to find a solution on the internet, but could not find
anything, I stumble a lot on threads about Go or Rust language
even if I specify "d language" in my search.
On Wednesday, 5 June 2024 at 05:15:42 UTC, Olivier Pisano wrote:
This is technically not a memory corruption, because as
bool.sizeof < int.sizeof, you just write the low order byte of
an int you allocated on the stack.
It was not an int, it was a ushort. Anyway, what I wrote still
applies.
On Tuesday, 4 June 2024 at 16:58:50 UTC, Basile B. wrote:
question in the header, code in the body, execute on a X86 or
X86_64 CPU
I understand that the notion of `bool` doesn't exist on X86,
hence what will be used is rather an instruction that write on
the lower 8 bits, but with a 7 bits
On Wednesday, 5 June 2024 at 01:18:06 UTC, Paul Backus wrote:
On Tuesday, 4 June 2024 at 16:58:50 UTC, Basile B. wrote:
you have violated the language's safety invariants.
ah mais non.
https://issues.dlang.org/show_bug.cgi?id=24586
Issue ID: 24586
Summary: [REG 2.108] initialization of immutable arrays with a
system function marks the array as system
Product: D
Version: D2
Hardware: All
OS:
On Tuesday, 4 June 2024 at 16:58:50 UTC, Basile B. wrote:
```d
void main(string[] args)
{
ushort a = 0b;
bool* b = cast(bool*)
setIt(*b);
assert(a == 0b); // what actually happens
assert(a == 0b1110); // what would be safe
}
```
On Tuesday, 4 June 2024 at 16:58:50 UTC, Basile B. wrote:
question in the header, code in the body, execute on a X86 or
X86_64 CPU
```d
module test;
void setIt(ref bool b) @safe
{
b = false;
}
void main(string[] args)
{
ushort a = 0b;
bool* b = cast(bool*)
On Tuesday, 4 June 2024 at 16:58:50 UTC, Basile B. wrote:
question in the header, code in the body, execute on a X86 or
X86_64 CPU
```d
module test;
void setIt(ref bool b) @safe
{
b = false;
}
void main(string[] args)
{
ushort a = 0b;
bool* b = cast(bool*)
question in the header, code in the body, execute on a X86 or
X86_64 CPU
```d
module test;
void setIt(ref bool b) @safe
{
b = false;
}
void main(string[] args)
{
ushort a = 0b;
bool* b = cast(bool*)
setIt(*b);
assert(a == 0b); // what
On Tuesday, 4 June 2024 at 12:22:23 UTC, Eric P626 wrote:
I tried to find a solution on the internet, but could not find
anything, I stumble a lot on threads about Go or Rust language
even if I specify "d language" in my search.
Aside from the excellent answer already present, I wanted to
On Tuesday, 4 June 2024 at 12:22:23 UTC, Eric P626 wrote:
I am currently trying to learn how to program in D. I thought
that I could start by trying some maze generation algorithms. I
have a maze stored as 2D array of structure defined as follow
which keep tracks of wall positions:
~~~
I am currently trying to learn how to program in D. I thought
that I could start by trying some maze generation algorithms. I
have a maze stored as 2D array of structure defined as follow
which keep tracks of wall positions:
~~~
struct s_cell
{
bool north = true;
bool east = true;
https://issues.dlang.org/show_bug.cgi?id=24585
Bolpat changed:
What|Removed |Added
Priority|P1 |P4
CC|
https://issues.dlang.org/show_bug.cgi?id=24585
Issue ID: 24585
Summary: Allow switch with multiple arguments
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
On Wednesday, 29 May 2024 at 09:01:13 UTC, evilrat wrote:
On Wednesday, 29 May 2024 at 07:47:01 UTC, Dakota wrote:
[...]
(here is the signature of callback)
https://github.com/microsoft/garnet/blob/ade2991f3737b9b5e3151d0dd0b614adfd4bcecd/libs/storage/Tsavorite/cc/src/device/async.h#L25
On Monday, 3 June 2024 at 19:42:42 UTC, kinke wrote:
Glad to announce the first beta for LDC 1.39. Major changes:
* Based on D 2.109.0.
* LLVM for prebuilt packages bumped to v18.1.6.
* Support for LLVM 11-14 was dropped. The CLI options
`-passmanager` and `-opaque-pointers` were removed.
On Sunday, 2 June 2024 at 15:51:04 UTC, Iain Buclaw wrote:
Glad to announce D 2.109.0, ♥ to the 44 contributors.
This release comes with 15 major changes and 26 fixed Bugzilla
issues, including:
Thanks!
I've written a changelog entry about reinterpreting a byte as
bool being unsafe:
Glad to announce the first beta for LDC 1.39. Major changes:
* Based on D 2.109.0.
* LLVM for prebuilt packages bumped to v18.1.6.
* Support for LLVM 11-14 was dropped. The CLI options
`-passmanager` and `-opaque-pointers` were removed.
Full release log and downloads:
https://issues.dlang.org/show_bug.cgi?id=24582
--- Comment #3 from Nick Treleaven ---
bool v = cast(bool) 2;
ubyte[] a = [2, 4];
auto b = cast(bool[]) a;
auto c = cast(bool[]) [2, 4]; // literal cast
import std.stdio;
writeln(*cast(byte*)); // 1, OK
https://issues.dlang.org/show_bug.cgi?id=24582
Nick Treleaven changed:
What|Removed |Added
Summary|Detect unsafe casting to|Detect unsafe
|bool
https://issues.dlang.org/show_bug.cgi?id=20423
Richard (Rikki) Andrew Cattermole changed:
What|Removed |Added
CC||alphaglosi...@gmail.com
https://issues.dlang.org/show_bug.cgi?id=24582
Dennis changed:
What|Removed |Added
CC||dkor...@live.nl
Hardware|x86_64
https://issues.dlang.org/show_bug.cgi?id=24584
Issue ID: 24584
Summary: [phobos] `make unittest` should not rerun tests
unnecessarily
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
https://issues.dlang.org/show_bug.cgi?id=3947
Nick Treleaven changed:
What|Removed |Added
CC||n...@geany.org
--- Comment #1 from Nick
https://issues.dlang.org/show_bug.cgi?id=24583
Richard (Rikki) Andrew Cattermole changed:
What|Removed |Added
Keywords||mangling, safe
--
Very awesome lineup this year!
https://issues.dlang.org/show_bug.cgi?id=24583
Issue ID: 24583
Summary: di generator emits return scope and scope return in
wrong order
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
On Monday, 3 June 2024 at 13:26:54 UTC, Mike Parker wrote:
## The DConf '24 Schedule
The DConf '24 schedule is now live:
https://dconf.org/2024/index.html#schedule
You'll notice that we've departed from the norm in a few
places. That's because of the number of submissions we
received.
## The DConf '24 Schedule
The DConf '24 schedule is now live:
https://dconf.org/2024/index.html#schedule
You'll notice that we've departed from the norm in a few places.
That's because of the number of submissions we received.
Typically, we receive either just enough or many more than we
https://issues.dlang.org/show_bug.cgi?id=24582
Dlang Bot changed:
What|Removed |Added
Keywords||pull
--- Comment #1 from Dlang Bot ---
@ntrel
https://issues.dlang.org/show_bug.cgi?id=24582
Nick Treleaven changed:
What|Removed |Added
Keywords||safe
--
https://issues.dlang.org/show_bug.cgi?id=24582
Issue ID: 24582
Summary: Detect unsafe casting to bool
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: major
Priority: P1
https://issues.dlang.org/show_bug.cgi?id=24581
Bolpat changed:
What|Removed |Added
CC||qs.il.paperi...@gmail.com
--
https://issues.dlang.org/show_bug.cgi?id=24581
Issue ID: 24581
Summary: Add a @gc attribute already
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
https://issues.dlang.org/show_bug.cgi?id=19916
Nick Treleaven changed:
What|Removed |Added
CC||n...@geany.org
--- Comment #24 from Nick
On Sunday, 2 June 2024 at 21:46:41 UTC, solidstate1991 wrote:
Well, it turns out I used the windres found in mingw instead of
`rc.exe` since the latter cannot be found anywhere on my PC,
even after reinstalling stuff. I need to hunt it down somehow.
rc.exe comes with the Windows SDK - it gets
On Sunday, 2 June 2024 at 19:11:10 UTC, solidstate1991 wrote:
Added a few more line to my `resources.rc` file, it seems like
the issue is the resource file not being touched at all.
I've put `dflags "resources.res" platform="windows"` in my
`dub.sdl` file, it doesn't even care if there's a
https://issues.dlang.org/show_bug.cgi?id=24580
Tim changed:
What|Removed |Added
Keywords||ImportC
--
https://issues.dlang.org/show_bug.cgi?id=24580
Issue ID: 24580
Summary: ImportC: Asm label after attributes results in syntax
error
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
On Saturday, 25 May 2024 at 19:51:25 UTC, John Chapman wrote:
Not tested but from memory I do this:
1) Copy that first XML snippet from the page you linked, save
to a file called example.exe.manifest
2) Create a resource script file called resources.rc, with this
at the top:
1 24
On Sunday, 2 June 2024 at 17:46:09 UTC, bauss wrote:
If anything you should use a thread pool that each handles a
set of sockets, instead of each thread being a single socket.
Yup, thread pool it is. I'm still fleshing out the data
structure which manages the incoming work presented to the
On Friday, 31 May 2024 at 16:07:23 UTC, Andy Valencia wrote:
I'm coding a server which takes TCP connections. I end up in
the main thread with .accept() which hands me a Socket. I'd
like to hand this off to a spawn()'ed thread to do the actual
work.
Aliases to mutable thread-local data
Glad to announce D 2.109.0, ♥ to the 44 contributors.
This release comes with 15 major changes and 26 fixed Bugzilla
issues, including:
- In the language, a new function `__ctfeWrite` has been added to
allow writing messages from CTFE to console.
- `__traits(isBitfeld)`, and the properties
https://issues.dlang.org/show_bug.cgi?id=24579
Issue ID: 24579
Summary: stat_t has wrong size for Android armv7a
Product: D
Version: D2
Hardware: Other
OS: Other
Status: NEW
Severity: normal
On Saturday, 25 May 2024 at 19:51:25 UTC, John Chapman wrote:
Not tested but from memory I do this:
1) Copy that first XML snippet from the page you linked, save
to a file called example.exe.manifest
2) Create a resource script file called resources.rc, with this
at the top:
1 24
https://issues.dlang.org/show_bug.cgi?id=24578
Issue ID: 24578
Summary: Memory leak in rt.minfo sortCtor
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P1
https://issues.dlang.org/show_bug.cgi?id=24560
--- Comment #7 from Dlang Bot ---
dlang/dmd pull request #16553 "merge stable" was merged into master:
- ee4f5a04ffa272cf9c9fa4a134fc71559d0851b3 by RazvanN7:
Fix Bugzilla Issue 24560 - dmd crash on imported function with default
parameter
https://issues.dlang.org/show_bug.cgi?id=24504
Dlang Bot changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://issues.dlang.org/show_bug.cgi?id=24504
Dlang Bot changed:
What|Removed |Added
Keywords||pull
--- Comment #2 from Dlang Bot ---
https://issues.dlang.org/show_bug.cgi?id=24576
--- Comment #2 from Nicholas Wilson ---
the different directory and the smattering of Makefiles changes, compiler
sc.ini, etc. was part of the reason that this was such a PITA to try to change
it. We should have it configured in one place ideally.
https://issues.dlang.org/show_bug.cgi?id=24577
kinke changed:
What|Removed |Added
CC||ki...@gmx.net
--- Comment #1 from kinke ---
I'm
https://issues.dlang.org/show_bug.cgi?id=24576
kinke changed:
What|Removed |Added
CC||ki...@gmx.net
--- Comment #1 from kinke ---
I'd
https://issues.dlang.org/show_bug.cgi?id=15587
Tim changed:
What|Removed |Added
CC||tim.dl...@t-online.de
--- Comment #4 from Tim ---
https://issues.dlang.org/show_bug.cgi?id=24577
Issue ID: 24577
Summary: Struct with constructor returned from C++ wrong
Product: D
Version: D2
Hardware: x86_64
OS: Windows
Status: NEW
Severity: normal
https://issues.dlang.org/show_bug.cgi?id=24577
Tim changed:
What|Removed |Added
Keywords||C++
--
https://issues.dlang.org/show_bug.cgi?id=24576
Issue ID: 24576
Summary: Now that OMF support has been dropped, the standard
library should be called `phobo32` not
`phobos32mscoff`
Product: D
Version: D2
https://issues.dlang.org/show_bug.cgi?id=24576
Nicholas Wilson changed:
What|Removed |Added
Summary|Now that OMF support has|Now that OMF support has
On Friday, May 31, 2024 6:28:27 PM MDT Andy Valencia via Digitalmars-d-learn
wrote:
> On Friday, 31 May 2024 at 16:59:08 UTC, Jonathan M Davis wrote:
>
> Speaking as an old kernel engineer for the Sequent multiprocessor
> product line, this is all very comfortable to me. I'm very g
On Friday, 31 May 2024 at 16:59:08 UTC, Jonathan M Davis wrote:
Strictly speaking, unless you're dealing with a module or
static-level variable, the object is not in TLS. It's treated
as thread-local by the type system, and the type system will
assume that no other thread has access to it, but
https://issues.dlang.org/show_bug.cgi?id=24135
Dlang Bot changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
On Friday, 31 May 2024 at 19:48:37 UTC, kdevel wrote:
Have you taken into consideration that each of the
(pre-spawned) threads
can call accept()? Your program may also accept in multiple
processes on the same socket. [1]
Yes, but I am planning on some global behavior--mostly concerning
https://issues.dlang.org/show_bug.cgi?id=24575
Richard (Rikki) Andrew Cattermole changed:
What|Removed |Added
CC||alphaglosi...@gmail.com
https://issues.dlang.org/show_bug.cgi?id=24575
Issue ID: 24575
Summary: sumtype fails to match lambdas with anonymous
arguments
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
On Friday, 31 May 2024 at 16:07:23 UTC, Andy Valencia wrote:
I'm coding a server which takes TCP connections. I end up in
the main thread with .accept() which hands me a Socket. I'd
like to hand this off to a spawn()'ed thread to do the actual
work.
Have you taken into consideration that
https://issues.dlang.org/show_bug.cgi?id=23487
Forest changed:
What|Removed |Added
CC||fores...@nom.one
--- Comment #2 from Forest ---
https://issues.dlang.org/show_bug.cgi?id=24261
Nick Treleaven changed:
What|Removed |Added
CC||n...@geany.org
--- Comment #1 from Nick
1 - 100 of 274593 matches
Mail list logo