Re: D serialization temporary fixup?

2015-10-26 Thread Atila Neves via Digitalmars-d-learn
On Friday, 23 October 2015 at 16:27:11 UTC, Shriramana Sharma wrote: Shriramana Sharma wrote: I'd just like to have a quick but reliable way to store real and int data types into a binary data file and read therefrom. Is there such a solution? Wow thank you people! Nice to know I can do

Re: Playing audio files and related functions?

2015-10-26 Thread WhatMeWorry via Digitalmars-d-learn
On Monday, 26 October 2015 at 21:25:58 UTC, Cleverson wrote: Hello, Is there any library or module for easily managing basic audio functions, e.g., play/pause/stop a sound? I can't find it amongst the standard library and the packages colection, or maybe I don't know how to search properly,

Playing audio files and related functions?

2015-10-26 Thread Cleverson via Digitalmars-d-learn
Hello, Is there any library or module for easily managing basic audio functions, e.g., play/pause/stop a sound? I can't find it amongst the standard library and the packages colection, or maybe I don't know how to search properly, since I'm new to D and its ecosystem. Thank you, Cleverson

Re: Mimicing Python list of list

2015-10-26 Thread Meta via Digitalmars-d-learn
On Monday, 26 October 2015 at 18:46:45 UTC, Dandyvica wrote: Hi all, I'm trying to find out a solution to implement a generic tree or array container whose nodes can either be elements or a subtree (or sub-array). Pretty much like you can do in Python: l = [1, 2, [1, 2, 3], 4] l is a list

Re: Mimicing Python list of list

2015-10-26 Thread Dandyvica via Digitalmars-d-learn
On Monday, 26 October 2015 at 19:26:08 UTC, Meta wrote: On Monday, 26 October 2015 at 18:46:45 UTC, Dandyvica wrote: Hi all, I'm trying to find out a solution to implement a generic tree or array container whose nodes can either be elements or a subtree (or sub-array). Pretty much like you

Re: Playing audio files and related functions?

2015-10-26 Thread Cleverson via Digitalmars-d-learn
Forgot to say, it may be for Windows only, in case a portable version isn't available.

Re: Mimicing Python list of list

2015-10-26 Thread Meta via Digitalmars-d-learn
On Monday, 26 October 2015 at 20:53:18 UTC, Dandyvica wrote: Thanks Meta, great idea. But does I'd like to have something like dynamic arrays and be able to do this: class A(T) { T _v; this(T v) { _v = v; } } auto myContainer = MyContainerArray!(A!int)(); myContainer ~= new A!int(1);

D interface header import file

2015-10-26 Thread ric maicle via Digitalmars-d-learn
I just noticed these multiple terminologies: * from the compiler --help, -H refers to a 'header' file * the compiler online page refers to it as 'D interface' file * The generated .di file first line comment says 'D import file' I know they refer to the same thing but how is this kind of

Re: Playing audio files and related functions?

2015-10-26 Thread ponce via Digitalmars-d-learn
On Monday, 26 October 2015 at 21:25:58 UTC, Cleverson wrote: Hello, Is there any library or module for easily managing basic audio functions, e.g., play/pause/stop a sound? I can't find it amongst the standard library and the packages colection, or maybe I don't know how to search properly,

Re: Array of templated classes or structs

2015-10-26 Thread Dandyvica via Digitalmars-d-learn
On Saturday, 24 October 2015 at 19:02:50 UTC, TheFlyingFiddle wrote: On Saturday, 24 October 2015 at 19:00:57 UTC, TheFlyingFiddle wrote: One thing about variant is that if the struct you are trying to insert is larger then (void delegate()).sizeof it will allocate the wrapped type on the gc

Mimicing Python list of list

2015-10-26 Thread Dandyvica via Digitalmars-d-learn
Hi all, I'm trying to find out a solution to implement a generic tree or array container whose nodes can either be elements or a subtree (or sub-array). Pretty much like you can do in Python: l = [1, 2, [1, 2, 3], 4] l is a list of (integers or list of integers). Any idea on how to do

Re: An annoying compile issue

2015-10-26 Thread WhatMeWorry via Digitalmars-d-learn
On Monday, 26 October 2015 at 03:53:21 UTC, Adam D. Ruppe wrote: On Monday, 26 October 2015 at 03:44:31 UTC, WhatMeWorry wrote: First, isn't Vector!(float,3) a template which creates a tuple consisting of float, float, float; so aren't the argument types identical? I'm not familiar with the

Re: How to get DMD to stop littering my source dir with .o files?

2015-10-26 Thread Cauterite via Digitalmars-d-learn
The problem is that the compiler and linker are separate programs; the compiler has to generate input for the linker in the form of a file. RDMD automatically cleans up all the .obj garbage, so one solution is to run rdmd --build-only asdf.d Also, the -of flag is a little more

How to get DMD to stop littering my source dir with .o files?

2015-10-26 Thread Shriramana Sharma via Digitalmars-d-learn
The subject line says it all. Every time I compile a D file to an executable I get an unwanted .o file and have to manually clean up things. I'm using DMD 2.0.68.2. -of doesn't help, and my God, it doesn't even allow a space or equal sign between itself and the desired name of the output file

Re: Does D's GC release memory back to the OS?

2015-10-26 Thread Cauterite via Digitalmars-d-learn
On Sunday, 25 October 2015 at 08:56:52 UTC, Jonathan M Davis wrote: It is my understanding that the GC does not normally ever return memory to the OS It seems that it does now. In smallAlloc() and bigAlloc(), if allocation fails it collects garbage and then: if (lowMem) minimize(); On

Re: Does D's GC release memory back to the OS?

2015-10-26 Thread Cauterite via Digitalmars-d-learn
Correction: you said "the GC does not normally ever return memory" and you're right, because applications do not "normally" consume >95% of their address space.

Re: How to get DMD to stop littering my source dir with .o files?

2015-10-26 Thread Andrea Fontana via Digitalmars-d-learn
On Monday, 26 October 2015 at 11:55:48 UTC, Shriramana Sharma wrote: The subject line says it all. Every time I compile a D file to an executable I get an unwanted .o file and have to manually clean up things. I'm using DMD 2.0.68.2. Do you mean: -odobjdir write object & library files