Re: Compile-time vs. compile-time

2018-01-02 Thread H. S. Teoh via Digitalmars-d
On Tue, Jan 02, 2018 at 07:26:54PM -0700, Jonathan M Davis via Digitalmars-d wrote: > On Tuesday, January 02, 2018 17:51:01 H. S. Teoh via Digitalmars-d wrote: > > object.destroy! :-P > > But that doesn't work during compile-time, does it? ;) [...] Which compile-time? :-D T -- Computers aren

Re: load data from txt file

2018-01-02 Thread Tony via Digitalmars-d
On Tuesday, 2 January 2018 at 22:08:52 UTC, aerto wrote: Hello and happy new year im new in d so i have a question i have into a txt file named users.txt the bellow ["admin":"123456789"] ["test":"test345"] im my app string[string] data; so i need to load users.txt content into data in order

Re: load data from txt file

2018-01-02 Thread Muld via Digitalmars-d
On Tuesday, 2 January 2018 at 23:25:21 UTC, visitor wrote: On Tuesday, 2 January 2018 at 22:08:52 UTC, aerto wrote: Hello and happy new year im new in d so i have a question writeln(data["admin"]); // i want this to print 123456789 writeln(data["test"]); // i want this to print test345 if you

Re: Compile-time vs. compile-time

2018-01-02 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, January 02, 2018 17:51:01 H. S. Teoh via Digitalmars-d wrote: > object.destroy! :-P But that doesn't work during compile-time, does it? ;) - Jonathan M Davis

Compile-time vs. compile-time

2018-01-02 Thread H. S. Teoh via Digitalmars-d
Finally got around to working on my draft article "Compile-time vs. compile-time" again today. Mainly added another case study for a commonly encountered issue, and cleaned up the outdated stuff on "static" foreach (not the *real* static foreach that we have now). Now I'm reasonably happy with its

Re: D needs to publicize its speed of compilation

2018-01-02 Thread Ali Çehreli via Digitalmars-d
On 01/02/2018 10:13 AM, H. S. Teoh wrote: > As you can see, I made File into a template parameter so that the > unittest can simulate a virtual filesystem with a struct All I'm hearing is "blah blah blog." ;) Ali

Re: Cannot confirm that a DigitalMars order has been received

2018-01-02 Thread Walter Bright via Digitalmars-d
On 1/2/2018 1:50 PM, H. S. Teoh wrote: On Tue, Jan 02, 2018 at 09:50:55PM +, Dennis via Digitalmars-d wrote: On Tuesday, 2 January 2018 at 21:00:34 UTC, Walter Bright wrote: Just sent it there, too. Thank you! I recieved it there (albeit in the spam folder). Still weird I didn't recieve a

load data from txt file

2018-01-02 Thread aerto via Digitalmars-d
Hello and happy new year im new in d so i have a question i have into a txt file named users.txt the bellow ["admin":"123456789"] ["test":"test345"] im my app string[string] data; so i need to load users.txt content into data in order to be able to run writeln(data["admin"]); // i want t

Re: Cannot confirm that a DigitalMars order has been received

2018-01-02 Thread H. S. Teoh via Digitalmars-d
On Tue, Jan 02, 2018 at 09:50:55PM +, Dennis via Digitalmars-d wrote: > On Tuesday, 2 January 2018 at 21:00:34 UTC, Walter Bright wrote: > > Just sent it there, too. > > Thank you! I recieved it there (albeit in the spam folder). Still weird I > didn't recieve anything on my Gmail account. Gm

Re: Cannot confirm that a DigitalMars order has been received

2018-01-02 Thread Dennis via Digitalmars-d
On Tuesday, 2 January 2018 at 21:00:34 UTC, Walter Bright wrote: Just sent it there, too. Thank you! I recieved it there (albeit in the spam folder). Still weird I didn't recieve anything on my Gmail account.

Re: Documentation of object.destroy

