[Issue 20847] confusing compiler error message when compiling PosixTimeZone.getTimeZone

2024-07-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=20847 anonymous4 changed: What|Removed |Added Keywords||diagnostic --

Re: Array concatenation & optimisation

2024-07-22 Thread IchorDev via Digitalmars-d-learn
On Monday, 22 July 2024 at 12:03:33 UTC, Quirin Schroll wrote: this has no effect on whether the function is `@nogc`. That is a highly amusing (but obviously understandable) logical contradiction that I’d never considered before. ‘Sometimes you can’t use non-GC code in `@nogc` code.’

[Issue 13381] Two cases of array literal that can be stack-allocated

2024-07-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13381 Nick Treleaven changed: What|Removed |Added CC||n...@geany.org --- Comment #16 from Nick

Re: Array concatenation & optimisation

2024-07-22 Thread Nick Treleaven via Digitalmars-d-learn
On Sunday, 21 July 2024 at 10:33:38 UTC, Nick Treleaven wrote: On Sunday, 21 July 2024 at 05:43:32 UTC, IchorDev wrote: Does this mean that array literals are *always* separately allocated first, or is this usually optimised out? My understanding is that they do not allocate if used to

Re: Array concatenation & optimisation

2024-07-22 Thread Quirin Schroll via Digitalmars-d-learn
On Sunday, 21 July 2024 at 05:43:32 UTC, IchorDev wrote: Obviously when writing optimised code it is desirable to reduce heap allocation frequency. With that in mind, I'm used to being told by the compiler that I can't do this in `@nogc` code: ```d void assign(ref int[4] a) @nogc{ a[] =

[Issue 22977] [dip1000] can escape scope pointer returned by nested function

2024-07-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22977 Dennis changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Issue 24337] Segfault when printing an int[] cast from a string literal

2024-07-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24337 Dlang Bot changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

monkyyys code golf course(ALPHA)

2024-07-21 Thread monkyyy via Digitalmars-d-announce
https://github.com/crazymonkyyy/monkyyy-code-golf-course- ### monkyyys code golf course(ALPHA) ~~18~~ 9 exciting programing challenges 1. clone this repo 2. edit files in `you`, you are highly encouraged to add code to mylib.d 3. run `./scorefile.d` and/or `./scorescourse` for score 4.

[Issue 23487] std.experimental.logger assigning FileLogger to sharedLog no longer works

2024-07-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23487 Dlang Bot changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Issue 24447] ImportC: extern symbols cannot have initializers

2024-07-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24447 Dlang Bot changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Issue 24670] importC: .di generation does not place parentheses around const struct return types

2024-07-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24670 Dlang Bot changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: Using FFI to write a std::string to a buffer passed in from D

2024-07-21 Thread Troy via Digitalmars-d-learn
On Sunday, 21 July 2024 at 15:31:47 UTC, Johan wrote: On Sunday, 21 July 2024 at 13:35:46 UTC, Troy wrote: void create(void* b) { std::string s = "engineer again"; *(std::string*)(b) = s;// Segfault here } You have to construct an empty string object first in location `b`

Re: Array concatenation & optimisation

2024-07-21 Thread IchorDev via Digitalmars-d-learn
On Sunday, 21 July 2024 at 15:41:50 UTC, Johan wrote: https://d.godbolt.org/z/sG5Kancs4 The short array is not dynamically allocated (it's allocated on the stack, or for larger arrays it will be a hidden symbol in the binary image), even at `-O0` (i.e. `-O` was not passed). Wow thanks,

Re: Array concatenation & optimisation

2024-07-21 Thread IchorDev via Digitalmars-d-learn
On Sunday, 21 July 2024 at 10:33:38 UTC, Nick Treleaven wrote: Just to mention that if you assign to the static array it works: `a = [1,3,6,9];`. Bonkers. `array[]` is meant to be 'all of `array` as a slice', so you'd think that's how you copy a slice to a static array, but no! My

Re: Array concatenation & optimisation

2024-07-21 Thread Johan via Digitalmars-d-learn
On Sunday, 21 July 2024 at 05:43:32 UTC, IchorDev wrote: Does this mean that array literals are *always* separately allocated first, or is this usually optimised out? Not always allocated, see your example below. I don't quite know what the heuristic is for allocation or not... For

Re: Using FFI to write a std::string to a buffer passed in from D

2024-07-21 Thread Johan via Digitalmars-d-learn
On Sunday, 21 July 2024 at 13:35:46 UTC, Troy wrote: void create(void* b) { std::string s = "engineer again"; *(std::string*)(b) = s;// Segfault here } You have to construct an empty string object first in location `b` (emplacement new). Then you can assign to it as you do.

[Issue 24447] ImportC: extern symbols cannot have initializers

2024-07-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24447 Dlang Bot changed: What|Removed |Added Keywords||pull --- Comment #2 from Dlang Bot ---

[Issue 24670] importC: .di generation does not place parentheses around const struct return types

2024-07-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24670 Dlang Bot changed: What|Removed |Added Keywords||pull --- Comment #1 from Dlang Bot ---

Using FFI to write a std::string to a buffer passed in from D

2024-07-21 Thread Troy via Digitalmars-d-learn
I have a weird issue I've been running into while trying to write D bindings to some C++ code. I'm trying to call some C++ functions that take in a std::string but don't make a copy of it. To do this, I want to write a std::string to a buffer passed in from D so I can keep it from being

[Issue 24670] New: importC: .di generation does not place parentheses around const struct return types

2024-07-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24670 Issue ID: 24670 Summary: importC: .di generation does not place parentheses around const struct return types Product: D Version: D2 Hardware: x86_64 OS: Linux

Re: Array concatenation & optimisation

2024-07-21 Thread Nick Treleaven via Digitalmars-d-learn
On Sunday, 21 July 2024 at 10:33:38 UTC, Nick Treleaven wrote: For instance, will this example *always* allocate a new dynamic array for the array literal, and then append it to the existing one, even in optimised builds? ```d void append(ref int[] a){ a ~= [5, 4, 9]; } ``` If there

Re: Tuple deconstruction in Phobos

2024-07-21 Thread Nick Treleaven via Digitalmars-d-learn
On Sunday, 21 July 2024 at 04:05:52 UTC, IchorDev wrote: On Saturday, 20 July 2024 at 20:48:29 UTC, Nick Treleaven wrote: Instead of the `tie` assignment, you can just do: ```d import std.meta; AliasSeq!(y, x) = tupRetFn().expand; ``` And here I was trying to use comma

Re: Array concatenation & optimisation

2024-07-21 Thread Nick Treleaven via Digitalmars-d-learn
On Sunday, 21 July 2024 at 05:43:32 UTC, IchorDev wrote: Obviously when writing optimised code it is desirable to reduce heap allocation frequency. With that in mind, I'm used to being told by the compiler that I can't do this in `@nogc` code: ```d void assign(ref int[4] a) @nogc{ a[] =

Array concatenation & optimisation

2024-07-20 Thread IchorDev via Digitalmars-d-learn
Obviously when writing optimised code it is desirable to reduce heap allocation frequency. With that in mind, I'm used to being told by the compiler that I can't do this in `@nogc` code: ```d void assign(ref int[4] a) @nogc{ a[] = [1,3,6,9]; //Error: array literal in `@nogc` function `assign`

Re: Tuple deconstruction in Phobos

2024-07-20 Thread IchorDev via Digitalmars-d-learn
On Saturday, 20 July 2024 at 20:48:29 UTC, Nick Treleaven wrote: Instead of the `tie` assignment, you can just do: ```d import std.meta; AliasSeq!(y, x) = tupRetFn().expand; ``` And here I was trying to use comma expressions for this like a buffoon! Of course they didn't work,

[Issue 24668] ImportC: C files have no way to set module name

2024-07-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24668 --- Comment #1 from dave287...@gmail.com --- I think the fix is to just set the module name to the import path. In other words `a/foo.c` implies a `module a.foo;` declaration. --

[Issue 24669] ImportC: C files are not compiled with '-i' flag

2024-07-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24669 --- Comment #1 from dave287...@gmail.com --- https://issues.dlang.org/show_bug.cgi?id=24668 might block this as projects that currently work importing *.c files for decls only might stop working. --

[Issue 24669] New: ImportC: C files are not compiled with '-i' flag

2024-07-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24669 Issue ID: 24669 Summary: ImportC: C files are not compiled with '-i' flag Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: ImportC,

[Issue 24668] New: ImportC: C files have no way to set module name

2024-07-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24668 Issue ID: 24668 Summary: ImportC: C files have no way to set module name Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: ImportC

[Issue 15932] Get rid of the implicit slicing of static arrays

2024-07-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15932 Nick Treleaven changed: What|Removed |Added CC||n...@geany.org --- Comment #7 from Nick

Re: Tuple deconstruction in Phobos

2024-07-20 Thread Nick Treleaven via Digitalmars-d-learn
On Saturday, 20 July 2024 at 14:02:21 UTC, IchorDev wrote: Why does Phobos not provide a method to easily deconstruct tuples? Here's a trivial implementation: ... tie!(y, x) = tupRetFn().expand; writeln(x,", ",y); } ``` Not having this is like if Phobos didn't have `AliasSeq`.

[Issue 23487] std.experimental.logger assigning FileLogger to sharedLog no longer works

2024-07-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23487 Dlang Bot changed: What|Removed |Added Keywords||pull --- Comment #5 from Dlang Bot --- @veelo

Tuple deconstruction in Phobos

2024-07-20 Thread IchorDev via Digitalmars-d-learn
Why does Phobos not provide a method to easily deconstruct tuples? Here's a trivial implementation: ```d //Similar to C++'s `std::tie`. Can anyone tell me why it's called `tie`? void tie(T...)(typeof(T) src){ static foreach(ind, i; src){ T[ind] = i; } } //Usage

[Issue 16334] dmd producing invalid OMF file

2024-07-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16334 Dennis changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Issue 23830] Azure failure for OMF: Module name not printed before struct symbol

