On Sunday, 4 August 2024 at 10:06:49 UTC, aberba wrote:
So if I have a feature request, but I don't have the necessary
technical skills to draft a DIP with the implementation
details, is there a process in D community to submit such a
request?
please continue here:
On Monday, 5 August 2024 at 12:25:48 UTC, user1234 wrote:
On Monday, 5 August 2024 at 03:09:41 UTC, IchorDev wrote:
Also sometimes if a feature is very minor you can submit a
‘feature request’ issue.
"enhancement" is the bugzilla word for this. IIRC it's in the
"severity" field.
Yes,
On Monday, 5 August 2024 at 11:35:56 UTC, Dennis wrote:
On Monday, 5 August 2024 at 11:02:24 UTC, Dakota wrote:
This will not work for me. (huge code base I can not change
and maintain)
You don't have to change the code where the type is defined per
se, you just need to put it in any C file
On Sunday, 4 August 2024 at 10:06:49 UTC, aberba wrote:
So if I have a feature request, but I don't have the necessary
technical skills to draft a DIP with the implementation
details, is there a process in D community to submit such a
request?
DIP Ideas?
On Monday, 5 August 2024 at 03:09:41 UTC, IchorDev wrote:
On Sunday, 4 August 2024 at 10:32:38 UTC, Richard (Rikki)
Andrew Cattermole wrote:
Chuck it into the ideas forum.
If it interests somebody, somebody else can work on it.
Also sometimes if a feature is very minor you can submit a
On Monday, 5 August 2024 at 11:02:24 UTC, Dakota wrote:
This will not work for me. (huge code base I can not change
and maintain)
You don't have to change the code where the type is defined per
se, you just need to put it in any C file that can access the C
symbol.
clib_helpers.c:
```C
On Saturday, 3 August 2024 at 11:55:53 UTC, Dennis wrote:
On Saturday, 3 August 2024 at 05:10:37 UTC, Dakota wrote:
How can I get the function and type from importC? is there a
auto rename mechanism ?
The most pragmatic workaround is to add a typedef to the C code:
```C
int S;
struct S {
On Sunday, 4 August 2024 at 10:32:38 UTC, Richard (Rikki) Andrew
Cattermole wrote:
Chuck it into the ideas forum.
If it interests somebody, somebody else can work on it.
Also sometimes if a feature is very minor you can submit a
‘feature request’ issue.
On 04/08/2024 10:06 PM, aberba wrote:
So if I have a feature request, but I don't have the necessary technical
skills to draft a DIP with the implementation details, is there a
process in D community to submit such a request?
Other communities using GitHub have a way to file an issue which
So if I have a feature request, but I don't have the necessary
technical skills to draft a DIP with the implementation details,
is there a process in D community to submit such a request?
Other communities using GitHub have a way to file an issue which
then gets labelled as a feature request
On Saturday, 3 August 2024 at 12:15:46 UTC, Dennis wrote:
On Thursday, 1 August 2024 at 04:00:08 UTC, An Pham wrote:
pragma(msg, os.stringof...?);
pragma(msg, target.stringof...?);
There's no built-in way, but you can define it yourself in a
helper module:
```D
version(Windows)
enum os
On Thursday, 1 August 2024 at 04:00:08 UTC, An Pham wrote:
pragma(msg, os.stringof...?);
pragma(msg, target.stringof...?);
There's no built-in way, but you can define it yourself in a
helper module:
```D
version(Windows)
enum os = "windows";
else version(AArch64)
enum os =
On Saturday, 3 August 2024 at 05:10:37 UTC, Dakota wrote:
How can I get the function and type from importC? is there a
auto rename mechanism ?
The most pragmatic workaround is to add a typedef to the C code:
```C
int S;
struct S { int a, b; };
typedef struct S S_t;// add this typedef
```
On Saturday, 3 August 2024 at 05:07:55 UTC, Dakota wrote:
```c
#define ERR_SUCCESS 0
#define ERR_INVALID -1 // invalid argument
```
If the number >=0, it work. < 0 will not work.
DMD64 D Compiler v2.110.0-beta.1
https://issues.dlang.org/show_bug.cgi?id=24639
-Steve
```c
struct type_name {
int a;
}
int type_name(int a);
```
How can I get the function and type from importC? is there a
auto rename mechanism ?
```c
#define ERR_SUCCESS 0
#define ERR_INVALID -1 // invalid argument
```
If the number >=0, it work. < 0 will not work.
DMD64 D Compiler v2.110.0-beta.1
On Monday, 14 November 2022 at 18:45:40 UTC, Imperatorn wrote:
On Monday, 14 November 2022 at 14:43:50 UTC, Preetpal wrote:
On Monday, 14 November 2022 at 10:44:11 UTC, Imperatorn wrote:
On Tuesday, 13 September 2022 at 19:54:15 UTC, Preetpal wrote:
[...]
Have you set longPathAware in the
On Thursday, 1 August 2024 at 07:25:53 UTC, Emma wrote:
```d
Option!int something() {
return None(); // Error: cannot implicitly convert expression
`None()` of type `None` to `Option!int`
}
```
Not D per se, but you can check Adam D. Ruppe's current work.
If I am not mistaken, the thing
On Thursday, 1 August 2024 at 14:42:36 UTC, Ruby The Roobster
wrote:
Thank you. I am not very well acquainted with the standard
library, and this cleans up things significantly.
Question: Is there a good guide to Phobos anywhere? I would
like to learn the more commonly used algorithms /
On Thursday, 1 August 2024 at 14:20:29 UTC, user1234 wrote:
That was a general criticism of implicit construction.
We are only talking about it in the context of returning from a
function.
The classic example is
```d
struct S {int i;}
function f(S s);
function f(int i);
unittest { f(0);
Thanks everyone for the replies! I just thought it was weird that
implicit construction is seemingly supported when directly
initialising a struct but not in any other case. I guess it's
because it's clearly less ambiguous.
On Thursday, 1 August 2024 at 13:07:09 UTC, Lance Bachmeier wrote:
On Thursday, 1 August 2024 at 08:46:00 UTC, IchorDev wrote:
P.S. You might want to put `value = void`, otherwise it’ll
always be default-constructed.
Doing `= void` can violate the assumptions of a destructor of T.
Nullable uses a union to store T, so it can decide when to call
the
On Thursday, 1 August 2024 at 07:03:04 UTC, IchorDev wrote:
Hey just a heads up, you might wanna use
[`readText`](https://dlang.org/library/std/file/read_text.html)
and
[`lineSplitter`](https://dlang.org/library/std/string/line_splitter.html) just so you don’t have to deal with file handles.
On Thursday, 1 August 2024 at 10:59:03 UTC, IchorDev wrote:
On Thursday, 1 August 2024 at 09:55:08 UTC, user1234 wrote:
The problem would be that sorting the candidates of an
overload set would be more complicated. Also in certain cases
it would be less obvious to get which one is selected.
On Thursday, 1 August 2024 at 07:25:53 UTC, Emma wrote:
but this doesn't:
```d
Option!int something() {
return None(); // Error: cannot implicitly convert expression
`None()` of type `None` to `Option!int`
}
```
For the program you've written, I'm happy it doesn't compile,
because a lot
On Thursday, 1 August 2024 at 09:55:08 UTC, user1234 wrote:
The problem would be that sorting the candidates of an overload
set would be more complicated. Also in certain cases it would
be less obvious to get which one is selected.
Please elaborate about how this would interact with function
On Thursday, 1 August 2024 at 08:46:00 UTC, IchorDev wrote:
[...]
I’m pretty sure this is intentional to prevent ambiguity, but I
can’t quite remember what the point of that is.
The problem would be that sorting the candidates of an overload
set would be more complicated. Also in certain
Emma kirjoitti 1.8.2024 klo 10.25:
This kind of prevents ergonomic code like the above. Instead you have to
use a function like `Option!T None(T)() => Option!T()` and then you have
to repeat yourself with `return None!int` and etc... it's quite annoying :(
While this isn't exactly less
On Thursday, 1 August 2024 at 07:25:53 UTC, Emma wrote:
This code works:
```d
struct None {}
struct Option(T) {
bool hasSome;
T value;
this(None) {}
this(T v) {
hasSome = true;
value = v;
}
}
Option!int a = 123;// automatically constructs an
No, D does not support implicit construction.
However in saying that, I will continue to argue in support of sum types
when they get added to the language to support implicit construction!
This code works:
```d
struct None {}
struct Option(T) {
bool hasSome;
T value;
this(None) {}
this(T v) {
hasSome = true;
value = v;
}
}
Option!int a = 123;// automatically constructs an Option!int
from a bare int
Option!int b = None(); // same as
Hey just a heads up, you might wanna use
[`readText`](https://dlang.org/library/std/file/read_text.html)
and
[`lineSplitter`](https://dlang.org/library/std/string/line_splitter.html) just so you don’t have to deal with file handles. Also you can use something like
Nevermind. The segfault happened because I accidentally used the
Mesh class before loading OpenGL. I don't know if it works as
intended, but it no longer crashes.
pragma(msg, os.stringof...?);
pragma(msg, target.stringof...?);
what is use case for this? mixin & import
Long list of version.
version(Windows)
mixin(import("foo_windows.enum."));
else version(AArch64)
mixin(import("foo_aarch64.enum"));
else
static
On Wednesday, 31 July 2024 at 23:06:30 UTC, Ruby The Roobster
wrote:
... or is `readln` bugging out because the file (backpack.obj
contained in the linked .zip file) is too large?
...
I don't have I compiler in hand to try your code at moment, but
about your concern over the size of the
I decided to attempt to write my own OBJ loading library, seeing
as the spec for the format is readily available online. Building
with DMD and on Windows, and testing on [this
model](https://learnopengl.com/data/models/backpack.zip), the
code acts normally for a while, and then apparently
What has become of the project?
What are the workaround apart from using ngnix?
Hello
A const copy ensures the copied value remains unchanged,
providing safety and predictability. If the original is const,
copying it as non-const could introduce unintended side effects.
To modify a copied value, create a mutable copy explicitly.
For file systems, copying write-protected
On Friday, 26 July 2024 at 10:04:45 UTC, Jonathan M Davis wrote:
On Friday, July 26, 2024 2:17:21 AM MDT Dom DiSc via
Digitalmars-d-learn wrote:
If you are not able to construct a mutable copy of a type, why
on earth are you handing it over by value?!?
Why not?
Because you can't make a
On Thursday, 18 July 2024 at 14:02:09 UTC, Ruby The Roobster
wrote:
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
On Friday, July 26, 2024 2:17:21 AM MDT Dom DiSc via Digitalmars-d-learn
wrote:
> On Thursday, 25 July 2024 at 13:07:03 UTC, Jonathan M Davis wrote:
> > On Thursday, July 25, 2024 6:00:58 AM MDT Dom DiSc via
> >
> >> But a parameter given by value is ALWAYS a copy.
> >
> > It has to be a _full_,
On Thursday, 18 July 2024 at 14:02:09 UTC, Ruby The Roobster
wrote:
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
On Thursday, 25 July 2024 at 13:07:03 UTC, Jonathan M Davis wrote:
On Thursday, July 25, 2024 6:00:58 AM MDT Dom DiSc via
But a parameter given by value is ALWAYS a copy.
It has to be a _full_, independent copy. If you're talking
about integer types, that's a non-issue, but if you're talking
On Friday, 26 July 2024 at 02:34:12 UTC, Andy Valencia wrote:
On Thursday, 25 July 2024 at 13:07:03 UTC, Jonathan M Davis
wrote:
It's most definitely not a bug that IFTI (Implicit Function
Template Instantiation) instantiates the template with the
exact type that it's given.
The "principle
On Thursday, 25 July 2024 at 15:40:29 UTC, Nick Treleaven wrote:
On Thursday, 25 July 2024 at 15:06:35 UTC, IchorDev wrote:
I think your function most likely has a safe interface, so it
can be marked as `@trusted` as-per [the
spec](https://dlang.org/spec/function.html#safe-interfaces).
Just
NASHVILLE, Tenn. Yadier Molina, a franchise fixture at catcher
for 19 seasons and the powering tension powering Planet Sequence
wins inside 2006 and 11, rejoined the Cardinals as a exceptional
assistant toward president of baseball functions John Mozeliak,
the club declared upon 41 yr
Luis Matos strike a 3 operate dwelling function as I was
positioning this thread collectively hence, youre welcome. Only
overall look at it pay attention in direction of it soak it up
and saLUte RFZoKVfgyJ SFGiants May perhaps 18, 2024Its a wonder
what a 3 function property function can do.
On Thursday, July 25, 2024 4:48:06 PM MDT Quirin Schroll via Digitalmars-d-
learn wrote:
> It seems one can’t have one in a struct together with a copy
> constructor, but what is it? When is it called? What is it for?
An rvalue constructor is a constructor that takes the same type as the
struct
On Thursday, July 25, 2024 4:50:04 AM MDT Dom DiSc via Digitalmars-d-learn
wrote:
> I have copied some source from C++, where the following pattern
> is common (operator== already renamed):
>
> ```d
> @safe:
> struct S
> {
> bool opEquals(const ref S x) const
> {
>if(==) return
On Thursday, 25 July 2024 at 13:07:03 UTC, Jonathan M Davis wrote:
On Thursday, July 25, 2024 6:00:58 AM MDT Dom DiSc via
Digitalmars-d-learn wrote:
> And no, in general, you don't want to be casting away const
> or immutable. There are cases where it can work (e.g. if the
> cast does a copy,
On Thursday, 25 July 2024 at 15:06:35 UTC, IchorDev wrote:
I think your function most likely has a safe interface, so it
can be marked as `@trusted` as-per [the
spec](https://dlang.org/spec/function.html#safe-interfaces).
Just to mention that with -dip1000, taking the address of
variables is
On Thursday, 25 July 2024 at 14:05:50 UTC, Dom DiSc wrote:
As he said: no. It's only true for @safe:
No they did not, they specifically said that my assertion holds
true for all other [function
attributes](https://dlang.org/spec/attribute.html#function-attributes). This does not tell me
On Thursday, 25 July 2024 at 13:20:59 UTC, IchorDev wrote:
On Thursday, 25 July 2024 at 13:01:53 UTC, Dennis wrote:
That's true for the other function attributes, but `@safe:`
actually does penetrate scopes
The spec doesn’t mention this at all! Is this the case for any
other
On Thursday, 25 July 2024 at 13:01:53 UTC, Dennis wrote:
That's true for the other function attributes, but `@safe:`
actually does penetrate scopes
The spec doesn’t mention this at all! Is this the case for any
other `AttributeSpecifier` declarations?
On Thursday, July 25, 2024 6:00:58 AM MDT Dom DiSc via Digitalmars-d-learn
wrote:
> > And no, in general, you don't want to be casting away const or
> > immutable. There are cases where it can work (e.g. if the cast
> > does a copy, which it would with an integer type)
>
> But a parameter given
On Thursday, 25 July 2024 at 11:46:29 UTC, IchorDev wrote:
Also just so you know, placing `@safe:` there will not affect
the contents of `S`. It has to be inside the struct declaration
to affect its contents.
That's true for the other function attributes, but `@safe:`
actually does penetrate
On Thursday, 25 July 2024 at 08:42:29 UTC, Jonathan M Davis wrote:
It's not a cast. Casts in D use the keyword, cast - e.g.
return --(cast(T)x);
Rather, Dennis' solution is constructing a value of the given
type. For it to work, T must be constructible from an immutable
T - which works
On Thursday, 25 July 2024 at 10:50:04 UTC, Dom DiSc wrote:
```d
@safe:
struct S{
```
Also just so you know, placing `@safe:` there will not affect the
contents of `S`. It has to be inside the struct declaration to
affect its contents.
On Thursday, 25 July 2024 at 10:50:04 UTC, Dom DiSc wrote:
Can I replace this pattern with ```(x is this)``` or are there
some special cases where this doen't work?
When a parameter is `ref` it is treated as a value type (i.e. it
has value semantics), even though it is a reference; therefore
I have copied some source from C++, where the following pattern
is common (operator== already renamed):
```d
@safe:
struct S
{
bool opEquals(const ref S x) const
{
if(==) return true;
...
}
}
```
Can I replace this pattern with ```(x is this)``` or are there
some special
On Thursday, July 25, 2024 12:50:04 AM MDT Dom DiSc via Digitalmars-d-learn
wrote:
> On Wednesday, 24 July 2024 at 15:40:28 UTC, Dennis wrote:
> >> Is there a way to tell the compiler that it should discard
> >> "const" and "immutable" if it needs to create a copy?
> >> Unqual!T doesn't work :-(
On Wednesday, 24 July 2024 at 15:40:28 UTC, Dennis wrote:
Is there a way to tell the compiler that it should discard
"const" and "immutable" if it needs to create a copy?
Unqual!T doesn't work :-(
When you add `const` or `immutable` before the template type
parameter, it will infer T as
In following code:
```d
int test(int x) { return --x; }
T test2(T)(T x) { return --x; }
void main()
{
const int v = 3;
writeln(test(v));
writeln(test2(v)); // doesn't compile
}
```
test2 (just like test) works on a copy of x. Why is this copy
const?!? If I copy a const or immutable
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.’
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[] =
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.
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
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,
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`.
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
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 during the compiling
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 doesn't exist,
> so that
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
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`
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
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 RangeError. But if I change that last line to:
>
> ```
> lookup["test"]
```
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
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
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 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
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 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`
1 - 100 of 116485 matches
Mail list logo