Re: Vibe.d Password Verification

2025-02-11 Thread Kagamin via Digitalmars-d-learn
uint32_t is from stdint.h, which id is `import core.stdc.stdint;`

Re: Vibe.d Password Verification

2025-02-08 Thread Matthew via Digitalmars-d-learn
On Wednesday, 5 February 2025 at 15:16:10 UTC, seany wrote: Is there any built in passowrd verification for Vibe.d? Such as bcrypt.verifypassword(password , hash)? ... Thank you. I would agree with Jonathan and use a C library. I was just looking for a password solution myself also for a

Re: Vibe.d Password Verification

2025-02-06 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Wednesday, 5 February 2025 at 15:16:10 UTC, seany wrote: Is there any built in passowrd verification for Vibe.d? Such as bcrypt.verifypassword(password , hash)? I looked at this library: https://code.dlang.org/packages/passwd This is causing linking error ( ld: error: unable to find

Re: Vibe.d Password Verification

2025-02-05 Thread Adam Wilson via Digitalmars-d-learn
On Wednesday, 5 February 2025 at 15:16:10 UTC, seany wrote: Is there any built in passowrd verification for Vibe.d? Such as bcrypt.verifypassword(password , hash)? I looked at this library: https://code.dlang.org/packages/passwd This is causing linking error ( ld: error: unable to find

Re: Vibe.d Password Verification

2025-02-05 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, February 5, 2025 8:16:10 AM MST seany via Digitalmars-d-learn wrote: > Is there any built in passowrd verification for Vibe.d? Such as > bcrypt.verifypassword(password , hash)? > > I looked at this library: https://code.dlang.org/packages/passwd > This is causing lin

Re: Vibe.d Password Verification

2025-02-05 Thread Sergey via Digitalmars-d-learn
On Wednesday, 5 February 2025 at 15:16:10 UTC, seany wrote: Any help would be appreciated. My password is being sent as string over a secure https connection. The hash is stored as another string. There are also these 2: https://code.dlang.org/packages/dauth https://code.dlang.org/packages/a

Vibe.d Password Verification

2025-02-05 Thread seany via Digitalmars-d-learn
Is there any built in passowrd verification for Vibe.d? Such as bcrypt.verifypassword(password , hash)? I looked at this library: https://code.dlang.org/packages/passwd This is causing linking error ( ld: error: unable to find library -lbsd) - yes i am on FreeBSD with my hoster. I can't c

Re: NGINX Unit and vibe.d Integration Performance

2024-11-04 Thread monkyyy via Digitalmars-d-learn
On Monday, 4 November 2024 at 18:05:25 UTC, Salih Dincer wrote: I'm glad to hear that. In the world of software, there is actually no problem that cannot be solved; except for the halting problem :) ? Id argue theres entire families of problems that are unsolvable; the halting problem may

Re: NGINX Unit and vibe.d Integration Performance

2024-11-04 Thread Salih Dincer via Digitalmars-d-learn
On Sunday, 3 November 2024 at 00:42:44 UTC, Kyle Ingraham wrote: "You can add an explicit sub configuration to dub.json: ```json "dependencies": { "vibe-d": "~>0.10.1", "eventcore": "~>0.9.34" }, "subConfigurations": { "eventcore": "kqueue" }, ``` Or you could pass --ove

Re: NGINX Unit and vibe.d Integration Performance

2024-11-02 Thread Kyle Ingraham via Digitalmars-d-learn
On Monday, 28 October 2024 at 01:06:58 UTC, Kyle Ingraham wrote: I know vibe.d can do better so I'm thinking there's something I'm missing. Sönke Ludwig solved this for me here: https://github.com/vibe-d/vibe.d/issues/2807#issue-2630501194 The solution was to switch to a co

Re: NGINX Unit and vibe.d Integration Performance

2024-10-31 Thread Kyle Ingraham via Digitalmars-d-learn
tree - https://blog.kyleingraham.com/wp-content/uploads/2024/10/screenshot-2024-10-30-at-11.53.46e280afpm.png In the flame graph there are two threads: Main Thread and thread_entryPoint. NGINX Unit runs in thread_entryPoint. vibe.d and my request handing code run in Main Thread. My request handing co

Re: NGINX Unit and vibe.d Integration Performance

2024-10-31 Thread Kyle Ingraham via Digitalmars-d-learn
using vibe.d's web framework the two have similar performance numbers. Adding a 10ms sleep resulted in 600 req/s for my demonstrator and 630 req/s for vibe.d. It's encouraging to see the benefit of vibe.d's concurrency system with delays added. I'd like to be able to us

Re: NGINX Unit and vibe.d Integration Performance

