Re: Working on a library: request for code review

2014-06-12 Thread Xavier Bigand via Digitalmars-d-learn
Le 12/06/2014 20:09, Rene Zwanenburg a écrit : On Thursday, 12 June 2014 at 15:46:12 UTC, Mike wrote: On Thursday, 12 June 2014 at 00:20:28 UTC, cal wrote: Might it be worth stitching things together into a proper image processing package? Well I started working on TGA because I was

Re: Working on a library: request for code review

2014-06-12 Thread Xavier Bigand via Digitalmars-d-learn
Le 12/06/2014 20:35, Xavier Bigand a écrit : Le 12/06/2014 20:09, Rene Zwanenburg a écrit : On Thursday, 12 June 2014 at 15:46:12 UTC, Mike wrote: On Thursday, 12 June 2014 at 00:20:28 UTC, cal wrote: Might it be worth stitching things together into a proper image processing package? Well I

Is it normal that unittests of phobos are executed with my project build?

2014-06-14 Thread Xavier Bigand via Digitalmars-d-learn
I get a failure on a test in format.d when I build my own project with unittest. I though importing phobos header would not regenerate their unittest modules. Any idea of what can cause this issue? I already have reinstalled dmd with visualD completely.

Memory usage of dmd

2014-11-10 Thread Xavier Bigand via Digitalmars-d-learn
I develop a web site with vibe, but because I am using a Virtual Private Server I get some memory issues. The server only has 1Go of memory ( 900Mo free) and it seems I can't compile directly on it a simple static page (70 lines). I get the following message when building with dub : Running

Re: Memory usage of dmd

2014-11-10 Thread Xavier Bigand via Digitalmars-d-learn
Le 10/11/2014 17:41, Etienne a écrit : On 2014-11-10 11:32 AM, Xavier Bigand wrote: Is there some options can help me to reduce the memory consumption? As it's for production purpose I don't think that is a good idea to remove compiler optimizations. The memory issues are probably related to

Re: Memory usage of dmd

2014-11-10 Thread Xavier Bigand via Digitalmars-d-learn
Le 10/11/2014 18:17, Etienne a écrit : On 2014-11-10 12:02 PM, Xavier Bigand wrote: As I know to be able to have no down time with vibe we need to be able to build directly on the server where the program runs. Maybe I just need to wait that I have some users to pay a better server with more

Need help to compile code with traits

2017-02-05 Thread Xavier Bigand via Digitalmars-d-learn
Hi, I am trying to create an allocator that don't use the GC, and I have issues for the initialization of member before calling the constructor. Here is my actual code : mixin template NogcAllocator(T) { static TnogcNew(T, Args...)(Args args) @nogc {

Re: Need help to compile code with traits

2017-02-05 Thread Xavier Bigand via Digitalmars-d-learn
Le 05/02/2017 à 18:32, Basile B. a écrit : On Sunday, 5 February 2017 at 14:59:04 UTC, Xavier Bigand wrote: Hi, I am trying to create an allocator that don't use the GC, and I have issues for the initialization of member before calling the constructor. Here is my actual code : mixin template

Re: @nogc and opengl errors check

2017-01-21 Thread Xavier Bigand via Digitalmars-d-learn
Le 21/01/2017 à 13:24, Jerry a écrit : On Friday, 20 January 2017 at 22:47:17 UTC, Xavier Bigand wrote: Hi, I am writing some code with opengl commands that I want to check in debug, so I am using the function checkgl (from glamour lib). The issue is that checkgl throw exception and can't be

@nogc and opengl errors check

2017-01-20 Thread Xavier Bigand via Digitalmars-d-learn
Hi, I am writing some code with opengl commands that I want to check in debug, so I am using the function checkgl (from glamour lib). The issue is that checkgl throw exception and can't be @nogc, I had try to use std.experimental.logger in place of exceptions, but it doesn't work either.

Using Nsight with VisualD

2016-12-13 Thread Xavier Bigand via Digitalmars-d-learn
Hi, I am trying to use Nsight with VisualD by it tell me that it can not start the program "". It seems that it does not use the right property of the project to retrieve the path of my generated binary. I do not know if it is an issue of VisualD directly or DUB that don't correctly

Re: Dynamic arrays with static initialization and maybe a bug with sizeof

