Re: Started to get 'Previous Definition Different' linking errors when compiling in debug mode

2013-05-20 Thread evilrat
On Sunday, 19 May 2013 at 11:45:10 UTC, MrSmith wrote: I have also tried to use previous versions of Derelict and versions of my library. you use old lib compiled with older dmd? or using same compiler version you update derelict? anyway here is little tips: 1) every time you update ur dmd

Re: Nesting Variants

2013-05-20 Thread evilrat
On Sunday, 19 May 2013 at 23:31:11 UTC, Wyatt wrote: I'm trying to use Variants and ran into the following sort of situation: //Using DMD 2.062 import std.stdio; import std.variant; void main(){ int key = 1; Variant[] one; Variant[] ender; one = new

Re: Started to get 'Previous Definition Different' linking errors when compiling in debug mode

2013-05-20 Thread MrSmith
On Monday, 20 May 2013 at 07:16:57 UTC, evilrat wrote: On Sunday, 19 May 2013 at 11:45:10 UTC, MrSmith wrote: I have also tried to use previous versions of Derelict and versions of my library. you use old lib compiled with older dmd? or using same compiler version you update derelict?

Re: Started to get 'Previous Definition Different' linking errors when compiling in debug mode

2013-05-20 Thread MrSmith
On Monday, 20 May 2013 at 11:09:53 UTC, MrSmith wrote: Now i decided to try exlxlude files from LibCore until the problem disappears, to find the file that causes problem. Thanks for your answer! I found where is a bug. It is old magic bug that a have magically fixed in the past. But seems

Re: Started to get 'Previous Definition Different' linking errors when compiling in debug mode

2013-05-20 Thread evilrat
On Monday, 20 May 2013 at 11:44:59 UTC, MrSmith wrote: I had writeln statement in my code which was used to display all uniforms of the shader program. It can't be removed. When i remove it, the error from this topic occurs. do you have referenced projects in xamarin? if so, any time you

Re: Started to get 'Previous Definition Different' linking errors when compiling in debug mode

2013-05-20 Thread MrSmith
On Monday, 20 May 2013 at 12:42:50 UTC, evilrat wrote: do you have referenced projects in xamarin? if so, any time you change something in one of such projects you need to rebuild whole solution, that one of many reasons why i don't use xamarin/mono-d Yes, i have. This moment has started to

Linker error

2013-05-20 Thread Namespace
What's wrong? Core.lib(object) Offset 01118H Record Type 0091 Error 1: Previous Definition Different : _D60D:\D\dmd2\windows\bin\..\..\src\druntime\import\object.di.6312__ModuleInfoZ Core.lib(object) Offset 011A7H Record Type 00C3 Error 1: Previous Definition Different :

Re: Linker error

2013-05-20 Thread Namespace
On Monday, 20 May 2013 at 15:10:05 UTC, Namespace wrote: What's wrong? Core.lib(object) Offset 01118H Record Type 0091 Error 1: Previous Definition Different : _D60D:\D\dmd2\windows\bin\..\..\src\druntime\import\object.di.6312__ModuleInfoZ Core.lib(object) Offset 011A7H Record Type 00C3

Re: Linker error

2013-05-20 Thread Namespace
Works with dmd 2.062. Strange.

Re: Linker error

2013-05-20 Thread MrSmith
On Monday, 20 May 2013 at 15:41:28 UTC, Namespace wrote: Works with dmd 2.062. Strange. Have the similar problem here http://forum.dlang.org/thread/zkbrvrlvujmnnjqqp...@forum.dlang.org

Re: Linker error

2013-05-20 Thread Namespace
On Monday, 20 May 2013 at 16:17:36 UTC, MrSmith wrote: On Monday, 20 May 2013 at 15:41:28 UTC, Namespace wrote: Works with dmd 2.062. Strange. Have the similar problem here http://forum.dlang.org/thread/zkbrvrlvujmnnjqqp...@forum.dlang.org Nice. Hope that this will be solved. Do you have a

Re: Linker error

2013-05-20 Thread MrSmith
On Monday, 20 May 2013 at 18:25:19 UTC, Namespace wrote: Nice. Hope that this will be solved. Do you have a working workaround? As you may have read, i had writeln statement which when removed from code causes linker error. In my case i can just place it back. It was writeln(uniforms);

Re: why doesn't formattedRead take args by ref instead of by pointer?

2013-05-20 Thread Timothee Cour
ping on this. Also, same question with std.getopt, which takes by pointer instead of by ref. On Thu, May 16, 2013 at 12:54 AM, Timothee Cour thelastmamm...@gmail.comwrote: If I change formattedRead's input signature to: uint formattedRead(R, Char, S...)(ref R r, const(Char)[] fmt, ref S

Re: why doesn't formattedRead take args by ref instead of by pointer?

2013-05-20 Thread Ali Çehreli
On 05/20/2013 01:55 PM, Timothee Cour wrote: why is std.format. formattedRead taking by pointer instead ? could we change that (with proper deprecation), or add that function? It must be simply historical. readf takes pointers as well. Ali

Re: why doesn't formattedRead take args by ref instead of by pointer?