2024-10-31 Thread Kyle Ingraham via Digitalmars-d-learn
to try using a semaphore and ended up using a mutex, an event, and a lock-free queue. My aim was to limit the amount of vibe.d events emitted to hopefully limit event loop overhead. It works as follows: - Requests come in on the Unit thread and are added to the lock-free queue. - The Unit thr

Re: NGINX Unit and vibe.d Integration Performance

2024-10-28 Thread Salih Dincer via Digitalmars-d-learn
On Monday, 28 October 2024 at 20:53:32 UTC, Salih Dincer wrote: Semaphore? Please see: https://dlang.org/phobos/core_sync_semaphore.html SDB@79

Re: NGINX Unit and vibe.d Integration Performance

2024-10-28 Thread Salih Dincer via Digitalmars-d-learn
On Monday, 28 October 2024 at 19:57:41 UTC, Kyle Ingraham wrote: - Polling too little killed performance and too often wrecked CPU usage. - Using message passing reduced performance quite a bit. - Batching reads was hard because it was tricky balancing performance for single requests with per

Re: NGINX Unit and vibe.d Integration Performance

2024-10-28 Thread Kyle Ingraham via Digitalmars-d-learn
or example, something like this: ... You are right that they aren't compatible. Running them in the same thread was a no-go (which makes sense given they both want to control when code is run). How would you suggest reading from the queue you provided in the vibe.d thread? I tried somethi

Re: NGINX Unit and vibe.d Integration Performance

2024-10-28 Thread Salih Dincer via Digitalmars-d-learn
On Monday, 28 October 2024 at 01:06:58 UTC, Kyle Ingraham wrote: ... The second though only achieves ~20k requests per second. In that demo I try to make vibe.d's concurrency system available during request handling. NGINX Unit's event loop is run in its own thread. When requests arrive, Uni

Re: NGINX Unit and vibe.d Integration Performance

2024-10-28 Thread Kyle Ingraham via Digitalmars-d-learn
On Monday, 28 October 2024 at 05:56:32 UTC, ryuukk_ wrote: ImportC is great It really is. Most of my time setting it up was on getting include and linking flags working. Which is exactly what you’d run into using C from C.

Re: NGINX Unit and vibe.d Integration Performance

2024-10-27 Thread ryuukk_ via Digitalmars-d-learn
Let's take a moment to appreciate how easy it was for you to use nginx unit from D https://github.com/kyleingraham/unit-d-hello-world/blob/main/source/unit_integration.c ImportC is great

NGINX Unit and vibe.d Integration Performance

2024-10-27 Thread Kyle Ingraham via Digitalmars-d-learn
lo-world (NGINX Unit/vibe.d) The first integration achieves ~43k requests per second on my computer. That matches what I've been able to achieve with a minimal vibe.d project and is I believe the max my benchmark configuration on macOS can hit. The second though only achieves ~20k req

Re: Vibe.d v0.9.0, v0.10.0: ` dub init hello -t vibe.d` fails to build on MacOS

2024-07-07 Thread Ki Rill via Digitalmars-d-learn
On Sunday, 7 July 2024 at 23:33:59 UTC, Steven Schveighoffer wrote: openssl version should be automatically determined by running a pre-build step. If this doesn't work for you, please file a bug here: https://github.com/D-Programming-Deimos/openssl -Steve Filed a bug here: https://github.

Re: Vibe.d v0.9.0, v0.10.0: ` dub init hello -t vibe.d` fails to build on MacOS

2024-07-07 Thread Steven Schveighoffer via Digitalmars-d-learn
undefined symbols from openssl, but I have it installed. Vibe.d should link it automatically, right? You can try to add to dependencies "vibe-stream:tls": "~>1.1.0" and ``` "subConfigurations": { "vibe-stream:tls": "notls" } ``` It

Re: Vibe.d v0.9.0, v0.10.0: ` dub init hello -t vibe.d` fails to build on MacOS

2024-07-07 Thread Sergey via Digitalmars-d-learn
On Sunday, 7 July 2024 at 14:15:02 UTC, Ki Rill wrote: It worked, thank you! But what does it do; disables TLS? Thread Local Storage? It disabling transport layer security IMUC you won't be able to have "https" but only "http". So in case you need that, you can make another SubConfiguration

Re: Vibe.d v0.9.0, v0.10.0: ` dub init hello -t vibe.d` fails to build on MacOS

2024-07-07 Thread Ki Rill via Digitalmars-d-learn
. Vibe.d should link it automatically, right? You can try to add to dependencies "vibe-stream:tls": "~>1.1.0" and ``` "subConfigurations": { "vibe-stream:tls": "notls" } ``` It worked, thank you! But what does it do; disables TLS? Thread Local Storage?

Re: Vibe.d v0.9.0, v0.10.0: ` dub init hello -t vibe.d` fails to build on MacOS

