Re: Programming a Game in D? :D

2014-05-23 Thread evilrat via Digitalmars-d-learn
On Friday, 23 May 2014 at 14:43:30 UTC, David wrote: On Friday, 23 May 2014 at 14:11:26 UTC, David wrote: Ok so I installed DDT for eclipse now but have a problem :D First the imports are changed, std.studio is now std.stdio (or its something completly else) And if I try to run the file now it

Re: Programming a Game in D? :D

2014-05-24 Thread evilrat via Digitalmars-d-learn
On Saturday, 24 May 2014 at 09:35:01 UTC, David wrote: On Friday, 23 May 2014 at 17:47:56 UTC, evilrat wrote: why not just use Xamarin Studio with Mono-D? But only the trial of Xamarin Studio is for free, and I used eclipse for Java before and really like it :P actually not. you don't even

Re: Programming a Game in D? :D

2014-05-24 Thread evilrat via Digitalmars-d-learn
On Saturday, 24 May 2014 at 16:41:41 UTC, Dmitry wrote: On Saturday, 24 May 2014 at 09:49:30 UTC, evilrat wrote: why not just use Xamarin Studio with Mono-D? But only the trial of Xamarin Studio is for free, and I used eclipse for Java before and really like it :P actually not. you don't even n

Re: Programming a Game in D? :D

2014-05-25 Thread evilrat via Digitalmars-d-learn
On Sunday, 25 May 2014 at 08:59:55 UTC, Dmitry wrote: On Saturday, 24 May 2014 at 18:00:05 UTC, evilrat wrote: there is a plugin for linux for GDB i believe, and another plugin for Windows which i can't remember the name, the latter one disappeared from XS 5.0 by some reason. search the extens

Re: Programming a Game in D? :D

2014-05-25 Thread evilrat via Digitalmars-d-learn
On Sunday, 25 May 2014 at 08:59:55 UTC, Dmitry wrote: I use Windows. Thanks, I think I found it: https://github.com/llucenic/MonoDevelop.Debugger.Gdb.D But now I cant install it, here is error: The package 'MonoDevelop.Core v4.0' could not be found in any repository The package 'MonoDevelop.Ide

alias and mixin

2014-08-31 Thread evilrat via Digitalmars-d-learn
what the problem with this? alias myint = mixin("int"); // <- basic type expected blah blah blah... mixin alias unusable now, it blocks various cool templates and really frustrating(such things make D feels like some cheap limited language), is there any way to tell compiler explicitly use

Re: alias and mixin

2014-08-31 Thread evilrat via Digitalmars-d-learn
On Sunday, 31 August 2014 at 11:43:03 UTC, ketmar via Digitalmars-d-learn wrote: On Sun, 31 Aug 2014 11:26:47 + evilrat via Digitalmars-d-learn wrote: alias myint = mixin("int"); // <- basic type expected blah blah mixin("alias myint = "~"int"~&quo

Re: Programming a Game in D? :D

2014-08-31 Thread evilrat via Digitalmars-d-learn
On Sunday, 31 August 2014 at 19:06:41 UTC, David wrote: So first of all, I'm not sure if D is really the best choice for me. Since its just pretty hard for begginers like me without any tutorials and anything to come up with a game. Then what language should it be? It should have a big communi

Re: alias and mixin

2014-09-01 Thread evilrat via Digitalmars-d-learn
On Sunday, 31 August 2014 at 12:01:43 UTC, evilrat wrote: On Sunday, 31 August 2014 at 11:43:03 UTC, ketmar via Digitalmars-d-learn wrote: On Sun, 31 Aug 2014 11:26:47 + evilrat via Digitalmars-d-learn wrote: alias myint = mixin("int"); // <- basic type expected blah

Re: alias and mixin

