Re: Confusion over what types have value vs reference semantics

2016-09-13 Thread Neurone via Digitalmars-d-learn
On Sunday, 11 September 2016 at 16:14:59 UTC, Mike Parker wrote: On Sunday, 11 September 2016 at 16:10:04 UTC, Mike Parker wrote: And here, no memory is allocated. barSlice.ptr is the same as bar.ptr and barSlice.length is the same as bar.length. However, if you append a new element:

Confusion over what types have value vs reference semantics

2016-09-11 Thread Neurone via Digitalmars-d-learn
Hi, Are there universal rules that I can apply to determine what types have reference or value semantics? I know that for the basic primitive C types (int, bool, etc) has value semantics. In particular, I'm still trying to understand stack vs GC-managed arrays, and slices. Finally, I

Reading hexidecimal from a file

2016-09-10 Thread Neurone via Digitalmars-d-learn
Hi, I want to read a text file that contains sha1 hashes in hexidecimal, then convert the hashes back into ubyte[20]. Examples of some lines: E9785DC5 D43B5F67 F1B7D1CB 33279B7C 284E2593 04150E8F 1840BCA2 972BE1C5 2DE81039 0C486F9C How can I do this? The documentation for format

Re: Library for serialization of data (with cycles) to JSON and binary

2016-08-06 Thread Neurone via Digitalmars-d-learn
On Saturday, 6 August 2016 at 16:25:48 UTC, Ilya Yaroshenko wrote: On Saturday, 6 August 2016 at 16:11:03 UTC, Neurone wrote: Is there a library that can serialize data (which may contain cycles) into JSON and a binary format that is portable across operating systems? JSON:

Library for serialization of data (with cycles) to JSON and binary

2016-08-06 Thread Neurone via Digitalmars-d-learn
Is there a library that can serialize data (which may contain cycles) into JSON and a binary format that is portable across operating systems?

Re: Using D in Games and bindings to c++ libraries

2016-08-06 Thread Neurone via Digitalmars-d-learn
On Saturday, 6 August 2016 at 08:04:45 UTC, rikki cattermole wrote: On 06/08/2016 6:28 PM, Neurone wrote: On Saturday, 6 August 2016 at 04:01:03 UTC, rikki cattermole wrote: You can safely forget about RakNet by the looks. "While I still get some inquiries, as of as of March 13, 2015 I've

Re: Using D in Games and bindings to c++ libraries

2016-08-06 Thread Neurone via Digitalmars-d-learn
On Saturday, 6 August 2016 at 04:01:03 UTC, rikki cattermole wrote: You can safely forget about RakNet by the looks. "While I still get some inquiries, as of as of March 13, 2015 I've decided to stop licensing so I can focus on changing the world through VR." So based upon this, what would

Using D in Games and bindings to c++ libraries

2016-08-05 Thread Neurone via Digitalmars-d-learn
Hi, I have some experience with c++, and am considering using either D or python for a game. 1. It is going to be online-based, would D be a good choice for writing both the client and server? I haven't seen any online games using D yet. 2. A concern is interfacing with c++. I'll like to