Re: Create class on stack

2017-08-07 Thread ANtlord via Digitalmars-d-learn
On Sunday, 6 August 2017 at 15:47:43 UTC, Moritz Maxeiner wrote: If you use this option, do be aware that this feature has been > scheduled for future deprecation [1]. It's likely going to continue working for quite a while (years), though. [1]

Re: rename file, execute os, etc at compile time

2017-08-07 Thread Stefan Koch via Digitalmars-d-learn
On Monday, 7 August 2017 at 00:07:26 UTC, Johnson Jones wrote: On Sunday, 6 August 2017 at 23:11:56 UTC, Nicholas Wilson wrote: On Sunday, 6 August 2017 at 19:56:06 UTC, Johnson Jones wrote: [...] It is deliberately not possible. reproducible builds security ect. have a look at dubs

vibed.web.auth framework and redirection

2017-08-07 Thread Johannes Loher via Digitalmars-d-learn
Hello I'd like to use the vibed.web.auth framework for authentication in my vibe.d app. If a user is not authorized to access a certain page, he should be redirected to another page (a custom error page for example, or the login page in my case). At the moment, I'm using the following

Re: gtk interface responsiveness

2017-08-07 Thread Johnson Jones via Digitalmars-d-learn
On Monday, 7 August 2017 at 22:59:16 UTC, Moritz Maxeiner wrote: On Monday, 7 August 2017 at 22:02:21 UTC, Johnson Jones wrote: I have an icon that I toggle which clicked. It seems that I can't toggle it any faster than about a second. The handler is being called each click but it seems the

Re: gtk interface responsiveness

2017-08-07 Thread Johnson Jones via Digitalmars-d-learn
On Monday, 7 August 2017 at 22:59:16 UTC, Moritz Maxeiner wrote: On Monday, 7 August 2017 at 22:02:21 UTC, Johnson Jones wrote: I have an icon that I toggle which clicked. It seems that I can't toggle it any faster than about a second. The handler is being called each click but it seems the

Re: x64 build time 3x slower?

2017-08-07 Thread Johnson Jones via Digitalmars-d-learn
On Monday, 7 August 2017 at 22:56:37 UTC, Moritz Maxeiner wrote: On Monday, 7 August 2017 at 22:19:57 UTC, Johnson Jones wrote: Why would that be. Program take about 4 seconds to compile and 12 for x64. There is fundamentally no difference between the two versions. I do link in gtk x86 and gtk

Re: VibeD - REST API and vibed.web.auth framework

2017-08-07 Thread holo via Digitalmars-d-learn
Thank you for explanation. It fix my problem with compilation. I was using https://github.com/rejectedsoftware/vibe.d/blob/master/examples/web-auth/source/app.d as example and there is @safe function. I try to compile it with newest (beta) version of vibe.d and it compiled too (so i suspect in

Re: gtk interface responsiveness

2017-08-07 Thread Moritz Maxeiner via Digitalmars-d-learn
On Monday, 7 August 2017 at 22:02:21 UTC, Johnson Jones wrote: I have an icon that I toggle which clicked. It seems that I can't toggle it any faster than about a second. The handler is being called each click but it seems the gui is not updated more than about 1fps in that case? Although,

Re: x64 build time 3x slower?

2017-08-07 Thread Moritz Maxeiner via Digitalmars-d-learn
On Monday, 7 August 2017 at 22:19:57 UTC, Johnson Jones wrote: Why would that be. Program take about 4 seconds to compile and 12 for x64. There is fundamentally no difference between the two versions. I do link in gtk x86 and gtk x64 depending on version, and that's it as far as I can tell.

Re: Create class on stack

2017-08-07 Thread Moritz Maxeiner via Digitalmars-d-learn
On Monday, 7 August 2017 at 22:02:07 UTC, Mike wrote: On Monday, 7 August 2017 at 13:42:33 UTC, Moritz Maxeiner wrote: You can still create a (scope) class on the stack, escape a reference to it using `move` and use it afterwards, all within the rules of @safe, so I'm not convinced that the

x64 build time 3x slower?

2017-08-07 Thread Johnson Jones via Digitalmars-d-learn
Why would that be. Program take about 4 seconds to compile and 12 for x64. There is fundamentally no difference between the two versions. I do link in gtk x86 and gtk x64 depending on version, and that's it as far as I can tell. Debug x86 4 x64 12 Release x86 3 x64

gtk interface responsiveness