2024-07-07 Thread Sergey via Digitalmars-d-learn
On Sunday, 7 July 2024 at 10:55:21 UTC, Ki Rill wrote: Machine: ``` MacBook Pro (Retina, 15-inch, Late 2013), macOS Big Sur version 11.7.10 ``` How should I solve this? It mentions undefined symbols from openssl, but I have it installed. Vibe.d should link it automatically, right? You can

Re: vibe.d still does not work on FreeBSD.

2024-02-20 Thread Alain De Vos via Digitalmars-d-learn
On Monday, 19 February 2024 at 07:11:30 UTC, Kagamin wrote: Docs say SSL_get0_peer_certificate was added in openssl 3. I recompiled everything with : DEFAULT_VERSIONS+= ssl=openssl31 With this setting vibe works fine on FreeBSD. Nice.

Re: vibe.d still does not work on FreeBSD.

2024-02-18 Thread Kagamin via Digitalmars-d-learn
Docs say SSL_get0_peer_certificate was added in openssl 3.

Re: vibe.d still does not work on FreeBSD.

2024-02-18 Thread Alain De Vos via Digitalmars-d-learn
ht": "Copyright © 2024, x", "dependencies": { "vibe-d": "~>0.9" }, "description": "A simple vibe.d server application.", "license": "proprietary", "name": "hello" }

Re: vibe.d still does not work on FreeBSD.

2024-02-18 Thread Sergey via Digitalmars-d-learn
On Sunday, 18 February 2024 at 13:23:53 UTC, Alain De Vos wrote: DEFAULT_VERSIONS+= ssl=openssl111 Maybe also could be helpful to share your dub.json, compiler version and OS version as well.

vibe.d still does not work on FreeBSD.