2024-07-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23830 Dlang Bot changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: Unexpected range assignment behaviour

2024-07-19 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, July 19, 2024 12:02:55 PM MDT H. S. Teoh via Digitalmars-d-learn wrote: > On Fri, Jul 19, 2024 at 05:48:37PM +, Dennis via Digitalmars-d-learn wrote: > > On Friday, 19 July 2024 at 17:20:22 UTC, matheus wrote: > > > couldn't this case for example be caught du

Re: Unexpected range assignment behaviour

2024-07-19 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Jul 19, 2024 at 05:48:37PM +, Dennis via Digitalmars-d-learn wrote: > On Friday, 19 July 2024 at 17:20:22 UTC, matheus wrote: > > couldn't this case for example be caught during the compiling time? > > The RangeError is only thrown when at runtime, the key does

Re: Unexpected range assignment behaviour

2024-07-19 Thread Dennis via Digitalmars-d-learn
On Friday, 19 July 2024 at 17:20:22 UTC, matheus wrote: couldn't this case for example be caught during the compiling time? The RangeError is only thrown when at runtime, the key doesn't exist, so that can't be caught. The real problem is implicit slicing of static arrays, which I'm not a

[Issue 7444] Require [] for array copies too

2024-07-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7444 --- Comment #25 from Nick Treleaven --- > Another issue is with an AA of static array key type: Sorry, static array *value* type: string[3][string] lookup; string[] dynArray = ["d", "e", "f"]; --

