On Saturday, 5 October 2024 at 10:35:30 UTC, ryuukk_ wrote:
On Saturday, 5 October 2024 at 06:43:00 UTC, Richard (Rikki)
Andrew Cattermole wrote:
I don't know why it isn't supported.
Its very useful with bindings to C.
The parser should be able to swap it to a named instance with
a generated
On Saturday, 5 October 2024 at 06:35:57 UTC, ryuukk_ wrote:
Why is this allowed
```D
struct EntityDef
{
struct
{
int hp;
}
}
```
But not this fucking thing?
```D
struct EntityDef
{
struct
{
int hp;
} stats;
}
```
Let me name my shit
No, i don't wan
On Saturday, 5 October 2024 at 16:40:46 UTC, Salih Dincer wrote:
On Saturday, 5 October 2024 at 06:35:57 UTC, ryuukk_ wrote:
No, i don't want to do:
```C
struct EntityDef
{
struct Stats
{
int hp;
} stats;
}
```
Repeating the same name 3 times, i should go back to the ston
On Saturday, 5 October 2024 at 06:35:57 UTC, ryuukk_ wrote:
No, i don't want to do:
```C
struct EntityDef
{
struct Stats
{
int hp;
} stats;
}
```
Repeating the same name 3 times, i should go back to the stone
age too no?
C and all other C like languages allow me to be c
On Saturday, 5 October 2024 at 06:43:00 UTC, Richard (Rikki)
Andrew Cattermole wrote:
I don't know why it isn't supported.
Its very useful with bindings to C.
The parser should be able to swap it to a named instance with a
generated name.
Let's PR and let's merge
I don't know why it isn't supported.
Its very useful with bindings to C.
The parser should be able to swap it to a named instance with a
generated name.
https://forum.dlang.org/post/dudpbkerfrdlnggiz...@forum.dlang.org
On Saturday, 1 October 2022 at 03:14:44 UTC, mw wrote:
extern(C++)?
Why do you think Rust export C++ linkage?
Rust support [two mangling
version](https://doc.rust-lang.org/rustc/symbol-mangling/index.html#mangling-versions)
:
On Friday, 4 October 2024 at 08:45:49 UTC, holyzantaclara wrote:
Is there a way to achieve this?
dub concerns
ctfe risky
whats this fud about?
Will try to generate a .d file that would contain a static D
object instead and then compile this .d file.
While ctfe json is bad, you should st
On Friday, 4 October 2024 at 08:45:49 UTC, holyzantaclara wrote:
Hello hello everyone ^_^,
I am new in D, and started this morning. I found a way to read
a file at compile time with `-J.` and `static string content =
import("my_json_file.json")`
https://dlang.org/spec/expression.html#impor
On Friday, 4 October 2024 at 12:39:45 UTC, Alexander Zhirov wrote:
On Thursday, 3 October 2024 at 23:56:37 UTC, Salih Dincer wrote
I meant taking the function to D for the elements of the C
syntax. To get only an API to which we can pass our callback,
and hide everything else inside the wrappe
On Thursday, 3 October 2024 at 23:56:37 UTC, Salih Dincer wrote
I meant taking the function to D for the elements of the C
syntax. To get only an API to which we can pass our callback, and
hide everything else inside the wrapper. I have no experience
porting from C to D, but I would like to tr
Thank you everyone, true the compilation speed with the `static
immutable string s` is unbearable for my workflow right now. Will
try to generate a `.d` file that would contain a static D object
instead and then compile this `.d` file.
On Friday, 4 October 2024 at 08:45:49 UTC, holyzantaclara wrote:
I am new in D, and started this morning. I found a way to read
a file at compile time with `-J.` and `static string content =
import("my_json_file.json")`
static usually means "give this declaration the same semantics as
if it w
On Friday, 4 October 2024 at 10:33:37 UTC, Ferhat Kurtulmuş wrote:
On Friday, 4 October 2024 at 08:45:49 UTC, holyzantaclara wrote:
[...]
Your issue is related to static that seems it does not trigger
a compile time evaluation.
According to the docs, static does not imply immutability at a
On Friday, 4 October 2024 at 08:45:49 UTC, holyzantaclara wrote:
Hello hello everyone ^_^,
I am new in D, and started this morning. I found a way to read
a file at compile time with `-J.` and `static string content =
import("my_json_file.json")`
But then tried to statically evaluate with `st
On Friday, 4 October 2024 at 08:45:49 UTC, holyzantaclara wrote:
Hello hello everyone ^_^,
I am new in D, and started this morning. I found a way to read
a file at compile time with `-J.` and `static string content =
import("my_json_file.json")`
But then tried to statically evaluate with `st
Hello hello everyone ^_^,
I am new in D, and started this morning. I found a way to read a
file at compile time with `-J.` and `static string content =
import("my_json_file.json")`
But then tried to statically evaluate with `static JSONValue j =
parseJson(content)` but it fails.
```sh
main
On Thursday, 3 October 2024 at 22:54:53 UTC, Alexander Zhirov
wrote:
I want to try to make access via D to PAM.
```d
/// I added it here:
import pam_wrapper;
int main(string[] args)
{
if (args.length < 3)
{
writeln("Usage: ", args[0], " ");
return 1;
}
/// I added it h
I want to try to make access via D to PAM. I'm trying to write
basic things. I would like to know how to best transform access
to callback functions? For example, so that there is no need to
cast to a type and use binding to `extern`, move all this to a
library?
```d
extern(C):
struct pam_me
On Thursday, 3 October 2024 at 08:51:12 UTC, Danic wrote:
I want to know where publish mi D web
Look for Adam D. Ruppe on D IRC Channel, he used to deploy some D
web apps, he may help you.
Matheus.
On Thursday, 3 October 2024 at 08:51:12 UTC, Danic wrote:
I want to know where publish mi D web
You didn't say what platform you were comfortable operating. For
Linux, I've often used Debian on a Linode nano instance.
$5/month, and with an efficient app, by the time you outgrow it,
you can
On Thursday, 3 October 2024 at 08:51:12 UTC, Danic wrote:
I want to know where publish mi D web
You can try Railway or Heroku for example. Or if you like Azure
you could host it there as well. I've used Azure before and it's
quite easy imo.
On Thursday, 3 October 2024 at 08:51:12 UTC, Danic wrote:
I want to know where publish mi D web
I think any hosting that supports binary deployment
This is my (feeble) source code, for testing purposes only:
uint64 sod_decompose(const uint64 n, const uint64 mod, const
ref uint64[] primes, const ref uint64[uint64][uint64] factorials)
{
auto result = factorials[n];
for (uint64 k = 2; k < n - 1; k++) {
aut
On Tuesday, 1 October 2024 at 17:30:20 UTC, H. S. Teoh wrote:
On Tue, Oct 01, 2024 at 04:30:27PM +, Salih Dincer wrote:
Please add this to your MyCon structure:
```d
alias value this;
// assert(num1 == 3.14);
```
And test it like this too, I think it's awesome!
[...]
IMO it's not a good id
On Tue, Oct 01, 2024 at 04:30:27PM +, Salih Dincer via Digitalmars-d-learn
wrote:
[...]
> > ```
> Please add this to your MyCon structure:
> ```d
> alias value this;
> // assert(num1 == 3.14);
> ```
> And test it like this too, I think it's awesome!
[...]
On Tuesday, 1 October 2024 at 16:18:17 UTC, Salih Dincer wrote:
```d
// ...
struct MyCon
{
string input;
T value;
this(string data)
{
// ...
}
// ...
}
}
```
Please add this to your MyCon structure:
```d
alias value this;
// assert(num1 == 3
On Tuesday, 1 October 2024 at 01:00:08 UTC, Andy Valencia wrote:
... A conversion like:
auto d = atoi!double("123.456");
is about 4k of code. Nice!
Congratulations on your initiative. D is very flexible with
templates, especially with the mixin templates. For example, you
might like t
On Tuesday, 1 October 2024 at 11:45:35 UTC, monkyyy wrote:
On Tuesday, 1 October 2024 at 05:44:16 UTC, H. S. Teoh wrote:
why spend the time and effort when you could have just done:
```
import std.conv;
theres a bunch of relivent tradeoffs and phoboes doesnt make a
good set of them
To be f
On Tuesday, 1 October 2024 at 05:44:16 UTC, H. S. Teoh wrote:
why spend the time and effort when you could have just done:
```
import std.conv;
theres a bunch of relivent tradeoffs and phoboes doesnt make a
good set of them
On Tue, Oct 01, 2024 at 01:00:08AM +, Andy Valencia via Digitalmars-d-learn
wrote:
> I had an old atoi() I wrote when I was getting started with D. You know,
> fixed type, string in, int output. Today for fun I templated the type:
>
> T atoi(T)(string s)
[...]
It's all go
On Thursday, 25 April 2024 at 03:18:36 UTC, cc wrote:
On Wednesday, 24 April 2024 at 05:08:25 UTC, Salih Dincer wrote:
Yes, `opApply()` works! You just need to use `do while()`
instead of `while()` because it skips the first item.
It depends on the type of structure being consumed, if it
prov
Thank You!
I just did a test, I did not used the --allinst flag for the
first time since 4-5 years.
It was a superstition since that, because back then it fixed
something.
Now to my surprise the test build was successful :D
80KLOC, 20 modules -> 20 obj files, and the full compiling time
went
On Sat, Sep 28, 2024 at 06:16:55PM +, Ian via Digitalmars-d-learn wrote:
> Hi,
>
> I'm coming from C and some C++ so the way D stores class instance
> variables is new to me. If I'm not mistaken the basic unadorned
> instance variable is like a "hidden&qu
On Saturday, 28 September 2024 at 18:16:55 UTC, Ian wrote:
Hi,
I'm coming from C and some C++ so the way D stores class
instance variables is new to me. If I'm not mistaken the basic
unadorned instance variable is like a "hidden" pointer. So,
when passing class instance variables to a functio
Hi,
I'm coming from C and some C++ so the way D stores class instance
variables is new to me. If I'm not mistaken the basic unadorned
instance variable is like a "hidden" pointer. So, when passing
class instance variables to a function, what would be the point
of passing a pointer or ref?
I
On Saturday, 28 September 2024 at 12:20:43 UTC, realhet wrote:
Hi,
I have some statements in my mind about --allinst, but I'm not
sure they are correct or not.
1. Normally the compiler analyzes the full code with all the
modules, and it only compiles code for template things that are
used i
Hi,
I have some statements in my mind about --allinst, but I'm not
sure they are correct or not.
1. Normally the compiler analyzes the full code with all the
modules, and it only compiles code for template things that are
used in the given code.
2. It is not needed for compiling the code w
On Saturday, 28 September 2024 at 08:35:39 UTC, Johan wrote:
On Saturday, 28 September 2024 at 07:54:40 UTC, Dakota wrote:
```c
struct __attribute__((packed)) type1 {
uint32_tu32;
uint8_t u8;
uint16_tu16a;
uint16_tu16b;
uint8_t u8a;
On Saturday, 28 September 2024 at 07:54:40 UTC, Dakota wrote:
```c
struct __attribute__((packed)) type1 {
uint32_tu32;
uint8_t u8;
uint16_tu16a;
uint16_tu16b;
uint8_t u8a;
uint8_t arr[14];
};
```
the struct size in C is 24:
😁
Try the 2nd usage, D is a very flexible language; moves towards
perfection!
```d
struct Sarma {
int i;
// mixin DownRange;
}
struct Foo(T) {
int[] array;
// 1. USAGE
auto opApply(scope int delegate(T) dg) {
foreach (ref e; array)
{
On Friday, 27 September 2024 at 20:28:21 UTC, H. S. Teoh wrote:
...
The reason for (2) is that in UFCS chains, the only thing you
really only care about is what kind of range it is that you're
dealing with, and maybe the element type. What exactly the
container type is, is unimportant, and in
Jonathan M Davis via Digitalmars-d-learn wrote:
Well, I don't think that auto is a particularly controversial topic among D
programmers...
Thank you Jonathan for that very detailed response.
This thread can end now unless others really feel the need to comment.
I got two outstanding resp
H. S. Teoh via Digitalmars-d-learn wrote:
In idiomatic D, you'd use `auto` when either (1) you don't care what the
type is, you just want whatever value you get to be shoved into a
variable, or (2) you *shouldn't* care what the type is, because your
code shouldn't be dependi
On Friday, September 27, 2024 2:13:45 PM MDT thinkunix via Digitalmars-d-learn
wrote:
> monkyyy via Digitalmars-d-learn wrote:
> > On Friday, 27 September 2024 at 04:23:32 UTC, thinkunix wrote:
> >> What about using 'auto' as the return type?
> >>
On Thursday, September 26, 2024 12:53:12 AM MDT Per Nordlöw via Digitalmars-d-
learn wrote:
> Should a function like
>
> ```d
> uint parseHex(in char ch) pure nothrow @safe @nogc {
> switch (ch) {
> case '0': .. case '9':
> return ch - '0&
On Fri, Sep 27, 2024 at 04:13:45PM -0400, thinkunix via Digitalmars-d-learn
wrote:
[...]
> I've seen a lot of "use auto everywhere" especially in C++ and was
> wondering where the D community stands on it's use. Is it generally
> favored or not?
>
> Personall
monkyyy via Digitalmars-d-learn wrote:
On Friday, 27 September 2024 at 04:23:32 UTC, thinkunix wrote:
What about using 'auto' as the return type?
I tried it and it seemed to work OK.
Wondering if there are any good reasons to use auto,
or bad reasons why not to use auto here?
On Friday, 27 September 2024 at 04:23:32 UTC, thinkunix wrote:
What about using 'auto' as the return type?
I tried it and it seemed to work OK.
Wondering if there are any good reasons to use auto,
or bad reasons why not to use auto here?
You have started a style debate that will last a week,
Per Nordlöw via Digitalmars-d-learn wrote:
Should a function like
```d
uint parseHex(in char ch) pure nothrow @safe @nogc {
switch (ch) {
case '0': .. case '9':
return ch - '0';
case 'a': .. case 'f':
On Thursday, 26 September 2024 at 06:53:12 UTC, Per Nordlöw wrote:
Should a function like
```d
uint parseHex(in char ch) pure nothrow @safe @nogc {
switch (ch) {
case '0': .. case '9':
return ch - '0';
case 'a': .. case 'f':
return 10 + ch
On Thursday, 26 September 2024 at 06:53:12 UTC, Per Nordlöw wrote:
Should a function like
```d
uint parseHex(in char ch) pure nothrow @safe @nogc {
switch (ch) {
case '0': .. case '9':
return ch - '0';
case 'a': .. case 'f':
return 10 + ch
On Thursday, 26 September 2024 at 06:53:12 UTC, Per Nordlöw wrote:
Should a function like
```d
uint parseHex(in char ch) pure nothrow @safe @nogc {
switch (ch) {
case '0': .. case '9':
return ch - '0';
case 'a': .. case 'f':
return 10 + ch
On Thursday, 26 September 2024 at 06:53:12 UTC, Per Nordlöw wrote:
Should a function like
```d
uint parseHex(in char ch) pure nothrow @safe @nogc {
switch (ch) {
case '0': .. case '9':
return ch - '0';
case 'a': .. case 'f':
return 10 + ch
On 9/23/24 21:52, Craig Dillabaugh wrote:
Why does the following program:
\
import std.stdio;
int main(string[] args) {
uint Q = 7681;
writeln("Val = ", -1 % Q);
return 0;
}
\
Print
Val = 5568
Was hopin
I *strongly* believe the answer is not reasonable using phoboes
tools; but Im going to leave it as an open question before I get
started on something from scratch.
Given well compliant phoboes-style ranges and a `ref string or
retro!string` that starts with '(',')','[',']','{','}', modify
tha
On Monday, 23 September 2024 at 19:52:02 UTC, Craig Dillabaugh
wrote:
Why does the following program:
\
import std.stdio;
int main(string[] args) {
uint Q = 7681;
writeln("Val = ", -1 % Q);
return 0;
}
\
Print
Val
On Monday, 23 September 2024 at 20:02:25 UTC, Craig Dillabaugh
wrote:
On Monday, 23 September 2024 at 19:52:02 UTC, Craig Dillabaugh
wrote:
Why does the following program:
snip
Opps, sorry. I was expecting 7680 (not -1 or 5568).
After a bit of research I see this is the same behavior as C,
On Monday, September 23, 2024 1:52:02 PM MDT Craig Dillabaugh via Digitalmars-
d-learn wrote:
> Why does the following program:
>
> \
> import std.stdio;
>
> int main(string[] args) {
> uint Q = 7681;
>
On Monday, 23 September 2024 at 19:52:02 UTC, Craig Dillabaugh
wrote:
Why does the following program:
\
import std.stdio;
int main(string[] args) {
uint Q = 7681;
writeln("Val = ", -1 % Q);
return 0;
}
\
Print
Val
On Friday, 20 September 2024 at 16:21:10 UTC, Nick Treleaven
wrote:
On Friday, 20 September 2024 at 09:38:54 UTC, Dakota wrote:
Thanks to Dennis for the workaround.
Thanks your all for the tips, void solution fix me problem.
On 23/09/2024 10:13 AM, Maximilian Naderer wrote:
I want to create a .h file from my D modules so you’re saying this
should be also possible ?
There is support in the compiler, but its not really mature.
https://dlang.org/dmd-windows.html#switch-HC[
Hello Richard,
Thank you for the info. I thought this goes the other way around.
Using a header file and converting it to a .di file.
I want to create a .h file from my D modules so you’re saying
this should be also possible ?
There are a number of solutions for C bindings creation.
Try ImportC its built into the compiler.
You can use the .di generator to emit a D file for further use and
manual cleanup.
https://dlang.org/spec/importc.html
It does depend upon the system toolchain, so you'll want MSVC installed
if
Hello,
so what are my / our best options to create an automatic C
foreign function interface.
I would like to create such interface / header file from a D
module with public functions, structs which are declared with
extern(C)
D code
module leo
extern(C) void test() { }
Expectation:
//
On Sunday, 22 September 2024 at 15:44:17 UTC, Ian wrote:
Ron Tarrant for gtkcoding.com by the way!) Is there a place
where I can ask specific Gtkd questions? I came across some
For many years this has been the main place to ask GtkD-related
questions: https://forum.gtkd.org/groups/GtkD/
Hi,
I have started using Gtkd for my first D app. (Many thanks to Ron
Tarrant for gtkcoding.com by the way!) Is there a place where I
can ask specific Gtkd questions? I came across some post at some
point mentioning they may have another forum but I don't remember
it now.
Cheers,
Ian
On Thursday, 19 September 2024 at 14:30:08 UTC, Gerardo Cahn
wrote:
On Wednesday, 24 August 2022 at 08:12:33 UTC, Salih Dincer
wrote:
On Tuesday, 23 August 2022 at 23:17:21 UTC, Salih Dincer wrote:
...
Actually, both structures could be combined:
```d
struct EscapedString
{
string[1] str;
On Saturday, 21 September 2024 at 05:00:51 UTC, user1234 wrote:
On Saturday, 21 September 2024 at 04:29:15 UTC, user1234 wrote:
```d
module m;
[...]
Beside the childish example... D could use a system of
"constraint matching score" to help Carlos. Three AndAndExps
verified should have a bet
On Saturday, 21 September 2024 at 04:29:15 UTC, user1234 wrote:
```d
module m;
[...]
Beside the childish example... D could use a system of
"constraint matching score" to help Carlos. Three AndAndExps
verified should have a better score than two and finally
determine the selection.
On Friday, 20 September 2024 at 09:38:54 UTC, Dakota wrote:
I need my struct defined as `isZeroInit`, so can I can import
them as `di` file. (this also reduce build size)
But I find this problem with float inside union:
```d
struct test_t {
union {
int i32;
float f32;
On Friday, 20 September 2024 at 09:38:54 UTC, Dakota wrote:
I need my struct defined as `isZeroInit`, so can I can import
them as `di` file. (this also reduce build size)
But I find this problem with float inside union:
```d
struct test_t {
union {
int i32;
float f32;
On Thursday, 19 September 2024 at 14:30:08 UTC, Gerardo Cahn
wrote:
I am using the code listed here.
It should be left to posterity that the code presented in this
thread cannot properly escape
```
"A\xfeZ"
```
```
BV's escape: cast(char) 0x41, cast(char) 0xFE, cast(char) 0x5A
steve's: c
On Friday, 20 September 2024 at 09:38:54 UTC, Dakota wrote:
I consider this is compiler bug (it may take years to get fixed)
I've sent issues for compiler bugs and had them fixed within the
next release—about month, not years.
Also yes, this seems to be a compiler bug; unless there's some
s
I need my struct defined as `isZeroInit`, so can I can import
them as `di` file. (this also reduce build size)
But I find this problem with float inside union:
```d
struct test_t {
union {
int i32;
float f32;
}
}
static assert(__traits(isZeroInit, test_t) );
```
``
On Wednesday, 24 August 2022 at 08:12:33 UTC, Salih Dincer wrote:
On Tuesday, 23 August 2022 at 23:17:21 UTC, Salih Dincer wrote:
...
Actually, both structures could be combined:
```d
struct EscapedString
{
string[1] str;
this(string str) @nogc pure nothrow @safe
{
...(rest clipped)
`
https://forum.dlang.org/post/qpmqvhipfyyyehvoe...@forum.dlang.org
On Monday, 8 January 2024 at 23:00:02 UTC, Dennis wrote:
On Monday, 8 January 2024 at 21:56:10 UTC, Renato wrote:
but I tried exactly that! Which gives a seg fault.
Looks like there's a bug with the -H switch:
https://issues.dl
On Saturday, 14 September 2024 at 12:31:01 UTC, Steven
Schveighoffer wrote:
On Tuesday, 10 September 2024 at 20:41:12 UTC, Curtis Spencer
wrote:
I'm attempting to upgrade the vibe-d dependencies of a
project. The project compiles fine using `dub`, but the linker
fails with:
…
I'm at a loss
On Tuesday, 10 September 2024 at 20:41:12 UTC, Curtis Spencer
wrote:
I'm attempting to upgrade the vibe-d dependencies of a project.
The project compiles fine using `dub`, but the linker fails
with:
…
I'm at a loss for how to fix this linker error. Any help would
be appreciated.
You may
On Thursday, 12 September 2024 at 22:34:04 UTC, user1234 wrote:
On Wednesday, 11 September 2024 at 10:08:29 UTC, ryuukk_ wrote:
On Wednesday, 11 September 2024 at 09:14:39 UTC, Nick
Treleaven wrote:
On Wednesday, 11 September 2024 at 08:08:45 UTC, ryuukk_
wrote:
[...]
I again apologies for bei
On Wednesday, 11 September 2024 at 10:08:29 UTC, ryuukk_ wrote:
On Wednesday, 11 September 2024 at 09:14:39 UTC, Nick Treleaven
wrote:
On Wednesday, 11 September 2024 at 08:08:45 UTC, ryuukk_ wrote:
[...]
I again apologies for being wrong and i apologies again for
trying to improve things, i d
On Wednesday, 11 September 2024 at 22:06:54 UTC, WB wrote:
Honestly, D, does not really need it, and most of solutions
(like above) do have one or few limitations and drawbacks. Some
will be acceptable in some projects, some not.
There is plenty of stuff in language and library already,
add
On Wednesday, 11 September 2024 at 04:01:53 UTC, f wrote:
i mean , is this a bug?
This is not a bug. The problem is due to a misunderstanding of
the -release parameter. The following related topic opened by
Steven and the answers given by Walter are really valuable:
https://forum.dlang.org/t
On Wednesday, 11 September 2024 at 16:40:05 UTC, Bradley Chatha
wrote:
On Wednesday, 11 September 2024 at 12:17:02 UTC, Fox wrote:
I don't care about whether it's a bug or not, I just want to
learn What illegal instructions did this "assert(false);" code
create?
Fortunately Godbolt supports
On Wednesday, 11 September 2024 at 22:06:54 UTC, WB wrote:
I feel there is too much already in D and standard library, and
things are added to quickly and eagerly, and years later we end
up in a mess that cannot be solved (because of compatibility).
this isnt autodecoding, cant be, your oping
On Wednesday, 11 September 2024 at 19:44:54 UTC, Salih Dincer
wrote:
It looks clean and understandable. What is not understandable
is that it has not been included in std.stdio for over 10
years. I know, string interpolation has just been integrated,
but why hasn't something like this been deve
On Wednesday, 11 September 2024 at 18:29:39 UTC, WB wrote:
This code is about 13 years old, but still works. (It is
functional and works, but I never it used more than what is in
this repo).
But now that we have interpolation sequences in the language,
it would be way easier, cleaner and more
On Sunday, 8 September 2024 at 22:01:10 UTC, WraithGlade wrote:
Specifically, I want a way to create a print command that
behaves like `@show` from Julia lang or `dump` from (if my
memory is correct) Nim.
Yes.
https://github.com/baryluk/echo/blob/master/echo.d#L205-L209
```d
mixin(echo("e
On Wednesday, 11 September 2024 at 12:17:02 UTC, Fox wrote:
I don't care about whether it's a bug or not, I just want to
learn What illegal instructions did this "assert(false);" code
create?
Fortunately Godbolt supports D, so it's easy to see that it
generates `ud2` on x86(_64): https://god
I don't care about whether it's a bug or not, I just want to
learn What illegal instructions did this "assert(false);" code
create?
On Wednesday, 11 September 2024 at 10:08:29 UTC, ryuukk_ wrote:
On Wednesday, 11 September 2024 at 09:14:39 UTC, Nick Treleaven
wrote:
On Wednesday, 11 September 2024 at 08:08:45 UTC, ryuukk_ wrote:
It is a bug, don't claim it is not, the compiler gives the
wrong information, wich lead to a con
On Wednesday, 11 September 2024 at 09:14:39 UTC, Nick Treleaven
wrote:
On Wednesday, 11 September 2024 at 08:08:45 UTC, ryuukk_ wrote:
It is a bug, don't claim it is not, the compiler gives the
wrong information, wich lead to a confused user
You don't want confused users, you want compiler say
On Wednesday, 11 September 2024 at 08:08:45 UTC, ryuukk_ wrote:
It is a bug, don't claim it is not, the compiler gives the
wrong information, wich lead to a confused user
You don't want confused users, you want compiler say what's up,
if i type assert, it should assert, end of the story
The
On Tuesday, September 10, 2024 10:01:53 PM MDT f via Digitalmars-d-learn
wrote:
> i mean , is this a bug?
No, it's not a bug. Assertions with an expression that is known to be false
at compile time are treated as special. They are always left in the
generated code so that they will k
i mean , is this a bug?
void main()
{
assert(false);
}
dmd -release a.d
dmd version 2.109.1
debian bookworm x64
illegal instruction
thanks
I'm attempting to upgrade the vibe-d dependencies of a project.
The project compiles fine using `dub`, but the linker fails with:
```
/usr/bin/ld:
../../.dub/packages/vibe-d-0.9.8/vibe-d/tls/.dub/build/openssl-debug-linux.posix-x86_64-dmd_v2.101.2-BCC9E2A9CB402B67930FAFFBF7360088035232BADBED8A5
OK, It works, thanks.
// dlang tries to use the type system to make one be clear about
what data is shared between potentially concurrent threads.
// You need that data to be "shared" before you can send it
between threads.
// Andy
import std.concurrency;
import std.stdio;
void main(){
On Tuesday, 10 September 2024 at 13:14:05 UTC, Fox wrote:
// I am learning how to send and receive data. The following is
my intention, but it cannot be compiled.
// aliases to mutable thread-local data not allowed, what does
it mean? thank you.
dlang tries to use the type system to make one b
// I am learning how to send and receive data. The following is
my intention, but it cannot be compiled.
// aliases to mutable thread-local data not allowed, what does it
mean? thank you.
I am learning how to send and receive. The following is my
intention, but it cannot be compiled. Report
i
201 - 300 of 1278 matches
Mail list logo