Re: Command Line Utility Library

2016-08-15 Thread Jacob Carlborg via Digitalmars-d-learn
On 2016-08-16 04:29, Jonathan Marler wrote: Seb how in the heck do you know about all these libraries, geeze. Currently Dub has so few libraries that it's possible to manually scan the list. -- /Jacob Carlborg

Re: Template type reduction

2016-08-15 Thread Engine Machine via Digitalmars-d-learn
On Monday, 15 August 2016 at 19:40:37 UTC, Steven Schveighoffer wrote: On 8/15/16 3:31 PM, Engine Machine wrote: Suppose I have a templated type like struct S(T) { int x; static if (T is Y) int y; } I would like to be able to create a reference to S(T) for any T, struct Q { S!* s; // Can

Re: new XML and JSON libs and replacement of std.net.curl

2016-08-15 Thread rikki cattermole via Digitalmars-d-learn
On 16/08/2016 3:35 AM, Seb wrote: On Monday, 15 August 2016 at 15:25:22 UTC, rikki cattermole wrote: On 16/08/2016 3:20 AM, Seb wrote: On Monday, 15 August 2016 at 15:04:29 UTC, rikki cattermole wrote: On 16/08/2016 3:01 AM, Oleg B wrote: As replacement of std.net.curl I found https://github.

Re: new XML and JSON libs and replacement of std.net.curl

2016-08-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, August 15, 2016 15:01:13 Oleg B via Digitalmars-d-learn wrote: > Hello. > In std.xml docs I read that is deprecated, and std.net.curl can > be deprecated too (not remember here I read about std.net.curl). > About std.json I read what it's has slow (de)serialization. std.json and std.xml

Re: Command Line Utility Library

2016-08-15 Thread Jonathan Marler via Digitalmars-d-learn
On Monday, 15 August 2016 at 10:48:11 UTC, Seb wrote: Are you trying to parse arguments? There's a lot of good stuff for it already: https://dlang.org/phobos/std_getopt.html https://code.dlang.org/packages/darg https://blog.thecybershadow.net/2014/08/05/ae-utils-funopt/ For configuration file

Re: Command Line Utility Library

2016-08-15 Thread Seb via Digitalmars-d-learn
On Tuesday, 16 August 2016 at 01:23:16 UTC, UDW wrote: On Monday, 15 August 2016 at 10:48:11 UTC, Seb wrote: [...] Thanks for the suggestions Seb, https://blog.thecybershadow.net/2014/08/05/ae-utils-funopt/ looks very nice :). I just thought there would be a standard library, stdclib, phobo

Re: Command Line Utility Library

2016-08-15 Thread UDW via Digitalmars-d-learn
On Monday, 15 August 2016 at 10:48:11 UTC, Seb wrote: Are you trying to parse arguments? There's a lot of good stuff for it already: https://dlang.org/phobos/std_getopt.html https://code.dlang.org/packages/darg https://blog.thecybershadow.net/2014/08/05/ae-utils-funopt/ For configuration file

Re: Template type reduction

2016-08-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/15/16 3:31 PM, Engine Machine wrote: Suppose I have a templated type like struct S(T) { int x; static if (T is Y) int y; } I would like to be able to create a reference to S(T) for any T, struct Q { S!* s; // Can hold any type of S. } and be able to access s.x, since it is common to al

Template type reduction

2016-08-15 Thread Engine Machine via Digitalmars-d-learn
Suppose I have a templated type like struct S(T) { int x; static if (T is Y) int y; } I would like to be able to create a reference to S(T) for any T, struct Q { S!* s; // Can hold any type of S. } and be able to access s.x, since it is common to all S. Can D do anything like this? It is so

Re: new XML and JSON libs and replacement of std.net.curl

2016-08-15 Thread ikod via Digitalmars-d-learn
On Monday, 15 August 2016 at 15:01:13 UTC, Oleg B wrote: Hello. As replacement of std.net.curl I found https://github.com/ikod/dlang-requests. Who know's about this lib? Is this good replacement of std.net.curl? Maybe if I need json and http requests I must fully use vibe for these things?

Re: new XML and JSON libs and replacement of std.net.curl

2016-08-15 Thread Lodovico Giaretta via Digitalmars-d-learn
On Monday, 15 August 2016 at 15:01:13 UTC, Oleg B wrote: Hello. In std.xml docs I read that is deprecated, [...] For XML I found this project https://github.com/lodo1995/experimental.xml. Is this really candidate to std, or author just called it as he want? Hi! I'm the developer of that XML

Re: new XML and JSON libs and replacement of std.net.curl

2016-08-15 Thread Seb via Digitalmars-d-learn
On Monday, 15 August 2016 at 15:25:22 UTC, rikki cattermole wrote: On 16/08/2016 3:20 AM, Seb wrote: On Monday, 15 August 2016 at 15:04:29 UTC, rikki cattermole wrote: On 16/08/2016 3:01 AM, Oleg B wrote: As replacement of std.net.curl I found https://github.com/ikod/dlang-requests. Who know's

Re: new XML and JSON libs and replacement of std.net.curl

2016-08-15 Thread rikki cattermole via Digitalmars-d-learn
On 16/08/2016 3:20 AM, Seb wrote: On Monday, 15 August 2016 at 15:04:29 UTC, rikki cattermole wrote: On 16/08/2016 3:01 AM, Oleg B wrote: As replacement of std.net.curl I found https://github.com/ikod/dlang-requests. Who know's about this lib? Is this good replacement of std.net.curl? Nope, n

Re: new XML and JSON libs and replacement of std.net.curl

2016-08-15 Thread Seb via Digitalmars-d-learn
On Monday, 15 August 2016 at 15:04:29 UTC, rikki cattermole wrote: On 16/08/2016 3:01 AM, Oleg B wrote: As replacement of std.net.curl I found https://github.com/ikod/dlang-requests. Who know's about this lib? Is this good replacement of std.net.curl? Nope, not a replacement. Why? I like i

Re: Multi-Thread message passing approach

2016-08-15 Thread Charles Hixson via Digitalmars-d-learn
I misunderstood the problem. The problem was that a dynamically sized array cannot be sent as a message. So this works: import std.concurrency; import std.stdio; import core.thread; enum tidMax = 10; struct Start { int tidCnt = 0; Tid[tidMax] tids; } struct Msg { int

new XML and JSON libs and replacement of std.net.curl

2016-08-15 Thread Oleg B via Digitalmars-d-learn
Hello. In std.xml docs I read that is deprecated, and std.net.curl can be deprecated too (not remember here I read about std.net.curl). About std.json I read what it's has slow (de)serialization. What I must use at this time? vibe.data.json has evolution https://github.com/s-ludwig/std_data_j

Re: new XML and JSON libs and replacement of std.net.curl

2016-08-15 Thread rikki cattermole via Digitalmars-d-learn
On 16/08/2016 3:01 AM, Oleg B wrote: Hello. In std.xml docs I read that is deprecated, and std.net.curl can be deprecated too (not remember here I read about std.net.curl). About std.json I read what it's has slow (de)serialization. What I must use at this time? vibe.data.json has evolution http

Re: Virus detected

2016-08-15 Thread Kagamin via Digitalmars-d-learn
On Monday, 15 August 2016 at 06:51:35 UTC, Joel wrote: Thanks rikki. Did you install it? Try to copy the installed files to a folder visible to windows defender, maybe only one file is a culprit - which one?

Re: Virus detected

2016-08-15 Thread Seb via Digitalmars-d-learn
On Monday, 15 August 2016 at 06:20:55 UTC, Joel wrote: I can't install DMD, because Windows defender says the install file has a virus and wipes it off. I'm using a Windows 10 pro OS. DMD 2.071.1 this seems to be a recent issue & at least you aren't alone with this problem: http://forum.dl

Re: Command Line Utility Library

2016-08-15 Thread Seb via Digitalmars-d-learn
On Monday, 15 August 2016 at 09:26:21 UTC, Jacob Carlborg wrote: On 2016-08-15 09:29, UDW wrote: Hi, I would like some options for a library, preferably json configurable, that helps with command line tool development. Doesn't have to be in D specifically. Currently I am using using std.ge

Re: Command Line Utility Library

2016-08-15 Thread Jacob Carlborg via Digitalmars-d-learn
On 2016-08-15 09:29, UDW wrote: Hi, I would like some options for a library, preferably json configurable, that helps with command line tool development. Doesn't have to be in D specifically. Currently I am using using std.getopt. I had a search in the DUB repos and in github but didn't really

Re: Caesar Cipher Cracking

2016-08-15 Thread Antonio Corbi via Digitalmars-d-learn
On Sunday, 14 August 2016 at 18:36:02 UTC, Stefan wrote: same code, just a little shorter. usage of ".array" more UFCS replaced cast with ".to" Wow Stefan! Thanks for your time, I'll have a look at it! Antonio

Using shared libraries for external scripts, looking for advice (windows)

2016-08-15 Thread Tofu Ninja via Digitalmars-d-learn
So this is kind of an open ended question, just looking for advice on doing it in general, if it's possible, and doing it specifically in D on windows. I am not super familiar with how shared libraries work so I had some questions. I would like to attempt to use D to write scripts for a game

Command Line Utility Library

2016-08-15 Thread UDW via Digitalmars-d-learn
Hi, I would like some options for a library, preferably json configurable, that helps with command line tool development. Doesn't have to be in D specifically. Currently I am using using std.getopt. I had a search in the DUB repos and in github but didn't really find anything appealing. t