https://issues.dlang.org/show_bug.cgi?id=20847
anonymous4 changed:
What|Removed |Added
Keywords||diagnostic
--
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.’
https://issues.dlang.org/show_bug.cgi?id=13381
Nick Treleaven changed:
What|Removed |Added
CC||n...@geany.org
--- Comment #16 from Nick
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
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[] =
https://issues.dlang.org/show_bug.cgi?id=22977
Dennis changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://issues.dlang.org/show_bug.cgi?id=24337
Dlang Bot changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
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.
https://issues.dlang.org/show_bug.cgi?id=23487
Dlang Bot changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://issues.dlang.org/show_bug.cgi?id=24447
Dlang Bot changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://issues.dlang.org/show_bug.cgi?id=24670
Dlang Bot changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
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`
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,
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
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
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.
https://issues.dlang.org/show_bug.cgi?id=24447
Dlang Bot changed:
What|Removed |Added
Keywords||pull
--- Comment #2 from Dlang Bot ---
https://issues.dlang.org/show_bug.cgi?id=24670
Dlang Bot changed:
What|Removed |Added
Keywords||pull
--- Comment #1 from Dlang Bot ---
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
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
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
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
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[] =
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`
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,
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.
--
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.
--
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,
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
https://issues.dlang.org/show_bug.cgi?id=15932
Nick Treleaven changed:
What|Removed |Added
CC||n...@geany.org
--- Comment #7 from Nick
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`.
https://issues.dlang.org/show_bug.cgi?id=23487
Dlang Bot changed:
What|Removed |Added
Keywords||pull
--- Comment #5 from Dlang Bot ---
@veelo
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
https://issues.dlang.org/show_bug.cgi?id=16334
Dennis changed:
What|Removed |Added
Status|NEW |RESOLVED
CC|
https://issues.dlang.org/show_bug.cgi?id=23830
Dlang Bot changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
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
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
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
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"];
--
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`
https://issues.dlang.org/show_bug.cgi?id=7444
Nick Treleaven changed:
What|Removed |Added
CC||n...@geany.org
--- Comment #24 from Nick
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
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
https://issues.dlang.org/show_bug.cgi?id=24337
Dlang Bot changed:
What|Removed |Added
Keywords||pull
--- Comment #1 from Dlang Bot ---
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
https://issues.dlang.org/show_bug.cgi?id=23830
Dlang Bot changed:
What|Removed |Added
Keywords||pull
--- Comment #2 from Dlang Bot ---
https://issues.dlang.org/show_bug.cgi?id=22040
Dennis changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://issues.dlang.org/show_bug.cgi?id=23294
Dlang Bot changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://issues.dlang.org/show_bug.cgi?id=23300
Dlang Bot changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
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
https://issues.dlang.org/show_bug.cgi?id=24667
Dlang Bot changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://issues.dlang.org/show_bug.cgi?id=24667
Nick Treleaven changed:
What|Removed |Added
CC||n...@geany.org
--- Comment #2 from Nick
https://issues.dlang.org/show_bug.cgi?id=24667
Dlang Bot changed:
What|Removed |Added
Keywords||pull
--- Comment #1 from Dlang Bot ---
@ntrel
```
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
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
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
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
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 = [
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.
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 =
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
https://issues.dlang.org/show_bug.cgi?id=24666
feklushkin.de...@gmail.com changed:
What|Removed |Added
Hardware|x86_64 |All
--
https://issues.dlang.org/show_bug.cgi?id=24666
feklushkin.de...@gmail.com changed:
What|Removed |Added
OS|Linux |All
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:
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
https://issues.dlang.org/show_bug.cgi?id=24663
Dlang Bot changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
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?
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
https://issues.dlang.org/show_bug.cgi?id=24662
Dennis changed:
What|Removed |Added
CC||dkor...@live.nl
--- Comment #1 from Dennis ---
https://issues.dlang.org/show_bug.cgi?id=4703
Nick Treleaven changed:
What|Removed |Added
CC||n...@geany.org
https://issues.dlang.org/show_bug.cgi?id=23923
RazvanN changed:
What|Removed |Added
CC||razvan.nitu1...@gmail.com
--- Comment #5 from
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:
https://issues.dlang.org/show_bug.cgi?id=24663
Dlang Bot changed:
What|Removed |Added
Keywords||pull
--- Comment #1 from Dlang Bot ---
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
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
https://issues.dlang.org/show_bug.cgi?id=24662
Bolpat changed:
What|Removed |Added
CC||qs.il.paperi...@gmail.com
--
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
https://issues.dlang.org/show_bug.cgi?id=15142
Bolpat changed:
What|Removed |Added
CC||qs.il.paperi...@gmail.com
--- Comment #2 from
https://issues.dlang.org/show_bug.cgi?id=18625
Bolpat changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://issues.dlang.org/show_bug.cgi?id=17170
Nick Treleaven changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://issues.dlang.org/show_bug.cgi?id=17170
Nick Treleaven changed:
What|Removed |Added
Keywords|ddoc|
CC|
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
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
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
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
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
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
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
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`
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,
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?
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.
https://issues.dlang.org/show_bug.cgi?id=24661
Dlang Bot changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://issues.dlang.org/show_bug.cgi?id=24660
Dlang Bot changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
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
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
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.
https://issues.dlang.org/show_bug.cgi?id=24659
Dlang Bot changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
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
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
101 - 200 of 275313 matches
Mail list logo