Re: stri: string format/interpolation library for D. how to embed variables into string like shell scripts

2018-07-29 Thread Seb via Digitalmars-d-announce
On Sunday, 29 July 2018 at 14:55:46 UTC, Shigeki Karita wrote: This library is very similar to Scala or shell scripts. - https://github.com/ShigekiKarita/stri/tree/master - https://docs.scala-lang.org/overviews/core/string-interpolation.html ## example import stri : s; // runtime/compile-t

Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-07-29 Thread Nikos via Digitalmars-d-announce
Eg turn this into a function and try wrapping this instead: auto intp = interpreter(dmdEngine()); Actually, I manage to export the `interpret` method export: auto intp(char[] txt) { return interpreter(dmdEngine()).interpret(txt); } and tested it in ipython successfully.

Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-07-29 Thread Nikos via Digitalmars-d-announce
Ok, I made a stupid mistake. It works now. Thanks a lot!

stri: string format/interpolation library for D. how to embed variables into string like shell scripts

2018-07-29 Thread Shigeki Karita via Digitalmars-d-announce
This library is very similar to Scala or shell scripts. - https://github.com/ShigekiKarita/stri/tree/master - https://docs.scala-lang.org/overviews/core/string-interpolation.html ## example import stri : s; // runtime/compile-time variables auto a = 1; enum _a0 = "D-lang"; struct A { st

Re: On D in competitive programming

2018-07-29 Thread Ivan Kazmenko via Digitalmars-d-announce
On Sunday, 29 July 2018 at 07:51:00 UTC, Jim Balter wrote: Actually, map!something does not drop empty parentheses, so mentioning that does not help. Parentheses containing 0 or 1 arguments can be omitted ... and you omit them for 1 argument in 3 places, and no instances of omitted empty parent

Re: On D in competitive programming

2018-07-29 Thread Cym13 via Digitalmars-d-announce
On Sunday, 29 July 2018 at 07:51:00 UTC, Jim Balter wrote: On Saturday, 28 July 2018 at 21:33:04 UTC, Ivan Kazmenko wrote: [snip] 2. When you briefly explain templates I think it's important to mention that empty parentheses may be omitted to allow the reader to make the link between function!(

Re: Blogpost about the T.init problem

2018-07-29 Thread Jim Balter via Digitalmars-d-announce
On Wednesday, 11 July 2018 at 16:58:53 UTC, Greatsam4sure wrote: On Tuesday, 10 July 2018 at 13:41:56 UTC, FeepingCreature wrote: [...] Every language is plague with one bug or the order. For those will great love for the language they lend a helping hand to fixed the bug. I expect you to h

Re: Blogpost about the T.init problem

2018-07-29 Thread Jim Balter via Digitalmars-d-announce
On Wednesday, 11 July 2018 at 07:30:59 UTC, FeepingCreature wrote: On Tuesday, 10 July 2018 at 21:08:32 UTC, Cym13 wrote: First of all I must point that I would very much like to have seen a code actually producing an error in that article. Contrary to what is hinted just taking the struct and

Re: Blogpost about the T.init problem

2018-07-29 Thread Jim Balter via Digitalmars-d-announce
On Wednesday, 11 July 2018 at 16:54:18 UTC, Greatsam4sure wrote: On Tuesday, 10 July 2018 at 13:41:56 UTC, FeepingCreature wrote: [...] Sincerely speaking D language does not merit all these criticism. The magnitude of criticism on D language does not really make sense to me. I am yet to see

Re: On D in competitive programming

2018-07-29 Thread Jim Balter via Digitalmars-d-announce
On Saturday, 28 July 2018 at 21:33:04 UTC, Ivan Kazmenko wrote: [snip] 2. When you briefly explain templates I think it's important to mention that empty parentheses may be omitted to allow the reader to make the link between function!(arg1)(arg2) and map!something. Explaining UFCS isn't necess