Re: Deprecation in traits

2020-09-30 Thread Frak via Digitalmars-d-learn
On Tuesday, 29 September 2020 at 18:25:03 UTC, Steven Schveighoffer wrote: On 9/29/20 1:08 PM, Frak wrote: Hi folks, I've this: /Users/frak/dlang/ldc-1.23.0/bin/../import/std/traits.d(3711): Deprecation: function `std.typecons.Nullable!long.Nullable.get_` is deprecated - Implicit

vibe.de multiple ports.

2020-09-30 Thread seany via Digitalmars-d-learn
Hello I am trying to use this example for a iot application: https://aberba.com/2018/using-vibe-d-web-interface/ The code i use is: ushort port = 5504; void main(char[][] args) { auto router = new URLRouter; router.post("/archive", );

Re: Deprecation in traits

2020-09-30 Thread Stefan Koch via Digitalmars-d-learn
On Wednesday, 30 September 2020 at 08:33:58 UTC, Frak wrote: On Tuesday, 29 September 2020 at 18:25:03 UTC, Steven Schveighoffer wrote: On 9/29/20 1:08 PM, Frak wrote: [...] Because it's probably coming from a constraint, you probably can't figure out the exact usage. What's more annoying

Re: Trying to create a trivial 64 bit D Lang DLL on a Windows 10 machine and cant get past linking.

2020-09-30 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Tuesday, 29 September 2020 at 21:22:21 UTC, WhatMeWorry wrote: module user; export { int myAddSeven(int a, int b); } [...] it is better to use this template https://github.com/dlang/dmd/tree/master/samples/mydll You don't have a DllMain.

Re: vibe.de multiple ports.

