Re: Variables & kind of memory

2022-04-22 Thread Alain De Vos via Digitalmars-d-learn
On Saturday, 23 April 2022 at 04:52:39 UTC, Alain De Vos wrote: On Saturday, 23 April 2022 at 03:41:17 UTC, Alain De Vos wrote: I wrote a simple test program: ``` import std.stdio:writefln; [...] BBB: is probably the data-segment. Remains AAA ? Could AAA be the bss-segment ?

Re: Variables & kind of memory

2022-04-22 Thread Salih Dincer via Digitalmars-d-learn
On Saturday, 23 April 2022 at 03:41:17 UTC, Alain De Vos wrote: I wrote a simple test program: ```d import std.stdio:writefln; int [] GLV=[1,2]; int [2] GLF=[1,2]; // paste it ->> static int [] GSLV=[1,2]; static int [2] GSLF=[1,2]; void main() { } ``` First of all, there is no such thing

Re: Variables & kind of memory

2022-04-22 Thread Alain De Vos via Digitalmars-d-learn
On Saturday, 23 April 2022 at 03:41:17 UTC, Alain De Vos wrote: I wrote a simple test program: ``` import std.stdio:writefln; [...] BBB: is probably the data-segment. Remains AAA ?

Variables & kind of memory

2022-04-22 Thread Alain De Vos via Digitalmars-d-learn
I wrote a simple test program: ``` import std.stdio:writefln; int [] GLV=[1,2]; int [2] GLF=[1,2]; static int [] GSLV=[1,2]; static int [2] GSLF=[1,2]; void main(){ writefln("-"); writefln("GLV:address :%12x:AAA",); writefln("GLF:address :%12x:AAA",);

microservice story needed

2022-04-22 Thread fred via Digitalmars-d-learn
just need the libraries you use in microservice, and the reason you use them, and of course the URL link.

Re: How to get an IP address from network interfaces

2022-04-22 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Apr 22, 2022 at 03:46:01PM +, IGotD- via Digitalmars-d-learn wrote: > On Friday, 22 April 2022 at 12:58:24 UTC, H. S. Teoh wrote: > > > > Why would you not want to use OS APIs? > > > > 1. Portability Usually when portability matters, you already have specific OSes that you're

Re: How to get an IP address from network interfaces

2022-04-22 Thread IGotD- via Digitalmars-d-learn
On Friday, 22 April 2022 at 12:58:24 UTC, H. S. Teoh wrote: Why would you not want to use OS APIs? 1. Portability 2. Language APIs are usually much better to use that the OS APIs, like Berkeley sockets for example.

Re: Understanding alias template parameters

2022-04-22 Thread Salih Dincer via Digitalmars-d-learn
On Friday, 22 April 2022 at 08:04:16 UTC, JG wrote: On Thursday, 21 April 2022 at 21:02:47 UTC, JG wrote: Hi, Could someone possibly help me to understand why the commented line doesn't compile? Good job, works great! Potential is high: ```d void main() { alias type = real; auto

Re: Understanding alias template parameters

2022-04-22 Thread Ali Çehreli via Digitalmars-d-learn
On 4/22/22 01:04, JG wrote: > In response to the change to "alias", which has several upsides > including faster code. I would note it also has some downsides including > every lambda produces a new type so that (at the moment) the following > assert > holds: I got confused a little bit there.

Re: How to get an IP address from network interfaces

2022-04-22 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Apr 22, 2022 at 09:26:13AM +, IGotD- via Digitalmars-d-learn wrote: > On Thursday, 21 April 2022 at 07:20:30 UTC, dangbinghoo wrote: > > > > [... Berkley sockets network code ...] > > > > It really makes me sad when I see this. D has some native networking > API but unfortunately

Re: How to get an IP address from network interfaces

2022-04-22 Thread IGotD- via Digitalmars-d-learn
On Thursday, 21 April 2022 at 07:20:30 UTC, dangbinghoo wrote: [... Berkley sockets network code ...] It really makes me sad when I see this. D has some native networking API but unfortunately you have go to the OS API to have this basic functionality. D should really expand its own API

Re: Understanding alias template parameters

2022-04-22 Thread JG via Digitalmars-d-learn
On Thursday, 21 April 2022 at 21:02:47 UTC, JG wrote: Hi, Could someone possibly help me to understand why the commented line doesn't compile? ```d import std; struct MapResult(R,F) { R r; const F f; auto empty() { return r.empty; } auto front() { return f(r.front); }