Re: How can overloads be distinguished on attributes alone?

2023-08-01 Thread Quirin Schroll via Digitalmars-d-learn
On Monday, 31 July 2023 at 18:15:25 UTC, Jonathan M Davis wrote: On Monday, July 31, 2023 4:55:44 AM MDT Quirin Schroll via Digitalmars-d-learn wrote: Apparently, functions can be overloaded solely distinguished by attributes: ```d void f(ref int x) pure { x = 1; } void f(ref int x) { x = 2

Re: how to make pragma(lib)'s path relative to the package's path?

2023-08-01 Thread ryuukk_ via Digitalmars-d-learn
On Monday, 31 July 2023 at 08:58:43 UTC, Johan wrote: On Monday, 31 July 2023 at 00:32:07 UTC, ryuukk_ wrote: I reworked the PR, here is the new link: https://github.com/dlang/dmd/pull/15479 It basically add support for ``pragma(lib, "local:bin/lib.a");`` Makes things easier, and doesn't ch

HTTP Post Body Parameters

2023-08-01 Thread Vahid via Digitalmars-d-learn
Hi, I want to submit a request to server with "x-www-form-urlencoded" header. This is the simplified version of my code: auto http = HTTP("https://myurl.com/api";); http.addRequestHeader("Content-Type", "application/x-www-form-urlencoded"); http.addRequestHeader("Authorization",

Re: HTTP Post Body Parameters

2023-08-01 Thread Ivan Kazmenko via Digitalmars-d-learn
On Tuesday, 1 August 2023 at 23:57:29 UTC, Vahid wrote: I want to submit a request to server with "x-www-form-urlencoded" header. Isn't https://dlang.org/library/std/net/curl/post.html what you need?

Re: HTTP Post Body Parameters

2023-08-01 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/1/23 7:57 PM, Vahid wrote: Hi, I want to submit a request to server with "x-www-form-urlencoded" header. This is the simplified version of my code:     auto http = HTTP("https://myurl.com/api";);     http.addRequestHeader("Content-Type", "application/x-www-form-urlencoded");     ht

Re: Thread/Task cancellation

2023-08-01 Thread Gjiergji via Digitalmars-d-learn
On Friday, 28 July 2023 at 20:13:24 UTC, Ruby The Roobster wrote: This is the only way I could think of doing this, since exceptions don't travel up the threads. Thank you for pointing me in the right direction. I think that exceptions are not really necessary in D for cancellation, as I sai

Re: openssl 1.1 vs. 3.0 for vibe.d:tls on Ubuntu 22.04

2023-08-01 Thread Mathias LANG via Digitalmars-d-learn
On Friday, 28 July 2023 at 08:56:17 UTC, Guillaume Lathoud wrote: Hello, some context first: I recently updated a server to Ubuntu 22.04 which appears to have only openssl 3.0.2 installed. Dub could compile my project, but could not link it anymore, as the D code seemed to be expecting openss