Re: Congrats to D / Vibe-D -- techempower Round 15

2018-02-16 Thread Daniel Kozak via Digitalmars-d
https://tfb-status.techempower.com/raw/results.2018-02-09-10-22-34-441.json On Fri, Feb 16, 2018 at 1:01 AM, Petar via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On Thursday, 15 February 2018 at 20:59:53 UTC, Ali wrote: > >> On Thursday, 15 February 2018 at 20:43:41 UTC, Daniel Kozak w

Knowing the approach to solve a D challenge

2018-02-16 Thread aberba via Digitalmars-d
D has tone of features and library solutions. When you encounter a problem, how do you approach solving it in code? 1. Do you first write it in idiomatic D style or a more general approach before porting to idiomatic D? 2. Do you find yourself mostly rolling out your own implementation first

Re: Knowing the approach to solve a D challenge

2018-02-16 Thread rikki cattermole via Digitalmars-d
On 16/02/2018 9:44 AM, aberba wrote: D has tone of features and library solutions. When you encounter a problem, how do you approach solving it in code? 1. Do you first write it in idiomatic D style or a more general approach before porting to idiomatic D? 2. Do you find yourself mostly roll

Re: Knowing the approach to solve a D challenge

2018-02-16 Thread Joakim via Digitalmars-d
I don't write much D code, but here are my answers for _any_ language. On Friday, 16 February 2018 at 09:44:27 UTC, aberba wrote: D has tone of features and library solutions. When you encounter a problem, how do you approach solving it in code? 1. Do you first write it in idiomatic D style o

Re: Knowing the approach to solve a D challenge

2018-02-16 Thread Chris via Digitalmars-d
On Friday, 16 February 2018 at 09:44:27 UTC, aberba wrote: D has tone of features and library solutions. When you encounter a problem, how do you approach solving it in code? 1. Do you first write it in idiomatic D style or a more general approach before porting to idiomatic D? As idiomatic

Re: Knowing the approach to solve a D challenge

2018-02-16 Thread Dukc via Digitalmars-d
On Friday, 16 February 2018 at 09:44:27 UTC, aberba wrote: 1. Do you first write it in idiomatic D style or a more general approach before porting to idiomatic D? In micro-level, it's usually fairly idiomatic from get-go. Usually no heap allocations at inner loops, for-looping, static variabl

Re: Dub, Cargo, Go, Gradle, Maven

2018-02-16 Thread H. S. Teoh via Digitalmars-d
On Mon, Feb 12, 2018 at 10:35:06AM +, Russel Winder via Digitalmars-d wrote: > In all the discussion of Dub to date, it hasn't been pointed out that > JVM building merged dependency management and build a long time ago. > Historically: > > Make → Ant → Maven → Gradle > > and Gradle can hand

Re: Congrats to D / Vibe-D -- techempower Round 15

2018-02-16 Thread Johan Engelen via Digitalmars-d
On Thursday, 15 February 2018 at 19:04:53 UTC, Benny wrote: https://www.techempower.com/benchmarks/#section=data-r15&hw=ph&test=plaintext https://www.techempower.com/benchmarks/#section=data-r14&hw=ph&test=json D is finally showing up in the upper and middle parts of the tests. In some tests Vi

Re: Dub, Cargo, Go, Gradle, Maven

2018-02-16 Thread Dmitry Olshansky via Digitalmars-d
On Friday, 16 February 2018 at 18:16:12 UTC, H. S. Teoh wrote: On Mon, Feb 12, 2018 at 10:35:06AM +, Russel Winder via Digitalmars-d wrote: In all the discussion of Dub to date, it hasn't been pointed out that JVM building merged dependency management and build a long time ago. Historically

Re: Dub, Cargo, Go, Gradle, Maven

2018-02-16 Thread Ola Fosheim Grøstad via Digitalmars-d
On Friday, 16 February 2018 at 18:16:12 UTC, H. S. Teoh wrote: The O(N) vs. O(n) issue is actually very important once you I understand what you are trying to say, but this usage of notation is very confusing. O(n) is exactly the same as O(N) if N relates to n by a given percentage.