2018-01-02 Thread Johan Engelen via Digitalmars-d
On Tuesday, 2 January 2018 at 17:16:54 UTC, Steven Schveighoffer wrote: I would actually recommend ddocing each of the overloads of destroy individually instead of lumping them together, identifying what happens with each one. I first wrote an extra one for just structs, but then decided to

Re: Cannot confirm that a DigitalMars order has been received

2018-01-02 Thread Walter Bright via Digitalmars-d
On 1/2/2018 1:44 AM, Dennis wrote: On Monday, 1 January 2018 at 22:21:28 UTC, Walter Bright wrote: If you still do not receive it, please let me know and maybe you have another email address you can use. Mmm... I still can't find it in my inbox and I've looked in the spam folder. Another e-mail

Re: Documentation of object.destroy

2018-01-02 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 2 January 2018 at 20:07:11 UTC, jmh530 wrote: What's the monitor do? I see that in the ABI documentation, but it doesn't really explain it... A monitor queues/schedules processes that are calling methods of an object so that only one process is executing methods on a single object

Re: Documentation of object.destroy

2018-01-02 Thread Steven Schveighoffer via Digitalmars-d
On 1/2/18 3:07 PM, jmh530 wrote: On Tuesday, 2 January 2018 at 17:16:54 UTC, Steven Schveighoffer wrote: It does something different depending on the type: Objects: calls rt_finalize on the object, which calls the dtor, deletes the monitor, rewrites the init value to the object, and THEN zer

Re: Documentation of object.destroy

2018-01-02 Thread jmh530 via Digitalmars-d
On Tuesday, 2 January 2018 at 17:16:54 UTC, Steven Schveighoffer wrote: It does something different depending on the type: Objects: calls rt_finalize on the object, which calls the dtor, deletes the monitor, rewrites the init value to the object, and THEN zeroes the vtable ptr. This last step

Re: Old Quora post: D vs Go vs Rust by Andrei Alexandrescu

2018-01-02 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 2 January 2018 at 16:34:25 UTC, Ali wrote: "Overall it could be said that D has the downsides of GC but doesn't enjoy its benefits." Not a true statement. Go does not have long pauses, but it has slightly slower code and a penalty for interfacing with C. Go also has finalization

Re: Old Quora post: D vs Go vs Rust by Andrei Alexandrescu

2018-01-02 Thread Mark via Digitalmars-d
On Tuesday, 2 January 2018 at 16:34:25 UTC, Ali wrote: While randomly browsing online, I found this link below https://www.quora.com/Which-language-has-the-brightest-future-in-replacement-of-C-between-D-Go-and-Rust-And-Why/answer/Andrei-Alexandrescu [...] Yes, it is a great post. I would be h

Re: queries on druntime

2018-01-02 Thread Arun Chandrasekaran via Digitalmars-d
On Thursday, 14 December 2017 at 08:00:44 UTC, Petar Kirov [ZombineDev] wrote: If you mean process shared memory, I agree that there are many valid cases where you want to be in control of the memory. I have been thinking about extracting the core of the synchronization primitives into @system

Re: D needs to publicize its speed of compilation

2018-01-02 Thread H. S. Teoh via Digitalmars-d
On Tue, Jan 02, 2018 at 04:00:11PM +, Atila Neves via Digitalmars-d wrote: > On Saturday, 30 December 2017 at 01:09:59 UTC, H. S. Teoh wrote: [...] > > Yeah... recently I've been resorting to `dmd -unittest -main > > module.d` on single modules for faster turnaround time, because in > > spite o

Re: What don't you switch to GitHub issues

2018-01-02 Thread H. S. Teoh via Digitalmars-d
On Tue, Jan 02, 2018 at 09:57:08AM +, Patrick Schluter via Digitalmars-d wrote: > On Monday, 1 January 2018 at 18:32:37 UTC, Pjotr Prins wrote: [...] > > I am just going to share my thoughts a little. Github, in my > > opinion, is hype and even though I depend on it today, I am trying > > to d

