Re: surviving wasm

2023-12-14 Thread ryuukk_ via Digitalmars-d-learn
On Wednesday, 13 December 2023 at 20:40:20 UTC, monkyyy wrote: so long term planning on wasm raylib; I want compatibility with the good parts of the std, the std is causal about using libc while ldc-wasm half-baked implication is missing a bunch of basically worthless symbols but given the std

Re: surviving wasm

2023-12-14 Thread ryuukk_ via Digitalmars-d-learn
I forgot to link this nice website that got me started with WASM: https://schellcode.github.io/webassembly-without-emscripten

Re: Checking path name

2023-12-14 Thread Anonymouse via Digitalmars-d-learn
On Thursday, 14 December 2023 at 03:58:37 UTC, Joel wrote: If I get user input, for example, how do I check to see if it's a valid path, like, file name. ```d // something like this: if (getUserInput.isValidPath) { ... } ``` Is that not how it works?

Re: Checking path name

2023-12-14 Thread Joel via Digitalmars-d-learn
On Thursday, 14 December 2023 at 08:47:49 UTC, Anonymouse wrote: On Thursday, 14 December 2023 at 03:58:37 UTC, Joel wrote: If I get user input, for example, how do I check to see if it's a valid path, like, file name. ```d // something like this: if (getUserInput.isValidPath) { ... } ```

Re: D is a great language, but I've had a bad experience getting started

2023-12-14 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 15/12/2023 2:02 AM, Renato wrote: How do you tell dub to "build and link in a single step"? This should do it: ``--combined --build-mode=allAtOnce``

Re: D is a great language, but I've had a bad experience getting started

2023-12-14 Thread Renato via Digitalmars-d-learn
On Thursday, 14 December 2023 at 12:59:04 UTC, Hipreme wrote: Yeah, D has a really bad experience in MacOS. If you want to use it on mac, I suggest using LDC. And the package managers doesn't do D justice. You want to get the zip and setup the environment variables yourself, this is the

Re: D is a great language, but I've had a bad experience getting started

2023-12-14 Thread Renato via Digitalmars-d-learn
On Thursday, 14 December 2023 at 13:12:06 UTC, Richard (Rikki) Andrew Cattermole wrote: On 15/12/2023 2:02 AM, Renato wrote: How do you tell dub to "build and link in a single step"? This should do it: ``--combined --build-mode=allAtOnce`` I run this: ``` dub build --combined

Re: D is a great language, but I've had a bad experience getting started

2023-12-14 Thread Sergey via Digitalmars-d-learn
On Thursday, 14 December 2023 at 13:27:29 UTC, Renato wrote: On Thursday, 14 December 2023 at 13:12:06 UTC, Richard (Rikki) My build options are currently: ``` "dflags-dmd": [ "-v"], "lflags": ["-ld_classic"] ``` I tried some variations but nothing worked. Previously for macOS it

Re: D is a great language, but I've had a bad experience getting started

2023-12-14 Thread bachmeier via Digitalmars-d-learn
On Thursday, 14 December 2023 at 12:59:32 UTC, Renato wrote: On Thursday, 14 December 2023 at 12:30:35 UTC, Renato wrote: The other compilers were also easily installable on Kubuntu using snap. It seems that the Ubuntu "snap"s are not being updated for a few years?? It seems some of

Re: D is a great language, but I've had a bad experience getting started

2023-12-14 Thread Hipreme via Digitalmars-d-learn
On Thursday, 14 December 2023 at 12:30:35 UTC, Renato wrote: Hi, I have been trying D for the last few days... I am only writing because I really, really like the language! It's absolutely stunning how the features it has are simple, well designed and at the same time incredibly advanced! All

Re: D is a great language, but I've had a bad experience getting started

2023-12-14 Thread Renato via Digitalmars-d-learn
On Thursday, 14 December 2023 at 12:30:35 UTC, Renato wrote: The other compilers were also easily installable on Kubuntu using snap. It seems that the Ubuntu "snap"s are not being updated for a few years?? It seems some of my problems are related to the very old versions I got with

Re: D is a great language, but I've had a bad experience getting started

2023-12-14 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
Welcome! Regarding the problems with dub on OSX, that'll be due to separate build + link steps. It should work ok if you build and link in a single step with the workaround applied. DC is an environment variable that should point to the D compiler. As a variable this particular one

Re: D is a great language, but I've had a bad experience getting started

2023-12-14 Thread Renato via Digitalmars-d-learn
On Thursday, 14 December 2023 at 12:59:34 UTC, Richard (Rikki) Andrew Cattermole wrote: Welcome! Regarding the problems with dub on OSX, that'll be due to separate build + link steps. It should work ok if you build and link in a single step with the workaround applied. DC is an

D is a great language, but I've had a bad experience getting started

2023-12-14 Thread Renato via Digitalmars-d-learn
Hi, I have been trying D for the last few days... I am only writing because I really, really like the language! It's absolutely stunning how the features it has are simple, well designed and at the same time incredibly advanced! All with an extremely fast compiler, which is almost

Re: Checking path name

2023-12-14 Thread cc via Digitalmars-d-learn
On Thursday, 14 December 2023 at 09:38:30 UTC, Joel wrote: On Thursday, 14 December 2023 at 08:47:49 UTC, Anonymouse wrote: On Thursday, 14 December 2023 at 03:58:37 UTC, Joel wrote: https://dlang.org/phobos/std_path.html#isValidPath https://dlang.org/phobos/std_path.html#.isValidFilename

Re: Advent of Code 2023

2023-12-14 Thread Siarhei Siamashka via Digitalmars-d-learn
On Sunday, 3 December 2023 at 15:04:09 UTC, Siarhei Siamashka wrote: On Saturday, 2 December 2023 at 14:35:19 UTC, Sergey wrote: Some other solutions that could be worth to check: https://github.com/andrewlalis/AdventOfCode2023/blob/main/day_1/solution.d

Re: Checking path name

2023-12-14 Thread Basile B. via Digitalmars-d-learn
On Thursday, 14 December 2023 at 03:58:37 UTC, Joel wrote: If I get user input, for example, how do I check to see if it's a valid path, like, file name. ```d // something like this: if (getUserInput.isValidPath) { ... } ``` https://dlang.org/phobos/std_file.html#exists

Re: vibe-d REST API: POSTing a struct

2023-12-14 Thread aj_dlang via Digitalmars-d-learn
On Saturday, 2 December 2023 at 12:39:01 UTC, bomat wrote: On Friday, 1 December 2023 at 19:18:19 UTC, bomat wrote: So my question is, is it possible to have vibe-d parse the request body into a struct "implicitly"? I'm gonna answer my own question here, it's `@bodyParam`.