Re: Dub, Cargo, Go, Gradle, Maven

2018-02-16 Thread H. S. Teoh via Digitalmars-d
On Fri, Feb 16, 2018 at 07:40:01PM +, Ola Fosheim Grøstad via Digitalmars-d wrote: > On Friday, 16 February 2018 at 18:16:12 UTC, H. S. Teoh wrote: > > The O(N) vs. O(n) issue is actually very important once you > > I understand what you are trying to say, but this usage of notation is > very

Re: Tuple DIP

2018-02-16 Thread Martin Nowak via Digitalmars-d
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 01/12/2018 11:44 PM, Timon Gehr wrote: > As promised [1], I have started setting up a DIP to improve tuple > ergonomics in D: > > https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md Pardon me if things have been said already, can

Re: Tuple DIP

2018-02-16 Thread Martin Nowak via Digitalmars-d
On 01/14/2018 07:41 PM, Timothee Cour wrote: > Should definitely be mentioned in the DIP to open that up for discussion; > it breaks assumptions like sizeof(Tuple)=sum_i : tuple (sizeof(Ti)); That doesn't hold for all cases anyhow, as it seems were talking about closed tuples that are contiguous i

Re: Tuple DIP

2018-02-16 Thread Martin Nowak via Digitalmars-d
On 01/14/2018 12:21 AM, Timon Gehr wrote: >> what would be the equivalent of this ? >> ` writeln(tuple!("x", "y", "z")(2, 3, 4).y); ` > > It would continue to work the same way. > > I did consider adding a proposal for built-in named tuple syntax: > > writeln((x: 2, y: 3, z: 4).y); > > (int a,

Re: Tuple DIP

2018-02-16 Thread Jonathan M Davis via Digitalmars-d
On Friday, February 16, 2018 21:01:02 Martin Nowak via Digitalmars-d wrote: > On 01/14/2018 12:21 AM, Timon Gehr wrote: > >> what would be the equivalent of this ? > >> ` writeln(tuple!("x", "y", "z")(2, 3, 4).y); ` > > > > It would continue to work the same way. > > > > I did consider adding a pro

Re: how to get typeid of extern(C++) classes?

2018-02-16 Thread timotheecour via Digitalmars-d
On Friday, 16 February 2018 at 00:42:02 UTC, Timothee Cour wrote: is there a way to get typeid of extern(C++) classes (eg for ones in dmd/astbase.d but not limited to that) ? as a workaround, could the compiler insert (eg, depending on a version(insert_typeid)) a virtual method in each extern

Re: Dub, Cargo, Go, Gradle, Maven

2018-02-16 Thread Ola Fosheim Grøstad via Digitalmars-d
On Friday, 16 February 2018 at 19:40:07 UTC, H. S. Teoh wrote: On Fri, Feb 16, 2018 at 07:40:01PM +, Ola Fosheim Grøstad via Digitalmars-d wrote: On Friday, 16 February 2018 at 18:16:12 UTC, H. S. Teoh wrote: > The O(N) vs. O(n) issue is actually very important once you I understand what yo

Re: Tuple DIP

2018-02-16 Thread H. S. Teoh via Digitalmars-d
On Fri, Feb 16, 2018 at 01:16:13PM -0700, Jonathan M Davis via Digitalmars-d wrote: > On Friday, February 16, 2018 21:01:02 Martin Nowak via Digitalmars-d wrote: > > On 01/14/2018 12:21 AM, Timon Gehr wrote: > > >> what would be the equivalent of this ? > > >> ` writeln(tuple!("x", "y", "z")(2, 3,

Re: Congrats to D / Vibe-D -- techempower Round 15

2018-02-16 Thread Daniel Kozak via Digitalmars-d
Hard to say, but I believe one of reasons is VibeManualMemoryManagement, another one would be same fixes in vibe-core and eventcore

Re: how to get typeid of extern(C++) classes?

2018-02-16 Thread Steven Schveighoffer via Digitalmars-d
On 2/15/18 7:42 PM, Timothee Cour wrote: is there a way to get typeid of extern(C++) classes (eg for ones in dmd/astbase.d but not limited to that) ? C++ exposes it via typeid so in theory all the info is there ; I would need it at least for debugging (eg if RTTI is not enabled for all compilers

Re: Vulkan

2018-02-16 Thread Ivan Trombley via Digitalmars-d
On Wednesday, 14 February 2018 at 02:40:18 UTC, Mike Parker wrote: What [does] it mean to say they don't work? Have you reported any issues? I don't see any in the DerelictVulkan repo. If something's broken, please report it so it can be fixed. Derelict-vulkan is Windows only ATM.

Re: Dub, Cargo, Go, Gradle, Maven

2018-02-16 Thread H. S. Teoh via Digitalmars-d
On Fri, Feb 16, 2018 at 07:31:37PM +, Dmitry Olshansky via Digitalmars-d wrote: > On Friday, 16 February 2018 at 18:16:12 UTC, H. S. Teoh wrote: [...] > > If a dependent node requires network access, it forces network > > access every time the DAG is updated. This is slow, and also > > unreli

Re: Vulkan

2018-02-16 Thread Ivan Trombley via Digitalmars-d
On Wednesday, 14 February 2018 at 00:22:25 UTC, flamencofantasy wrote: Maybe these work, not sure; https://github.com/Rikarin/VulkanizeD Thanks, I'll check this out.

Re: Knowing the approach to solve a D challenge

2018-02-16 Thread Jesse Phillips via Digitalmars-d
On Friday, 16 February 2018 at 09:44:27 UTC, aberba wrote: D has tone of features and library solutions. When you encounter a problem, how do you approach solving it in code? 1. Do you first write it in idiomatic D style or a more general approach before porting to idiomatic D? Like always,

New abstraction: Layout

2018-02-16 Thread Andrei Alexandrescu via Digitalmars-d
I've been long bothered that the builtin .tupleof and our own abstractions Fields and RepresentationTypeTuple in std.traits - all omit the essential information of field offsets. That makes types that use align() to have the same .tupleof, Fields, and RepresentationTypeTuple even though they sh

Re: how to get typeid of extern(C++) classes?

2018-02-16 Thread Meta via Digitalmars-d
On Friday, 16 February 2018 at 00:42:02 UTC, Timothee Cour wrote: C++ exposes it via typeid so in theory all the info is there ; It's been awhile since I've written any C++ code, but as I remember it, this type of type info is not available unless you enable it with a (C++) compiler switch.

Re: Vulkan

2018-02-16 Thread Zoadian via Digitalmars-d
On Friday, 16 February 2018 at 22:58:30 UTC, Ivan Trombley wrote: On Wednesday, 14 February 2018 at 02:40:18 UTC, Mike Parker wrote: What [does] it mean to say they don't work? Have you reported any issues? I don't see any in the DerelictVulkan repo. If something's broken, please report it so i

Re: Dub, Cargo, Go, Gradle, Maven

2018-02-16 Thread Dmitry Olshansky via Digitalmars-d
On Friday, 16 February 2018 at 22:48:55 UTC, H. S. Teoh wrote: On Fri, Feb 16, 2018 at 07:31:37PM +, Dmitry Olshansky via Digitalmars-d wrote: On Friday, 16 February 2018 at 18:16:12 UTC, H. S. Teoh wrote: [...] > If a dependent node requires network access, it forces > network access ever

Re: Vulkan

2018-02-16 Thread Rubn via Digitalmars-d
On Friday, 16 February 2018 at 22:58:30 UTC, Ivan Trombley wrote: On Wednesday, 14 February 2018 at 02:40:18 UTC, Mike Parker wrote: What [does] it mean to say they don't work? Have you reported any issues? I don't see any in the DerelictVulkan repo. If something's broken, please report it so i

Re: New abstraction: Layout

2018-02-16 Thread rikki cattermole via Digitalmars-d
On 17/02/2018 12:04 AM, Andrei Alexandrescu wrote: I've been long bothered that the builtin .tupleof and our own abstractions Fields and RepresentationTypeTuple in std.traits - all omit the essential information of field offsets. That makes types that use align() to have the same .tupleof, Fiel

Re: Vulkan

2018-02-16 Thread Danni Coy via Digitalmars-d
On Wed, Feb 14, 2018 at 2:26 PM, rikki cattermole via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On 13/02/2018 10:54 PM, Danni Coy wrote: > >> >> On Wed, Feb 14, 2018 at 8:20 AM, Ivan Trombley via Digitalmars-d < >> digitalmars-d@puremagic.com > wrote

Re: Tuple DIP

2018-02-16 Thread Timon Gehr via Digitalmars-d
On 16.02.2018 21:48, H. S. Teoh wrote: On Fri, Feb 16, 2018 at 01:16:13PM -0700, Jonathan M Davis via Digitalmars-d wrote: On Friday, February 16, 2018 21:01:02 Martin Nowak via Digitalmars-d wrote: On 01/14/2018 12:21 AM, Timon Gehr wrote: what would be the equivalent of this ? ` writeln(tup

Re: Tuple DIP

2018-02-16 Thread Timon Gehr via Digitalmars-d
On 16.02.2018 21:16, Jonathan M Davis wrote: On Friday, February 16, 2018 21:01:02 Martin Nowak via Digitalmars-d wrote: On 01/14/2018 12:21 AM, Timon Gehr wrote: what would be the equivalent of this ? ` writeln(tuple!("x", "y", "z")(2, 3, 4).y); ` It would continue to work the same way. I d

Re: Tuple DIP

2018-02-16 Thread Timon Gehr via Digitalmars-d
On 16.02.2018 21:01, Martin Nowak wrote: On 01/14/2018 12:21 AM, Timon Gehr wrote: what would be the equivalent of this ? ` writeln(tuple!("x", "y", "z")(2, 3, 4).y); ` It would continue to work the same way. I did consider adding a proposal for built-in named tuple syntax: writeln((x: 2, y:

Re: Tuple DIP

2018-02-16 Thread Timon Gehr via Digitalmars-d
On 16.02.2018 20:51, Martin Nowak wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 01/12/2018 11:44 PM, Timon Gehr wrote: As promised [1], I have started setting up a DIP to improve tuple ergonomics in D: https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md Pardon me i

Re: how to get typeid of extern(C++) classes?

2018-02-16 Thread Jonathan M Davis via Digitalmars-d
On Saturday, February 17, 2018 00:23:01 Meta via Digitalmars-d wrote: > On Friday, 16 February 2018 at 00:42:02 UTC, Timothee Cour wrote: > > C++ exposes it via typeid so in theory all the info is there ; > > It's been awhile since I've written any C++ code, but as I > remember it, this type of typ

Re: Vulkan

2018-02-16 Thread Jonathan M Davis via Digitalmars-d
On Saturday, February 17, 2018 13:52:06 Danni Coy via Digitalmars-d wrote: > On Wed, Feb 14, 2018 at 2:26 PM, rikki cattermole via Digitalmars-d < > > digitalmars-d@puremagic.com> wrote: > > On 13/02/2018 10:54 PM, Danni Coy wrote: > >> On Wed, Feb 14, 2018 at 8:20 AM, Ivan Trombley via Digitalmars

Re: how to get typeid of extern(C++) classes?

2018-02-16 Thread Stefan Koch via Digitalmars-d
On Friday, 16 February 2018 at 00:42:02 UTC, Timothee Cour wrote: is there a way to get typeid of extern(C++) classes (eg for ones in dmd/astbase.d but not limited to that) ? C++ exposes it via typeid so in theory all the info is there ; I would need it at least for debugging (eg if RTTI is not

Re: Vulkan

2018-02-16 Thread rumbu via Digitalmars-d
On Saturday, 17 February 2018 at 05:52:38 UTC, Jonathan M Davis wrote: Well, in D-speak, C header definitions rewritten as D so that D can call the C functions are exactly what bindings are, whereas if bindings are wrapped in D code to make them more D-like, those are called wrappers. I don't