Re: Unexpected range assignment behaviour

2024-07-19 Thread matheus via Digitalmars-d-learn
On Friday, 19 July 2024 at 15:33:34 UTC, Dennis wrote: On Friday, 19 July 2024 at 09:34:13 UTC, Lewis wrote: But the value of $ here is 3. Why do I get a RangeError at runtime even though the slice is the correct size (and the same size as the hardcoded one that works)? The range `0 .. 3`

[Issue 7444] Require [] for array copies too

2024-07-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7444 Nick Treleaven changed: What|Removed |Added CC||n...@geany.org --- Comment #24 from Nick

Re: Unexpected range assignment behaviour

2024-07-19 Thread Lance Bachmeier via Digitalmars-d-learn
On Friday, 19 July 2024 at 09:34:13 UTC, Lewis wrote: ``` string[3][string] lookup; string[] dynArray = ["d", "e", "f"]; lookup["test"] = dynArray[0..$]; ``` This fails at runtime with RangeError. But if I change that last line to: ``` lookup["test"] = dynArray[0..3]; ``` then it works. But

Re: Unexpected range assignment behaviour

2024-07-19 Thread Dennis via Digitalmars-d-learn
On Friday, 19 July 2024 at 09:34:13 UTC, Lewis wrote: But the value of $ here is 3. Why do I get a RangeError at runtime even though the slice is the correct size (and the same size as the hardcoded one that works)? The range `0 .. 3` has compile time known length, so it gets converted to

