Re: private with alias this

2012-12-24 Thread evilrat
On Tuesday, 25 December 2012 at 02:43:52 UTC, r_m_r wrote: On 12/25/2012 07:42 AM, r_m_r wrote: assert(!__traits(compiles, b._bar)); sorry, i made a typo: it should be bar_ instead of _bar. Interestingly, the below assertion fails at run time: assert(!__traits(compiles, b.bar_)); but this

Re: private with alias this

2012-12-24 Thread evilrat
On Tuesday, 25 December 2012 at 06:19:02 UTC, r_m_r wrote: i dunno. i'm no D expert either ;-) BTW its interesting that while the following assertion fails at runtime: assert(!__traits(compiles, b.bar_)); the assertion below executes without errors (as expected):

Re: private with alias this

2012-12-24 Thread evilrat
On Tuesday, 25 December 2012 at 05:28:54 UTC, Zhenya wrote: On Tuesday, 25 December 2012 at 02:43:52 UTC, r_m_r wrote: On 12/25/2012 07:42 AM, r_m_r wrote: assert(!__traits(compiles, b._bar)); sorry, i made a typo: it should be bar_ instead of _bar. Interestingly, the below assertion fails

Re: SQLite library on Windows

2012-12-26 Thread evilrat
On Thursday, 27 December 2012 at 01:45:26 UTC, BLM768 wrote: I've been trying various methods to get SQLite working in Windows using the etc.c.sqlite3 bindings, but I can't figure out how to get everything in a form that DMD likes. GCC doesn't seem to output anything that OPTLINK can use, and

Re: Running out of memory

2012-12-27 Thread evilrat
On Thursday, 27 December 2012 at 14:15:51 UTC, FG wrote: ... Now, this delete looks like Python's kind of GC cheating. :) Personally, I don't have anything against it, but is it a valid practice? delete itself is considered deprecated in D2, though it was used widely, instead there is

Re: Running out of memory

2012-12-28 Thread evilrat
On Friday, 28 December 2012 at 10:40:32 UTC, FG wrote: I don't require manual malloc. I wanted to make a hint to the GC, that this block can be freed, because I know there are no other pointers into it (that would be used later), while the imprecise GC finds false pointers and prevents the

Re: GtkD - missing DLLs in Gtk win32 runtime

2012-12-28 Thread evilrat
On Saturday, 29 December 2012 at 00:46:15 UTC, FG wrote: I'm trying out the latest GtkD binding. The lib has built without problems, some example programs also compile, but I can't run them. The Gtk-Runtime-3.6 archive provided at https://github.com/gtkd-developers/GtkD/downloads is missing

Re: Unicode symbols in the identifiers

2013-01-10 Thread evilrat
On Friday, 11 January 2013 at 02:09:33 UTC, Andrey wrote: Should these variants serve as identifiers? auto x²; //fails to compile: char 0x00b2 not allowed in identifier, unsupported char 0xb2 (why? is it not a digit?) Same for ⅀, ∫ and etc. Official documentations says: « D source text can

Re: Unicode symbols in the identifiers

2013-01-11 Thread evilrat
On Friday, 11 January 2013 at 07:47:03 UTC, Andrey wrote: Apart from that, try this code: int в_квадрате(int num) { return num*num; } writeln(2.в_квадрате); You get: Error: found 'в_квадрате' when expecting ',' don't have any errors with this code(dmd 2.061, win8) but x² as identifier is

Re: Reading array of numbers from file

2013-01-11 Thread evilrat
On Friday, 11 January 2013 at 09:44:31 UTC, Lubos Pintes wrote: Hi, Do I correctly suppose this is not possible? Because I don't understand fully the compiler error. import std.stdio; void main() { int[] a; stdin.readf( %s,a); writeln(a); } what is the definition of format of array to

Re: Reading array of numbers from file

2013-01-11 Thread evilrat
oops, for reading by line it is not std.file.byLine but std.stdio.File.byLine http://dlang.org/phobos/std_stdio.html#.File.byLine well, use docs, there are lot of info for starters

Re: Win32 + OpenGL bindings

2013-04-22 Thread evilrat
On Saturday, 20 April 2013 at 03:26:29 UTC, Diggory wrote: - win32.windows: Apparantly out of date and gives linker errors, although it does declare all the functions needed. you are doing it wrong. first you will need mingw32-make from mingw default setup, second fix win32 bindings makefile

