[vibe.d] How to create authentication system via REST interface?

2019-09-17 Thread Pablo De NĂ¡poli via Digitalmars-d-learn
https://forum.dlang.org/post/bctojiyzicxaueqgm...@forum.dlang.org On Wednesday, 15 March 2017 at 13:24:07 UTC, NX wrote: I'm trying to understand how to create some json-rest api that would return data (in json format) related to that specific logged in user. I see the documentation covers

Re: Is there a way to do the same thing in entry and return of a bunch of functions?

2019-09-17 Thread Nicholas Wilson via Digitalmars-d-learn
On Tuesday, 17 September 2019 at 17:11:09 UTC, Stefanos Baziotis wrote: I think it's better to give a concrete example rather than explaining this vaguely. -- The question -- Can we do better ? For one, I believe that because D does not have a preprocessor, we have to do an actual declaration

Re: Building 64-bit Windows application with console window

2019-09-17 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 18 September 2019 at 00:13:43 UTC, cc wrote: Sample program here: https://pastebin.com/wpLetNKP You have a WinMain function there. The Microsoft linker sees that as an indication that you are writing a Windows gui application and thus suppresses the console window. Inside

Building 64-bit Windows application with console window

2019-09-17 Thread cc via Digitalmars-d-learn
This might be more a question about the MS linker than D, but I'm noticing that when building with -m64 under DMD v2.087.1, it is no longer generating a console window when running the application. Under 32-bit, it would always generate the console window, and I had to disable it by building

Re: Deprecation message sources

2019-09-17 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, September 17, 2019 2:34:00 PM MDT Steven Schveighoffer via Digitalmars-d-learn wrote: > On 9/17/19 4:16 PM, Anonymouse wrote: > > On Tuesday, 17 September 2019 at 19:31:53 UTC, Steven Schveighoffer wrote: > >> I'd hate to say the answer is to special case Nullable for so many > >>

Re: Deprecation message sources

2019-09-17 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, September 17, 2019 5:28:33 PM MDT H. S. Teoh via Digitalmars-d- learn wrote: > On Tue, Sep 17, 2019 at 08:55:27PM +, Johan Engelen via > Digitalmars-d-learn wrote: [...] > > > Wow. How come this is not caught by the CI testing? > > [...] > > Is the CI setup to detect deprecations

Re: Deprecation message sources

2019-09-17 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Sep 17, 2019 at 08:55:27PM +, Johan Engelen via Digitalmars-d-learn wrote: [...] > Wow. How come this is not caught by the CI testing? [...] Is the CI setup to detect deprecations and flag them as failures? It's either that, or many cases are not tested because Phobos has a lot of

Re: Deprecation message sources

2019-09-17 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/17/19 3:31 PM, Steven Schveighoffer wrote: Hi, I just upgraded my compiler from 2.084 to 2.088, and I'm getting scores of deprecation messages. One thing I've realized is that most of these messages are generated by calls outside my code. These deprecation messages are intended to tell

Re: Deprecation message sources

2019-09-17 Thread Johan Engelen via Digitalmars-d-learn
On Tuesday, 17 September 2019 at 20:16:12 UTC, Anonymouse wrote: On Tuesday, 17 September 2019 at 19:31:53 UTC, Steven Schveighoffer wrote: I'd hate to say the answer is to special case Nullable for so many functions, but what other alternative is there? -Steve Nullable isn't alone,

Re: Deprecation message sources

2019-09-17 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/17/19 4:16 PM, Anonymouse wrote: On Tuesday, 17 September 2019 at 19:31:53 UTC, Steven Schveighoffer wrote: I'd hate to say the answer is to special case Nullable for so many functions, but what other alternative is there? -Steve Nullable isn't alone, std.json.JSONType causes a literal

Re: Deprecation message sources

2019-09-17 Thread Anonymouse via Digitalmars-d-learn
On Tuesday, 17 September 2019 at 19:31:53 UTC, Steven Schveighoffer wrote: I'd hate to say the answer is to special case Nullable for so many functions, but what other alternative is there? -Steve Nullable isn't alone, std.json.JSONType causes a literal wall of text of deprecation warnings.

Deprecation message sources