[Issue 24337] Segfault when printing an int[] cast from a string literal

2024-07-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24337 Dlang Bot changed: What|Removed |Added Keywords||pull --- Comment #1 from Dlang Bot ---

Re: Unexpected range assignment behaviour

2024-07-19 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Jul 19, 2024 at 09:34:13AM +, Lewis via Digitalmars-d-learn wrote: > ``` > string[3][string] lookup; > string[] dynArray = ["d", "e", "f"]; > lookup["test"] = dynArray[0..$]; > ``` > > This fails at runtime with RangeErro

[Issue 23830] Azure failure for OMF: Module name not printed before struct symbol

2024-07-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23830 Dlang Bot changed: What|Removed |Added Keywords||pull --- Comment #2 from Dlang Bot ---

[Issue 22040] dip1000: foreach ref can escape scope array

2024-07-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22040 Dennis changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Issue 23294] [dip1000] parameter to parameter assignment leads to incorrect scope inference

2024-07-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23294 Dlang Bot changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Issue 23300] std.array : array wrongly propagates scopeness of source

2024-07-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23300 Dlang Bot changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Issue 23294] [dip1000] parameter to parameter assignment leads to incorrect scope inference

2024-07-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23294 --- Comment #2 from Dlang Bot --- @dkorpel created dlang/dmd pull request #16725 "Fix bugzilla 23294 - parameter to parameter assignment leads to incor…" fixing this issue: - Fix bugzilla 23294 - parameter to parameter assignment leads to incorrect

[Issue 24667] goo.gl is going away

2024-07-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24667 Dlang Bot changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Issue 24667] goo.gl is going away

2024-07-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24667 Nick Treleaven changed: What|Removed |Added CC||n...@geany.org --- Comment #2 from Nick

[Issue 24667] goo.gl is going away

2024-07-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24667 Dlang Bot changed: What|Removed |Added Keywords||pull --- Comment #1 from Dlang Bot --- @ntrel

Unexpected range assignment behaviour

2024-07-19 Thread Lewis via Digitalmars-d-learn
``` string[3][string] lookup; string[] dynArray = ["d", "e", "f"]; lookup["test"] = dynArray[0..$]; ``` This fails at runtime with RangeError. But if I change that last line to: ``` lookup["test"] = dynArray[0..3]; ``` then it works. But the value of $ here is 3. Why do I get a RangeError

[Issue 23300] std.array : array wrongly propagates scopeness of source

2024-07-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23300 --- Comment #10 from Dlang Bot --- @dkorpel created dlang/phobos pull request #9026 "Bugzilla 23300 - add testcase for std.array on scope InputRange" mentioning this issue: - Bugzilla 23300 - add testcase for std.array on scope InputRange

[Issue 23300] std.array : array wrongly propagates scopeness of source

2024-07-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23300 --- Comment #9 from Dlang Bot --- @dkorpel created dlang/dmd pull request #16724 "Fix bugzilla 23300 - std.array : array wrongly propagates scopeness o…" fixing this issue: - Fix bugzilla 23300 - std.array : array wrongly propagates scopeness of

[Issue 24667] New: goo.gl is going away

2024-07-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24667 Issue ID: 24667 Summary: goo.gl is going away Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: normal Priority: P1

Re: Error: circular reference to variable cause by order (bugs?)