2024-02-18 Thread Alain De Vos via Digitalmars-d-learn
The error i get : ``` Up-to-date vibe-d 0.9.8: target for configuration [library] is up to date. Building t ~master: building configuration [application] Linking t ld: error: undefined symbol: SSL_get_peer_certificate referenced by openssl.d:373 (../../.dub/packages/vibe-d/0.9.8/vibe

Re: how can I load html files and not .dt or diet files in vibe.d

2024-02-10 Thread dunkelheit via Digitalmars-d-learn
hat you're looking for. https://github.com/vibe-d/vibe.d/blob/master/examples/http_static_server/source/app.d gracias por la solucion aunque esperaba que fuera un poco mas simple el proceso pero estare estudiando el codigo y su funcionamiento

Re: how can I load html files and not .dt or diet files in vibe.d

2024-02-10 Thread dunkelheit via Digitalmars-d-learn
On Friday, 2 February 2024 at 06:01:22 UTC, Menjanahary R. R. wrote: On Thursday, 1 February 2024 at 03:20:31 UTC, dunkelheit wrote: [...] Explore this link https://github.com/D-Programming-GDC/gdcproject for potential sources of inspiration. gracias por tu ayuda pero obtuve errores que n

Re: how can I load html files and not .dt or diet files in vibe.d

2024-02-10 Thread dunkelheit via Digitalmars-d-learn
On Thursday, 1 February 2024 at 10:44:24 UTC, Aravinda VK wrote: On Thursday, 1 February 2024 at 03:20:31 UTC, dunkelheit wrote: !!! 5 html body h1 hello diet -iframe("hola.html") please help me :') Try ``` html body h1 hello diet iframe(

Re: how can I load html files and not .dt or diet files in vibe.d

2024-02-01 Thread Menjanahary R. R. via Digitalmars-d-learn
On Thursday, 1 February 2024 at 03:20:31 UTC, dunkelheit wrote: this is my code, I'm a begginer on vibe, and I want to use html and not diet files `import vibe.vibe; void main() { auto settings = new HTTPServerSettings; settings.port = 8080; settings.bindAddresses = [":

Re: how can I load html files and not .dt or diet files in vibe.d

2024-02-01 Thread Rene Zwanenburg via Digitalmars-d-learn
On Thursday, 1 February 2024 at 03:20:31 UTC, dunkelheit wrote: this is my code, I'm a begginer on vibe, and I want to use html and not diet files Take a look at the static file example, I think that's close to what you're looking for. https://github.com/vibe-d/vibe.d/blob/

Re: how can I load html files and not .dt or diet files in vibe.d

2024-02-01 Thread Aravinda VK via Digitalmars-d-learn
On Thursday, 1 February 2024 at 03:20:31 UTC, dunkelheit wrote: !!! 5 html body h1 hello diet -iframe("hola.html") please help me :') Try ``` html body h1 hello diet iframe(src="hola.html") ```

how can I load html files and not .dt or diet files in vibe.d

2024-01-31 Thread dunkelheit via Digitalmars-d-learn
this is my code, I'm a begginer on vibe, and I want to use html and not diet files `import vibe.vibe; void main() { auto settings = new HTTPServerSettings; settings.port = 8080; settings.bindAddresses = ["::1", "127.0.0.1"]; auto listener = listenHTTP(settings, &

Re: Vibe.d download function, how to get callback when done or error?

2023-09-25 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/23/23 8:07 AM, j...@bloow.edu wrote: I'm using download(url, filename) to download files in vibe.d. The issue is that I do not know when the download is finished or errors. There is a callback for the streaming side but not for the file download. You might misunderstand how vi

Re: Vibe.d download function, how to get callback when done or error?

2023-09-24 Thread Christian Köstlin via Digitalmars-d-learn
On 24.09.23 12:01, j...@bloow.edu wrote: On Saturday, 23 September 2023 at 20:20:31 UTC, Christian Köstlin wrote: On 23.09.23 14:07, j...@bloow.edu wrote: I'm using download(url, filename) to download files in vibe.d. The issue is that I do not know when the download is finished or e

Re: Vibe.d download function, how to get callback when done or error?

2023-09-24 Thread Christian Köstlin via Digitalmars-d-learn
On 24.09.23 12:01, j...@bloow.edu wrote: On Saturday, 23 September 2023 at 20:20:31 UTC, Christian Köstlin wrote: On 23.09.23 14:07, j...@bloow.edu wrote: I'm using download(url, filename) to download files in vibe.d. The issue is that I do not know when the download is finished or e

Re: Vibe.d download function, how to get callback when done or error?

2023-09-24 Thread Joe--- via Digitalmars-d-learn
On Saturday, 23 September 2023 at 20:20:31 UTC, Christian Köstlin wrote: On 23.09.23 14:07, j...@bloow.edu wrote: I'm using download(url, filename) to download files in vibe.d. The issue is that I do not know when the download is finished or errors. There is a callback for the streaming

Re: Vibe.d download function, how to get callback when done or error?

2023-09-24 Thread Joe--- via Digitalmars-d-learn
On Saturday, 23 September 2023 at 15:09:13 UTC, Elias wrote: On Saturday, 23 September 2023 at 12:07:38 UTC, Joe wrote: I'm using download(url, filename) to download files in vibe.d. The issue is that I do not know when the download is finished or errors. There is a callback for the stre

Re: Vibe.d download function, how to get callback when done or error?

2023-09-24 Thread Imperatorn via Digitalmars-d-learn
On Saturday, 23 September 2023 at 12:07:38 UTC, Joe wrote: I'm using download(url, filename) to download files in vibe.d. The issue is that I do not know when the download is finished or errors. There is a callback for the streaming side but not for the file download. If you wa

Re: Vibe.d download function, how to get callback when done or error?

2023-09-23 Thread Christian Köstlin via Digitalmars-d-learn
On 23.09.23 14:07, j...@bloow.edu wrote: I'm using download(url, filename) to download files in vibe.d. The issue is that I do not know when the download is finished or errors. There is a callback for the streaming side but not for the file download. A small test program shows, that i

Re: Vibe.d download function, how to get callback when done or error?

2023-09-23 Thread Elias via Digitalmars-d-learn
On Saturday, 23 September 2023 at 12:07:38 UTC, Joe wrote: I'm using download(url, filename) to download files in vibe.d. The issue is that I do not know when the download is finished or errors. There is a callback for the streaming side but not for the file download. You don’t n

Vibe.d download function, how to get callback when done or error?

2023-09-23 Thread Joe--- via Digitalmars-d-learn
I'm using download(url, filename) to download files in vibe.d. The issue is that I do not know when the download is finished or errors. There is a callback for the streaming side but not for the file download.

Re: vibe.d mongo updateOne error

2023-04-23 Thread Ben Jones via Digitalmars-d-learn
On Friday, 21 April 2023 at 20:46:36 UTC, Ben Jones wrote: I'm trying to update an app from an older version of Vibe.d to a newer version that supports modern Mongo (0.9.7-alpha2) [...] Update: https://github.com/vibe-d/vibe.d/pull/2729

vibe.d mongo updateOne error

2023-04-21 Thread Ben Jones via Digitalmars-d-learn
I'm trying to update an app from an older version of Vibe.d to a newer version that supports modern Mongo (0.9.7-alpha2) I'm replacing an older call to collection.update() to collection.updateOne() instead. I had to change the options parameter to an updated struct, and it now com

Re: What makes vibe.d Incredibly Slow on a VPS?

2023-03-18 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/18/23 9:36 AM, seany wrote: But on a VPS server, the program outputs the first writeln line (not even the consequent req.form printouts), then apparently stops for several seconds ( 10 to 16) , and then suddenly starts working again. I see this in the log outputs. Why does this happen?

What makes vibe.d Incredibly Slow on a VPS?

2023-03-18 Thread seany via Digitalmars-d-learn
Consider this fraction of code Please: void createNewOwner(HTTPServerRequest req, HTTPServerResponse res) { writeln("NEW OWNER requests are : -");

Re: vibe.d

2023-03-11 Thread seany via Digitalmars-d-learn
On Saturday, 11 March 2023 at 12:56:16 UTC, Steven Schveighoffer wrote: On 3/11/23 5:12 AM, seany wrote: email.headers["Sender"] = "<"; // valid mail Looks like an extra `<`, is that correct? No, i mistyped that when i changed the email address after copying it in here. The original co

Re: vibe.d

2023-03-11 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/11/23 5:12 AM, seany wrote: email.headers["Sender"] = "<"; // valid mail Looks like an extra `<`, is that correct? Exception while handling request POST /createNewOwner: object.Exception@/home/monsoon/.dub/packages/vibe-d-0.9.6-alpha.1/vibe-d/tls/vibe/stream/openssl.d(668): Connectin

vibe.d

2023-03-11 Thread seany via Digitalmars-d-learn
cert not trusted or unknown issuer: /C=BE/O=GlobalSign nv-sa/OU=Root CA/CN=GlobalSign Root CA SSL validation result: 0 (20) OpenSSL error at ssl/statem/statem_clnt.c:1889: error:0A86:SSL routines::certificate verify failed (-) - HTTP server response: - HTTP/

Re: vibe.d community/forum/whatever ?

2023-01-26 Thread o3o via Digitalmars-d-learn
On Monday, 23 January 2023 at 01:51:41 UTC, Rey Valeza wrote: On Monday, 30 August 2021 at 02:39:06 UTC, someone wrote: https://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/ I've been reading vibe.d tour and some documentation today to get some first impressions. https://vibe

Re: vibe.d community/forum/whatever ?

2023-01-22 Thread Rey Valeza via Digitalmars-d-learn
On Monday, 30 August 2021 at 02:39:06 UTC, someone wrote: https://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/ I've been reading vibe.d tour and some documentation today to get some first impressions. https://vibed.org/community pointed to the link above ... but it seems

Re: vibe.d + mongoDB

2023-01-20 Thread Ruby The Roobster via Digitalmars-d-learn
On Friday, 20 January 2023 at 18:58:16 UTC, seany wrote: Hi I am googling to find some vibe.d and mongoDB tutorial. Are their some available? Thank you There is a nice book, titled D Web Development, that despite being 6 years old, is still mostly applicable to using vibe.d. The only

Re: vibe.d + mongoDB

2023-01-20 Thread Ben Jones via Digitalmars-d-learn
On Friday, 20 January 2023 at 18:58:16 UTC, seany wrote: Hi I am googling to find some vibe.d and mongoDB tutorial. Are their some available? Thank you There's a couple of examples like this one in main vibe repo in the examples directory: https://github.com/vibe-d/vibe.d/tree/m

vibe.d + mongoDB

2023-01-20 Thread seany via Digitalmars-d-learn
Hi I am googling to find some vibe.d and mongoDB tutorial. Are their some available? Thank you

Re: How to Add CSS and JS to vibe.d templates

2023-01-19 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/19/23 11:44 PM, seany wrote: Hi Howcan one add CSS and JS to vibe.d templates? Here is my setup (vibe.d project initiated with dub using dub init myproject vibe.d): ./public: main.css  main.js ./source: app.d ./views: auth2fa.dt  fail.dt  login.dt  pair.dt  passfail.dt  userfail.dt

How to Add CSS and JS to vibe.d templates

2023-01-19 Thread seany via Digitalmars-d-learn
Hi Howcan one add CSS and JS to vibe.d templates? Here is my setup (vibe.d project initiated with dub using dub init myproject vibe.d): ./public: main.css main.js ./source: app.d ./views: auth2fa.dt fail.dt login.dt pair.dt passfail.dt userfail.dt I am trying to add a css file

Re: Vibe.d Diet Templatesand Forms

2023-01-19 Thread seany via Digitalmars-d-learn
On Friday, 20 January 2023 at 01:32:04 UTC, Steven Schveighoffer wrote: On 1/19/23 6:24 PM, seany wrote: [...] Did you mean to include straight HTML here? I don't think that is supported. [...] You are indeed right. The Link was a problem, and removing the link actually have sorted the i

Re: Vibe.d Diet Templatesand Forms

2023-01-19 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/19/23 6:24 PM, seany wrote: Hello Please consider this diet template:     doctype html     html(lang="es", dir="ltr")     head     meta(name="viewport", content="width=device-width, user-scalable=no, initial-scale=1.0")     meta(charset="utf-8

Vibe.d Diet Templatesand Forms

2023-01-19 Thread seany via Digitalmars-d-learn
Hello Please consider this diet template: doctype html html(lang="es", dir="ltr") head meta(name="viewport", content="width=device-width, user-scalable=no, initial-scale=1.0") meta(charset="utf-8") link(rel="stylesheet

Re: Vibe.d serve files from filesystem

2023-01-12 Thread evilrat via Digitalmars-d-learn
is problem differently? Thanks in advance. eXo You will probably need to write a custom route handler that handles some authentication and returns files in response to a user. Since vibe.d routes handled in order you will need to add such route before generic '*' route. Take a look a

Vibe.d serve files from filesystem

2023-01-11 Thread eXodiquas via Digitalmars-d-learn
Hello everyone, I build a web tool that allows people to upload some files. Those files should not be public, so I copy them into a folder hidden away on the filesystem. But, I want an authenticated user to be able to look at them. Those files are PDFs and mp3/4s. So my idea was to use an `if

Re: Vibe.d MongoDB database connection

2022-12-26 Thread Adam D Ruppe via Digitalmars-d-learn
On Monday, 26 December 2022 at 21:32:51 UTC, eXodiquas wrote: I looked a bit closer into the problem and I found an issue in the vibe.d repository that states that the current version of vibe.d is not compatible with MongoDB version >= 5.1 the mongo driver in the standalone package sha

Re: Vibe.d MongoDB database connection

2022-12-26 Thread eXodiquas via Digitalmars-d-learn
o the problem and I found an issue in the vibe.d repository that states that the current version of vibe.d is not compatible with MongoDB version >= 5.1 https://github.com/vibe-d/vibe.d/issues/2693. In the same comment there is also a hint that a fix is already merged into vibe.d. I'll

Vibe.d MongoDB database connection

2022-12-25 Thread eXodiquas via Digitalmars-d-learn
connection for my application. I'm running vibe.d on version 0.9.5. ```d this.client = connectMongoDB("mongodb://root:abc@127.0.0.1:27017"); auto db = this.client.getDatabase("test"); MongoCollection users = db["users"]; foreach(d; users.find(Bson.emptyObject))

Re: Poste some interesting vibe.d webpages

2022-09-23 Thread Alain De Vos via Digitalmars-d-learn
Note. How to do authentications & sessions ,is important, but badly described.

Re: Poste some interesting vibe.d webpages

2022-09-22 Thread Alain De Vos via Digitalmars-d-learn
It's possible to remove the "@" annotation & use the default names of functions for the vibe framework, E.g, ``` final class WebChat { // GET / void get() { render!("index.dt", names); } void getEdit(string myid) { int id = myid.to!int; string firs

Re: Poste some interesting vibe.d webpages

2022-09-20 Thread Ben Jones via Digitalmars-d-learn
On Friday, 9 September 2022 at 13:40:45 UTC, Alain De Vos wrote: I find documentation of vibe.d between worse and bad, while the framework is relative OK. There are a few good links on the internet. I post two of them. Feel free to add other web links in order to increase our knowledge

Re: Poste some interesting vibe.d webpages

2022-09-20 Thread David via Digitalmars-d-learn
On Wednesday, 14 September 2022 at 19:34:01 UTC, Alain De Vos wrote: Although the framework is good. There is no community. Or general acceptance. Which is a pitty. Currently I ask myself how to do "sessions" with vibe.d. Hi Alain, I'm new to D and looking at vibe as well but

Re: Poste some interesting vibe.d webpages

2022-09-14 Thread Alain De Vos via Digitalmars-d-learn
Although the framework is good. There is no community. Or general acceptance. Which is a pitty. Currently I ask myself how to do "sessions" with vibe.d.

Poste some interesting vibe.d webpages

2022-09-09 Thread Alain De Vos via Digitalmars-d-learn
I find documentation of vibe.d between worse and bad, while the framework is relative OK. There are a few good links on the internet. I post two of them. Feel free to add other web links in order to increase our knowledge. https://vibed.org/blog/posts/a-scalable-chat-room-service-in-d https

Vibe.d conectting to a mongo replica set

2022-07-22 Thread Bogdan Szabo via Digitalmars-d-learn
Hello everyone, I recently seen that vibe.d can't connect to a mongo replica set and it looks that is a missing feature in the library: https://github.com/vibe-d/vibe.d/blob/7604eea772b1a733f7bfd16591ddc5bd37850bd9/mongodb/vibe/db/mongo/connection.d#L152 Does anyone uses vibe.d w

Re: vibe.d Serialize/Deserialize SumType to/from json

2022-07-04 Thread Paul Backus via Digitalmars-d-learn
On Monday, 4 July 2022 at 11:35:24 UTC, Antonio wrote: (or a way for creating a custom struct "inheriting" SumType with serialization capabilities)? You can "inherit" from a struct using `alias this`: ```d struct CustomStruct { SumType!(A, B, C) unwrap; alias unwrap this; // seria

vibe.d Serialize/Deserialize SumType to/from json

2022-07-04 Thread Antonio via Digitalmars-d-learn
D offers `SumType` struct to manage tagged Union types. But there is no support for managing it's Json serialization/deserialization (using vibe.d) Is it a way to add `fromRepresentation` and `toRepresentation` to `SumType` (or a way for creating a custom struct "inheriting"

vibe.d community/forum/whatever ?

2022-06-30 Thread Orfeo via Digitalmars-d-learn
https://forum.dlang.org/post/gbpasireizpjfifmq...@forum.dlang.org On Monday, 30 August 2021 at 12:51:38 UTC, someone wrote: On Monday, 30 August 2021 at 10:37:38 UTC, Steven Schveighoffer wrote: It used to be moderated somewhat, but I think they gave up (99% of the messages were porn or spam)

how to set REST path for gcloud api in vibe.d?

2022-06-14 Thread MichaelBi via Digitalmars-d-learn
I need to use gcloud NLP api which has the url and endpoint like this "https://language.googleapis.com/v1beta2/documents:analyzeSentiment";. The ":" between documents and analyzeSentiment make a lot trouble for me. Just don't know how to setup the @path in RestInterface for such endpoint. I tried

Re: vibe.d requestHTTP in static this causes infinite loop?

2022-05-20 Thread Vijay Nayar via Digitalmars-d-learn
tion would cause an infinite loop? I am not experienced with vibe.d. 'static this' is executed per thread. If requestHTTP starts a new thread, then I can see how you would be in an infinite loop. I wonder whether it should be 'shared static this' (which is executed once per progra

Re: vibe.d requestHTTP in static this causes infinite loop?

2022-05-19 Thread bauss via Digitalmars-d-learn
tion would cause an infinite loop? I am not experienced with vibe.d. 'static this' is executed per thread. If requestHTTP starts a new thread, then I can see how you would be in an infinite loop. I wonder whether it should be 'shared static this' (which is executed once per p

Re: vibe.d requestHTTP in static this causes infinite loop?

2022-05-19 Thread Ali Çehreli via Digitalmars-d-learn
On 5/19/22 16:44, Vijay Nayar wrote: > If I remove the call from `static this()`, then the web call works as > normal. Any idea why calling vibe.d's `requestHTTP` function inside of a > module's static construction would cause an infinite loop? I am not experienced with vi

vibe.d requestHTTP in static this causes infinite loop?

2022-05-19 Thread Vijay Nayar via Digitalmars-d-learn
I've encountered an unusual behavior that I have no good explanation for. Consider the following code example: ```d import vibe.core.log : logInfo; import vibe.http.client : requestHTTP, HTTPClientRequest, HTTPClientResponse; import vibe.http.common : HTTPMethod; import vibe.stream.operations

Re: vibe.d ubuntu 22.04 ssl linking error

2022-05-18 Thread Gavin Gray via Digitalmars-d-learn
On Wednesday, 18 May 2022 at 20:41:53 UTC, Gavin Gray wrote: After upgrading to ubuntu 22.04, I get the linker error below for a project that previously built successfully. OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022) LDC - the LLVM D compiler (1.27.1): based on DMD v2.097.

vibe.d ubuntu 22.04 ssl linking error

2022-05-18 Thread Gavin Gray via Digitalmars-d-learn
After upgrading to ubuntu 22.04, I get the linker error below for a project that previously built successfully. OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022) LDC - the LLVM D compiler (1.27.1): based on DMD v2.097.2 and LLVM 12.0.1 built with LDC - the LLVM D compiler (1.27

Re: Help, in vibe.d, how to get configure var of mongodb in heroku?

2022-05-13 Thread rikki cattermole via Digitalmars-d-learn
rate pages by using vibe.d Its been a while since I used vibe.d but I think just storing it in a variable first would be enough. https://vibed.org/api/vibe.http.server/render

Re: Help, in vibe.d, how to get configure var of mongodb in heroku?

2022-05-13 Thread MichaelBi via Digitalmars-d-learn
On Friday, 13 May 2022 at 06:43:30 UTC, rikki cattermole wrote: On 13/05/2022 6:23 PM, MichaelBi wrote:     render!("index.dt", showData()); There ya go, template arguments are run at compile time. Unh, then how to dynamically generate pages by using vibe.d

Re: Help, in vibe.d, how to get configure var of mongodb in heroku?

2022-05-12 Thread rikki cattermole via Digitalmars-d-learn
On 13/05/2022 6:23 PM, MichaelBi wrote:     render!("index.dt", showData()); There ya go, template arguments are run at compile time.

Re: Help, in vibe.d, how to get configure var of mongodb in heroku?

2022-05-12 Thread MichaelBi via Digitalmars-d-learn
On Friday, 13 May 2022 at 06:12:01 UTC, rikki cattermole wrote: Okay that is fine, now we need to see where showData is being called. thanks, here's the code: import vibe.vibe; import std.process; import std.conv : to; void main() { auto settings = new HTTPServerSettings; se

Re: Help, in vibe.d, how to get configure var of mongodb in heroku?

2022-05-12 Thread rikki cattermole via Digitalmars-d-learn
Okay that is fine, now we need to see where showData is being called.

Re: Help, in vibe.d, how to get configure var of mongodb in heroku?

2022-05-12 Thread MichaelBi via Digitalmars-d-learn
On Friday, 13 May 2022 at 06:01:29 UTC, rikki cattermole wrote: On 13/05/2022 5:52 PM, MichaelBi wrote: struct Camera{ @name("_id") BsonObjectID id; // represented as "_id" in the database string brand; string model; } the structure is mapping of database field structure. how

Re: Help, in vibe.d, how to get configure var of mongodb in heroku?

2022-05-12 Thread rikki cattermole via Digitalmars-d-learn
On 13/05/2022 5:52 PM, MichaelBi wrote: struct Camera{ @name("_id") BsonObjectID id; // represented as "_id" in the database string brand; string model; } the structure is mapping of database field structure. how to resolve? That code isn't the cause of your issue (its fine, n

Re: Help, in vibe.d, how to get configure var of mongodb in heroku?

2022-05-12 Thread MichaelBi via Digitalmars-d-learn
On Friday, 13 May 2022 at 05:41:33 UTC, rikki cattermole wrote: On 13/05/2022 5:18 PM, MichaelBi wrote:     i have code here:     auto uri = environment.get("MONGODB_URI");     MongoClient conn = connectMongoDB(uri);     MongoDatabase eqpdb = conn.getDatabase("MbEqpHeroku"); the

Re: Help, in vibe.d, how to get configure var of mongodb in heroku?

2022-05-12 Thread rikki cattermole via Digitalmars-d-learn
On 13/05/2022 5:18 PM, MichaelBi wrote:     i have code here:     auto uri = environment.get("MONGODB_URI");     MongoClient conn = connectMongoDB(uri);     MongoDatabase eqpdb = conn.getDatabase("MbEqpHeroku"); the "MONGODB_URI" showed above already put into heroku's app config

Help, in vibe.d, how to get configure var of mongodb in heroku?

2022-05-12 Thread MichaelBi via Digitalmars-d-learn
there are online documents of heroku on how to access config var value from code, and several code samples without D. link here: https://devcenter.heroku.com/articles/config-vars#accessing-config-var-values-from-code. i have code here: auto uri = environment.get("MONGODB_URI");

Re: Deploy vibe.d application on Heroku : App not compatible with buildpack

2022-05-09 Thread MichaelBi via Digitalmars-d-learn
On Monday, 28 June 2021 at 16:25:20 UTC, vnr wrote: On Monday, 28 June 2021 at 16:14:07 UTC, Andre Pany wrote: On Monday, 28 June 2021 at 13:53:05 UTC, vnr wrote: [...] Hi, Heroku is Cloud Foundry? If yes, you can make use of the binary buildpack or deploying your app as container too. Ki

Re: error connecting to mongodb atlas with vibe.d

2022-05-01 Thread Arjan via Digitalmars-d-learn
On Saturday, 30 April 2022 at 14:29:56 UTC, notsteve wrote: Hi, I am trying to setup a simple webserver in D using vibe.d (0.9.4) and want to use mongoDB as a database. To achieve this, I've set up a mongoDB atlas instance with the following command inside the standard app.d file creat

Re: error connecting to mongodb atlas with vibe.d

2022-04-30 Thread Tejas via Digitalmars-d-learn
On Saturday, 30 April 2022 at 14:29:56 UTC, notsteve wrote: Hi, I am trying to setup a simple webserver in D using vibe.d (0.9.4) and want to use mongoDB as a database. To achieve this, I've set up a mongoDB atlas instance with the following command inside the standard app.d file creat

error connecting to mongodb atlas with vibe.d

2022-04-30 Thread notsteve via Digitalmars-d-learn
Hi, I am trying to setup a simple webserver in D using vibe.d (0.9.4) and want to use mongoDB as a database. To achieve this, I've set up a mongoDB atlas instance with the following command inside the standard app.d file created by vibe.d ``` string MongoURL = "mongodb:

Re: Source code for vibe.d listenTCP()

2022-03-08 Thread Chris Piker via Digitalmars-d-learn
On Sunday, 27 February 2022 at 01:45:35 UTC, Adam D Ruppe wrote: My dpldocs.info search engine is not great right now but it can sometimes help find these things: http://search.dpldocs.info/?q=listenTCP Hi Adam Your site has been super helpful given the state of the vibe.d docs. It only

  1   2   3   4   5   6   7   8   9   >