2019-09-17 Thread Steven Schveighoffer via Digitalmars-d-learn
Hi, I just upgraded my compiler from 2.084 to 2.088, and I'm getting scores of deprecation messages. One thing I've realized is that most of these messages are generated by calls outside my code. These deprecation messages are intended to tell you where you are calling them, but end up

Re: segmentation fault when running void main() {}

2019-09-17 Thread Adam D. Ruppe via Digitalmars-d-learn
Did you make sure the old version was totally uninstalled before the new version was attempted to be built? This thing often happens because of a compiler/runtime version mismatch, typically because the old version didn't get fully removed first.

segmentation fault when running void main() {}

2019-09-17 Thread berni via Digitalmars-d-learn
I'm not sure, if this is the right place to ask, but I couldn't find a better one either. I'm trying to install D on my old 32-bit machine (debian stable). First I tried to install a precompiled version and now I followed [1]. In both cases, I always get a segmentation fault when I try to

Is there a way to do the same thing in entry and return of a bunch of functions?

2019-09-17 Thread Stefanos Baziotis via Digitalmars-d-learn
I think it's better to give a concrete example rather than explaining this vaguely. - For those who are familiar with LDC internals: I want to create something like LOG_SCOPE. You can skip the explanation. - For those who are not: Imagine that you want to track down how deep in the call

Re: Dynamic array + AA array

2019-09-17 Thread Brett via Digitalmars-d-learn
On Tuesday, 17 September 2019 at 15:51:34 UTC, Andrea Fontana wrote: On Tuesday, 17 September 2019 at 14:33:30 UTC, Brett wrote: The idea is to basically use a dynamic array for most of the items, then an array to get the rest. T[] Base; T[int] Rest; Then if Base has a max size(usually it

Re: matplotlibD returns

2019-09-17 Thread Brett via Digitalmars-d-learn
On Tuesday, 17 September 2019 at 15:21:37 UTC, jmh530 wrote: On Tuesday, 17 September 2019 at 01:54:01 UTC, Brett wrote: How does one get return values? https://matplotlib.org/3.1.0/gallery/statistics/hist.html Shows that python uses return values to set properties of the plot

Re: Dynamic array + AA array

2019-09-17 Thread Andrea Fontana via Digitalmars-d-learn
On Tuesday, 17 September 2019 at 14:33:30 UTC, Brett wrote: The idea is to basically use a dynamic array for most of the items, then an array to get the rest. T[] Base; T[int] Rest; Then if Base has a max size(usually it might be fixed due to some algorithm) the Rest AA can pick up any

Re: matplotlibD returns

2019-09-17 Thread jmh530 via Digitalmars-d-learn
On Tuesday, 17 September 2019 at 01:54:01 UTC, Brett wrote: How does one get return values? https://matplotlib.org/3.1.0/gallery/statistics/hist.html Shows that python uses return values to set properties of the plot

Re: Dynamic array + AA array

2019-09-17 Thread Paul Backus via Digitalmars-d-learn
On Tuesday, 17 September 2019 at 14:33:30 UTC, Brett wrote: The idea is to basically use a dynamic array for most of the items, then an array to get the rest. T[] Base; T[int] Rest; Then if Base has a max size(usually it might be fixed due to some algorithm) the Rest AA can pick up any

Dynamic array + AA array

2019-09-17 Thread Brett via Digitalmars-d-learn
The idea is to basically use a dynamic array for most of the items, then an array to get the rest. T[] Base; T[int] Rest; Then if Base has a max size(usually it might be fixed due to some algorithm) the Rest AA can pick up any outside values easily. The idea here is to be able to combine

Re: Collect Statistics efficiently and easily

2019-09-17 Thread Paul Backus via Digitalmars-d-learn
On Tuesday, 17 September 2019 at 01:53:39 UTC, Brett wrote: Many times I have to get statistical info which is simply compute statistics on a data set that may be generating or already generated. The code usually is M = max(M, v); m = min(m, v); but other things like standard deviation,

Blog Post #71: Expanding on the Statusbar

2019-09-17 Thread Ron Tarrant via Digitalmars-d-learn
Here's the second instalment on the lowly Statusbar wherein we look at multiple status reports as well as the Statusbar's signal: https://gtkdcoding.com/2019/09/17/0071-expanding-on-the-statusbar.html