Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Walter Bright via Digitalmars-d-announce
On 2/24/2020 8:24 PM, FeepingCreature wrote: The behavior of formatting strings is *currently* deferred to a template (std.format and co). This lets us do important decisions at compiletime, like writing the format string to a file or a string buffer piecewise without allocating memory. Why

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Walter Bright via Digitalmars-d-announce
On 2/24/2020 2:45 PM, Steven Schveighoffer wrote: My inference of the discussion about this in the n.g. was the templates would be used so users could customize the behavior to be whatever they wanted. By accepting a different type from string. In other words, an overload. This means you can

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread FeepingCreature via Digitalmars-d-announce
On Monday, 24 February 2020 at 22:11:08 UTC, Walter Bright wrote: The semantics of an interpolated string must be defined by the DIP, not deferred to some template. If the implementation of those defined language features is done by a template, that is an implementation choice, not part of the

Re: GSOC 2020 projects

2020-02-24 Thread RazvanN via Digitalmars-d-announce
On Monday, 24 February 2020 at 17:43:41 UTC, Panke wrote: On Monday, 24 February 2020 at 02:52:04 UTC, RazvanN wrote: On Tuesday, 18 February 2020 at 05:59:47 UTC, RazvanN wrote: Hello everyone! In a couple of days we should find out if The Dlang Foundation was accepted as a mentoring

Re: GSOC 2020 projects

2020-02-24 Thread Mike Parker via Digitalmars-d-announce
On Monday, 24 February 2020 at 18:00:15 UTC, rikki cattermole wrote: Limited spots, somebody had to go. That’s the only reason they ever give for rejection AFAIK.

Re: GSOC 2020 projects