2024-07-18 Thread monkyyy via Digitalmars-d-learn
On Thursday, 18 July 2024 at 12:25:37 UTC, Dakota wrote: I am trying to translate some c code into d, get this error: ```d struct A { void* sub; } struct B { void* subs; } __gshared { const A[1] a0 = [ { _ptr }, ]; const A[2] a1 = [

Libraries for Model Loading

2024-07-18 Thread Ruby The Roobster via Digitalmars-d-learn
Is there a good package available that can load models, Wavefront .obj files in particular? I tried to use the existing bindings to old versions of Assimp, but I could not get Assimp itself to build on my machine. Thanks in advance.

Error: circular reference to variable cause by order (bugs?)

2024-07-18 Thread Dakota via Digitalmars-d-learn
I am trying to translate some c code into d, get this error: ```d struct A { void* sub; } struct B { void* subs; } __gshared { const A[1] a0 = [ { _ptr }, ]; const A[2] a1 = [ { _ptr }, ]; const B b1 =

Re: Recommendations on porting Python to D

2024-07-17 Thread rkompass via Digitalmars-d-learn
On Monday, 15 July 2024 at 19:40:01 UTC, mw wrote: On Friday, 12 July 2024 at 18:07:50 UTC, mw wrote: [...] FYI, now merged into the main branch: https://github.com/py2many/py2many/tree/main/pyd This is great and certainly deserves an own discussion contribution in General. Did you try

[Issue 24666] Two modules, mutually importing each other, silently ignores bodies of static conditions

2024-07-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24666 feklushkin.de...@gmail.com changed: What|Removed |Added Hardware|x86_64 |All --

[Issue 24666] Two modules, mutually importing each other, silently ignores bodies of static conditions

2024-07-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24666 feklushkin.de...@gmail.com changed: What|Removed |Added OS|Linux |All

[Issue 24666] New: Two modules, mutually importing each other, silently ignores bodies of static conditions

2024-07-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24666 Issue ID: 24666 Summary: Two modules, mutually importing each other, silently ignores bodies of static conditions Product: D Version: D2 Hardware: x86_64 OS:

[Issue 24665] New: Static array cast can be an unsafe lvalue

2024-07-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24665 Issue ID: 24665 Summary: Static array cast can be an unsafe lvalue Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal

[Issue 24663] dip1000 doesn't check slice expression implicitly converted to static array

2024-07-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24663 Dlang Bot changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: Recommendations on porting Python to D

2024-07-15 Thread mw via Digitalmars-d-learn
On Friday, 12 July 2024 at 18:07:50 UTC, mw wrote: On Friday, 3 May 2024 at 17:38:10 UTC, Chris Piker wrote: On Thursday, 25 April 2024 at 16:57:53 UTC, mw wrote: On Wednesday, 24 April 2024 at 22:07:41 UTC, Chris Piker wrote: Python-AST to D source converter may already exist?

Re: basic py2many.pyd work at language/syntax level in my dlang fork now

2024-07-15 Thread mw via Digitalmars-d-announce
On Friday, 12 July 2024 at 19:13:26 UTC, Witold Baryluk wrote: I will take a look more into py2many. I also do hope you complete it, and merge upstream. FYI, now merged into the main branch: https://github.com/py2many/py2many/tree/main/pyd

[Issue 24662] Add a way to pass mixin arguments to pragma(msg) before mixing in

2024-07-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24662 Dennis changed: What|Removed |Added CC||dkor...@live.nl --- Comment #1 from Dennis ---

[Issue 4703] Ambiguously designed array/AA literal syntax

2024-07-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4703 Nick Treleaven changed: What|Removed |Added CC||n...@geany.org

[Issue 23923] `this` not captured by lazy expression

2024-07-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23923 RazvanN changed: What|Removed |Added CC||razvan.nitu1...@gmail.com --- Comment #5 from

[Issue 24664] New: Inconsistent "cannot be used as an lvalue in @safe code" deprecation

2024-07-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24664 Issue ID: 24664 Summary: Inconsistent "cannot be used as an lvalue in @safe code" deprecation Product: D Version: D2 Hardware: All OS: All Status:

[Issue 24663] dip1000 doesn't check slice expression implicitly converted to static array

2024-07-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24663 Dlang Bot changed: What|Removed |Added Keywords||pull --- Comment #1 from Dlang Bot ---

[Issue 24663] New: dip1000 doesn't check slice expression implicitly converted to static array

2024-07-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24663 Issue ID: 24663 Summary: dip1000 doesn't check slice expression implicitly converted to static array Product: D Version: D2 Hardware: All OS: All

Re: need help to check symbol is static variable or not

2024-07-15 Thread Dakota via Digitalmars-d-learn
On Monday, 15 July 2024 at 11:16:23 UTC, Nick Treleaven wrote: I put `type_s` in a file anonstruct.c, then: ```d import anonstruct; pragma(msg, isStatic!(type_s.c)); ``` That outputs `false`, because the symbol is not a compile-time value. Is that what you meant? No, I am here deal with a

[Issue 24662] Add a way to pass mixin arguments to pragma(msg) before mixing in

2024-07-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24662 Bolpat changed: What|Removed |Added CC||qs.il.paperi...@gmail.com --

[Issue 24662] New: Add a way to pass mixin arguments to pragma(msg) before mixing in

2024-07-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24662 Issue ID: 24662 Summary: Add a way to pass mixin arguments to pragma(msg) before mixing in Product: D Version: D2 Hardware: All OS: All Status: NEW

[Issue 15142] @trusted ignored on alias declarations when specified as prefix

2024-07-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15142 Bolpat changed: What|Removed |Added CC||qs.il.paperi...@gmail.com --- Comment #2 from

[Issue 18625] mixin(__MODULE__) in string mixin results in undefined identifier in certain cases

2024-07-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18625 Bolpat changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Issue 17170] ddoc shows parameters that are not used in function

