Re: DCompute is now in the master branch of LDC
On Friday, 16 June 2017 at 01:19:56 UTC, solidstate1991 wrote: Other than I'm planning to using DCompute to implement "GPU blitter" (as I couldn't find any hardware acceleration API for raster graphics besides the long obsolete DirectDraw), but I'm also thinking on if I could implement some physical modelling audio engine, that would compile reverberation in real time for a virtual room, enabling it to be used in games (game audio haven't advanced as much as graphics unfortunately). Sounds cool! (BTW are you ZILtoid1991 on GitHub?) Do let me know what features (support for images etc.) you need to do the projects you are working on. There is a lot to be done, but most of the features I am looking to add can be developed independently. Of course collaboration will accelerate development. Also, I am looking for people who would be interested talking at IWOCL, the international workshop on OpenCL, about the user experience of dcompute (productivity, optimisation, debugging, API intuition/ease of use) in Edinburgh, May 15-17 next year, if anyone that has interesting projects they have made progress on.
Re: DCompute is now in the master branch of LDC
On Wednesday, 14 June 2017 at 05:43:01 UTC, Manu wrote: See, I would have a very different conversation: N: DCompute M: Awesome, I've been waiting! instead of: N: D-GPU M: What's that... is it, like, a rendering library? N: No, it's a 'compute' library. M: Ohhh, awesome! I've been waiting! ;) Also "D-GPU" implies that it's only for GPUs. Granted, there's a lot of similarities (early 3D accelerators in arcade cabinets were often built from multiple DSPs, GPUs always have VLIW and FMA capabilities, FPGAs can function as either as DSP or GPU with limitations, etc), but we still need some distinction. Even CPUs have OpenCL capabilities (my good old Athlon 64 x2 supports up to 1.1). Other than I'm planning to using DCompute to implement "GPU blitter" (as I couldn't find any hardware acceleration API for raster graphics besides the long obsolete DirectDraw), but I'm also thinking on if I could implement some physical modelling audio engine, that would compile reverberation in real time for a virtual room, enabling it to be used in games (game audio haven't advanced as much as graphics unfortunately).
Re: Lubeck: Hight Level Linear Algebra for Dlang
On Thursday, 15 June 2017 at 14:23:29 UTC, jmh530 wrote: mir.ndslice.slice has CanonicalMatrix/ContinguousMatrix, and similar versions for vectors and tensors and all the algorithms that operate on ranges in mir seem to work fine with them. Ilya has expressed his intention in the past for higher level abstractions on mir, including operator overloading. I brought up the operator overloading issue on the gradient descent thread: https://forum.dlang.org/post/ohjsuphzuapaxktgw...@forum.dlang.org Thanks.
Re: The DLang Tour translated into Russian
On Thursday, 15 June 2017 at 18:19:35 UTC, Murzistor wrote: On Thursday, 15 June 2017 at 16:42:08 UTC, Eugene Wissner wrote: Здесь английская версия с описанием процесса: https://github.com/dlang-tour/english/blob/master/README.md русская: https://github.com/dlang-tour/russian/blob/master/README.md Английскую правку приняли, а для русской написано: This branch has no conflicts with the base branch Ну как просмотрят, думаю, примут :)
Re: The DLang Tour translated into Russian
On Thursday, 15 June 2017 at 16:42:08 UTC, Eugene Wissner wrote: Здесь английская версия с описанием процесса: https://github.com/dlang-tour/english/blob/master/README.md русская: https://github.com/dlang-tour/russian/blob/master/README.md Английскую правку приняли, а для русской написано: This branch has no conflicts with the base branch
Re: The DLang Tour translated into Russian
On Thursday, 15 June 2017 at 16:22:53 UTC, Murzistor wrote: On Thursday, 15 June 2017 at 09:46:14 UTC, Dmitry wrote: Создайте pull request'ы к английской и русскоязычной версии, пожалуйста. Понятия не имею, как это делается. Если что, по-английски читаю, вроде... Здесь английская версия с описанием процесса: https://github.com/dlang-tour/english/blob/master/README.md русская: https://github.com/dlang-tour/russian/blob/master/README.md И еще дополнительная информация: https://github.com/dlang-tour/core/blob/master/CONTRIBUTING.md
Re: The DLang Tour translated into Russian
On Thursday, 15 June 2017 at 09:46:14 UTC, Dmitry wrote: Создайте pull request'ы к английской и русскоязычной версии, пожалуйста. Понятия не имею, как это делается. Если что, по-английски читаю, вроде...
Re: Lubeck: Hight Level Linear Algebra for Dlang
On Thursday, 15 June 2017 at 13:44:33 UTC, Nordlöw wrote: On Thursday, 15 June 2017 at 12:22:25 UTC, Nordlöw wrote: On Tuesday, 13 June 2017 at 08:26:20 UTC, 9il wrote: [1] http://code.dlang.org/packages/lubeck https://github.com/kaleidicassociates/lubeck/tree/master/example Nice. Will there be any matrix, vector, scalar, types with operator overloads? I'm guessing such a solution is not generic enough partly because D cannot define non-member operator overloads and partly because the algorithms operates on ranges. mir.ndslice.slice has CanonicalMatrix/ContinguousMatrix, and similar versions for vectors and tensors and all the algorithms that operate on ranges in mir seem to work fine with them. Ilya has expressed his intention in the past for higher level abstractions on mir, including operator overloading. I brought up the operator overloading issue on the gradient descent thread: https://forum.dlang.org/post/ohjsuphzuapaxktgw...@forum.dlang.org
Re: Lubeck: Hight Level Linear Algebra for Dlang
On Thursday, 15 June 2017 at 12:22:25 UTC, Nordlöw wrote: On Tuesday, 13 June 2017 at 08:26:20 UTC, 9il wrote: [1] http://code.dlang.org/packages/lubeck https://github.com/kaleidicassociates/lubeck/tree/master/example Nice. Will there be any matrix, vector, scalar, types with operator overloads? I'm guessing such a solution is not generic enough partly because D cannot define non-member operator overloads and partly because the algorithms operates on ranges.
Re: Lubeck: Hight Level Linear Algebra for Dlang
On Tuesday, 13 June 2017 at 08:26:20 UTC, 9il wrote: [1] http://code.dlang.org/packages/lubeck https://github.com/kaleidicassociates/lubeck/tree/master/example Nice. Will there be any matrix, vector, scalar, types with operator overloads?
Re: Getters/setters generator
On Tuesday, 13 June 2017 at 21:49:53 UTC, jmh530 wrote: On Tuesday, 13 June 2017 at 20:45:34 UTC, jmh530 wrote: Fair point. I just was playing around with it today and was like, oh that's pretty easy. It was only when I was trying to see if anyone else had done anything like this that I came across your project. I was just looking at the code in the package. There was an earlier discussion on predicates. If you changed the Read/RefRead/etc structs to be something like below, then the user could add in a string of the assert. It's not really all that elegant, but I think you should be able to get it to work. struct Read { string visibility = "public"; string constraint = void; } My ideal was to get something working where the lower and upper bounds were actual values, so you didn't have to pass the string, but I can see how that gets complicated. One problem I ran into is that you can't really make a struct templated in an optional way. For instance, the following won't compile (ignoring the complexity of making the asserts > or >=): struct Read(T = void) { string visibility = "public"; static if (!is(T == void)) { T lower; T upper; } } void main() { Read read; } I think that predicates aren't predicates for specific types (like lower/upper for arithmetic types), but generic predicates that could replace in/out constraints. For example lower/upper boundaries could be expressed then as "x >= a && x < b". Now it isn't clear what should happen if the predicate doesn't hold (do we use enforce and throw an exception or assert and throw an error). Ok, it can be solved with template parameter for the GenerateFieldAccessors mixin). String constraints are imho ugly and error prone. For example I personally don't use alogrithms like sort with string predicates, but only with lambdas. Maybe it is possible to pass a lambda to the struct that gets a value of the member and evaluetes to a boolean - I haven't tested it. But even with a lambda it doesn't look that cool: @ConstRead @Write(ref x => x > 0 && x < 10)
Re: The DLang Tour translated into Russian
On Wednesday, 14 June 2017 at 06:54:23 UTC, Vadim Lopatin wrote: Кто-нибудь из переводчиков хочет написать статью на Хабре? В принципе, я мог бы заняться, но не раньше следующей недели. Если кто-то хочет раньше - пишите.
Re: The DLang Tour translated into Russian
On Thursday, 15 June 2017 at 03:54:53 UTC, Murzistor wrote: Спасибо за поддержку такого замечательного языка! И спасибо его создателям! Я ошибку нашёл в коде: https://tour.dlang.org/tour/ru/basics/interfaces auto dog = new Animal; // "создание" экземпляра интерфейса Animal animal = dog; dog.makeNoise(); Причём в на английской версии тоже неправильно: https://tour.dlang.org/tour/en/basics/interfaces auto dog = new Dog; Animal animal = dog; dog.makeNoise(); // про интерфейс забыли А надо так: auto dog = new Dog; Animal animal = dog; // неявное преобразование к интерфейсу animal.makeNoise(); Создайте pull request'ы к английской и русскоязычной версии, пожалуйста.