LDC Stacktrace with symbols instead of addresses

2024-02-10 Thread Per Nordlöw via Digitalmars-d-learn
How do I make LDC stacktraces like ```test-library(+0x1fb232)[0x562230d82232] test-library(+0x2a35b7)[0x562230e2a5b7] /lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f6ad2242520] test-library(+0x7521a)[0x562230bfc21a] test-library(+0x79083)[0x562230c00083] test-library(+0x2a35f5)[0x562230e2a5f5]

Re: The difference between the dates in years

2024-02-10 Thread Brad Roberts via Digitalmars-d-learn
On 2/10/2024 6:01 PM, matheus via Digitalmars-d-learn wrote: On Saturday, 10 February 2024 at 22:11:48 UTC, Brad Roberts wrote: Back when I was doing lots of software developer interviews, one of my frequent questions involved date math.  This wasn't because it's difficult from a coding

Re: The difference between the dates in years

2024-02-10 Thread Steven Schveighoffer via Digitalmars-d-learn
On Saturday, 10 February 2024 at 15:53:09 UTC, Alexander Zhirov wrote: Is it possible to calculate the difference between dates in years using regular means? Something like that ``` writeln(Date(1999, 3, 1).diffMonths(Date(1999, 1, 1))); ``` At the same time, keep in mind that the month and

Re: The difference between the dates in years

2024-02-10 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, February 10, 2024 7:31:47 PM MST Steven Schveighoffer via Digitalmars-d-learn wrote: > On Saturday, 10 February 2024 at 23:48:56 UTC, Jonathan M Davis > > wrote: > > If I understand correctly, he cares about how far into the > > month the dates > > are, whereas diffMonths ignores the

Re: The difference between the dates in years

2024-02-10 Thread Steven Schveighoffer via Digitalmars-d-learn
On Saturday, 10 February 2024 at 23:48:56 UTC, Jonathan M Davis wrote: If I understand correctly, he cares about how far into the month the dates are, whereas diffMonths ignores the smaller units, meaning that you get the same result no matter when in the month the dates are. So, 2000-05-10

Re: The difference between the dates in years

2024-02-10 Thread matheus via Digitalmars-d-learn
On Saturday, 10 February 2024 at 22:11:48 UTC, Brad Roberts wrote: Back when I was doing lots of software developer interviews, one of my frequent questions involved date math. This wasn't because it's difficult from a coding standpoint, but that it's NOT a coding problem. The key part of the

Re: The difference between the dates in years

2024-02-10 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, February 10, 2024 4:20:33 PM MST Steven Schveighoffer via Digitalmars-d-learn wrote: > On Saturday, 10 February 2024 at 15:53:09 UTC, Alexander Zhirov > > wrote: > > Is it possible to calculate the difference between dates in > > years using regular means? Something like that > > > >

Re: The difference between the dates in years

2024-02-10 Thread Steven Schveighoffer via Digitalmars-d-learn
On Saturday, 10 February 2024 at 15:53:09 UTC, Alexander Zhirov wrote: Is it possible to calculate the difference between dates in years using regular means? Something like that ``` writeln(Date(1999, 3, 1).diffMonths(Date(1999, 1, 1))); ``` At the same time, keep in mind that the month and

Re: The difference between the dates in years

2024-02-10 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, February 10, 2024 3:11:48 PM MST Brad Roberts via Digitalmars-d- learn wrote: > Back when I was doing lots of software developer interviews, one of my > frequent questions involved date math. This wasn't because it's > difficult from a coding standpoint, but that it's NOT a coding

Re: The difference between the dates in years

2024-02-10 Thread Brad Roberts via Digitalmars-d-learn
Back when I was doing lots of software developer interviews, one of my frequent questions involved date math. This wasn't because it's difficult from a coding standpoint, but that it's NOT a coding problem. The key part of the question is realization that it's a requirements question. The

Re: The difference between the dates in years

2024-02-10 Thread Lance Bachmeier via Digitalmars-d-learn
On Saturday, 10 February 2024 at 21:56:30 UTC, Lance Bachmeier wrote: On Saturday, 10 February 2024 at 15:53:09 UTC, Alexander Zhirov wrote: Is it possible to calculate the difference between dates in years using regular means? Something like that ``` writeln(Date(1999, 3,

Re: The difference between the dates in years

2024-02-10 Thread Lance Bachmeier via Digitalmars-d-learn
On Saturday, 10 February 2024 at 15:53:09 UTC, Alexander Zhirov wrote: Is it possible to calculate the difference between dates in years using regular means? Something like that ``` writeln(Date(1999, 3, 1).diffMonths(Date(1999, 1, 1))); ``` At the same time, keep in mind that the month and

Re: The difference between the dates in years

2024-02-10 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, February 10, 2024 8:53:09 AM MST Alexander Zhirov via Digitalmars-d-learn wrote: > Is it possible to calculate the difference between dates in years > using regular means? Something like that > > > ``` > writeln(Date(1999, 3, 1).diffMonths(Date(1999, 1, 1))); > ``` > > At the same

Re: The difference between the dates in years

2024-02-10 Thread matheus via Digitalmars-d-learn
On Saturday, 10 February 2024 at 19:16:35 UTC, Alexander Zhirov wrote: ... Maybe this will help: I think if you will divide it can't be 365, but 365.242199. About your code: I having tested fully, but I found a few problems and I wrote (Again without further tests) as below: import std;

Re: The difference between the dates in years

2024-02-10 Thread Alexander Zhirov via Digitalmars-d-learn
On Saturday, 10 February 2024 at 18:12:07 UTC, Alexander Zhirov wrote: On Saturday, 10 February 2024 at 16:03:32 UTC, H. S. Teoh wrote: On Sat, Feb 10, 2024 at 03:53:09PM +, Alexander Zhirov via Digitalmars-d-learn wrote: Is it possible to calculate the difference between dates in years

Re: The difference between the dates in years

2024-02-10 Thread Alexander Zhirov via Digitalmars-d-learn
On Saturday, 10 February 2024 at 16:03:32 UTC, H. S. Teoh wrote: On Sat, Feb 10, 2024 at 03:53:09PM +, Alexander Zhirov via Digitalmars-d-learn wrote: Is it possible to calculate the difference between dates in years using regular means? Something like that ``` writeln(Date(1999, 3,

Re: how can I load html files and not .dt or diet files in vibe.d

2024-02-10 Thread dunkelheit via Digitalmars-d-learn
On Thursday, 1 February 2024 at 13:29:40 UTC, Rene Zwanenburg wrote: On Thursday, 1 February 2024 at 03:20:31 UTC, dunkelheit wrote: this is my code, I'm a begginer on vibe, and I want to use html and not diet files Take a look at the static file example, I think that's close to what you're

Re: how can I load html files and not .dt or diet files in vibe.d

2024-02-10 Thread dunkelheit via Digitalmars-d-learn
On Friday, 2 February 2024 at 06:01:22 UTC, Menjanahary R. R. wrote: On Thursday, 1 February 2024 at 03:20:31 UTC, dunkelheit wrote: [...] Explore this link https://github.com/D-Programming-GDC/gdcproject for potential sources of inspiration. gracias por tu ayuda pero obtuve errores que

Re: how can I load html files and not .dt or diet files in vibe.d

2024-02-10 Thread dunkelheit via Digitalmars-d-learn
On Thursday, 1 February 2024 at 10:44:24 UTC, Aravinda VK wrote: On Thursday, 1 February 2024 at 03:20:31 UTC, dunkelheit wrote: !!! 5 html body h1 hello diet -iframe("hola.html") please help me :') Try ``` html body h1 hello diet

Re: The difference between the dates in years

2024-02-10 Thread H. S. Teoh via Digitalmars-d-learn
On Sat, Feb 10, 2024 at 03:53:09PM +, Alexander Zhirov via Digitalmars-d-learn wrote: > Is it possible to calculate the difference between dates in years > using regular means? Something like that > > > ``` > writeln(Date(1999, 3, 1).diffMonths(Date(1999, 1, 1))); > ``` > > At the same

The difference between the dates in years

2024-02-10 Thread Alexander Zhirov via Digitalmars-d-learn
Is it possible to calculate the difference between dates in years using regular means? Something like that ``` writeln(Date(1999, 3, 1).diffMonths(Date(1999, 1, 1))); ``` At the same time, keep in mind that the month and day matter, because the difference between the year, taking into