Re: Does D have a tool like pySnooper?

2019-04-25 Thread Dennis via Digitalmars-d-learn
On Monday, 22 April 2019 at 16:24:53 UTC, Taylor Hillegeist wrote: Or would this not be easy at all with D? I don't think so. While there are lots of traits for introspection of declarations, there is no way to introspect lines of code. The whole function would need to be wrapped into a

Re: Future of D language

2019-04-25 Thread Vijay Singh via Digitalmars-d-learn
On Wednesday, 24 April 2019 at 05:22:35 UTC, Arjunkumar wrote: I am title bit confuse about learning D Lang and is it well good for future point of view. Currently in a market many of language is present, so why people learn D Lang and any site which provide best tutorials for D Lang? Just

GTK Scale/Volume Buttons Show Muted Icon on Startup

2019-04-25 Thread Ron Tarrant via Digitalmars-d-learn
I've scoured the docs, the wrapper code, the Internet, but can't come up with an explanation... When running this example of a VolumeButton, no matter what the initial value of the slider, the icon showing is audio-volume-muted. I wrote up a second test using the parent, a ScaleButton,

Logging best practices

2019-04-25 Thread Vladimirs Nordholm via Digitalmars-d-learn
Hello. Is there a current "Best Practices" for logging in D? For the actual logging, I know of `std.experimental.logger`. However, the `experimental` has kept me away from it. Is it good, or are there any better alternatives?

Re: Retrieving Column Data from a ListStore?

2019-04-25 Thread number via Digitalmars-d-learn
On Wednesday, 24 April 2019 at 18:56:50 UTC, Ron Tarrant wrote: For anyone else who comes along looking for the same answer, here's what I did: I'm trying to do it with multi-selection. It works now but I wonder if it's right to just create a dummy TreeModelIF to call getSelectedRows()?

Re: GTK Scale/Volume Buttons Show Muted Icon on Startup

2019-04-25 Thread number via Digitalmars-d-learn
On Thursday, 25 April 2019 at 11:36:26 UTC, Ron Tarrant wrote: When running this example of a VolumeButton, ... When using `setValue(initialValue)` after `setAdjustment()` the scale seems have the correct value. If in addition the Adjustment is created with an initial value different from

Re: Retrieving Column Data from a ListStore?

2019-04-25 Thread Ron Tarrant via Digitalmars-d-learn
On Thursday, 25 April 2019 at 11:29:04 UTC, number wrote: I'm trying to do it with multi-selection. It works now but I wonder if it's right to just create a dummy TreeModelIF to call getSelectedRows()? Same question for creating a TreeIter to call getIter()? Whatever works, I guess. Just

Re: Retrieving Column Data from a ListStore?

2019-04-25 Thread number via Digitalmars-d-learn
On Thursday, 25 April 2019 at 15:16:03 UTC, Ron Tarrant wrote: On Thursday, 25 April 2019 at 11:29:04 UTC, number wrote: I'm trying to do it with multi-selection. It works now but I wonder if it's right to just create a dummy TreeModelIF to call getSelectedRows()? Same question for creating a

Re: GTK Scale/Volume Buttons Show Muted Icon on Startup

2019-04-25 Thread Ron Tarrant via Digitalmars-d-learn
On Thursday, 25 April 2019 at 12:40:00 UTC, number wrote: On Thursday, 25 April 2019 at 11:36:26 UTC, Ron Tarrant wrote: When running this example of a VolumeButton, ... When using `setValue(initialValue)` after `setAdjustment()` the scale seems have the correct value. If in addition the

Re: DMD different compiler behaviour on Linux and Windows

2019-04-25 Thread Patrick Schluter via Digitalmars-d-learn
On Thursday, 25 April 2019 at 20:18:28 UTC, Zans wrote: import std.stdio; void main() { char[] mychars; mychars ~= 'a'; long index = 0L; writeln(mychars[index]); } Why would the code above compile perfectly on Linux (Ubuntu 16.04), however it would produce the following error

DMD different compiler behaviour on Linux and Windows

2019-04-25 Thread Zans via Digitalmars-d-learn
import std.stdio; void main() { char[] mychars; mychars ~= 'a'; long index = 0L; writeln(mychars[index]); } Why would the code above compile perfectly on Linux (Ubuntu 16.04), however it would produce the following error on Windows 10: source\app.d(8,21): Error: cannot

Re: DMD different compiler behaviour on Linux and Windows

2019-04-25 Thread Mike Parker via Digitalmars-d-learn
On Thursday, 25 April 2019 at 20:18:28 UTC, Zans wrote: import std.stdio; void main() { char[] mychars; mychars ~= 'a'; long index = 0L; writeln(mychars[index]); } Why would the code above compile perfectly on Linux (Ubuntu 16.04), however it would produce the following error

Re: Logging best practices

2019-04-25 Thread dangbinghoo via Digitalmars-d-learn
On Thursday, 25 April 2019 at 10:33:00 UTC, Vladimirs Nordholm wrote: Hello. Is there a current "Best Practices" for logging in D? For the actual logging, I know of `std.experimental.logger`. However, the `experimental` has kept me away from it. Is it good, or are there any better

Re: GTK Scale/Volume Buttons Show Muted Icon on Startup

2019-04-25 Thread Mike Wey via Digitalmars-d-learn
On 25-04-2019 15:19, Ron Tarrant wrote: On Thursday, 25 April 2019 at 12:40:00 UTC, number wrote: On Thursday, 25 April 2019 at 11:36:26 UTC, Ron Tarrant wrote: When running this example of a VolumeButton, ... When using `setValue(initialValue)` after `setAdjustment()` the scale seems have

Re: GTK Scale/Volume Buttons Show Muted Icon on Startup

2019-04-25 Thread Ron Tarrant via Digitalmars-d-learn
On Thursday, 25 April 2019 at 17:57:25 UTC, Mike Wey wrote: On 25-04-2019 15:19, Ron Tarrant wrote: This looks like an issue with GTK, the icon is not updated when changing the Adjustment, only when the value changes. So, it should be reported directly to the GTK people rather than...

Re: Call delegate from C++

2019-04-25 Thread Alex via Digitalmars-d-learn
On Wednesday, 24 April 2019 at 16:20:17 UTC, Nicholas Wilson wrote: How do you pass a delegate to a c++ function to be called by it? The function to pass the delegate to is: extern (C++) int fakeEntrypoint( extern(C++) void function(void* /*delegate's context*/) func, void*

DLL creation fails with undefined symbol error

2019-04-25 Thread dokutoku via Digitalmars-d-learn
I tried to build a DLL in a Windows 64bit environment. It works well if the compiler is DMD, but in the case of LDC, the build fails with a large number of undefined symbol errors. Is this a DUB or LDC bug? Or do I have to specify some additional arguments to the command?