Re: Bug in gtkd?

2017-08-01 Thread Johnson Jones via Digitalmars-d-learn
On Tuesday, 1 August 2017 at 20:18:19 UTC, Mike Wey wrote: On 01-08-17 21:44, Johnson Jones wrote: On Tuesday, 1 August 2017 at 15:20:08 UTC, Mike Wey wrote: On 01-08-17 05:53, Johnson Jones wrote: GtkD is currently based on GTK 3 the properties it complains about were removed in GTK 3.0.

Re: Adding deprecated to an enum member

2017-08-01 Thread Moritz Maxeiner via Digitalmars-d-learn
On Tuesday, 1 August 2017 at 01:12:28 UTC, Jeremy DeHaan wrote: I got an error today because I added deprecated to an enum member. Is there a way to achieve this, or am I out of luck? If it isn't doable, should it be? Here's what I want: [...] It's a bug [1]. [1]

Re: this r-value optimizations

2017-08-01 Thread Moritz Maxeiner via Digitalmars-d-learn
On Tuesday, 1 August 2017 at 22:47:24 UTC, Nordlöw wrote: Given the `struct S` with lots of data fields, I've written the following functional way of initializing only a subset of the members in an instance of `S`: struct S { [...] } Now the question becomes: will the S-copying inside

Re: why won't byPair work with a const AA?

2017-08-01 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Aug 01, 2017 at 07:31:41PM -0400, Steven Schveighoffer via Digitalmars-d-learn wrote: > On 8/1/17 7:15 PM, H. S. Teoh via Digitalmars-d-learn wrote: > > On Tue, Aug 01, 2017 at 07:09:45PM -0400, Steven Schveighoffer via > > Digitalmars-d-learn wrote: > > > If this were a true

Re: why won't byPair work with a const AA?

2017-08-01 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/1/17 7:15 PM, H. S. Teoh via Digitalmars-d-learn wrote: On Tue, Aug 01, 2017 at 07:09:45PM -0400, Steven Schveighoffer via Digitalmars-d-learn wrote: If this were a true implementation without the opaqueness, it would not work properly. [...] Actually, a proper implementation would

Re: Adding deprecated to an enum member

2017-08-01 Thread Jeremy DeHaan via Digitalmars-d-learn
On Tuesday, 1 August 2017 at 02:06:27 UTC, dark777 wrote: I did as follows using deprecated may help you to elucidate in relation to this https://pastebin.com/NEHtWiGx Deprecating an entire module isn't really a solution though. I only want parts of an existing enum to be deprecated when

Re: why won't byPair work with a const AA?

2017-08-01 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Aug 01, 2017 at 07:09:45PM -0400, Steven Schveighoffer via Digitalmars-d-learn wrote: > On 8/1/17 6:50 PM, H. S. Teoh via Digitalmars-d-learn wrote: [...] > > Actually, there's nothing about the implementation of both > > byKeyValue (the underlying implementation in druntime) and byPair

Re: why won't byPair work with a const AA?

