GStreamer issues.

2017-08-21 Thread Johnson via Digitalmars-d-learn
I can't get the example to work(although slightly modified). The installed version of GStreamer is 1.12.2 The file is: D:\temp\test.ogg Loading Setting to PLAYING. Running. XError: Could not demultiplex stream. dbug: gstoggdemux.c(4418): gst_ogg_demux_find_chains ():

Re: GtkD: New widget

2017-08-21 Thread Johnson via Digitalmars-d-learn
On Monday, 21 August 2017 at 20:54:04 UTC, Mike Wey wrote: On 21-08-17 03:45, Johnson Jones wrote: [...] If you want gtk to know about the functions you override you could use gtkd.Implement.ImplementCLass. [...] Thanks, I'll test it out when I get a chance. I was able to work around

Re: Mixed up over mixins.

2017-08-21 Thread Johnson via Digitalmars-d-learn
On Monday, 21 August 2017 at 07:34:23 UTC, WhatMeForget wrote: On Sunday, 20 August 2017 at 22:50:40 UTC, Johnson Jones wrote: On Sunday, 20 August 2017 at 19:27:43 UTC, WhatMeWorry wrote: [...] It's not difficult, it's just new. It's not that you are a poor programmer, but you simply have

Re: GtkD: New widget

2017-08-21 Thread Mike Wey via Digitalmars-d-learn
On 21-08-17 03:45, Johnson Jones wrote: Hey Mike, I bet you can answer this! I'd like to extend a widget to add some functionality. class MyBox : Box { protected GtkBox* gtkBox; import std.typecons; _gtk.Box Wrapped; mixin Proxy!Wrapped; public this(Box b) {

Re: Mixed up over mixins.

2017-08-21 Thread Ali Çehreli via Digitalmars-d-learn
On 08/21/2017 12:29 AM, WhatMeForget wrote: > Thanks. Don't know if you noticed, but i used some code from your book. > Hope you take that as a complement. I did notice that and thank you. Every time I see people struggle with code that originated from my half-witted examples, I actually feel

Re: Does anyone understand how to use "shared" types with concurrency send/receive functions?

2017-08-21 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/16/17 11:23 AM, Steven Schveighoffer wrote: On 8/16/17 8:58 AM, Steven Schveighoffer wrote: However, I have found a better way to call postblit that involves the qualifiers than the way Variant currently does it. I'm going to submit a PR to fix these issues.

Re: std.format expand "%s"

2017-08-21 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/21/17 10:58 AM, jmh530 wrote: On Monday, 21 August 2017 at 13:57:01 UTC, Steven Schveighoffer wrote: Well, for most things, %s does not do the same thing as another specifier. It's only integers, which format the same as %d, and floating points, which format the same as %g. For all

Re: std.format expand "%s"

2017-08-21 Thread jmh530 via Digitalmars-d-learn
On Monday, 21 August 2017 at 13:57:01 UTC, Steven Schveighoffer wrote: Well, for most things, %s does not do the same thing as another specifier. It's only integers, which format the same as %d, and floating points, which format the same as %g. For all others, the format is specified as %s.

Re: Folder Size

2017-08-21 Thread Vino.B via Digitalmars-d-learn
On Monday, 21 August 2017 at 08:57:52 UTC, Aravinda VK wrote: On Saturday, 19 August 2017 at 14:19:39 UTC, Vino.B wrote: [...] Keep a variable to add the sizes of subdirs auto dFiles = dirEntries(i, SpanMode.shallow).filter!(a => a.isDir && !globMatch(a.baseName, "*DND*")).array; ulong

Re: Mixed up over mixins.

2017-08-21 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/21/17 3:29 AM, WhatMeForget wrote: On Sunday, 20 August 2017 at 19:41:14 UTC, Ali Çehreli wrote: On 08/20/2017 12:27 PM, WhatMeWorry wrote: > // Mixins are for mixing in generated code into the source code. > // The mixed in code may be generated as a template instance > // or