2020-09-30 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 30 September 2020 at 11:23:59 UTC, seany wrote: auto router = new URLRouter; router.post("/archive", ); router.get("/archive", ); auto settings = new HTTPServerSettings; settings.port = port; settings.bindAddresses = ["::1",

Re: vibe.de multiple ports.

2020-09-30 Thread seany via Digitalmars-d-learn
On Wednesday, 30 September 2020 at 12:29:06 UTC, Daniel Kozak wrote: Dne st 30. 9. 2020 13:25 uživatel seany via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> napsal: Hello I am trying to use this example for a iot application: https://aberba.com/2018/using-vibe-d-web-interface/

Re: vibe.de multiple ports.

2020-09-30 Thread Daniel Kozak via Digitalmars-d-learn
Dne st 30. 9. 2020 13:25 uživatel seany via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> napsal: > Hello > > I am trying to use this example for a iot application: > https://aberba.com/2018/using-vibe-d-web-interface/ > > The code i use is: > > ushort port = 5504;

Re: Deprecation in traits

2020-09-30 Thread Frak via Digitalmars-d-learn
On Wednesday, 30 September 2020 at 09:42:40 UTC, Stefan Koch wrote: On Wednesday, 30 September 2020 at 08:33:58 UTC, Frak wrote: On Tuesday, 29 September 2020 at 18:25:03 UTC, Steven Schveighoffer wrote: On 9/29/20 1:08 PM, Frak wrote: [...] Because it's probably coming from a constraint,

What classification should shared objects in qeued thread pools have?

2020-09-30 Thread IGotD- via Digitalmars-d-learn
I have a system that heavily relies on thread pools. Typically this is used with items that are put on a queue and then a thread pool system process this queue. The thread pool can be configured to process the items in whatever parallel fashion it wants but usually it is set to one, that means

Re: vibe.de multiple ports.

2020-09-30 Thread aberba via Digitalmars-d-learn
On Wednesday, 30 September 2020 at 12:38:10 UTC, seany wrote: On Wednesday, 30 September 2020 at 12:29:06 UTC, Daniel Kozak wrote: Dne st 30. 9. 2020 13:25 uživatel seany via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> napsal: Hello I am trying to use this example for a iot

Re: Fiber based HTTP client for load testing

2020-09-30 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/30/20 8:35 PM, Arun wrote: As seen, the downside is that the more threads we use the more memory the app consumes. Is there a way to replace the threads with fibers in this particular case so that instead of spawning 1000 threads, we spawn 1000 fibers with just 1 thread? Right on the

Re: What classification should shared objects in qeued thread pools have?

2020-09-30 Thread mw via Digitalmars-d-learn
On Wednesday, 30 September 2020 at 20:13:47 UTC, IGotD- wrote: This where the memory model of D starts to become confusing for me. By default memory allocations/deallocation are not allowed between threads, however setting the object to shared circumvents this. This seems to work as there is

Re: What classification should shared objects in qeued thread pools have?

2020-09-30 Thread mw via Digitalmars-d-learn
On Thursday, 1 October 2020 at 00:13:41 UTC, IGotD- wrote: I think that the shared in shared structs should not be transitive to members of the struct. The compiler should not Once the aggregate struct data is decl-ed `shared` as a whole, it needs to be transitive to play safe. The compiler

Fiber based HTTP client for load testing

2020-09-30 Thread Arun via Digitalmars-d-learn
I have a REST client that can do load test of my REST services. It uses ikod's dlang-requests under the hood. https://github.com/ikod/dlang-requests At the moment I use a thread pool to dispatch the runtime operation and send the requests to the server. /// Iterates over the enum

Re: What classification should shared objects in qeued thread pools have?

2020-09-30 Thread IGotD- via Digitalmars-d-learn
On Thursday, 1 October 2020 at 00:00:06 UTC, mw wrote: I think using `shared` is the D's encouraged way. If there is a better way do this in D, I'd want to know it too. I think that the shared in shared structs should not be transitive to members of the struct. The compiler should not

Re: What classification should shared objects in qeued thread pools have?

2020-09-30 Thread mw via Digitalmars-d-learn
On Thursday, 1 October 2020 at 00:00:06 UTC, mw wrote: On Wednesday, 30 September 2020 at 20:13:47 UTC, IGotD- wrote: [...] I think declaring the container and item as `shared` is the D's encouraged way of sharing data among different threads. [...] then just cast the `shared` away:

Re: Fiber based HTTP client for load testing

2020-09-30 Thread ikod via Digitalmars-d-learn
On Thursday, 1 October 2020 at 00:35:49 UTC, Arun wrote: I have a REST client that can do load test of my REST services. It uses ikod's dlang-requests under the hood. https://github.com/ikod/dlang-requests At the moment I use a thread pool to dispatch the runtime operation and send the

Re: Deprecation in traits

2020-09-30 Thread Basile B. via Digitalmars-d-learn
On Tuesday, 29 September 2020 at 17:08:40 UTC, Frak wrote: Hi folks, I've this: /Users/frak/dlang/ldc-1.23.0/bin/../import/std/traits.d(3711): Deprecation: function `std.typecons.Nullable!long.Nullable.get_` is deprecated - Implicit conversion with `alias Nullable.get this` will be removed

Re: Deprecation in traits

2020-09-30 Thread Ben Jones via Digitalmars-d-learn
On Wednesday, 30 September 2020 at 18:18:48 UTC, Basile B. wrote: On Tuesday, 29 September 2020 at 17:08:40 UTC, Frak wrote: Hi folks, I've this: /Users/frak/dlang/ldc-1.23.0/bin/../import/std/traits.d(3711): Deprecation: function `std.typecons.Nullable!long.Nullable.get_` is deprecated -

Re: vibe.de multiple ports.

2020-09-30 Thread Daniel Kozak via Digitalmars-d-learn
On Wed, Sep 30, 2020 at 2:40 PM seany via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > On Wednesday, 30 September 2020 at 12:29:06 UTC, Daniel Kozak > wrote: > > to separate the messages from the IoT responses quickly and > forward them to different programs, and to have the