2017-08-01 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/1/17 6:50 PM, H. S. Teoh via Digitalmars-d-learn wrote: On Tue, Aug 01, 2017 at 10:04:18AM -0400, Steven Schveighoffer via Digitalmars-d-learn wrote: On 7/30/17 12:19 AM, Matthew Gamble wrote: [...] import std.array; import std.algorithm; class A { this() { aa = ["a":1, "b" : 2,

Re: why won't byPair work with a const AA?

2017-08-01 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Aug 01, 2017 at 10:04:18AM -0400, Steven Schveighoffer via Digitalmars-d-learn wrote: > On 7/30/17 12:19 AM, Matthew Gamble wrote: [...] > > import std.array; > > import std.algorithm; > > > > class A > > { > > this() { aa = ["a":1, "b" : 2, "c" : 3]; } > > auto pairs()

Re: gtk arch issues

2017-08-01 Thread FoxyBrown via Digitalmars-d-learn
On Tuesday, 1 August 2017 at 21:03:44 UTC, Mike Wey wrote: On 01-08-17 22:16, Johnson Jones wrote: nvm, the file exists. Why it is not being found is unknown. I did some stuff and it says it is not a valid win32, this is using that gtk3 runtime I linked to... says it's x64 version but

this r-value optimizations

2017-08-01 Thread Nordlöw via Digitalmars-d-learn
Given the `struct S` with lots of data fields, I've written the following functional way of initializing only a subset of the members in an instance of `S`: struct S { int i; float f; ... this(int i) { this.i = i; } S withF(float f) { // will this be optimized

Re: gtk arch issues

2017-08-01 Thread Mike Wey via Digitalmars-d-learn
On 01-08-17 22:16, Johnson Jones wrote: nvm, the file exists. Why it is not being found is unknown. I did some stuff and it says it is not a valid win32, this is using that gtk3 runtime I linked to... says it's x64 version but probably x86. Would be nice if the error message printed the

Re: gtk arch issues(fixed)

2017-08-01 Thread Johnson Jones via Digitalmars-d-learn
So, The error I currently get is object.Exception@generated\gtkd\gtkd\Loader.d(125): Library load failed (libgdk-3-0x64.dll): is not a valid Win32 application. and libgdk-3-0x64.dll was libgdk-3-0.dll from the 64-bit gtk package. (I simply added the extension)... the package downloaded

Re: Bug in gtkd?

2017-08-01 Thread Mike Wey via Digitalmars-d-learn
On 01-08-17 21:44, Johnson Jones wrote: On Tuesday, 1 August 2017 at 15:20:08 UTC, Mike Wey wrote: On 01-08-17 05:53, Johnson Jones wrote: GtkD is currently based on GTK 3 the properties it complains about were removed in GTK 3.0. Which version of glade are you using? The latest: Glade

Re: gtk arch issues

2017-08-01 Thread Johnson Jones via Digitalmars-d-learn
nvm, the file exists. Why it is not being found is unknown. I did some stuff and it says it is not a valid win32, this is using that gtk3 runtime I linked to... says it's x64 version but probably x86. Would be nice if the error message printed the full path of what was being loaded so it's

Re: gtk arch issues

2017-08-01 Thread Johnson Jones via Digitalmars-d-learn
On Tuesday, 1 August 2017 at 15:14:50 UTC, Mike Wey wrote: On 01-08-17 01:37, Johnson Jones wrote: So, the question is, is this a gtkd problem or a gtk problem? In either case, what's the way to get them both to work. Do you guys actually test out both versions installed on the same system?

Re: Bug in gtkd?

2017-08-01 Thread Johnson Jones via Digitalmars-d-learn
On Tuesday, 1 August 2017 at 15:20:08 UTC, Mike Wey wrote: On 01-08-17 05:53, Johnson Jones wrote: GtkD is currently based on GTK 3 the properties it complains about were removed in GTK 3.0. Which version of glade are you using? The latest: Glade 3.8.5

Re: Can you parse the d source file during compile time with std.regex?

2017-08-01 Thread 12345swordy via Digitalmars-d-learn
On Tuesday, 1 August 2017 at 16:20:07 UTC, Stefan Koch wrote: On Tuesday, 1 August 2017 at 16:16:46 UTC, 12345swordy wrote: I don't see this anywhere in the documentation. I am asking this as I want to know that it's possible to create a attribute to prevent certain functions being called in

Re: Can you parse the d source file during compile time with std.regex?

2017-08-01 Thread Stefan Koch via Digitalmars-d-learn
On Tuesday, 1 August 2017 at 16:16:46 UTC, 12345swordy wrote: I don't see this anywhere in the documentation. I am asking this as I want to know that it's possible to create a attribute to prevent certain functions being called in the body of a function. To enforce a certain code standard upon

Can you parse the d source file during compile time with std.regex?

2017-08-01 Thread 12345swordy via Digitalmars-d-learn
I don't see this anywhere in the documentation. I am asking this as I want to know that it's possible to create a attribute to prevent certain functions being called in the body of a function. To enforce a certain code standard upon myself.

Re: How to build GUI-based applications in D ?

2017-08-01 Thread Dukc via Digitalmars-d-learn
On Tuesday, 1 August 2017 at 15:18:12 UTC, ashit wrote: i couldn't set control's width and height (Button widget) shows error. maybe it works a different way. 1. Try layoutHeight/width. Remember to set it for the main widget too, not just the children of it. 2. DlangUI is not intended to

Re: How to build GUI-based applications in D ?

2017-08-01 Thread ashit via Digitalmars-d-learn
On Tuesday, 1 August 2017 at 14:57:50 UTC, JamesD wrote: On Tuesday, 1 August 2017 at 09:31:32 UTC, ashit wrote: what is the simplest library to create gui applications in D? i want to create gui applications but couldnt configure the tools so far. [snip] I recommend you check out the D

Re: It makes me sick!

2017-08-01 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 1 August 2017 at 15:16:44 UTC, Vladimir Panteleev wrote: Sorry, isn't that how things work now? For modules, yes. For packages, no. That inconsistency is what I want to change. So since we have a package here and the compiler doesn't allow you to define a package in the

Re: How to build GUI-based applications in D ?

2017-08-01 Thread ashit via Digitalmars-d-learn
On Tuesday, 1 August 2017 at 10:09:56 UTC, Russel Winder wrote: I use GtkD (with GStreamerD) for my GUI applications written in D. https://gtkd.org/ thank you Russel. i have tried to config that several months ago, but no luck. i should try that once again.

Re: Bug in gtkd?

2017-08-01 Thread Mike Wey via Digitalmars-d-learn
On 01-08-17 05:53, Johnson Jones wrote: GtkD is currently based on GTK 3 the properties it complains about were removed in GTK 3.0. Which version of glade are you using? -- Mike Wey

Re: How to build GUI-based applications in D ?

2017-08-01 Thread ashit via Digitalmars-d-learn
On Tuesday, 1 August 2017 at 09:44:48 UTC, ketmar wrote: ashit wrote: [...] Adam Ruppe has minigui in his arsd[0] repo. and minigui_xml to make interface creation easier. it is not really well-documented yet, tho, so you will prolly have to figure some things on your own. [0]

Re: It makes me sick!

2017-08-01 Thread Vladimir Panteleev via Digitalmars-d-learn
On Tuesday, 1 August 2017 at 14:29:28 UTC, Adam D. Ruppe wrote: So we can keep the search path: `datetime.di`, then `datetime.d`, then `datetime/package.d`, and any one of them, as long as it has `module std.datetime;` at the top, can count equally as the package.d. Sorry, isn't that how

Re: How to build GUI-based applications in D ?

2017-08-01 Thread ashit via Digitalmars-d-learn
On Tuesday, 1 August 2017 at 09:39:36 UTC, Daniel Kozak wrote: https://www.youtube.com/watch?v=5eUL8Z9AFW0 https://github.com/buggins/dlangui thank you Daniel. i have tried Dlangui previously and had no luck. but this time i could successfully compile my first app. now, i can say level

Re: gtk arch issues

2017-08-01 Thread Mike Wey via Digitalmars-d-learn
On 01-08-17 01:37, Johnson Jones wrote: So, the question is, is this a gtkd problem or a gtk problem? In either case, what's the way to get them both to work. Do you guys actually test out both versions installed on the same system? Gtk also loads some of it's own libraries at start up

Re: It makes me sick!

2017-08-01 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/1/17 10:29 AM, Adam D. Ruppe wrote: On Tuesday, 1 August 2017 at 14:20:00 UTC, Steven Schveighoffer wrote: But the fix here is to fix the bizarre package.d design. Don't break the zip for cases like mine where adding files is a key feature of it. How should it be fixed? Well, my

Re: How to build GUI-based applications in D ?

2017-08-01 Thread JamesD via Digitalmars-d-learn
On Tuesday, 1 August 2017 at 09:31:32 UTC, ashit wrote: what is the simplest library to create gui applications in D? i want to create gui applications but couldnt configure the tools so far. [snip] I recommend you check out the D widget toolkit (DWT). DWT is a library for creating

Re: It makes me sick!

2017-08-01 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 1 August 2017 at 14:20:00 UTC, Steven Schveighoffer wrote: But the fix here is to fix the bizarre package.d design. Don't break the zip for cases like mine where adding files is a key feature of it. How should it be fixed? Well, my preference would be to treat it just like any

Re: Convert ResultSet to List of Associted Array

2017-08-01 Thread Jshah via Digitalmars-d-learn
On Tuesday, 1 August 2017 at 14:14:57 UTC, Steven Schveighoffer wrote: On 8/1/17 10:14 AM, Steven Schveighoffer wrote: On 7/30/17 1:02 PM, Jshah wrote: On Sunday, 30 July 2017 at 16:39:05 UTC, Jshah wrote: Hi I am new to D writing a web service with vibe. My webservice connect to mysql and

Re: It makes me sick!

2017-08-01 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/29/17 3:51 PM, Adam D. Ruppe wrote: But the fix here is to fix the bizarre package.d design. Don't break the zip for cases like mine where adding files is a key feature of it. How should it be fixed? -Steve

Re: Convert ResultSet to List of Associted Array

2017-08-01 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/1/17 10:14 AM, Steven Schveighoffer wrote: On 7/30/17 1:02 PM, Jshah wrote: On Sunday, 30 July 2017 at 16:39:05 UTC, Jshah wrote: Hi I am new to D writing a web service with vibe. My webservice connect to mysql and return the result as JSON. How do I convert resultset to Array of

Re: Convert ResultSet to List of Associted Array

2017-08-01 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/30/17 1:02 PM, Jshah wrote: On Sunday, 30 July 2017 at 16:39:05 UTC, Jshah wrote: Hi I am new to D writing a web service with vibe. My webservice connect to mysql and return the result as JSON. How do I convert resultset to Array of Associated Array [["col1" : value, "col2" : value],

Re: why won't byPair work with a const AA?

2017-08-01 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/30/17 12:19 AM, Matthew Gamble wrote: I have a class member function from which I'm trying to return a sorted array of key, value tuples stored in an associative array as a private member. The member function should be able to be marked const to prevent the AA from being modified. I have

Re: sharedLog between dll

2017-08-01 Thread rikki cattermole via Digitalmars-d-learn
On 01/08/2017 11:27 AM, Domain wrote: On Tuesday, 1 August 2017 at 09:06:39 UTC, rikki cattermole wrote: On 01/08/2017 9:28 AM, Domain wrote: I want to redirect the sharedLog to my logger in one dll, and all dlls will use the new one. What should I do? sharedLog = new MyLogger(); // this

Re: sharedLog between dll

2017-08-01 Thread Domain via Digitalmars-d-learn
On Tuesday, 1 August 2017 at 09:06:39 UTC, rikki cattermole wrote: On 01/08/2017 9:28 AM, Domain wrote: I want to redirect the sharedLog to my logger in one dll, and all dlls will use the new one. What should I do? sharedLog = new MyLogger(); // this will not change the logger in other dll

Re: How to build GUI-based applications in D ?

2017-08-01 Thread Russel Winder via Digitalmars-d-learn
I use GtkD (with GStreamerD) for my GUI applications written in D. https://gtkd.org/ On Tue, 2017-08-01 at 09:31 +, ashit via Digitalmars-d-learn wrote: > what is the simplest library to create gui applications in D? > i want to create gui applications but couldnt configure the tools  > so

Re: How to build GUI-based applications in D ?

2017-08-01 Thread ketmar via Digitalmars-d-learn
ashit wrote: what is the simplest library to create gui applications in D? i want to create gui applications but couldnt configure the tools so far. i tried to install DFL several times, but it shows some errors while installing (that bold red lables showing : depreacated, depreacated, ... )

How to build GUI-based applications in D ?

2017-08-01 Thread ashit via Digitalmars-d-learn
what is the simplest library to create gui applications in D? i want to create gui applications but couldnt configure the tools so far. i tried to install DFL several times, but it shows some errors while installing (that bold red lables showing : depreacated, depreacated, ... ) i dont need

Re: sharedLog between dll

2017-08-01 Thread rikki cattermole via Digitalmars-d-learn
On 01/08/2017 9:28 AM, Domain wrote: I want to redirect the sharedLog to my logger in one dll, and all dlls will use the new one. What should I do? sharedLog = new MyLogger(); // this will not change the logger in other dll You said the magic phrase, DLL. Can't share e.g. classes between

sharedLog between dll

2017-08-01 Thread Domain via Digitalmars-d-learn
I want to redirect the sharedLog to my logger in one dll, and all dlls will use the new one. What should I do? sharedLog = new MyLogger(); // this will not change the logger in other dll