2024-07-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17170 Nick Treleaven changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Issue 17170] ddoc shows parameters that are not used in function

2024-07-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17170 Nick Treleaven changed: What|Removed |Added Keywords|ddoc| CC|

Re: need help to check symbol is static variable or not

2024-07-15 Thread Nick Treleaven via Digitalmars-d-learn
On Monday, 15 July 2024 at 06:44:12 UTC, Dakota wrote: ```d struct type_s { union { struct { int a; int b; } c; }; }; ``` `type c` will return false with `enum isStatic(alias V) = __traits(compiles, { enum v = V; });` I put `type_s` in

Re: need help to check symbol is static variable or not

2024-07-15 Thread Dakota via Digitalmars-d-learn
On Monday, 1 July 2024 at 11:15:46 UTC, Nick Treleaven wrote: ``` There is a case check will give wrong resutls: ```d struct type_s { union { struct { int a; int b; } c; }; }; ``` `type c` will return false with `enum isStatic(alias

Re: Redub v1.7.1 : Even faster dependency resolution and vibe-d support

2024-07-14 Thread aberba via Digitalmars-d-announce
On Tuesday, 9 July 2024 at 21:39:20 UTC, Hipreme wrote: Hello guys, in the last time, I told that I would not support vibe-d. This was purely on how many features I would need to implement to support it. But after a second thought, I saw that it would be a great opportunity to make it way more

Re: std.container.rbtree has no search method?! e.g. `contains`, `canFind`

2024-07-14 Thread mw via Digitalmars-d-learn
On Sunday, 14 July 2024 at 02:01:44 UTC, Steven Schveighoffer wrote: On Saturday, 13 July 2024 at 17:41:42 UTC, mw wrote: Hi, on doc: https://dlang.org/phobos/std_container_rbtree.html#.RedBlackTree I cannot find any search method?! e.g. `contains`, `canFind`. Is this a over look? Or there

Re: How to build a statically linked executable, before i loose my mind

2024-07-14 Thread ryuukk_ via Digitalmars-d-learn
On Sunday, 14 July 2024 at 06:34:54 UTC, Richard (Rikki) Andrew Cattermole wrote: On 14/07/2024 5:06 AM, ryuukk_ wrote: On Saturday, 13 July 2024 at 16:44:22 UTC, Richard (Rikki) Andrew Cattermole wrote: On 14/07/2024 4:37 AM, ryuukk_ wrote: On Saturday, 13 July 2024 at 16:16:20 UTC, Richard

Re: Wrapper around a recursive data type

2024-07-14 Thread drug007 via Digitalmars-d-learn
On 09.07.2024 06:54, Steven Schveighoffer wrote: On Monday, 8 July 2024 at 08:56:51 UTC, drug007 wrote: How can I "break" this recursion or some other work around to fix it? A few ideas: 1. If it's immediately recursive (that is, contains a pointer to itself), just use the type itself

Re: How to build a statically linked executable, before i loose my mind

2024-07-14 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 14/07/2024 5:06 AM, ryuukk_ wrote: On Saturday, 13 July 2024 at 16:44:22 UTC, Richard (Rikki) Andrew Cattermole wrote: On 14/07/2024 4:37 AM, ryuukk_ wrote: On Saturday, 13 July 2024 at 16:16:20 UTC, Richard (Rikki) Andrew Cattermole wrote: Seeing ``_d_arraybounds_slice`` missing sounds

Re: std.container.rbtree has no search method?! e.g. `contains`, `canFind`

2024-07-13 Thread Steven Schveighoffer via Digitalmars-d-learn
On Saturday, 13 July 2024 at 17:41:42 UTC, mw wrote: Hi, on doc: https://dlang.org/phobos/std_container_rbtree.html#.RedBlackTree I cannot find any search method?! e.g. `contains`, `canFind`. Is this a over look? Or there are such functions else where? The functions are called `equalRange`

Re: std.container.rbtree has no search method?! e.g. `contains`, `canFind`

2024-07-13 Thread Dennis via Digitalmars-d-learn
On Saturday, 13 July 2024 at 17:41:42 UTC, mw wrote: I cannot find any search method?! e.g. `contains`, `canFind`. Is this a over look? Or there are such functions else where? It's the `in` operator: https://dlang.org/phobos/std_container_rbtree.html#.RedBlackTree.opBinaryRight But indeed,

std.container.rbtree has no search method?! e.g. `contains`, `canFind`

2024-07-13 Thread mw via Digitalmars-d-learn
Hi, on doc: https://dlang.org/phobos/std_container_rbtree.html#.RedBlackTree I cannot find any search method?! e.g. `contains`, `canFind`. Is this a over look? Or there are such functions else where?

Re: How to build a statically linked executable, before i loose my mind

2024-07-13 Thread ryuukk_ via Digitalmars-d-learn
On Saturday, 13 July 2024 at 16:44:22 UTC, Richard (Rikki) Andrew Cattermole wrote: On 14/07/2024 4:37 AM, ryuukk_ wrote: On Saturday, 13 July 2024 at 16:16:20 UTC, Richard (Rikki) Andrew Cattermole wrote: Seeing ``_d_arraybounds_slice`` missing sounds like druntime isn't being linked against.

[Issue 24661] wctype_t and wctrans_t are platform-dependent

2024-07-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24661 Dlang Bot changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Issue 24660] atomic_wchar_t has wrong size on Posix

