Re: DirectXMath alternative

2018-12-04 Thread John Burton via Digitalmars-d-learn
On Wednesday, 5 December 2018 at 01:57:53 UTC, evilrat wrote: On Tuesday, 4 December 2018 at 20:41:54 UTC, Guillaume Piolat wrote: On Tuesday, 4 December 2018 at 20:33:07 UTC, John Burton wrote: What is the best alternative for D, assuming there is anything? (I want vector, matrix math for use

dub is building docs of dependencies

2018-12-04 Thread Jedzia via Digitalmars-d-learn
dmd2-2.083.0, win minimal dub init with dub.json: { "description": "A minimal D application.", "dependencies": { "iz": "~>0.6.23" }, "authors": [ "Jedzia" ], "copyright": "Copyright © 2018, Jedzia", "license":

Re: DirectXMath alternative

2018-12-04 Thread evilrat via Digitalmars-d-learn
On Tuesday, 4 December 2018 at 20:41:54 UTC, Guillaume Piolat wrote: On Tuesday, 4 December 2018 at 20:33:07 UTC, John Burton wrote: What is the best alternative for D, assuming there is anything? (I want vector, matrix math for use in D3, things like inverting a matrix, getting perspective mat

Re: int[] as constructor

2018-12-04 Thread jmh530 via Digitalmars-d-learn
On Tuesday, 4 December 2018 at 22:35:48 UTC, Jonathan M Davis wrote: On Tuesday, December 4, 2018 3:17:04 PM MST jmh530 via Digitalmars-d-learn wrote: I've noticed that I can use int like a constructor, as in: int x = int(1); but I can't do the same thing with slices int[] y = int[]([1

Re: int[] as constructor

2018-12-04 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Dec 04, 2018 at 10:17:04PM +, jmh530 via Digitalmars-d-learn wrote: > I've noticed that I can use int like a constructor, as in: > int x = int(1); > but I can't do the same thing with slices > int[] y = int[]([1, 2]); > > Is there something I'm missing here or is this a potenti

Re: int[] as constructor

2018-12-04 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, December 4, 2018 3:17:04 PM MST jmh530 via Digitalmars-d-learn wrote: > I've noticed that I can use int like a constructor, as in: > int x = int(1); > but I can't do the same thing with slices > int[] y = int[]([1, 2]); > > Is there something I'm missing here or is this a pot

int[] as constructor

2018-12-04 Thread jmh530 via Digitalmars-d-learn
I've noticed that I can use int like a constructor, as in: int x = int(1); but I can't do the same thing with slices int[] y = int[]([1, 2]); Is there something I'm missing here or is this a potential enhancement? It can make some types of generic code a little more annoying.

Re: DirectXMath alternative

2018-12-04 Thread Guillaume Piolat via Digitalmars-d-learn
On Tuesday, 4 December 2018 at 20:33:07 UTC, John Burton wrote: What is the best alternative for D, assuming there is anything? (I want vector, matrix math for use in D3, things like inverting a matrix, getting perspective matrices etc) I can program something myself if necessary but I'd prefer

DirectXMath alternative

2018-12-04 Thread John Burton via Digitalmars-d-learn
There is a directx-d library which seems to work nicely for d3d11 but it doesn't include anything like DirectXMath.h presumably because it's all implemented as inline intrinsics and very visual c++ specific. What is the best alternative for D, assuming there is anything? (I want vector, matrix

Re: Why does nobody seem to think that `null` is a serious problem in D?

2018-12-04 Thread PacMan via Digitalmars-d-learn
On Monday, 19 November 2018 at 21:23:31 UTC, Jordi Gutiérrez Hermoso wrote: When I was first playing with D, I managed to create a segfault by doing `SomeClass c;` and then trying do something with the object I thought I had default-created, by analogy with C++ syntax. Seasoned D programmers wi

Re: Why does nobody seem to think that `null` is a serious problem in D?

2018-12-04 Thread Dukc via Digitalmars-d-learn
Nulls/Nones are always a big gap in a language's type system. A common alternative is to have some Option/Maybe type like Rust or Haskell or D's Variant. How about making that required to plug the null gap? There are others too who feel like that too: https://news.ycombinator.com/item?id=1858