2017-08-07 Thread Johnson Jones via Digitalmars-d-learn
I have an icon that I toggle which clicked. It seems that I can't toggle it any faster than about a second. The handler is being called each click but it seems the gui is not updated more than about 1fps in that case? Although, I'm sure it update faster than 1fps, just seems the icon/image

Re: Create class on stack

2017-08-07 Thread Mike via Digitalmars-d-learn
On Monday, 7 August 2017 at 13:42:33 UTC, Moritz Maxeiner wrote: You can still create a (scope) class on the stack, escape a reference to it using `move` and use it afterwards, all within the rules of @safe, so I'm not convinced that the reason for deprecating scoped classes is gone yet.

Re: gtkD window centering message up and no app on taskbar

2017-08-07 Thread Johnson Jones via Digitalmars-d-learn
On Monday, 7 August 2017 at 20:57:08 UTC, Mike Wey wrote: On 07-08-17 22:46, Johnson Jones wrote: [...] This appears to be a GTK issue, a work around might be to get the Window handle from gtk and use the Windows API to set the taskbar visibility. Yeah, I was thinking about that but

Re: gtkD: events being triggered twice

2017-08-07 Thread Johnson Jones via Digitalmars-d-learn
On Monday, 7 August 2017 at 21:01:33 UTC, Mike Wey wrote: On 06-08-17 21:27, FoxyBrown wrote: [...] Also seems to be working properly with a Separator. Ok, I guess it's on my end, I don't see how since I'm not doing a hell of a lot and only gtk is calling those event handlers, I'll try to

Re: ldc D compiler installation on windows 10

2017-08-07 Thread Bastiaan Veelo via Digitalmars-d-learn
On Sunday, 6 August 2017 at 23:44:27 UTC, greatsam4sure wrote: Good day. I will appreciate it if anybody here can help me with the step by step way of installing ldc D compiler on windows. I have read online info but i just don't get it. let the process be in steps for easy

Re: gtkD: events being triggered twice

2017-08-07 Thread Mike Wey via Digitalmars-d-learn
On 06-08-17 21:27, FoxyBrown wrote: On Sunday, 6 August 2017 at 18:26:20 UTC, Mike Wey wrote: On 06-08-17 16:58, FoxyBrown wrote: I don't really(my code is a bit more complex) but basically all it boils down to is a UI with some nested widgets (an overlay, an box, and a box and one contains

Re: D on Power8 (PPC64)

2017-08-07 Thread kinke via Digitalmars-d-learn
On Monday, 7 August 2017 at 20:39:40 UTC, Dmitry Olshansky wrote: What is the status of the platform? I might be doing some number crunching on one of the power8 beasts, would be nice to have D working there. Not that bad afaik. LDC should be able to build itself, the runtime libs and their

Re: gtkD window centering message up and no app on taskbar

2017-08-07 Thread Mike Wey via Digitalmars-d-learn
On 07-08-17 22:46, Johnson Jones wrote: On Saturday, 5 August 2017 at 20:56:10 UTC, Mike Wey wrote: Windows will only show the taskbar icon if you are not running the application from the console. Now in x64 it is showing, not in x86. So, not sure what's going on but at least it is

Re: gtkD window centering message up and no app on taskbar

2017-08-07 Thread Johnson Jones via Digitalmars-d-learn
On Saturday, 5 August 2017 at 20:56:10 UTC, Mike Wey wrote: Windows will only show the taskbar icon if you are not running the application from the console. Now in x64 it is showing, not in x86. So, not sure what's going on but at least it is showing. I was in a windows console and added a

Re: VibeD - REST API and vibed.web.auth framework

2017-08-07 Thread Bastiaan Veelo via Digitalmars-d-learn
On Sunday, 6 August 2017 at 16:47:14 UTC, holo wrote: Hello I'm trying to use auth framework with REST api ( http://vibed.org/api/vibe.web.auth/ ). Is it possible to use it with registerRestInterface? According to description under: http://vibed.org/api/vibe.web.auth/requiresAuth it should

D on Power8 (PPC64)

2017-08-07 Thread Dmitry Olshansky via Digitalmars-d-learn
What is the status of the platform? I might be doing some number crunching on one of the power8 beasts, would be nice to have D working there. --- Dmitry Olshansky

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