Re: Win32 + OpenGL bindings

2013-04-22 Thread evilrat
On Sunday, 21 April 2013 at 15:20:28 UTC, Diggory wrote: OK, thanks I think I've got the hang of the way linking works now - I was confused about how some things didn't seem to require libs to work, but now I see it's because those things were compiled into druntime.lib which was compiled into

Re: Win32 + OpenGL bindings

2013-04-22 Thread evilrat
On Monday, 22 April 2013 at 12:54:32 UTC, Diggory wrote: ... I realise D is still fairly young so it's unreasonable to expect everything to already exist, but at least enough information should be given to be able to correctly add things that don't. it's not that young, but i agree the

Re: WinAPI callbacks and GC

2013-04-23 Thread evilrat
On Tuesday, 23 April 2013 at 21:21:28 UTC, Jack Applegame wrote: I'm writing Ctrl-C handler for console application for Windows: extern(Windows) { int CtrlHandler(uint flag) nothrow { auto tmp = new SomeClass; // is it safe? ... return true; } } ...

Re: WinAPI callbacks and GC

2013-04-23 Thread evilrat
On Tuesday, 23 April 2013 at 21:21:28 UTC, Jack Applegame wrote: If not, how to make it safe? I'm trying call thread_attachThis() at the beginning of CtrlHandler fucntion, but it doesn't compile because thread_attachThis() is not nothrow. what stops you from calling normal functions in

Re: WinAPI callbacks and GC

2013-04-24 Thread evilrat
On Wednesday, 24 April 2013 at 09:51:29 UTC, Regan Heath wrote: Until then, I would perform manual memory allocation. I am not sure how in D, but you need something like placement new to construct a class in a previously allocated block of memory (allocated with malloc or similar). look at

Re: general questions regarding value and reference semantics

2013-04-28 Thread evilrat
On Monday, 29 April 2013 at 00:22:23 UTC, WhatMeWorry wrote: I think I understand (and admire) D's use of value semantics for structs and reference semantics for classes. I believe classes exist for the entirety of a program's life whereas structs exist for the lifetime of their scope.

Re: debugging on Mac OSX

2013-04-29 Thread evilrat
On Monday, 29 April 2013 at 12:46:01 UTC, Daniel Davidson wrote: Ho do you debug D executables on mac os x in which debug symbols are available (preferably a setup that works in emacs with gdb or gud-gdb)? there is no solid solution as far as i know. you can try build zerobugs debugger from

Re: debugging on Mac OSX

2013-04-29 Thread evilrat
On Monday, 29 April 2013 at 18:49:46 UTC, 1100110 wrote: In my opinion, don't even bother going to the zerobugs website. It'll be a long, boring, annoying waste of time. i don't. zerobugs source is on codeplex

Re: debugging on Mac OSX

2013-04-29 Thread evilrat
On Tuesday, 30 April 2013 at 00:52:18 UTC, Timothee Cour wrote: were you able to use it ? if so on which platforms? and does it provide anything beyond what cgdb does? On Mon, Apr 29, 2013 at 5:41 PM, evilrat evilrat...@gmail.com wrote: On Monday, 29 April 2013 at 18:49:46 UTC, 1100110

Re: function declaration in parameter list

2013-05-01 Thread evilrat
On Wednesday, 1 May 2013 at 06:12:54 UTC, Jay Norwood wrote: On Saturday, 6 April 2013 at 14:50:50 UTC, Bruno Medeiros wrote: Interesting thread. I've been working on a hand-written D parser (in Java, for the DDT IDE) and I too have found a slew of grammar spec issues. Some of them more

Re: D is totally useless

2013-05-01 Thread evilrat
On Wednesday, 1 May 2013 at 08:42:40 UTC, Temtaime wrote: I'm new in D, so i'm tried to write some in that langugage. That's story about how i tried to port OGL sample, that renders one triangle. I was very surprised when i found, that D doesn't have equivalent of gl/gl.h. Any C++ compiler

Re: D is totally useless

