Re: New library: open multi-methods

2017-07-19 Thread jmh530 via Digitalmars-d-announce
On Wednesday, 19 July 2017 at 13:46:24 UTC, Jean-Louis Leroy wrote: What if you do: shared static this(){ mixin(registerMethods); } You mean in openmethods.d? Yes. I haven't tried something like that, but it seems like a use case for either static this or shared static this.

Re: New library: open multi-methods

2017-07-19 Thread jmh530 via Digitalmars-d-announce
On Wednesday, 19 July 2017 at 15:56:06 UTC, Jean-Louis Leroy wrote: Among other things, the mixin introduces two functions in the module's scope: the function the user actually calls (the "dispatcher"). E.g. it creates a times(double, Matrix) when it sees a times(double, virtual!Matrix). It

Re: New library: open multi-methods

2017-07-19 Thread Jean-Louis Leroy via Digitalmars-d-announce
On Wednesday, 19 July 2017 at 15:33:28 UTC, jmh530 wrote: On Wednesday, 19 July 2017 at 13:46:24 UTC, Jean-Louis Leroy wrote: What if you do: shared static this(){ mixin(registerMethods); } You mean in openmethods.d? Yes. I haven't tried something like that, but it seems like a use

Re: New library: open multi-methods

2017-07-19 Thread jmh530 via Digitalmars-d-announce
On Wednesday, 19 July 2017 at 15:33:28 UTC, jmh530 wrote: Yes. I haven't tried something like that, but it seems like a use case for either static this or shared static this. https://dlang.org/spec/class.html#StaticConstructor https://dlang.org/spec/class.html#SharedStaticConstructor Based

Re: New library: open multi-methods

2017-07-19 Thread James Dean via Digitalmars-d-announce
On Sunday, 16 July 2017 at 17:24:17 UTC, Jean-Louis Leroy wrote: Hello, TL;DR: see here https://github.com/jll63/methods.d/blob/master/README.md for an explanation of what open multi-methods are, if you are not familiar with the idea.You may also want to read my article on Code Project

Re: New library: open multi-methods

2017-07-19 Thread Jean-Louis Leroy via Digitalmars-d-announce
On Tuesday, 18 July 2017 at 18:21:21 UTC, Ali Çehreli wrote: On 07/18/2017 11:03 AM, jmh530 wrote: > the mixin(registerMethods); could then be adjusted so that void > print(virtual!Matrix m); is mixed in automatically because we now know > how to construct it. That reminds me: Would the

Re: Release D 2.075.0

2017-07-19 Thread Joakim via Digitalmars-d-announce
On Wednesday, 19 July 2017 at 15:36:22 UTC, Martin Nowak wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 [...] Wow, dmd builds in 12 seconds on a single linux/x64 core, can't wait to see what that time is when the backend is in D too, especially since it's taking most of the compile

Re: Release D 2.075.0

2017-07-19 Thread Walter Bright via Digitalmars-d-announce
On 7/19/2017 12:34 PM, Joakim wrote: when the backend is in D too The sticking point there is the base D compiler used by GDC and LDC needs to be upgraded with the -mv switch. For discussion: https://github.com/dlang/dmd/pull/6907

Release D 2.075.0

2017-07-19 Thread Martin Nowak via Digitalmars-d-announce
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Glad to announce D 2.075.0. This release comes with various phobos additions, a repackaged std.datetime, configurable Fiber stack guard pages (now also on Posix), and optional precise GC scanning for the DATA/TLS segment (static data) on Windows.

Re: New library: open multi-methods

2017-07-19 Thread Jean-Louis Leroy via Digitalmars-d-announce
On Wednesday, 19 July 2017 at 06:27:40 UTC, James Dean wrote: Interesting. One problem I think the above approach has is adding methods after compilation. Say, a plugin adds a new derived matrix type SparseMatrix and wants to customize the addition of them. This is impossible under the current

Re: New library: open multi-methods

2017-07-19 Thread Jean-Louis Leroy via Digitalmars-d-announce
openmethods is now available in the dub registry: https://code.dlang.org/packages/openmethods

Re: New library: open multi-methods

2017-07-19 Thread Jean-Louis Leroy via Digitalmars-d-announce
On Tuesday, 18 July 2017 at 04:26:42 UTC, Ali Çehreli wrote: It would be nice to see some performance results as well like you have on your C++ articles. Lib is in the dub registry now. Do you have a working gdc compiler? If yes, could you run the benchmark and post the results? Please make

Re: New library: open multi-methods

2017-07-19 Thread jmh530 via Digitalmars-d-announce
On Wednesday, 19 July 2017 at 13:35:40 UTC, jmh530 wrote: On Wednesday, 19 July 2017 at 12:29:36 UTC, Jean-Louis Leroy wrote: ...that does the two above. Problem is, it needs -Jpath on the command line to work. Unless there is a workaround? I prefer the original. What if you do: shared

Re: New library: open multi-methods

2017-07-19 Thread jmh530 via Digitalmars-d-announce
On Wednesday, 19 July 2017 at 12:29:36 UTC, Jean-Louis Leroy wrote: ...that does the two above. Problem is, it needs -Jpath on the command line to work. Unless there is a workaround? I prefer the original.

Re: New library: open multi-methods

2017-07-19 Thread Jean-Louis Leroy via Digitalmars-d-announce
On Wednesday, 19 July 2017 at 13:36:55 UTC, jmh530 wrote: On Wednesday, 19 July 2017 at 13:35:40 UTC, jmh530 wrote: On Wednesday, 19 July 2017 at 12:29:36 UTC, Jean-Louis Leroy wrote: ...that does the two above. Problem is, it needs -Jpath on the command line to work. Unless there is a

Re: Release D 2.075.0

2017-07-19 Thread Walter Bright via Digitalmars-d-announce
On 7/19/2017 8:36 AM, Martin Nowak wrote: Glad to announce D 2.075.0. This release comes with various phobos additions, a repackaged std.datetime, configurable Fiber stack guard pages (now also on Posix), and optional precise GC scanning for the DATA/TLS segment (static data) on Windows.

Re: Release D 2.075.0

2017-07-19 Thread Joseph Rushton Wakeling via Digitalmars-d-announce
On Wednesday, 19 July 2017 at 15:36:22 UTC, Martin Nowak wrote: Glad to announce D 2.075.0. This release comes with various phobos additions, a repackaged std.datetime, configurable Fiber stack guard pages (now also on Posix), and optional precise GC scanning for the DATA/TLS segment (static

Re: DIP 1010--Static foreach--Accepted

2017-07-19 Thread Timon Gehr via Digitalmars-d-announce
On 18.07.2017 00:44, Andrei Alexandrescu wrote: On 7/17/17 8:38 AM, Steven Schveighoffer wrote: What is the resolution of how break statements affect static foreach/foreach? We initially allowed break and continue to refer to the enclosing statement, but upon further consideration we will

Re: DMD library available as DUB package

2017-07-19 Thread Andrea Fontana via Digitalmars-d-announce
On Tuesday, 18 July 2017 at 12:07:27 UTC, Jacob Carlborg wrote: During the dconf hackathon I set out to create a DUB package for DMD to be used as a library. This has finally been merged [1] and is available here [2]. It contains the lexer and the parser. Great news!! I think it was not