2014-09-01 Thread evilrat via Digitalmars-d-learn
On Monday, 1 September 2014 at 11:23:37 UTC, ketmar via Digitalmars-d-learn wrote: On Mon, 01 Sep 2014 10:57:41 + evilrat via Digitalmars-d-learn wrote: p.s. you should really read about D mixins and templates. they aren't such intuitive sometimes, has their set of funny restric

Re: Overriding to!string on enum types

2014-09-02 Thread evilrat via Digitalmars-d-learn
On Tuesday, 2 September 2014 at 12:54:55 UTC, Nordlöw wrote: Is it possible to override the behaviour of to!string(x) when x is an enum. I'm asking because this enum CxxRefQualifier { none, normalRef, rvalueRef } string toString(CxxRefQualifier refQ) @safe pure nothrow { final

Re: Overriding to!string on enum types

2014-09-02 Thread evilrat via Digitalmars-d-learn
sorry, i forgot everything. here is example of how to do this - import std.conv : to; enum Test { One, Two, Three, } template to(T: string) { T to(A: Test)(A val) { final switch (val) { case Test.One: return "1"; case Test.Two: return "2"; case Test.Three: return "3"; }

Re: Overriding to!string on enum types

2014-09-02 Thread evilrat via Digitalmars-d-learn
On Tuesday, 2 September 2014 at 15:42:36 UTC, monarch_dodra wrote: Word of warning: You are not overriding "to", but rather, simply defining your own "to" locally, which resolves as a better match in the context where you are using it. If you pass the enum to another function in another modu

Re: basic question about adresses and values in structs

2014-09-04 Thread evilrat via Digitalmars-d-learn
On Thursday, 4 September 2014 at 09:54:57 UTC, nikki wrote: thanks! just what I needed, with some stumbling I managed to get everything working as intended: using a pointer variable to save an adres of a function, then dereferencing to use it. Now I am wondering when to use the ** ? for examp

dub github dependencies?

2014-09-04 Thread evilrat via Digitalmars-d-learn
how i can specify github repo & branch? i've already tried adding everything i have in mind but no luck so far. so in theory it should be like this: -- dub.json "dependencies": { "cairod": {"version": "~ReworkWin32", "path": "https://github.com/evilrat666/cairoD.git"} }

Re: dub github dependencies?

2014-09-04 Thread evilrat via Digitalmars-d-learn
On Thursday, 4 September 2014 at 17:22:42 UTC, Gary Willoughby wrote: On Thursday, 4 September 2014 at 16:43:13 UTC, evilrat wrote: how i can specify github repo & branch? i've already tried adding everything i have in mind but no luck so far. so in theory it should be like this: --

Re: Recomended cairo bindings

2014-09-14 Thread evilrat via Digitalmars-d-learn
On Sunday, 14 September 2014 at 13:30:28 UTC, Paul Z. Barsan wrote: First of all, the cairo version in the dub registry is different from the deimos version. CairoD (dub pkg) has support for more surfaces and provides D-style wrappers but I get compile-time errors. When I try to get an instan

Re: Recomended cairo bindings

2014-09-15 Thread evilrat via Digitalmars-d-learn
On Monday, 15 September 2014 at 12:11:09 UTC, Paul Z. Barsan wrote: Variables like CAIRO_HAS_XLIB_SURFACE are platform specific, xlib and xcb surfaces are for linux, win32 and directfb surfaces are for windows and so on.. I will search in dubs documentation how can I specify this sort of vari

Re: Function Pointers with Type T

2014-09-16 Thread evilrat via Digitalmars-d-learn
On Tuesday, 16 September 2014 at 01:16:14 UTC, Adam D. Ruppe wrote: bool function(T val1,T val2) ptr=&comp!T; Moreover, comp has compile time arguments, so you can't take the address of it without forwarding the arguments. So instead of &comp, you use &comp!T - passing the T from the outside

Re: [Dub Problem] DMD compile run failed with exit code -9

2014-09-19 Thread evilrat via Digitalmars-d-learn
On Friday, 19 September 2014 at 15:58:37 UTC, Jack wrote: Disclaimer: I'm a newbie so don't bite me. Anyway I've been testing out dub in an ArchLinux environment that is inside a VM software(namely VirtualBox) and tried to build the Dash-sample game. The whole process went smoothly until it

Re: [Dub Problem] DMD compile run failed with exit code -9

2014-09-19 Thread evilrat via Digitalmars-d-learn
On Friday, 19 September 2014 at 16:35:39 UTC, Jack wrote: On Friday, 19 September 2014 at 16:06:23 UTC, evilrat wrote: On Friday, 19 September 2014 at 15:58:37 UTC, Jack wrote: Disclaimer: I'm a newbie so don't bite me. Anyway I've been testing out dub in an ArchLinux environment that is insi

Re: [DerelictAlure] Error loading libdumb.so etc...

2014-09-20 Thread evilrat via Digitalmars-d-learn
On Saturday, 20 September 2014 at 06:47:09 UTC, Jack wrote: I've configured dub to build DerelictAlure for my project which only contains the example code shown in: https://github.com/DerelictOrg/DerelictALURE The build was successful though when I tried to run it, they were spewing out that t

Re: Can't get Visual D to come up. No warnings, no errors, no nothing

2014-09-22 Thread evilrat via Digitalmars-d-learn
On Tuesday, 23 September 2014 at 03:14:27 UTC, WhatMeWorry wrote: On Monday, 22 September 2014 at 03:30:22 UTC, Vladimir Panteleev wrote: On Monday, 22 September 2014 at 03:21:44 UTC, WhatMeWorry wrote: Anybody installed Visual D recently? As per the install instructions, I downloaded the Vis

Re: Can't get Visual D to come up. No warnings, no errors, no nothing

2014-09-22 Thread evilrat via Digitalmars-d-learn
On Tuesday, 23 September 2014 at 05:13:58 UTC, evilrat wrote: On Tuesday, 23 September 2014 at 03:14:27 UTC, WhatMeWorry wrote: I've downloaded the "isolated shell and the integrated package" installer and successfully installed them both. But after that I have no clue as to how to proceed. I o

Re: Can't get Visual D to come up. No warnings, no errors, no nothing

2014-09-23 Thread evilrat via Digitalmars-d-learn
On Tuesday, 23 September 2014 at 07:02:58 UTC, remco johannes wrote: On Monday, 22 September 2014 at 03:21:44 UTC, WhatMeWorry wrote: Anybody installed Visual D recently? As per the install instructions, I downloaded the Visual Studio isolated Shell 2013 and its integrated package. Everythin

Re: Can't get Visual D to come up. No warnings, no errors, no nothing

2014-09-23 Thread evilrat via Digitalmars-d-learn
On Tuesday, 23 September 2014 at 10:29:10 UTC, remco johannes wrote: why you guys have problems with it? it is so simple, install isolated shell first, then install ingegrated shell, install visuald and now you have your visuald environment ready to use. i Tried al kind of combination and in

Re: DirectX 11 bindings?

2014-09-30 Thread evilrat via Digitalmars-d-learn
On Tuesday, 30 September 2014 at 13:05:56 UTC, Denis Gladkiy wrote: http://www.dsource.org/projects/bindings/browser/trunk/directx On Sunday, 8 August 2010 at 15:13:19 UTC, Trass3r wrote: Are there any bindings for DirectX 11? The bindings project only contains DX9 and DX10. better check http

Re: Opening dub packages in Mono-D

2014-09-30 Thread evilrat via Digitalmars-d-learn
On Tuesday, 30 September 2014 at 21:47:01 UTC, Phil wrote: I'm trying to use Mono-D, but can't work out how to do simple things. I've tried looking for tutorials but this http://wiki.dlang.org/Mono-D is all I could find. I want to reference Pegged from a Mono-D project. I can't add its packag

Re: Invalid Assembly Generated

2014-10-04 Thread evilrat via Digitalmars-d-learn
On Saturday, 4 October 2014 at 09:40:24 UTC, Bauss wrote: I am not able to run the output file compiled. I am not sure if it might be an error with my commandline or not. Operating System: Windows 8 Commandline Arguments Try1: -c hello.d out\hello.exe Commandline Arguments Try2: -c hello.d -m32

Re: Returning structs from COM

2016-12-18 Thread evilrat via Digitalmars-d-learn
On Saturday, 3 December 2016 at 09:51:00 UTC, John C wrote: Some DirectX methods return structs by value, but when I try calling them I either get garbage or an access violation. Usually COM methods return structs by pointer as a parameter, but these are returning the struct as the actual retu

Re: Returning structs from COM

2016-12-19 Thread evilrat via Digitalmars-d-learn
On Monday, 19 December 2016 at 09:49:13 UTC, kinke wrote: On Saturday, 3 December 2016 at 09:51:00 UTC, John C wrote: Some DirectX methods return structs by value, but when I try calling them I either get garbage or an access violation. Usually COM methods return structs by pointer as a parame

Re: Returning structs from COM

2016-12-19 Thread evilrat via Digitalmars-d-learn
On Monday, 19 December 2016 at 22:47:26 UTC, kinke wrote: On Monday, 19 December 2016 at 09:49:13 UTC, kinke wrote: [...] I did some research myself and indeed, COM classes/interfaces are apparently subject to a separate ABI. Unfortunately, googling it hasn't turned up any official (and not

Re: Is it possbile to specify a remote git repo as dub dependency?

2016-12-20 Thread evilrat via Digitalmars-d-learn
On Tuesday, 20 December 2016 at 11:04:30 UTC, biocyberman wrote: On Monday, 19 December 2016 at 16:23:45 UTC, Guillaume Piolat wrote: What you can do for private package as of today is: - use path-based dependencies and put your packages in the same repo - use git submodules and path-based

D3D12 memory issues

2016-12-20 Thread evilrat via Digitalmars-d-learn
Hello guys, I have DirectX 12 code that doesn't work in D (it works in C++), as the subject says this can be related to D heap and/or thread local storage. code can be found here (build with dmd -m32mscoff) https://github.com/evilrat666/directx-d/blob/master/examples/d3d12_hello/source/d3d12_

Re: returning struct, destructor

2016-12-21 Thread evilrat via Digitalmars-d-learn
On Wednesday, 21 December 2016 at 14:15:06 UTC, John C wrote: On Wednesday, 21 December 2016 at 11:45:18 UTC, Eugene Wissner wrote: This prints 3 times "Destruct" with dmd 0.072.1. If I remove the if block, it prints "Destruct" only 2 times - the behavior I'm expecting. Why? Possibly to do wi

Re: Are there plans to make mono D work with current version?

2017-01-25 Thread evilrat via Digitalmars-d-learn
On Thursday, 26 January 2017 at 01:58:51 UTC, Adam Wilson wrote: I'd recommend VSCode with Code-D works very well for me. https://github.com/Pure-D/code-d And with Microsoft C++ tools (ms-vscode.cpptools) it can debug D too with x64 or -m32mscoff

Re: How do I call a C++ struct default constructor from D?

2017-02-08 Thread evilrat via Digitalmars-d-learn
On Tuesday, 7 February 2017 at 14:26:11 UTC, MGW wrote: On Tuesday, 7 February 2017 at 13:37:01 UTC, Atila Neves wrote: Here still example https://pp.vk.me/c636630/v636630885/46579/neSdIip1ySI.jpg I'm sorry for being offensive, but... Of course, and the next step will be pragma mangle on D fu

Re: Why is for() less efficient than foreach?

2017-02-10 Thread evilrat via Digitalmars-d-learn
On Friday, 10 February 2017 at 12:39:50 UTC, Bastiaan Veelo wrote: Depending on the machine this is run on, for() performs a factor 3-8 slower than foreach(). Can someone explain this to me? Or, taking for() as the norm, how can foreach() be so blazingly fast? Thanks! On my machine (AMD FX-8

Re: Why is for() less efficient than foreach?

2017-02-10 Thread evilrat via Digitalmars-d-learn
On Friday, 10 February 2017 at 13:13:24 UTC, evilrat wrote: On my machine (AMD FX-8350) actually almost no difference oops, it skips flags with -run -_- sorry dmd loops.d -release Function 0 took: 16 ╬╝s and 5 hnsecs Function 1 took: 55 secs, 262 ms, 844 ╬╝s, and 6 hnsecs Function 2 took: 56

Re: Recommend: IDE and GUI library

2017-02-24 Thread evilrat via Digitalmars-d-learn
On Saturday, 25 February 2017 at 00:45:24 UTC, Moritz Maxeiner wrote: I use Visual Studio Code on Linux and macOS, not sure how the experience on Windows is, but I'd expect it to be the same. Windows is fine, can also debug mscoff x86 or x64 projects with MS 'cpptools' plugin that has visu

Re: Recommend: IDE and GUI library

2017-03-01 Thread evilrat via Digitalmars-d-learn
On Wednesday, 1 March 2017 at 23:44:47 UTC, XavierAP wrote: For this I found out how to clone the dependencies, sorry about that... (Only from the command line... Anyone recommends better free Windows Git gui clients than GitHub Desktop?) TortoiseGIT maybe?

Re: DMD + Dynamic Library.

2017-03-08 Thread evilrat via Digitalmars-d-learn
On Wednesday, 8 March 2017 at 18:21:35 UTC, Damien Gibson wrote: On Wednesday, 8 March 2017 at 06:28:47 UTC, Jerry wrote: You have to use "export" for any symbol to be visible from a dll. On Windows by default nothing is exported. Would "export" and "export extern(D):" not be the same? Im con

Re: Declaring interfaces with a constructor

2017-03-13 Thread evilrat via Digitalmars-d-learn
On Monday, 13 March 2017 at 19:31:52 UTC, David Zhang wrote: Basically, I want to define a common interface for a group of platform-specific classes, except that they should ideally also share constructor parameters. What I want to do is then alias them to a common name, selecting the implem

Re: Declaring interfaces with a constructor

2017-03-14 Thread evilrat via Digitalmars-d-learn
On Tuesday, 14 March 2017 at 13:54:41 UTC, David Zhang wrote: Yeah, that's the idea. Though I just thought of a possibility using an isPublicInterface template. Is that what you meant by templates and duck typing? Not sure about what that template does, but the idea behind ranges is relyin

Re: How to COM interfaces work

2017-03-18 Thread evilrat via Digitalmars-d-learn
On Sunday, 19 March 2017 at 02:04:53 UTC, StarGrazer wrote: I have a COM interface that is dynamically created using invoke and such. One of the functions returns an interface. It is just a value of IUnknown or whatever. If I use it as a pointer in to the the D interface equivalent, it cras

Re: How to COM interfaces work

2017-03-18 Thread evilrat via Digitalmars-d-learn
On Sunday, 19 March 2017 at 03:27:28 UTC, StarGrazer wrote: I'd just like to get some conformation on the process so at least I know I'm headed in the right direction. The project is pretty complex and most of the stuff is done in compile time code. What debug shows? If CoCreateInstance an

Re: COM2D Wrapper

2017-03-27 Thread evilrat via Digitalmars-d-learn
On Monday, 27 March 2017 at 21:02:05 UTC, Nierjerson wrote: On Friday, 24 March 2017 at 18:17:31 UTC, Nierjerson wrote: I'd like to present the following D library I am working on: https://github.com/IllusionSoftware/COM2D I get access violations when trying to call the functions on the retu

Re: Single exe vibe.d app

2017-04-05 Thread evilrat via Digitalmars-d-learn
On Wednesday, 5 April 2017 at 12:13:38 UTC, Satoshi wrote: Hi, How can I build single exe application with vibe.d (windows)? now it require zlib.dll, libeay32.dll and ssleay32.dll But I need it as single app. you have to build those as static libraries first, compile vibe.d with that static l

Re: Single exe vibe.d app

2017-04-05 Thread evilrat via Digitalmars-d-learn
On Wednesday, 5 April 2017 at 12:13:38 UTC, Satoshi wrote: Hi, How can I build single exe application with vibe.d (windows)? now it require zlib.dll, libeay32.dll and ssleay32.dll But I need it as single app. btw, if all you need is to ship it as a single file and don't care if it writes anyt

Re: Top level associative arrays

2017-05-02 Thread evilrat via Digitalmars-d-learn
On Tuesday, 2 May 2017 at 07:48:35 UTC, ANtlord wrote: Hello! Is it possible to define associative array on top level of module? I try to compile this code and I get message `Error: non-constant expression ["s":"q", "ss":"qq"]` import std.stdio; auto dict = [ "s": "q", "ss": "

Re: Top level associative arrays

2017-05-02 Thread evilrat via Digitalmars-d-learn
On Tuesday, 2 May 2017 at 09:50:50 UTC, ANtlord wrote: On Tuesday, 2 May 2017 at 08:24:09 UTC, evilrat wrote: Making enum means that value should be available at compile time and AA's are fully dynamic. But if my memory serves me well, you can declare empty AA and delay initialization. So th

Re: C++ binding issues with C++ function returning a simple POD struct.

2017-05-21 Thread evilrat via Digitalmars-d-learn
On Monday, 22 May 2017 at 01:27:22 UTC, Nicholas Wilson wrote: On Sunday, 21 May 2017 at 19:33:06 UTC, ParticlePeter wrote: I am statically linking to ImGui [1] on Win 10 x64, quite successfully till this issue came up. The noticed error so far comes when an ImGui function returns an ImVec2, a

Re: C++ binding issues with C++ function returning a simple POD struct.

2017-05-22 Thread evilrat via Digitalmars-d-learn
On Monday, 22 May 2017 at 06:33:37 UTC, ParticlePeter wrote: On Monday, 22 May 2017 at 01:39:04 UTC, evilrat wrote: And this is actually D problem. In fact first bug report on this thing was dated back to 2014. Still not fixed. Thanks for your reply, do you have any links to some bug report

Re: C++ binding issues with C++ function returning a simple POD struct.

2017-05-22 Thread evilrat via Digitalmars-d-learn
On Monday, 22 May 2017 at 08:03:07 UTC, ParticlePeter wrote: No, no, this (other) way around :-), still C++ to D. It actually works btw: HACK --- // original C++ ImVec2 GetCursorPos(); // C++ helper void GetCursorPos(ImVec2& result) { result = GetCursorPos(); } //

Re: C++ binding issues with C++ function returning a simple POD struct.

2017-05-22 Thread evilrat via Digitalmars-d-learn
On Monday, 22 May 2017 at 11:25:31 UTC, ParticlePeter wrote: Then I am not getting your hack, this function here, does not exist on the C++ side. HACK --- // extern(C++) of course void GetCursorPos(ImVec2* v); How is it supposed to work then if there is no definition?

Re: C++ binding issues with C++ function returning a simple POD struct.

2017-05-22 Thread evilrat via Digitalmars-d-learn
On Monday, 22 May 2017 at 18:51:43 UTC, ParticlePeter wrote: On Monday, 22 May 2017 at 14:01:56 UTC, Jerry wrote: IIRC the problem is that it isn't a POD type. ImVec2 has its own default constructor. The problem now is that because it no longer is POD, Window's ABI handles it different and doe

<    1   2   3