2013-05-01 Thread evilrat
On Thursday, 2 May 2013 at 02:07:23 UTC, Carlos wrote: On Wednesday, 1 May 2013 at 08:53:18 UTC, Raphaël Jakse wrote: Le 01/05/2013 10:42, Temtaime a écrit : I'm new in D, so i'm tried to write some in that langugage. That's story about how i tried to port OGL sample, that renders one

Re: strange runtime error

2013-05-02 Thread evilrat
On Thursday, 2 May 2013 at 10:30:20 UTC, gedaiu wrote: can anyone help me tu understand this kind of errors? /home/user/workspace/path/project/src(_D4core7runtime18runModuleUnitTestsUZb19unittestSegvHandlerUiPS4core3sys5posix6signal9siginfo_tPvZv+0x3e)[0x485ede] linux? segfault during unit

Re: D is totally useless

2013-05-03 Thread evilrat
On Friday, 3 May 2013 at 06:15:20 UTC, Jacob Carlborg wrote: On 2013-05-02 22:23, Diggory wrote: The wgl*** functions and SwapBuffers ARE part of the windows api even though they are implemented in opengl32.dll (they are declared in wingdi.h IIRC) wgl*** is the Windows specific OpenGL

Re: How to reserve memory for a slice in a struct

2013-05-07 Thread evilrat
On Tuesday, 7 May 2013 at 10:58:42 UTC, John Colvin wrote: ... int a[]; please don't use C style declarations, D style is type followed by id: int[] a;

Re: Physics libraries in D

2013-05-08 Thread evilrat
On Wednesday, 8 May 2013 at 09:43:43 UTC, Mike Parker wrote: On Wednesday, 8 May 2013 at 09:37:51 UTC, KillerSponge wrote: Hi all, I've been searching around for physics libraries to use in a real-time 3D application (a game, to be more precise). I know that Bullet and ODE are the big open

Re: Variant associative arrays

2013-05-08 Thread evilrat
On Thursday, 9 May 2013 at 00:10:48 UTC, Byron Heads wrote: I have a variant associative array. In the example below I am wondering if there is a way to create the array without having to indicate the variant type on all of the values. Would like to be able to write code like #2, or something

Re: Tricky code with exceptions

2013-05-09 Thread evilrat
On Thursday, 9 May 2013 at 20:33:17 UTC, bearophile wrote: Brad Anderson: a 64-bit Windows dmd build did not crash and here is the output. Thank you for the data point. So maybe the problem is only on 32 bit Windows. Bye, bearophile win8 dmd 2.062 32-bit also crashes

Re: Get difficulties with variadics

2013-05-10 Thread evilrat
On Friday, 10 May 2013 at 21:11:57 UTC, Flamaros wrote: In the load(...) method I am getting filePath without issue, but for next parameters I am little confused on how to do. what all that stuff in ur load method? O_O look at my example in this thread, that at least should give you idea

Re: callback parameter order question

2013-05-11 Thread evilrat
On Saturday, 11 May 2013 at 10:44:01 UTC, gedaiu wrote: On Saturday, 11 May 2013 at 10:04:54 UTC, Andrej Mitrovic wrote: On 5/11/13, gedaiu szabobog...@yahoo.com wrote: if i do that, i get this error I don't know what ahc_echo is, but I imagine you'll have to make it an extern(C) function.

Re: Get difficulties with variadics

2013-05-11 Thread evilrat
On Saturday, 11 May 2013 at 13:00:42 UTC, Flamaros wrote: On Saturday, 11 May 2013 at 01:48:12 UTC, evilrat wrote: On Friday, 10 May 2013 at 21:11:57 UTC, Flamaros wrote: In the load(...) method I am getting filePath without issue, but for next parameters I am little confused on how to do

Re: callback parameter order question

2013-05-11 Thread evilrat
On Saturday, 11 May 2013 at 17:34:53 UTC, gedaiu wrote: yeah... what a shameful mistake.. i vave a new tricky question... how i can provide a class method instead a simple function as callback? with D code use delegates as Ali commented, it's simple. with C code use static method and pass

Re: Get difficulties with variadics

2013-05-11 Thread evilrat
On Saturday, 11 May 2013 at 22:01:33 UTC, Flamaros wrote: Thanks a lot, I think using Variant[] is a better way. For the moment (maybe for few minutes) it's necessary to always give the Variant array to the getResource method, but it can be null. I actually use derelict3, but for this VBO