2020-02-24 Thread Bill Baxter via Digitalmars-d-announce
The full list is here and there are lots of them: https://summerofcode.withgoogle.com/organizations/?sp-page=2 I think gamefromscratch.com just pulled out a short list of ones that were game-related there. --bb On Mon, Feb 24, 2020 at 10:05 AM rikki cattermole via Digitalmars-d-announce wrote:

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Steven Schveighoffer via Digitalmars-d-announce
On 2/24/20 5:45 PM, Steven Schveighoffer wrote: My inference of the discussion about this in the n.g. was the templates would be used so users could customize the behavior to be whatever they wanted. By accepting a different type from string. In other words, an overload. I have a feeling

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Adam D. Ruppe via Digitalmars-d-announce
On Monday, 24 February 2020 at 21:41:22 UTC, aliak wrote: Does that mean no betterC support if it's in druntime? It would actually still work there because there is no actual code to link, just a compile-time definition to look up. For example, the name `string` itself is a druntime

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Steven Schveighoffer via Digitalmars-d-announce
On 2/24/20 5:11 PM, Walter Bright wrote: On 2/24/2020 1:45 PM, Steven Schveighoffer wrote: Our proposal is even more restrictive, as the template and its API are actually defined by the language. API is defined by the language, but not the behavior. The language doesn't define my function's

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Walter Bright via Digitalmars-d-announce
On 2/24/2020 1:45 PM, Steven Schveighoffer wrote: Our proposal is even more restrictive, as the template and its API are actually defined by the language. API is defined by the language, but not the behavior. No. It's overloading, not AST macros. How can an overload affect the AST other

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Steven Schveighoffer via Digitalmars-d-announce
On 2/24/20 4:45 PM, Steven Schveighoffer wrote: i"$apples and $%{d}bananas" will be transformed into: Of course that should have read i"$apples and ${%d}bananas" -Steve

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Steven Schveighoffer via Digitalmars-d-announce
On 2/24/20 4:41 PM, aliak wrote: On Monday, 24 February 2020 at 21:23:43 UTC, Adam D. Ruppe wrote: On Monday, 24 February 2020 at 20:55:16 UTC, Walter Bright wrote: and proposed a lowering to: > i"your hex data is ${%02x}someByte" > > (_d_interpolated_string!("your hex data is ", >

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Steven Schveighoffer via Digitalmars-d-announce
On 2/24/20 4:10 PM, Walter Bright wrote: On 2/24/2020 12:19 PM, Steven Schveighoffer wrote: How can you possibly arrive at this conclusion? We lower to templates all the time. The language is nowhere defined as lowering to specific templates. There are indeed some lowerings to templates in

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread aliak via Digitalmars-d-announce
On Monday, 24 February 2020 at 21:23:43 UTC, Adam D. Ruppe wrote: On Monday, 24 February 2020 at 20:55:16 UTC, Walter Bright wrote: and proposed a lowering to: > i"your hex data is ${%02x}someByte" > > (_d_interpolated_string!("your hex data is ", > _d_interpolated_format_spec("%02x"))(),

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Adam D. Ruppe via Digitalmars-d-announce
On Monday, 24 February 2020 at 20:55:16 UTC, Walter Bright wrote: and proposed a lowering to: > i"your hex data is ${%02x}someByte" > > (_d_interpolated_string!("your hex data is ", > _d_interpolated_format_spec("%02x"))(), someByte) Do you understand that `_d_interpolated_string` and

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Walter Bright via Digitalmars-d-announce
On 2/24/2020 12:19 PM, Steven Schveighoffer wrote: How can you possibly arrive at this conclusion? We lower to templates all the time. The language is nowhere defined as lowering to specific templates. There are indeed some lowerings to templates in the implementation of the language, but

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Walter Bright via Digitalmars-d-announce
On 2/24/2020 11:45 AM, Adam D. Ruppe wrote: On Monday, 24 February 2020 at 19:35:16 UTC, Walter Bright wrote: Having the compiler lower string interpolation to some hidden template is - AST macros. We're not doing AST macros. This is untrue. Hidden user-defined semantics are not for D. We

Re: Earcut polygon triangulation

2020-02-24 Thread Ben Jones via Digitalmars-d-announce
On Monday, 24 February 2020 at 19:15:13 UTC, JN wrote: On Sunday, 23 February 2020 at 16:20:09 UTC, Ahmet Sait wrote: Out of curiosity, why would you need to triangulate polygons instead of using stencil buffer? I'm assuming you're using OpenGL (or something similar) since you talked about

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Steven Schveighoffer via Digitalmars-d-announce
On 2/24/20 2:35 PM, Walter Bright wrote: Having the compiler lower string interpolation to some hidden template is - AST macros. We're not doing AST macros. How can you possibly arrive at this conclusion? We lower to templates all the time. By this definition all operator overloading in D is

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread 12345swordy via Digitalmars-d-announce
On Monday, 24 February 2020 at 19:45:49 UTC, Adam D. Ruppe wrote: On Monday, 24 February 2020 at 19:35:16 UTC, Walter Bright wrote: Having the compiler lower string interpolation to some hidden template is - AST macros. We're not doing AST macros. This is untrue. Hidden user-defined

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Walter Bright via Digitalmars-d-announce
On 2/24/2020 9:24 AM, Arine wrote: No [...] Using unprofessional language will result in your posts being deleted. Please stop.

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Adam D. Ruppe via Digitalmars-d-announce
On Monday, 24 February 2020 at 19:35:16 UTC, Walter Bright wrote: Having the compiler lower string interpolation to some hidden template is - AST macros. We're not doing AST macros. This is untrue. Hidden user-defined semantics are not for D. We are NOT calling for this. What, exactly,

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Walter Bright via Digitalmars-d-announce
Having the compiler lower string interpolation to some hidden template is - AST macros. We're not doing AST macros. Hidden user-defined semantics are not for D. Every language I'm familiar with that supports it wound up with users creating their own completely undocumented personal language

Re: Earcut polygon triangulation

2020-02-24 Thread JN via Digitalmars-d-announce
On Sunday, 23 February 2020 at 16:20:09 UTC, Ahmet Sait wrote: Out of curiosity, why would you need to triangulate polygons instead of using stencil buffer? I'm assuming you're using OpenGL (or something similar) since you talked about your hobby game. Any advantage of triangulating shapes?

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Steven Schveighoffer via Digitalmars-d-announce
On 2/24/20 12:31 PM, H. S. Teoh wrote: On Mon, Feb 24, 2020 at 10:41:16AM -0500, Steven Schveighoffer via Digitalmars-d-announce wrote: [...] I will also note that we did something very similar with switch(string), where prior to this the compiler did all the "heavy lifting" of generating the

Re: GSOC 2020 projects

2020-02-24 Thread rikki cattermole via Digitalmars-d-announce
On 25/02/2020 6:43 AM, Panke wrote: On Monday, 24 February 2020 at 02:52:04 UTC, RazvanN wrote: On Tuesday, 18 February 2020 at 05:59:47 UTC, RazvanN wrote: Hello everyone! In a couple of days we should find out if The Dlang Foundation was accepted as a mentoring organization for Google

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Robert M. Münch via Digitalmars-d-announce
On 2020-02-24 09:51:16 +, Walter Bright said: I talk it over with Atila after the review threads are done, then decide. Voting is a terrible way to do engineering design, for many reasons I can list if you like. You don't need to, I'm not a fan of such a voting approach too. I just

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Robert M. Münch via Digitalmars-d-announce
On 2020-02-24 10:02:26 +, Mike Parker said: The DIP review process is outlined here: https://github.com/dlang/DIPs The final decision rests with the language maintainers. Now, that means Walter and Atila. Thanks, and sorry for my ignorance... How about adding a note who the "language

Re: GSOC 2020 projects

2020-02-24 Thread Panke via Digitalmars-d-announce
On Monday, 24 February 2020 at 02:52:04 UTC, RazvanN wrote: On Tuesday, 18 February 2020 at 05:59:47 UTC, RazvanN wrote: Hello everyone! In a couple of days we should find out if The Dlang Foundation was accepted as a mentoring organization for Google Summer of Code 2020. If we get accepted,

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread H. S. Teoh via Digitalmars-d-announce
On Mon, Feb 24, 2020 at 10:41:16AM -0500, Steven Schveighoffer via Digitalmars-d-announce wrote: [...] > I will also note that we did something very similar with > switch(string), where prior to this the compiler did all the "heavy > lifting" of generating the code to convert strings into

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Arine via Digitalmars-d-announce
On Monday, 24 February 2020 at 09:51:16 UTC, Walter Bright wrote: On 2/24/2020 12:43 AM, Robert M. Münch wrote: I mean, people spend a lot of time thinking, making suggestions, etc. and the end result is: we now have nothing. Which, IMO is the worst result for all. Not totally. I was unable

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Adam D. Ruppe via Digitalmars-d-announce
On Monday, 24 February 2020 at 16:22:22 UTC, Atila Neves wrote: Thanks for the detailed write-up, there are a lot of good things here. We talked about this in the other thread, too. I doubt the one template here will be a big deal. My experience is templates get bad when we use them in loops

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Atila Neves via Digitalmars-d-announce
On Monday, 24 February 2020 at 15:41:16 UTC, Steven Schveighoffer wrote: On 2/24/20 4:38 AM, Atila Neves wrote: There's also the practical question of template instantiations and compile times even if the DIP that was being discussed were to be modified in the way suggested. I want to

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Steven Schveighoffer via Digitalmars-d-announce
On 2/24/20 4:38 AM, Atila Neves wrote: There's also the practical question of template instantiations and compile times even if the DIP that was being discussed were to be modified in the way suggested. I want to actually explore this. There would be one template instantiation (probably) per

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread bachmeier via Digitalmars-d-announce
On Monday, 24 February 2020 at 08:43:57 UTC, Robert M. Münch wrote: I mean, people spend a lot of time thinking, making suggestions, etc. and the end result is: we now have nothing. Which, IMO is the worst result for all. We don't have nothing. There's an option value of not making a

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Basile B. via Digitalmars-d-announce
On Monday, 24 February 2020 at 10:02:26 UTC, Mike Parker wrote: I mean, people spend a lot of time thinking, making suggestions, etc. and the end result is: we now have nothing. Which, IMO is the worst result for all. Not at all. In this case, as the DIP author, Walter could have chosen to

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Mike Parker via Digitalmars-d-announce
On Monday, 24 February 2020 at 08:43:57 UTC, Robert M. Münch wrote: Out of curiosity, how and who makes such a decision? Is there a voting? Is there a committee? Is there a structured pro/con overview and highlight of blocking-points that need to be resolved? The DIP review process is

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Walter Bright via Digitalmars-d-announce
On 2/24/2020 12:43 AM, Robert M. Münch wrote: Out of curiosity, how and who makes such a decision? Is there a voting? Is there a committee? Is there a structured pro/con overview and highlight of blocking-points that need to be resolved? I talk it over with Atila after the review threads are

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Atila Neves via Digitalmars-d-announce
On Sunday, 23 February 2020 at 18:57:55 UTC, Adam D. Ruppe wrote: On Sunday, 23 February 2020 at 16:22:46 UTC, Mike Parker wrote: The decision was primarily influenced by the lack of consensus over the implementation and the syntax demonstrated in the two review threads. That's not true, we

Re: DIP 1027---String Interpolation---Format Assessment

2020-02-24 Thread Robert M. Münch via Digitalmars-d-announce
On 2020-02-23 16:22:46 +, Mike Parker said: DIP 1027, "String Interpolation", has been rejected. The decision was primarily influenced by the lack of consensus over the implementation and the syntax demonstrated in the two review threads. As the DIP author, Walter also rejected the