Re: How do I create classes dynamically?

2021-04-14 Thread Mario via Digitalmars-d-learn
, using Object.factory, but I would not recommend that, it's brittle and doesn't always work. -Steve Too bad. Nevertheless, thank you for your quick answer to my question. -Mario

How do I create classes dynamically?

2021-04-14 Thread Mario via Digitalmars-d-learn
Maybe I am just too short in D, but I wanted to find out if it is possible to create classes dynamically. My problem is, I just don't know where to start reading. Maybe at mixin templates? CreateClassWithName!("MyDynamicClassName"); should create the following class to work with dynamically:

Re: Error compiling with DUB (dmd) since yesterday dub update

2018-03-10 Thread Mario via Digitalmars-d-learn
On Sunday, 11 March 2018 at 07:11:09 UTC, rikki cattermole wrote: On 11/03/2018 8:02 PM, Mario wrote: On Sunday, 11 March 2018 at 06:59:32 UTC, rikki cattermole wrote: On 11/03/2018 7:55 PM, Mario wrote: [...] Are you aware that it is compiling with ldc? Actually, I didn't even reali

Re: Error compiling with DUB (dmd) since yesterday dub update

2018-03-10 Thread Mario via Digitalmars-d-learn
On Sunday, 11 March 2018 at 06:59:32 UTC, rikki cattermole wrote: On 11/03/2018 7:55 PM, Mario wrote: I upgraded yesterday to "DUB version 1.8.0, built on Mar  3 2018" using "4.15.6-1-ARCH". I got an error while compiling a project which uses the following dependencies:

Error compiling with DUB (dmd) since yesterday dub update

2018-03-10 Thread Mario via Digitalmars-d-learn
I upgraded yesterday to "DUB version 1.8.0, built on Mar 3 2018" using "4.15.6-1-ARCH". I got an error while compiling a project which uses the following dependencies: dependency "vibe-d" version="~>0.8.3-beta.1" dependency "vibe-d:tls" version="~>0.8.3-beta.1" versions "VibeDefaultMain" su

VibeD Rest Interface Generator

2018-03-02 Thread Mario via Digitalmars-d-learn
7;d like to know how can I set it to receive the HTTP(s) request, analyze the body and get the data through a database (we will probably use MongoDB). If you can help me with this, I'd be grateful. Best regards, Mario :-)

Re: Caesar Cipher

2018-02-11 Thread Mario via Digitalmars-d-learn
On Sunday, 11 February 2018 at 18:55:44 UTC, Seb wrote: On Sunday, 11 February 2018 at 18:50:25 UTC, Mario wrote: On Sunday, 11 February 2018 at 18:31:35 UTC, Seb wrote: On Sunday, 11 February 2018 at 18:01:20 UTC, Mario wrote: Hello there! I know deep Java, JavaScript, PHP, etc. but as you

Re: Caesar Cipher

2018-02-11 Thread Mario via Digitalmars-d-learn
On Sunday, 11 February 2018 at 18:55:14 UTC, Cym13 wrote: On Sunday, 11 February 2018 at 18:50:25 UTC, Mario wrote: On Sunday, 11 February 2018 at 18:31:35 UTC, Seb wrote: On Sunday, 11 February 2018 at 18:01:20 UTC, Mario wrote: Hello there! I know deep Java, JavaScript, PHP, etc. but as you

Re: Caesar Cipher

2018-02-11 Thread Mario via Digitalmars-d-learn
On Sunday, 11 February 2018 at 18:28:08 UTC, Cym13 wrote: On Sunday, 11 February 2018 at 18:01:20 UTC, Mario wrote: Hello there! I know deep Java, JavaScript, PHP, etc. but as you all probably know, that's high-level and most of them only use the heap memory. So I'm new to the

Re: Caesar Cipher

2018-02-11 Thread Mario via Digitalmars-d-learn
On Sunday, 11 February 2018 at 18:31:35 UTC, Seb wrote: On Sunday, 11 February 2018 at 18:01:20 UTC, Mario wrote: Hello there! I know deep Java, JavaScript, PHP, etc. but as you all probably know, that's high-level and most of them only use the heap memory. [...] If you want to

Caesar Cipher

2018-02-11 Thread Mario via Digitalmars-d-learn
Hello there! I know deep Java, JavaScript, PHP, etc. but as you all probably know, that's high-level and most of them only use the heap memory. So I'm new to the wonderful world of low-level and the stack-heap. I started a week ago learning D (which by the moment is being easy for me) but I'm

Re: Profiling after exit()

2017-07-28 Thread Mario Kröplin via Digitalmars-d-learn
On Friday, 28 July 2017 at 09:02:10 UTC, Temtaime wrote: There's no "gracefully" way to kill a thread. If your thread cannot join, then you're doing something wrong Our programs are intended to run "forever". 24/7 servers.

Re: Profiling after exit()

2017-07-27 Thread Mario Kröplin via Digitalmars-d-learn
On Thursday, 27 July 2017 at 14:44:31 UTC, Temtaime wrote: Also there was an issue that profiling doesn't work with multi-threaded apps and leads to a crash. Don't know if it is fixed. Was fixed two years ago: http://forum.dlang.org/post/mia2kf$djb$1...@digitalmars.com

Get systype for FTP-cmd "TYPE"

2012-05-05 Thread mario
I'm working on a small FTP-server and I'm now have to implement the "TYPE"- command which return the type of the system (for instance "UNIX L8")... but is there any chance to get type of the system using D? Is there any getSysType()- function? I was unable to find anything like that in Phobos...

Re: associative arrays: to sort or not to sort?

2010-07-21 Thread Mario Kroeplin
> >> the correct solution is to make the check order independent. For > >> example: > >> string s = CallReturningJSON(); > >> s = replace(s,`"a":23.54`, `X`); > >> s = replace(s,`"b":0.0012`, `X`); > >> s = replace(s,`{"nested":{X,X}}`, `X`); > >> s = replace(s,`"goodbye":[true,"or",false,["test",4

Re: associative arrays: to sort or not to sort?

2010-07-20 Thread Mario Kroeplin
> Unless JSON requiers that the keys be in some order, No, JSON does not require the names of an object to be in alphabetical order. > the correct solution is to make the check order independent. For example: > string s = CallReturningJSON(); > s = replace(s,`"a":23.54`, `X`); > s = replace(s,`"b

associative arrays: to sort or not to sort?

2010-07-18 Thread Mario Kroeplin
Have a look at the unittest of std.json: the only non-trivial test is commented out as "currently broken". Smells like std.json has deep problems when it comes to real-world examples. But then: running the unittest shows that the actual result is {"goodbye":[true,"or",false,["test",42,{"nested":{