Re: Error in assignment to 'this' inside constructor

2013-05-11 Thread evilrat
On Saturday, 11 May 2013 at 14:34:41 UTC, TommiT wrote: I'm trying to assign (or simply bit-copy) over 'this' inside a constructor. There's an error when compile-time constructing the object. Is this a bug in DMD (2.062) ? module main; struct Test { enum Test t = Test(1); int v;

Re: Error in assignment to 'this' inside constructor

2013-05-12 Thread evilrat
On Sunday, 12 May 2013 at 07:51:39 UTC, TommiT wrote: On Sunday, 12 May 2013 at 03:32:44 UTC, evilrat wrote: what? structs has value semantics, every time you assign a struct to variable it assign its copy. you also don't have to have constructor for structs, it initializes it fields in left

Re: Error in assignment to 'this' inside constructor

2013-05-12 Thread evilrat
oops. nevermind i've forgot about how it done in D :( you'd better read about it in language reference.

Re: Error in assignment to 'this' inside constructor

2013-05-12 Thread evilrat
oh right, struct A { this(this) { copy referenced mem here} } or struct A { ref A opAssign(ref const A other) { this = other; return this; } } so if you have fields that should be fully copied like array this is the place to do it, otherwise there is a reference arguments, if both is no go

Re: Structure's inheritance

2013-05-12 Thread evilrat
On Sunday, 12 May 2013 at 11:21:16 UTC, Temtaime wrote: Hello to all ! I'm surprised that there is no structure's inheritance. There is a problem: I want to make Matrix MxN class. I also want to make child classes Square Matrix and Vector from it with additional functions. I don't want use

Re: Structure's inheritance

2013-05-12 Thread evilrat
On Sunday, 12 May 2013 at 11:56:53 UTC, Maxim Fomin wrote: You can place base struct instance inside nested and use alias this. Note that currently multiple alias this are not supported. Also note that you cannot override functions because there are no virtual table for structs. why

Re: Using D as a shared library.

2013-05-14 Thread evilrat
On Tuesday, 14 May 2013 at 16:01:57 UTC, Jacob Carlborg wrote: ... I'm not sure if all this work yet. Using a D shared library from a D application, statically linked, should work on Linux 64bit. Don't know if it works from a C application. loading D libraries on non-Windows possible but all

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 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 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?

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-21 Thread evilrat
On Tuesday, 21 May 2013 at 04:58:35 UTC, 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

Re: Nesting Variants

2013-05-22 Thread evilrat
On Wednesday, 22 May 2013 at 01:04:35 UTC, Wyatt wrote: I was trying to do this as a way to obtain a concise syntax for manipulating a tree of elements deserialized at runtime, ex: data[foo][bar] = baz; assert( data[foo][bar] == baz ); foreach( subtree; data[foo] ) doSubtreeOp( subtree );

Re: WindowProc in a class - function and pointer problem

2013-05-22 Thread evilrat
On Wednesday, 22 May 2013 at 21:42:32 UTC, D-sturbed wrote: Yes I'm in the multiple Window case, every window is wraped in a class and has its own message handler. I know that Win, in its callback system, often lets you retrieve a pointer to something, and I haven't get it was possible in

Re: WindowProc in a class - function and pointer problem

2013-05-23 Thread evilrat
On Thursday, 23 May 2013 at 06:31:02 UTC, Sean Cavanaugh wrote: I had a partial port of WTL over to D which worked well enough for what I needed, the core of the WndProc handling is down below. Each HWND is owned by the thread it was created on, so assigning it into D associative array

Re: lookup fields struct

2013-05-26 Thread evilrat
On Sunday, 26 May 2013 at 14:19:13 UTC, mimi wrote: Hi! I am want to get list of fields types and offsets in struct by the template. I.e., lookup through this struct: struct S { int a; string b; someptr* c; }; template Lookup!( S )(); returns something as: field #0, int, offset 0 field

concurrency problem with pointers

2013-07-18 Thread evilrat
i hate asking for help, but... now i'm pushed in the corner. so here is my problem: i have struct with handle, and i need to send this struct or handle to second thread, all fine but feeding this struct or handle to send results in multiple errors(mostly complains about thread local data). and

Re: concurrency problem with pointers

2013-07-19 Thread evilrat
On Thursday, 18 July 2013 at 17:23:20 UTC, Ali Çehreli wrote: On 07/18/2013 08:29 AM, evilrat wrote: i hate asking for help Please do so. Otherwise we can't learn from others' issues. :) that's who i am. long story, but in short, people hated when i ask something and after few minutes i