2013-05-20 Thread Dmitry Olshansky
21-May-2013 00:55, Timothee Cour пишет: ping on this. Also, same question with std.getopt, which takes by pointer instead of by ref. IRC there was a problem with having a heterogeneous variadic (=compiler's type tuple) function to preserve ref-ness. On Thu, May 16, 2013 at 12:54 AM,

Re: why doesn't formattedRead take args by ref instead of by pointer?

2013-05-20 Thread Timothee Cour
IRC there was a problem with having a heterogeneous variadic (=compiler's type tuple) function to preserve ref-ness. could you please provide a code snippet demonstrating this?

Re: why doesn't formattedRead take args by ref instead of by pointer?

2013-05-20 Thread Dmitry Olshansky
21-May-2013 01:19, Timothee Cour пишет: IRC there was a problem with having a heterogeneous variadic (=compiler's type tuple) function to preserve ref-ness. could you please provide a code snippet demonstrating this? Here: void readf(Args...)(const(char)[] fmt, Args args) { ... }

Re: why doesn't formattedRead take args by ref instead of by pointer?

2013-05-20 Thread Timothee Cour
That was indeed what I was using in my updated ref based reimplementation of formattedRead (see my original post for the link), and the other functions getopt, readf) are the same AFAIK. so why not add it to phobos: it's safer (no null / invalid pointers) simpler user code more consistent with

irrelevant compiler error messages: should stop semantic3 passes after 1st error is encountered

2013-05-20 Thread Timothee Cour
In a number of cases I get very large compile error messages after running rdmd main_module.d Upon inspection, running rdmd -v fun.d reveals that the irrelevant error messages are in different semantic3 passes: semantic3 module_with_relevant_error relevant error (eg: Error: no property 'x' for

support UFCS with fully qualified function names

2013-05-20 Thread Timothee Cour
I'd like to be able to use UFCS with fully qualified function names. A typical use case is to disambiguate , as in the following case: import std.path; import std.string; void main(){ //Error: std.path.join()(const(char)[] p1, const(char)[] p2, const(char[ ])[] more...) at ... conflicts

Re: support UFCS with fully qualified function names

2013-05-20 Thread bearophile
Timothee Cour: I'd like to be able to use UFCS with fully qualified function names. auto a=.(std.path.join)(\n); It seems an acceptably-looking syntax. But maybe D.learn is not the best place to discuss new D syntax. Regarding new UFCS-related syntax, I sometimes wish for: alias T

Re: support UFCS with fully qualified function names

2013-05-20 Thread bearophile
Timothee Cour: auto a=.(std.path.join)(\n); I suggest to present it in the main D newsgroup. And if people don't hate it, to later write an enhancement request in bugzilla. Bye, bearophile

Re: Started to get 'Previous Definition Different' linking errors when compiling in debug mode

2013-05-20 Thread evilrat
On Monday, 20 May 2013 at 13:07:06 UTC, MrSmith wrote: On Monday, 20 May 2013 at 12:42:50 UTC, evilrat wrote: do you have referenced projects in xamarin? if so, any time you change something in one of such projects you need to rebuild whole solution, that one of many reasons why i don't use

Re: Started to get 'Previous Definition Different' linking errors when compiling in debug mode

2013-05-20 Thread evilrat
On Sunday, 19 May 2013 at 11:37:54 UTC, MrSmith wrote: I am using Derelict for my GUI project and after moving to the newest version i am getting following errors. These errors are occuring in debug mode only. wait, are you using 2.063 beta?

undefined identifier doesn't make sense

2013-05-20 Thread Enjoys Math
Here's Gui.d: module Gui; private import gtk.MainWindow; private import ProjectFile; // @@TODO: remove private import gtk.Label; class Gui : MainWindow { private: ProjectFile* proj; public: this() { super(Our Audio Synth App);

Enum of types

2013-05-20 Thread Diggory
I want to create an enum of some number of types, eg. { ubyte, ushort, uint, float } It should be straightforward to get a member of the enum from the type itself. Basically I have an object that stores some typed data, but the type may not be known at compile time, only the set of possible

Re: undefined identifier doesn't make sense

2013-05-20 Thread Enjoys Math
On Tuesday, 21 May 2013 at 03:15:46 UTC, Anthony Goins wrote: ?? ProjectFile.ProjectFile.loadLastProjectOrNew() ?? maybe. That did it!!! Lol crazy. :D Thx

Re: undefined identifier doesn't make sense

2013-05-20 Thread Enjoys Math
Should I put my static methods at module scope then?

Re: Enum of types

2013-05-20 Thread Ali Çehreli
On 05/20/2013 08:20 PM, Diggory wrote: I want to create an enum of some number of types, eg. { ubyte, ushort, uint, float } It should be straightforward to get a member of the enum from the type itself. Basically I have an object that stores some typed data, but the type may not be known at

Re: undefined identifier doesn't make sense

2013-05-20 Thread evilrat
On Tuesday, 21 May 2013 at 04:17:26 UTC, Enjoys Math wrote: Should I put my static methods at module scope then? just don't give symbol(struct/class/function/variable) names same as module

Re: Enum of types

2013-05-20 Thread Diggory
On Tuesday, 21 May 2013 at 04:36:57 UTC, Ali Çehreli wrote: Sounds like std.variant.Algebraic: http://dlang.org/phobos/std_variant.html#.Algebraic Ali I don't see how I could use that. Algebraic is for storing a value, I'm trying to store just a type.

Re: why doesn't formattedRead take args by ref instead of by pointer?

2013-05-20 Thread Dmitry Olshansky
21-May-2013 01:39, Timothee Cour пишет: That was indeed what I was using in my updated ref based reimplementation of formattedRead (see my original post for the link), and the other functions getopt, readf) are the same AFAIK. so why not add it to phobos: it's safer (no null / invalid pointers)

Re: Enum of types

2013-05-20 Thread Ali Çehreli
On 05/20/2013 09:58 PM, Diggory wrote: On Tuesday, 21 May 2013 at 04:36:57 UTC, Ali Çehreli wrote: Sounds like std.variant.Algebraic: http://dlang.org/phobos/std_variant.html#.Algebraic Ali I don't see how I could use that. Algebraic is for storing a value, I'm trying to store just a