2017-08-07 Thread Dukc via Digitalmars-d-learn
thank you aberba ok, so this is useless to me. i want something fully functional stand-alone tools. i have no internet connection there. Don't worry, DlangUI is stand-alone: you only need the connection to download it, but not to use it nor to compile with. Dub will function without

Re: gtkD window centering message up and no app on taskbar

2017-08-07 Thread Johnson Jones via Digitalmars-d-learn
and I do have skipTaskbar disabled... tried enabling it with no long... and fidgeting with other settings and using a Window instead of Application Window. Maybe gtk needs to be told that that the window is the "main window" of the application?

Re: gtkD window centering message up and no app on taskbar

2017-08-07 Thread Johnson Jones via Digitalmars-d-learn
On Saturday, 5 August 2017 at 20:56:10 UTC, Mike Wey wrote: On 05-08-17 20:14, Johnson Jones wrote: When trying to center the window. If one uses ALWAYS_CENTERED any resizing of the window is totally busted. CENTER also does not work. move(0,0) seems to not be relative to the main display.

Re: gtkD: events being triggered twice

2017-08-07 Thread Johnson Jones via Digitalmars-d-learn
On Monday, 7 August 2017 at 16:13:18 UTC, Adam D. Ruppe wrote: On Sunday, 6 August 2017 at 19:27:15 UTC, FoxyBrown wrote: I don't know gtk, but I would suspect moving the mouse over the child triggers the enter/leave notifications too and it bubbles up to

Re: gtkD: events being triggered twice

2017-08-07 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sunday, 6 August 2017 at 19:27:15 UTC, FoxyBrown wrote: I don't know gtk, but I would suspect moving the mouse over the child triggers the enter/leave notifications too and it bubbles up to the parent.

Re: Create class on stack

2017-08-07 Thread Moritz Maxeiner via Digitalmars-d-learn
On Monday, 7 August 2017 at 10:42:03 UTC, Jacob Carlborg wrote: On 2017-08-06 17:47, Moritz Maxeiner wrote: If you use this option, do be aware that this feature has been scheduled for future deprecation [1]. It's likely going to continue working for quite a while (years), though. It's

Re: Create class on stack

2017-08-07 Thread Moritz Maxeiner via Digitalmars-d-learn
On Monday, 7 August 2017 at 13:40:18 UTC, Moritz Maxeiner wrote: Thanks, I wasn't aware of this. I tried fooling around scope classes and DIP1000 for a bit and was surprised that this is allowed: --- import core.stdc.stdio : printf; import std.algorithm : move; class A { int i;

Re: Create class on stack

2017-08-07 Thread Moritz Maxeiner via Digitalmars-d-learn
On Monday, 7 August 2017 at 10:50:21 UTC, Mike wrote: On Sunday, 6 August 2017 at 15:47:43 UTC, Moritz Maxeiner wrote: If you use this option, do be aware that this feature has been scheduled for future deprecation [1]. It's likely going to continue working for quite a while (years), though.

Re: rename file, execute os, etc at compile time

2017-08-07 Thread lobo via Digitalmars-d-learn
On Monday, 7 August 2017 at 00:07:26 UTC, Johnson Jones wrote: On Sunday, 6 August 2017 at 23:11:56 UTC, Nicholas Wilson wrote: On Sunday, 6 August 2017 at 19:56:06 UTC, Johnson Jones wrote: [...] It is deliberately not possible. reproducible builds security ect. have a look at dubs

Re: std.math module

2017-08-07 Thread greatsam4sure via Digitalmars-d-learn
On Monday, 7 August 2017 at 04:47:56 UTC, Nicholas Wilson wrote: On Sunday, 6 August 2017 at 23:33:26 UTC, greatsam4sure wrote: import std.math; import std.stdio; cos(90*PI/180) = -2.7e-20 instead of zero. I will appreciate any help. thanks in advance. tan(90*PI/180) = -3.689e+19 instead of

Re: Create class on stack

2017-08-07 Thread Mike via Digitalmars-d-learn
On Sunday, 6 August 2017 at 15:47:43 UTC, Moritz Maxeiner wrote: If you use this option, do be aware that this feature has been scheduled for future deprecation [1]. It's likely going to continue working for quite a while (years), though. [1]

Re: Create class on stack

2017-08-07 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-08-06 17:47, Moritz Maxeiner wrote: If you use this option, do be aware that this feature has been scheduled for future deprecation [1]. It's likely going to continue working for quite a while (years), though. It's used all over the place in the DMD code base. -- /Jacob Carlborg