Re: concurrency problem with pointers

2013-07-19 Thread evilrat
On Thursday, 18 July 2013 at 23:36:34 UTC, Sean Kelly wrote: In short, you're trying to send a pointer via std.concurrency. The easiest way is to cast it to/from shared. Otherwise, you'd need to make it an opaque type like a size_t rather than a type D can tell is a reference. sure cast to

Re: concurrency problem with pointers

2013-07-19 Thread evilrat
modifying 3rd party libraries code? /Users/evilrat/Documents/prog/Derelict3/import/derelict/glfw3/types.d(290): Error: struct derelict.glfw3.types.GLFWwindow unknown size /Users/evilrat/Documents/prog/Derelict3/import/derelict/glfw3/types.d(290): Error: struct derelict.glfw3.types.GLFWwindow

Re: concurrency problem with pointers

2013-07-19 Thread evilrat
On Friday, 19 July 2013 at 15:35:27 UTC, John Colvin wrote: On Friday, 19 July 2013 at 15:16:23 UTC, evilrat wrote: here is reduced example without platform-specific stuff, requires derelict3 and glfw. http://pastebin.com/rhB14YNs I can't get that to compile, I keep getting Derelict3

Re: Linking with .dylibs on OSX?

2013-07-19 Thread evilrat
On Friday, 19 July 2013 at 18:19:20 UTC, Jeremy DeHaan wrote: I was just curious if DMD supported linking with .dylib files on OSX. Would one simply do something like this? dmd main.d somelib.dylib Thanks! i don't remember exactly, but if this not work for you try something like this dmd

Re: concurrency problem with pointers