Re: std.format expand "%s"

2017-08-21 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/20/17 9:52 PM, jmh530 wrote: I'm playing around with std.format and I'm trying to figure out if there is any way to identify what "%s" should expand to. So for instance: int x = 1; auto result = x.format!"%s"; I would know that result="1". I could run "1" through unformatValue and get

Re: DerelictGL3 reload crashes in 32 builds

2017-08-21 Thread Mike Parker via Digitalmars-d-learn
On Monday, 21 August 2017 at 02:40:59 UTC, Mike Parker wrote: On Sunday, 20 August 2017 at 19:29:55 UTC, Igor wrote: In 64 bit builds it works with both LDC and DMD but in 32 bit LDC version crashes and DMD release version crashes. Using LDC debug build I managed to find that it crashes after

Re: delegates that return void + lambdas

2017-08-21 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/21/17 8:15 AM, Joshua Hodkinson wrote: So I have run across the following issue while working with delegates and lambdas, --- struct Struct { int prop; } alias Func = void delegate(ref Struct); Func func = (ref s) => s.prop += 1; --- with compiler error `Error: cannot return

delegates that return void + lambdas

2017-08-21 Thread Joshua Hodkinson via Digitalmars-d-learn
So I have run across the following issue while working with delegates and lambdas, --- struct Struct { int prop; } alias Func = void delegate(ref Struct); Func func = (ref s) => s.prop += 1; --- with compiler error `Error: cannot return non-void from function` I understand that the

Re: dmd (v2.075.0): fully static linking: undefined reference to `__tls_get_addr'

2017-08-21 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-08-19 16:07, kdevel wrote: test.d --- void main () { } --- $ dmd -c test.d $ cc -o test test.o -L/[...]/dmd2/linux/lib64 -lphobos2 -static -lpthread -lrt /[...]/dmd2/linux/lib64/libphobos2.a(sections_elf_shared_774_420.o): In function

Re: std.range.put vs R.put: Best practices?

2017-08-21 Thread Jon Degenhardt via Digitalmars-d-learn
On Monday, 21 August 2017 at 05:58:01 UTC, Jonathan M Davis wrote: On Monday, August 21, 2017 02:34:23 Mike Parker via Digitalmars-d-learn wrote: On Sunday, 20 August 2017 at 18:08:27 UTC, Jon Degenhardt wrote: > Documentation for std.range.put >

Re: Folder Size

2017-08-21 Thread Aravinda VK via Digitalmars-d-learn
On Saturday, 19 August 2017 at 14:19:39 UTC, Vino.B wrote: Hi All, I have written a small program to find the size of folder's , but the output is not as expected, hence request your help and advice on any techniques to reduce the run time of the program. Requirement: The script has to

Re: Mixed up over mixins.

2017-08-21 Thread WhatMeForget via Digitalmars-d-learn
On Sunday, 20 August 2017 at 22:50:40 UTC, Johnson Jones wrote: On Sunday, 20 August 2017 at 19:27:43 UTC, WhatMeWorry wrote: [...] It's not difficult, it's just new. It's not that you are a poor programmer, but you simply have not learned how to think about mixins correctly. Stop whining

Re: Mixed up over mixins.

2017-08-21 Thread WhatMeForget via Digitalmars-d-learn
On Sunday, 20 August 2017 at 19:41:14 UTC, Ali Çehreli wrote: On 08/20/2017 12:27 PM, WhatMeWorry wrote: > // Mixins are for mixing in generated code into the source code. > // The mixed in code may be generated as a template instance > // or a string. Yes, it means that the string

Re: std.range.put vs R.put: Best practices?

2017-08-21 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, August 21, 2017 02:34:23 Mike Parker via Digitalmars-d-learn wrote: > On Sunday, 20 August 2017 at 18:08:27 UTC, Jon Degenhardt wrote: > > Documentation for std.range.put > > (https://dlang.org/phobos/std_range_primitives.html#.put) has > > > > the intriguing line: > >> put should not