2016-12-13 Thread Xavier Bigand via Digitalmars-d-learn
Le 13/12/2016 23:44, Johan Engelen a écrit : On Tuesday, 13 December 2016 at 21:27:57 UTC, Xavier Bigand wrote: Hi, I have the following code snippet : voidset() { GLfloat[]data = [ -1.0f, -1.0f, 0.0f, 1.0f, -1.0f, 0.0f, 0.0f, 1.0f,

Dynamic arrays with static initialization and maybe a bug with sizeof

2016-12-13 Thread Xavier Bigand via Digitalmars-d-learn
Hi, I have the following code snippet : voidset() { GLfloat[] data = [ -1.0f, -1.0f, 0.0f, 1.0f, -1.0f, 0.0f, 0.0f, 1.0f, 0.0f, ];

Re: Dynamic arrays with static initialization and maybe a bug with sizeof

2016-12-13 Thread Xavier Bigand via Digitalmars-d-learn
Le 13/12/2016 22:39, ag0aep6g a écrit : On 12/13/2016 10:27 PM, Xavier Bigand wrote: voidset() { GLfloat[]data = [ -1.0f, -1.0f, 0.0f, 1.0f, -1.0f, 0.0f, 0.0f, 1.0f, 0.0f, ]; glBindVertexArray(mVAO);

Question about DUB

2016-12-11 Thread Xavier Bigand via Digitalmars-d-learn
Hi, I am using DUB with the SDL language and I have two questions: 1. How can I add some text file to my project? I want to add shaders in my Visual Project. 2. How to make a compiler option depending on the platform and debug mode at the same time? Thanks.

Re: How give a module to a CTFE function

2018-03-12 Thread Xavier Bigand via Digitalmars-d-learn
Le 12/03/2018 à 23:24, Xavier Bigand a écrit : Le 12/03/2018 à 22:30, arturg a écrit : On Monday, 12 March 2018 at 21:00:07 UTC, Xavier Bigand wrote: Hi, I have a CTFE function that I want to make more generic by given it a module as parameter. My actual code looks like :

Re: How give a module to a CTFE function

2018-03-12 Thread Xavier Bigand via Digitalmars-d-learn
Le 12/03/2018 à 23:28, Xavier Bigand a écrit : Le 12/03/2018 à 23:24, Xavier Bigand a écrit : Le 12/03/2018 à 22:30, arturg a écrit : On Monday, 12 March 2018 at 21:00:07 UTC, Xavier Bigand wrote: Hi, I have a CTFE function that I want to make more generic by given it a module as parameter.

Re: How give a module to a CTFE function

2018-03-12 Thread Xavier Bigand via Digitalmars-d-learn
Le 12/03/2018 à 22:30, arturg a écrit : On Monday, 12 March 2018 at 21:00:07 UTC, Xavier Bigand wrote: Hi, I have a CTFE function that I want to make more generic by given it a module as parameter. My actual code looks like : mixin(implementFunctionsOf()); string implementFunctionsOf() {

CTFE and -betterC

2018-03-13 Thread Xavier Bigand via Digitalmars-d-learn
As I am trying to do a dll that acts exactly like one written in C, I am trying to compile my code with the -betterC option. So I would not need the DllMain function. I am not sure that I use the best syntax for my CTFE function to be able to make it works with the option -betterC and to

How give a module to a CTFE function

2018-03-12 Thread Xavier Bigand via Digitalmars-d-learn
Hi, I have a CTFE function that I want to make more generic by given it a module as parameter. My actual code looks like : mixin(implementFunctionsOf()); string implementFunctionsOf() { import std.traits; string res; foreach(name; __traits(allMembers,

Re: CTFE and -betterC

2018-03-16 Thread Xavier Bigand via Digitalmars-d-learn
Le 15/03/2018 à 01:09, Flamaros a écrit : On Wednesday, 14 March 2018 at 01:17:54 UTC, rikki cattermole wrote: You will still need DllMain, that is a platform requirement. I am not sure about that because when DllAnalyser don't see it in the opengl32.dll from the system32 directory. And the

Re: CTFE and -betterC

2018-03-16 Thread Xavier Bigand via Digitalmars-d-learn
Le 16/03/2018 à 22:58, Xavier Bigand a écrit : Le 15/03/2018 à 01:09, Flamaros a écrit : On Wednesday, 14 March 2018 at 01:17:54 UTC, rikki cattermole wrote: You will still need DllMain, that is a platform requirement. I am not sure about that because when DllAnalyser don't see it in the

Compile time initialization of AA

2018-03-23 Thread Xavier Bigand via Digitalmars-d-learn
I am trying to initialize an global immutable associative array of structs, but it doesn't compile. I am getting the following error message : "Error: not an associative array initializer". As I really need to store my data for a compile time purpose if we can't do that with AA, I'll use

Re: Compile time initialization of AA

2018-03-24 Thread Xavier Bigand via Digitalmars-d-learn
Le 23/03/2018 à 23:43, Xavier Bigand a écrit : I am trying to initialize an global immutable associative array of structs, but it doesn't compile. I am getting the following error message : "Error: not an associative array initializer". As I really need to store my data for a compile time