2024-07-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24660 Dlang Bot changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: How to build a statically linked executable, before i loose my mind

2024-07-13 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 14/07/2024 4:37 AM, ryuukk_ wrote: On Saturday, 13 July 2024 at 16:16:20 UTC, Richard (Rikki) Andrew Cattermole wrote: Seeing ``_d_arraybounds_slice`` missing sounds like druntime isn't being linked against. It is possible that your distribution of ldc doesn't include a static build of

Re: How to build a statically linked executable, before i loose my mind

2024-07-13 Thread ryuukk_ via Digitalmars-d-learn
On Saturday, 13 July 2024 at 16:16:20 UTC, Richard (Rikki) Andrew Cattermole wrote: Seeing ``_d_arraybounds_slice`` missing sounds like druntime isn't being linked against. It is possible that your distribution of ldc doesn't include a static build of druntime/phobos. You need to verify that

Re: How to build a statically linked executable, before i loose my mind

2024-07-13 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
Seeing ``_d_arraybounds_slice`` missing sounds like druntime isn't being linked against. It is possible that your distribution of ldc doesn't include a static build of druntime/phobos. You need to verify that ld is trying to link against a static build and that static build exists.

[Issue 24659] Memory safe D page lacks information on return ref

2024-07-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24659 Dlang Bot changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: How to build a statically linked executable, before i loose my mind

2024-07-13 Thread ryuukk_ via Digitalmars-d-learn
For anyone curious: https://github.com/ryuukk/dls/tree/master ``make build-dcd-release && make build-dls-release`` i'm giving up for now, i'll never touch druntime/phobos/dub never again

Re: How to build a statically linked executable, before i loose my mind

2024-07-13 Thread ryuukk_ via Digitalmars-d-learn
I'm loosing it Even with dub it doesn't work `"lflags": [ "-static", "--link-defaultlib-shared=false" ],` ``` (cut due to forum's limit) trivia.d:(.text._D6dparse6trivia__T22MultiLineCommentHelperHTyaZQBd6__ctorMFNaNbNcNfAyaZSQCtQCp__TQClHTyaZQCt+0x1a9): undefined reference to

<    1   2   3   4   5   6   7   8   9   10   >