Re: Range format specifiers in other languages?

2020-10-11 Thread Imperatorn via Digitalmars-d-learn
On Monday, 12 October 2020 at 00:59:33 UTC, Adam D. Ruppe wrote: On Monday, 12 October 2020 at 00:46:37 UTC, Imperatorn wrote: To people trying to learn, why is that % before ( needed in the format string? The %( ... %) stuff is expanded and repeated for each element inside the given array.

Re: Range format specifiers in other languages?

2020-10-11 Thread Ali Çehreli via Digitalmars-d-learn
On 10/11/20 5:44 PM, Max Haughton wrote: > Possibly worth showing off (especially given that some people at first > don't even know the templated format string exists) This feature is already among my slides for an upcoming conference. ;) Ali

Re: Range format specifiers in other languages?

2020-10-11 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 12 October 2020 at 00:46:37 UTC, Imperatorn wrote: To people trying to learn, why is that % before ( needed in the format string? The %( ... %) stuff is expanded and repeated for each element inside the given array.

Re: Range format specifiers in other languages?

2020-10-11 Thread Imperatorn via Digitalmars-d-learn
On Sunday, 11 October 2020 at 23:57:31 UTC, Ali Çehreli wrote: I find D's %( and %) range format specifiers very useful: import std.stdio; import std.range; void main() { 5.iota.writefln!"%(%s, %)"; // Prints 0, 1, 2, 3, 4 } Are there similar features in other languages? Thank you, Ali T

Re: Range format specifiers in other languages?

2020-10-11 Thread Max Haughton via Digitalmars-d-learn
On Sunday, 11 October 2020 at 23:57:31 UTC, Ali Çehreli wrote: I find D's %( and %) range format specifiers very useful: import std.stdio; import std.range; void main() { 5.iota.writefln!"%(%s, %)"; // Prints 0, 1, 2, 3, 4 } Are there similar features in other languages? Thank you, Ali I

Range format specifiers in other languages?

2020-10-11 Thread Ali Çehreli via Digitalmars-d-learn
I find D's %( and %) range format specifiers very useful: import std.stdio; import std.range; void main() { 5.iota.writefln!"%(%s, %)"; // Prints 0, 1, 2, 3, 4 } Are there similar features in other languages? Thank you, Ali

Can I measure how much memory is used in total, grouped by type?

2020-10-11 Thread drathier via Digitalmars-d-learn
I think I'm using way to much memory for pointers, so I'd like to see how much of my memory usage is taken up by pointers. I've calculated the answer, but I wonder if the compiler/runtime could do it for me, to get a faster and more exact number?

Re: vibe.d / experience / feedback

2020-10-11 Thread ddcovery via Digitalmars-d-learn
On Sunday, 11 October 2020 at 11:56:29 UTC, Robert M. Münch wrote: Well, for us it's getting more and more clear, that a decision what to use in the future will be based on less and less technical aspects. The interesting thing about Go is, that their main focus is thinking from an enterprise

Re: vibe.d / experience / feedback

2020-10-11 Thread tastyminerals via Digitalmars-d-learn
On Sunday, 11 October 2020 at 11:56:29 UTC, Robert M. Münch wrote: On 6 Oct 2020 at 10:07:56 CEST, "ddcovery" wrote: I found myself in a similar situation recently, and I can't help but ask you: What technology do you use regularly? Hi, well we use a couple of different things. Scripting l

How to rebind the default tkd GUI keybinds?

2020-10-11 Thread tastyminerals via Digitalmars-d-learn
Tk default keys are somewhat different from what we used to use for selecting, copying and pasting the text. So, any Tk based GUI app starts with writing the rebinding function for "ctrl+a", "ctrl+c", "ctrl+x" and "ctrl+v" keys, at least. I did it when writing TkInter based apps in Python. Toda

Re: Why does sum not work in static arrays?

2020-10-11 Thread H. S. Teoh via Digitalmars-d-learn
On Sun, Oct 11, 2020 at 01:26:13PM +, Alaindevos via Digitalmars-d-learn wrote: > Sidenote, sort also not works with static arrays. Just slice it with []. T -- I think the conspiracy theorists are out to get us...

Re: vibe.d / experience / feedback

2020-10-11 Thread shamsmehra90 via Digitalmars-d-learn
thank you for sharing this information with us...

Re: vibe.d / experience / feedback

2020-10-11 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Sunday, 11 October 2020 at 11:56:29 UTC, Robert M. Münch wrote: environment... I don't know about any other language which puts all these non-technical aspects on the top of the agenda. Ada, Java, Eiffel are supposed to. I'm not sure if Go is a success in that department either. I suspect

Re: Why does sum not work in static arrays?

2020-10-11 Thread Alaindevos via Digitalmars-d-learn
Sidenote, sort also not works with static arrays.

Re: vibe.d / experience / feedback

2020-10-11 Thread Robert M . Münch via Digitalmars-d-learn
On 6 Oct 2020 at 10:07:56 CEST, "ddcovery" wrote: > I found myself in a similar situation recently, and I can't help > but ask you: What technology do you use regularly? Hi, well we use a couple of different things. Scripting languages, C, Lua, .. > What drives/draws you to try dlang/vibe.d?

Re: Count template parameters of method

2020-10-11 Thread Basile B. via Digitalmars-d-learn
On Sunday, 11 October 2020 at 06:53:59 UTC, Andrey wrote: Hello, How to count a number of parameters in uninitialized template method? For example: struct Test { void abc(int a, bool status, string text)() {} { The method "Test.abc" has three template paramenters. I know that "Templat

Re: std.net.curl get json_encode

2020-10-11 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 11 October 2020 at 08:48:16 UTC, Vino wrote: On Friday, 9 October 2020 at 17:50:16 UTC, Andre Pany wrote: [...] Hi Andre, Thank you very much, now we are able to get the data as expected using jv["Name"], now when we try to print all the returned data with Key and Values as bel

Re: std.net.curl get json_encode

2020-10-11 Thread Vino via Digitalmars-d-learn
On Friday, 9 October 2020 at 17:50:16 UTC, Andre Pany wrote: On Friday, 9 October 2020 at 05:56:05 UTC, Vino wrote: On Friday, 9 October 2020 at 05:30:34 UTC, ikod wrote: On Friday, 9 October 2020 at 01:45:37 UTC, Vino wrote: On Friday, 2 October 2020 at 23:20:48 UTC, Imperatorn wrote: On Fri