Old Quora post: D vs Go vs Rust by Andrei Alexandrescu

2018-01-02 Thread Ali via Digitalmars-d
While randomly browsing online, I found this link below https://www.quora.com/Which-language-has-the-brightest-future-in-replacement-of-C-between-D-Go-and-Rust-And-Why/answer/Andrei-Alexandrescu This is a post on Quora, with some interesting statements by Andrei himself "Overall it could be s

Re: D needs to publicize its speed of compilation

2018-01-02 Thread Atila Neves via Digitalmars-d
On Saturday, 30 December 2017 at 01:09:59 UTC, H. S. Teoh wrote: On Fri, Dec 29, 2017 at 05:52:36PM -0700, Jonathan M Davis via Digitalmars-d wrote: [...] [...] [...] Yeah... recently I've been resorting to `dmd -unittest -main module.d` on single modules for faster turnaround time, because

Re: Attributes on Enum Members: Call for use cases.

2018-01-02 Thread Seb via Digitalmars-d
On Wednesday, 29 November 2017 at 14:23:30 UTC, Michael V. Franklin wrote: On Tuesday, 28 November 2017 at 19:38:44 UTC, Meta wrote: I'd be interested in working on a DIP like this Michael, but I also want to expand the scope to allowing UDAs on function arguments as well. We should have some

Re: Documentation of object.destroy

2018-01-02 Thread Petar via Digitalmars-d
On Tuesday, 2 January 2018 at 15:13:46 UTC, Mike Franklin wrote: [..] I suggest the following: Calls `obj`'s destructor and sets `obj` to its default initial state, `T.init`. This function does not initiate a GC cycle nor does it free any GC memory. Mike +1

Re: Documentation of object.destroy

2018-01-02 Thread Mike Franklin via Digitalmars-d
On Tuesday, 2 January 2018 at 13:58:49 UTC, Johan Engelen wrote: How about: "Destroys the given object `obj` and puts `obj` in its `T.init` state. This function used to destroy an object such that any cleanup by the destructor or finalizer is done, and such that `obj` no longer references any

Re: Documentation of object.destroy

2018-01-02 Thread Temtaime via Digitalmars-d
On Tuesday, 2 January 2018 at 14:39:52 UTC, Johan Engelen wrote: On Tuesday, 2 January 2018 at 14:22:06 UTC, Temtaime wrote: Why not zerofy the object ? Please keep the discussion on the topic of documentation, thanks. -Johan Documentation does not correspond with the actual behavior, so

Re: Documentation of object.destroy

2018-01-02 Thread Johan Engelen via Digitalmars-d
On Tuesday, 2 January 2018 at 14:22:06 UTC, Temtaime wrote: Why not zerofy the object ? Please keep the discussion on the topic of documentation, thanks. -Johan

Re: Maybe D is right about GC after all !

2018-01-02 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 2 January 2018 at 04:43:42 UTC, codephantom wrote: Well, consider the silent 'minority' too, who still think that increasing performance, and reducing demands on resources, still matter, a lot, and that we shouldn't just surrender this just to make programmers more 'productive' (i.e

Re: What don't you switch to GitHub issues

2018-01-02 Thread Patrick Schluter via Digitalmars-d
On Monday, 1 January 2018 at 18:32:37 UTC, Pjotr Prins wrote: On Monday, 1 January 2018 at 02:02:03 UTC, rjframe wrote: That's probably not the best method of effecting change. It killed off the discussion nicely, indeed. I am just going to share my thoughts a little. Github, in my opinion,

Re: Cannot confirm that a DigitalMars order has been received

2018-01-02 Thread Dennis via Digitalmars-d
On Monday, 1 January 2018 at 22:21:28 UTC, Walter Bright wrote: If you still do not receive it, please let me know and maybe you have another email address you can use. Mmm... I still can't find it in my inbox and I've looked in the spam folder. Another e-mail address of mine is `dkor...@live.nl