2013-07-19 Thread evilrat
On Friday, 19 July 2013 at 17:14:10 UTC, Ali Çehreli wrote: On 07/19/2013 09:00 AM, evilrat wrote: i think this is because GLFWwindow is (pre)defined as struct instead alias void :( Further reduced: import std.concurrency; struct S; void main() { receive((S * p){}); } Error Ali

Re: concurrency problem with pointers

2013-07-19 Thread evilrat
On Friday, 19 July 2013 at 18:25:26 UTC, Ali Çehreli wrote: On 07/19/2013 11:07 AM, evilrat wrote: i don't think this is compiler bug, it's just how it works. But what code needs toHash and others for the struct type even though we are just passing a pointer around? yet this is another

Re: Linking with .dylibs on OSX?

2013-07-19 Thread evilrat
On Friday, 19 July 2013 at 22:30:42 UTC, Jeremy DeHaan wrote: On Friday, 19 July 2013 at 19:52:49 UTC, Jeremy DeHaan wrote: On Friday, 19 July 2013 at 18:29:12 UTC, evilrat wrote: On Friday, 19 July 2013 at 18:19:20 UTC, Jeremy DeHaan wrote: I was just curious if DMD supported linking

Re: concurrency problem with pointers

2013-07-20 Thread evilrat
On Friday, 19 July 2013 at 19:05:27 UTC, Ali Çehreli wrote: This seems to be a problem with any template that has to work with pointers. The following template cannot work with a pointer: ... val.type returns a TypeInfo and it seems like there is no TypeInfo special for pointers to

Re: Get template name

2013-07-29 Thread evilrat
On Monday, 29 July 2013 at 23:02:57 UTC, JS wrote: __FUNCTION__ does not return anything when used in templates. For debugging purposes I sometimes use pragma(msg, template_name); (with template_name being the name of the template assigned an enum) I would like to make this more general

Re: Hello D-world!, imports South African D-naughts

2013-08-03 Thread evilrat
On Saturday, 3 August 2013 at 05:24:11 UTC, Andre Artus wrote: On Saturday, 3 August 2013 at 04:38:13 UTC, Andre Artus wrote: Hello D-world! My name is Andre Artus, and I'm a programmer from Johannesburg, South Africa. I'm relatively new to D, but so far quite impressed by it. I have been

Re: Logging and tracing in D

2013-08-06 Thread evilrat
On Tuesday, 6 August 2013 at 04:35:39 UTC, Andre Artus wrote: What is the recommended approach for adding logging and tracing to D apps? Is there a library for it? custom very simple yet powerful logging can be achieved with templates and debug specifier, something like this:

Re: Namespace clash between modules

2013-08-13 Thread evilrat
On Tuesday, 13 August 2013 at 16:10:19 UTC, Marek Janukowicz wrote: I implemented some generic logging module and want to use single Logger object per module. Some simplified excerpt from my code: module log; mixin template makeLogger( params,,, name ) { Logger logger; static this () {

Re: Namespace clash between modules

2013-08-13 Thread evilrat
On Tuesday, 13 August 2013 at 17:14:53 UTC, evilrat wrote: module log; mixin template makeLogger( params,,, name ) { Logger logger; static this () { .. logger initialization... } } is it necessary use multiple loggers? maybe you should move ur Logger instance to module scope(log module

Re: How compile program with curl support?

2013-08-22 Thread evilrat
On Thursday, 22 August 2013 at 07:28:52 UTC, ilya-stromberg wrote: I try to compile program with curl support, but I have error: ... i rarely use rdmd, so i can only advice to try using dmd directly with following flags and see if it works, and if works its a rdmd flags problem in your case:

Re: How compile program with curl support?

2013-08-22 Thread evilrat
On Thursday, 22 August 2013 at 10:00:20 UTC, Ivan Kazmenko wrote: On Thursday, 22 August 2013 at 07:28:52 UTC, ilya-stromberg wrote: undefined reference to `curl_global_init' undefined reference to `curl_global_cleanup' What should I do to get curl support? OS is Linux Ubuntu 12.10. I

Re: Resizing child windows using phobos

2013-08-22 Thread evilrat
On Thursday, 22 August 2013 at 11:34:40 UTC, Alex wrote: So i have been trying to send WM_SIZE messages to my child windows in my application window proc. I am sending theese messages when the application window is resized. But it will not work. They keep the same child window size as they

Re: How compile program with curl support?

2013-08-22 Thread evilrat
On Thursday, 22 August 2013 at 13:15:39 UTC, ilya-stromberg wrote: On Thursday, 22 August 2013 at 10:24:49 UTC, David wrote: What should I do to get curl support? OS is Linux Ubuntu 12.10. Install libcurl-dev http://packages.ubuntu.com/de/lucid/libcurl-dev Add -L-lcurl to your commandline

Re: How compile program with curl support?

2013-08-22 Thread evilrat
On Thursday, 22 August 2013 at 13:27:32 UTC, ilya-stromberg wrote: On Thursday, 22 August 2013 at 13:20:44 UTC, evilrat wrote: why do u link phobos when compiler do this for you? Because without it doesn't work: $ dmd -L-lcurl main.d /usr/lib/x86_64-linux-gnu/libphobos2.a(curl.o

Re: GC.collect bug ?

2013-09-13 Thread evilrat
On Friday, 13 September 2013 at 15:24:17 UTC, Temtaime wrote: Hello for all ! I need to call all objects destructors in one place. It's guaranted, that there is no objects instances. I tried use GC.collect but it's produces strange results. import std.stdio; import core.memory; class A {

Re: Designing an API with D.

2013-09-30 Thread evilrat
On Tuesday, 1 October 2013 at 00:37:48 UTC, Agustin wrote: Hello, i'm trying to make a library and i would like to use that library on a separated application using only interfaces. I know how to do it using C++, but i don't known using D. Can anyone help me? Project #1 include/*.d - These are

directx bindings problem

2013-10-03 Thread evilrat
i'm trying directx bindings from dsource (http://dsource.org/projects/bindings/wiki/DirectX) and encountered problem, when calling swap chain getbuffer it suddenly crashes. does anyone using it? any help please :( // Create a render target view ID3D11Texture2D* pBackBuffer; // C++

Re: directx bindings problem

2013-10-03 Thread evilrat
On Thursday, 3 October 2013 at 09:35:46 UTC, Benjamin Thaut wrote: Am 03.10.2013 08:19, schrieb evilrat: i'm trying directx bindings from dsource (http://dsource.org/projects/bindings/wiki/DirectX) and encountered problem, when calling swap chain getbuffer it suddenly crashes. does anyone

Re: directx bindings problem

2013-10-03 Thread evilrat
On Thursday, 3 October 2013 at 10:08:42 UTC, Benjamin Thaut wrote: NO I mean are you sure the library paths are correctly set to the June 2010 DirectX SDK/lib path? all paths are set correctly. Do you use 32 or 64 bit? 32 bit. You can get details on crashes inside DirectX by using the

Re: directx bindings problem

2013-10-03 Thread evilrat
On Thursday, 3 October 2013 at 11:21:14 UTC, Benjamin Thaut wrote: Am 03.10.2013 12:47, schrieb evilrat: On Thursday, 3 October 2013 at 10:08:42 UTC, Benjamin Thaut wrote: NO I mean are you sure the library paths are correctly set to the June 2010 DirectX SDK/lib path? all paths are set

Re: directx bindings problem

2013-10-03 Thread evilrat
On Thursday, 3 October 2013 at 11:30:58 UTC, Andrej Mitrovic wrote: On 10/3/13, evilrat evilrat...@gmail.com wrote: // Create a render target view ID3D11Texture2D* pBackBuffer; // C++ version //hr = g_pSwapChain-GetBuffer( 0, __uuidof( ID3D11Texture2D ),(LPVOID*)pBackBuffer ); // D

Re: directx bindings problem

2013-10-05 Thread evilrat
On Thursday, 3 October 2013 at 06:19:27 UTC, evilrat wrote: i'm trying directx bindings from dsource (http://dsource.org/projects/bindings/wiki/DirectX) and encountered problem, when calling swap chain getbuffer it suddenly crashes. does anyone using it? any help please :( // Create a render

Re: directx bindings problem

2013-10-05 Thread evilrat
oh, on the second thought after some tests, i encountered major ABI(or should i say MS 'optimization'?) mismatch which requires almost any function to be wrapped within C++ code to work, i doubt it would ever costs such efforts for me. so i'm tired off both C++ and D. and programming in

Re: directx bindings problem

2013-10-06 Thread evilrat
On Sunday, 6 October 2013 at 16:45:59 UTC, Benjamin Thaut wrote: Am 06.10.2013 07:25, schrieb evilrat: oh, on the second thought after some tests, i encountered major ABI(or should i say MS 'optimization'?) mismatch which requires almost any function to be wrapped within C++ code to work, i

Re: Checking if a string contains a string?

2013-10-17 Thread evilrat
On Thursday, 17 October 2013 at 06:27:19 UTC, Jeremy DeHaan wrote: Maybe I am just tired or something, but I tried searching for a way that is already included in phobos for checking if a string contains another string and couldn't find anything. I managed to write my own function for doing

Re: Can't compile on 64 bit Windows

2013-10-19 Thread evilrat
On Sunday, 28 April 2013 at 12:46:31 UTC, Josh wrote: I followed the instructions in http://wiki.dlang.org/Installing_DMD_on_64-bit_Windows_7_(COFF-compatible) and all seems ok. Except I get these errors when I'm compiling: Is there anything that those instructions left out that I need to do

Re: D on Windows - linker question

2013-10-19 Thread evilrat
On Friday, 18 October 2013 at 16:52:01 UTC, Benjamin Thaut wrote: Am 18.10.2013 18:40, schrieb Erik van Velzen: Hello, I have set up my enviroment according to these instructions: http://wiki.dlang.org/Installing_DMD_on_64-bit_Windows_7_%28COFF-compatible%29 When I compile a small tutorial

Re: D on Windows - linker question

2013-10-20 Thread evilrat
On Sunday, 20 October 2013 at 21:47:53 UTC, Erik van Velzen wrote: My goal was to learn D and Direct3D at the same time. I've tried to set up DMD to do this, but I keep running into issues that the available DirectX11 and win32 headers are incomplete, or won't compile (tried both dmd 2.063

Re: D on Windows - linker question

2013-10-21 Thread evilrat
On Monday, 21 October 2013 at 07:46:41 UTC, Andrew wrote: On Monday, 21 October 2013 at 04:38:05 UTC, evilrat wrote: On Sunday, 20 October 2013 at 21:47:53 UTC, Erik van Velzen wrote: My goal was to learn D and Direct3D at the same time. I've tried to set up DMD to do this, but I keep running

Re: D on Windows - linker question

2013-10-21 Thread evilrat
On Monday, 21 October 2013 at 08:12:49 UTC, Andrew wrote: If you want to offer Direct3D in D as is (I prefer this option instead of wrapper-libraries), you'll have to make it COM'ish and C'ish :-) I actually consider looking into this problem, I'm skilled C++ graphics programmer. i think

Re: D on Windows - linker question

2013-10-21 Thread evilrat
On Tuesday, 22 October 2013 at 01:07:48 UTC, Erik van Velzen wrote: I do get a few compiler errors with DMD in these win32.* modules about incorrect typecasts. I will make a new topic if these persist or file a bug report with the author. if you use x64 build then i must disappoint you, it

Re: Just noticed something interesting in the std.allocator source...

2013-10-26 Thread evilrat
as replied, version(none) allows removing some code from build but it still parses and spew errors in it, there is also version(all) to re-enable code.

Re: directx bindings problem

2013-10-29 Thread evilrat
omg, almost a month passed and i even didn't notice it. after some research i'm still don't know what the problem. some COM calls works, some fails(probably wrong method calls, and it not crashes just because same args). now i have half working d3d11 and not working at all xaudio2. due to

Re: directx bindings problem

2013-10-29 Thread evilrat
On Tuesday, 29 October 2013 at 11:47:00 UTC, Benjamin Thaut wrote: Am 29.10.2013 10:38, schrieb evilrat: omg, almost a month passed and i even didn't notice it. after some research i'm still don't know what the problem. some COM calls works, some fails(probably wrong method calls

Re: directx bindings problem

2013-10-29 Thread evilrat
On Tuesday, 29 October 2013 at 13:35:11 UTC, Benjamin Thaut wrote: I already found the first problem with your library. Your directx modules have module declarations in the form of: module directx.xaudio2; but they are directly within the src directory. You should create a subfolder called

Re: directx bindings problem

2013-10-29 Thread evilrat
On Tuesday, 29 October 2013 at 14:13:40 UTC, Benjamin Thaut wrote: As I'm not familiar with xaudio2 I will not be able to help you unless you present a example which actually crashes. I don't think this is a COM issue. Does a C++ program which does the same work? C++ example works

Re: directx bindings problem

2013-10-29 Thread evilrat
On Tuesday, 29 October 2013 at 14:13:40 UTC, Benjamin Thaut wrote: I also found that for all pp members which take pointers to COM interfaces. For example the CreateMasteringVoice IXAudio2MasteringVoice** ppMasteringVoice member. In D interfaces are already reference types. So it should read

Re: directx bindings problem

2013-10-29 Thread evilrat
On Tuesday, 29 October 2013 at 19:40:40 UTC, Benjamin Thaut wrote: So I found it. Its actually your fault. IXAudio2Voice isn't a COM interface. That means it should _not_ inherit from IUnkown. But if it isn't a COM interface it can't be a regular D interface either, because if it is a regular

Re: directx bindings problem

2013-10-30 Thread evilrat
On Wednesday, 30 October 2013 at 15:18:57 UTC, Benjamin Thaut wrote: Well we all make problems. Give me a note when you are done with complete directx bindings as I'm also interrested in having minimal up to date directx bindings. Also its always apperciated to thank you a person which

Re: How to iterate using foreach on a class?

2013-11-01 Thread evilrat
On Friday, 1 November 2013 at 11:39:15 UTC, Gary Willoughby wrote: On Friday, 1 November 2013 at 11:35:03 UTC, simendsjo wrote: On Friday, 1 November 2013 at 11:30:12 UTC, Gary Willoughby wrote: I have a class which contains an array as a core collection of data. I want to pass an instance of

Re: How to compile and test samples under Windows?

2013-11-06 Thread evilrat
On Wednesday, 6 November 2013 at 09:02:57 UTC, Adam Ryczkowski wrote: I installed the DMD32 D Compiler v2.063.2 into C:\ I try to complie and test the dserver.d sample specifically, but when I run build.bat in the dmd2\samples\d directory, I've got the following errors.

  1   2   3   4   5   >