Re: Building is slow!

2018-04-16 Thread Ivan Trombley via Digitalmars-d
I want to revisit this issue. Building 64 bit on Linux, release or debug, is fast. However, building 64 bit release on Windows 10 is super slow. I have a cross platform app that uses gtk-d. Today, I updated DMD to 2.079.1 and the gtk-d lib to 3.8.0. When I performed a debug build on Windows

Re: Vulkan

2018-02-16 Thread Ivan Trombley via Digitalmars-d
On Wednesday, 14 February 2018 at 00:22:25 UTC, flamencofantasy wrote: Maybe these work, not sure; https://github.com/Rikarin/VulkanizeD Thanks, I'll check this out.

Re: Vulkan

2018-02-16 Thread Ivan Trombley via Digitalmars-d
On Wednesday, 14 February 2018 at 02:40:18 UTC, Mike Parker wrote: What [does] it mean to say they don't work? Have you reported any issues? I don't see any in the DerelictVulkan repo. If something's broken, please report it so it can be fixed. Derelict-vulkan is Windows only ATM.

Vulkan

2018-02-13 Thread Ivan Trombley via Digitalmars-d
I wanted to do some experimentation with Vulkan using D. None of the projects that I found (derelict-vulkan, d-vulkan and erupted) work. Are there D bindings to Vulkan that actually work?

Re: [RFC] IDE starter kit

2018-02-02 Thread Ivan Trombley via Digitalmars-d
Here's how I get started: - Install DMD. - Install Visual Studio Code. - Add Jan Jurzitza's (webfreak) serve-d and Native Debug plugins to VSC. - Get busy.

Re: Dscanner: intentionally unused variable

2018-01-07 Thread Ivan Trombley via Digitalmars-d
On Sunday, 7 January 2018 at 17:02:02 UTC, visitor wrote: It seems a simple underscore "_" as a variable name tells Dscanner exactly that. Any number of underscores but underscores only apparently. That works too. Thanks.

Re: Dscanner: intentionally unused variable

2018-01-07 Thread Ivan Trombley via Digitalmars-d
On Sunday, 7 January 2018 at 03:41:18 UTC, SimonN wrote: Another way would be to have the RAII wrapper in a with statement, but it produces extra indentation, which you might not like: with (MyStruct(100, 200)) { // code that uses the new clip rectangle } -- Simon This

Re: Dscanner: intentionally unused variable

2018-01-07 Thread Ivan Trombley via Digitalmars-d
On Sunday, 7 January 2018 at 08:46:40 UTC, Basile B. wrote: More simple is to understand D-Scanner limitations and accept that warnings are only warnings and that a message doesn't necessarily mean that there's something to do. If the output is clogged with warnings then it's more difficult

Dscanner: intentionally unused variable

2018-01-06 Thread Ivan Trombley via Digitalmars-d
While working with SDL, I found that I kept using the same pattern over and over: - Get the current clip rectangle. - Set a new clip rectangle. - restore the old clip rectangle on scope (exit). Instead of writing that code again and again, I wrote a simple function that returns a struct which

Re: Super Simple GUI Library

2018-01-02 Thread Ivan Trombley via Digitalmars-d-announce
On Tuesday, 2 January 2018 at 02:12:24 UTC, Martin Nowak wrote: On Tuesday, 2 January 2018 at 02:06:00 UTC, Ivan Trombley wrote: For now, app.d has an example in the doc comments. I'll be adding more examples to the doc comments. Generating documentation is as simple as `dub build -b ddox`

Re: Super Simple GUI Library

2018-01-01 Thread Ivan Trombley via Digitalmars-d-announce
On Monday, 1 January 2018 at 23:38:45 UTC, Anton Pastukhov wrote: Hi, it would be nice to see some more info. Screenshots, docs etc. Right now there is just another github repo without single example. For now, app.d has an example in the doc comments. I'll be adding more examples to the doc

Super Simple GUI Library

2017-12-31 Thread Ivan Trombley via Digitalmars-d-announce
I started a new GUI library project (for various reasons) base on SDL2. It's pretty basic at the moment but I created a github repository so that I can hopefully get some feedback on it. What is currently present: - App: an application struct housing the main loop. - Handle: a RAII struct for

Re: Slices and Dynamic Arrays

2017-12-30 Thread Ivan Trombley via Digitalmars-d-learn
double[] D = [3.14159]; Can you guess what D is? :D

SDL_Quit after GC shutdown?

2017-12-27 Thread Ivan Trombley via Digitalmars-d
I believe that I should call SDL_Quit before my program terminates. However, some objects may be holding on to SDL resources and freeing these resources (particularly truetype resources) causes crashiness if SDL_Quit is called before. Is there a way to have SDL_Quit (and TTF_Quit) called after

Re: Dub generates a library file that is larger in size than the one built on command line.

2017-12-16 Thread Ivan Trombley via Digitalmars-d-learn
On Sunday, 17 December 2017 at 02:42:44 UTC, Venkat wrote: dub build --vverbose That is the command I used. Would it be right to assume that -g is being added because --vverbose ? The reason I ask is the file size is about the same when I run the below command. dub build You need to add

Re: High-resolution thread sleep

2017-12-14 Thread Ivan Trombley via Digitalmars-d-learn
On Friday, 15 December 2017 at 00:39:13 UTC, Rene Zwanenburg wrote: On Thursday, 14 December 2017 at 23:45:18 UTC, Ivan Trombley wrote: Something along the lines of this: while (render) { immutable auto startTime = MonoTime.currTime; // Render the frame... immutable auto remain =

Re: High-resolution thread sleep

2017-12-14 Thread Ivan Trombley via Digitalmars-d-learn
On Thursday, 14 December 2017 at 21:47:05 UTC, Rene Zwanenburg wrote: On Thursday, 14 December 2017 at 21:11:34 UTC, Ivan Trombley wrote: I need to be able to put a thread to sleep for some amount of time. I was looking at using Thread.sleep but it appears that on Windows, it's limited to

High-resolution thread sleep

2017-12-14 Thread Ivan Trombley via Digitalmars-d-learn
I need to be able to put a thread to sleep for some amount of time. I was looking at using Thread.sleep but it appears that on Windows, it's limited to millisecond resolution. Is there a way to do this in a cross-platform way that is higher resolution?

Re: SDL2 texture blend help

2017-12-13 Thread Ivan Trombley via Digitalmars-d
On Wednesday, 13 December 2017 at 13:54:28 UTC, Martin DraĊĦar wrote: Dne 13.12.2017 v 4:03 Ivan Trombley via Digitalmars-d napsal(a): On Wednesday, 13 December 2017 at 01:44:33 UTC, Dmitry wrote: On Tuesday, 12 December 2017 at 23:28:23 UTC, Ivan Trombley wrote: Here's the code that produces

Re: SDL2 texture blend help

2017-12-12 Thread Ivan Trombley via Digitalmars-d
Here's a page that describes the issue: http://ssp.impulsetrain.com/gamma-premult.html

Re: SDL2 texture blend help

2017-12-12 Thread Ivan Trombley via Digitalmars-d
On Wednesday, 13 December 2017 at 01:44:33 UTC, Dmitry wrote: On Tuesday, 12 December 2017 at 23:28:23 UTC, Ivan Trombley wrote: Here's the code that produces the correct results (exactly the same as GIMP): Share images you used, please. Background image:

Re: SDL2 texture blend help

2017-12-12 Thread Ivan Trombley via Digitalmars-d
GIMP 2.9, that is.

Re: SDL2 texture blend help

2017-12-12 Thread Ivan Trombley via Digitalmars-d
On Tuesday, 12 December 2017 at 07:12:07 UTC, Dmitry wrote: On Tuesday, 12 December 2017 at 06:27:30 UTC, Ivan Trombley wrote: This isn't a scaling problem (which is totally solved by Scaling is not a prerequisite for this problem. pre-multiplying the alpha with the colors BTW). This is a

Re: Static array as immutable

2017-12-12 Thread Ivan Trombley via Digitalmars-d-learn
On Tuesday, 12 December 2017 at 15:30:01 UTC, Nathan S. wrote: While what you're saying is true, exponentiation not being runnable at compile-time is a defect and I would assume a regression. I'll file a bug report. FWIW when trying to run the following with DMD v2.077.1 I get: ``` void

Re: Static array as immutable

2017-12-12 Thread Ivan Trombley via Digitalmars-d-learn
On Tuesday, 12 December 2017 at 09:48:09 UTC, Jonathan M Davis wrote: On Tuesday, December 12, 2017 07:33:47 Ivan Trombley via Digitalmars-d-learn wrote: Is there some way that I can make this array immutable? static float[256] ga = void; static foreach (i; 0 .. 256) ga[i] = (i

Re: Static array as immutable

2017-12-12 Thread Ivan Trombley via Digitalmars-d-learn
On Tuesday, 12 December 2017 at 07:44:55 UTC, Radu wrote: On Tuesday, 12 December 2017 at 07:33:47 UTC, Ivan Trombley wrote: Is there some way that I can make this array immutable? static float[256] ga = void; static foreach (i; 0 .. 256) ga[i] = (i / 255.0f) ^^ (1 / 2.2f); Check

Static array as immutable

2017-12-11 Thread Ivan Trombley via Digitalmars-d-learn
Is there some way that I can make this array immutable? static float[256] ga = void; static foreach (i; 0 .. 256) ga[i] = (i / 255.0f) ^^ (1 / 2.2f);

Re: SDL2 texture blend help

2017-12-11 Thread Ivan Trombley via Digitalmars-d
On Tuesday, 12 December 2017 at 03:34:51 UTC, Dmitry wrote: On Tuesday, 12 December 2017 at 03:32:05 UTC, Ivan Trombley wrote: It turns out that it's an issue with the color channels being in sRGB color space and the alpha channel being linear. I verified this by doing a software blend of the

Re: SDL2 texture blend help

2017-12-11 Thread Ivan Trombley via Digitalmars-d
It turns out that it's an issue with the color channels being in sRGB color space and the alpha channel being linear. I verified this by doing a software blend of the images and then doing another software blend using gamma corrected values. There's a setting in opengl to correct for it,

Re: SDL2 texture blend help

2017-12-11 Thread Ivan Trombley via Digitalmars-d
On Monday, 11 December 2017 at 07:04:19 UTC, Mike Parker wrote: On Monday, 11 December 2017 at 04:57:44 UTC, Ivan Trombley wrote: Any SDL experts out there that can give me a clue? I've used SDL quite a bit, but can't help with your specific problem. However, I suggest you try the new(ish)

SDL2 texture blend help

2017-12-10 Thread Ivan Trombley via Digitalmars-d
Experimenting with compositing images in SDL2, I get a dark edge around my textures. In the image below, you can see the top example where I composite the cyan image on top of the blue/magenta image looks correct but the bottom example, which is done using SDL_RenderCopy is not correct.

Re: GUI app brings up console

2017-12-06 Thread Ivan Trombley via Digitalmars-d-learn
On Wednesday, 6 December 2017 at 21:35:43 UTC, MrSmith wrote: On Wednesday, 6 December 2017 at 21:25:27 UTC, Ivan Trombley wrote: I created a cross-platform app using gtk-d. Everything works fine but when I run it from Windows, a console window is opened. How can I tell Windows that it's a GUI

GUI app brings up console

2017-12-06 Thread Ivan Trombley via Digitalmars-d-learn
I created a cross-platform app using gtk-d. Everything works fine but when I run it from Windows, a console window is opened. How can I tell Windows that it's a GUI application so that a console is not opened (keeping in mind that this app also needs to be compiled on Linux and Mac)?

Re: Building is slow!

2017-12-05 Thread Ivan Trombley via Digitalmars-d
There are issues with using "--build-mode=singleFile --parallel". On Windows I get errors saying that it can't write out some intermediate files (it looks like the file names may be too long for Windows) and on Linux, it makes the executable at least 3 MB larger in release mode. Also, it

Re: Building is slow!

2017-12-02 Thread Ivan Trombley via Digitalmars-d
On Saturday, 2 December 2017 at 23:26:20 UTC, Ivan Trombley wrote: On Saturday, 2 December 2017 at 14:34:58 UTC, Arek wrote: You can try `dub build --build-mode=single-file --parallel`. It will execute separate instance of compiler for each source file. If --parallel is given, dub will launch

Re: Building is slow!

2017-12-02 Thread Ivan Trombley via Digitalmars-d
On Saturday, 2 December 2017 at 14:34:58 UTC, Arek wrote: You can try `dub build --build-mode=single-file --parallel`. It will execute separate instance of compiler for each source file. If --parallel is given, dub will launch several instances of dmd in parallel. I get the error: Error

Re: Building is slow!

2017-12-02 Thread Ivan Trombley via Digitalmars-d
On Saturday, 2 December 2017 at 03:08:10 UTC, rjframe wrote: There is a --parallel flag: `dub build --parallel`. The help string says it "Runs multiple compiler instances in parallel, if possible." Thanks, I'll give that a try. After an hour, I pressed CTRL+C, shut it down and went home.

Building is slow!

2017-12-01 Thread Ivan Trombley via Digitalmars-d
When DUB bulds the gtk-d library, it takes a long time. This is mostly because it's only using one processor. It hasn't been such a big deal on Linux but I'm building my app on Windows right now and it been building gtk-d for the last half hour! Is there any way to make DUB use more

Re: Localization (i18n) Options

2017-11-30 Thread Ivan Trombley via Digitalmars-d
Figured it out. I was initializing some member strings where they were declared in a class. I just needed to move that initialization to the constructor.

Re: Localization (i18n) Options

2017-11-30 Thread Ivan Trombley via Digitalmars-d
On Thursday, 30 November 2017 at 00:50:35 UTC, Gerald wrote: On Tuesday, 28 November 2017 at 07:39:19 UTC, Ivan Trombley wrote: On Sunday, 24 January 2016 at 19:18:28 UTC, Gerald wrote: On Monday, 18 January 2016 at 09:04:48 UTC, Luis wrote: Please, write a HowTo some where. GtkD lack of

Re: Localization (i18n) Options

2017-11-27 Thread Ivan Trombley via Digitalmars-d
On Sunday, 24 January 2016 at 19:18:28 UTC, Gerald wrote: On Monday, 18 January 2016 at 09:04:48 UTC, Luis wrote: Please, write a HowTo some where. GtkD lack of documentation it's very anoying. I've gotten this going with Terminix and posted some information what it took to get it going

Re: GtkD help

2017-11-20 Thread Ivan Trombley via Digitalmars-d-learn
On Monday, 20 November 2017 at 08:01:28 UTC, Ivan Trombley wrote: I solved the TreeView text cooler l color issue by using markup. Phoned.

Re: GtkD help

2017-11-20 Thread Ivan Trombley via Digitalmars-d-learn
Since I wanted people to just be able to run the executable and not have to go through some install process, glib.Settings turned out to be a no-go since it requires a schema file to be installed in a specific place. Instead, I just create a json sidecar file next to the app in order to store

Re: GtkD help

2017-11-19 Thread Ivan Trombley via Digitalmars-d-learn
On Sunday, 19 November 2017 at 13:59:10 UTC, Mike Wey wrote: On 18-11-17 22:57, Ivan Trombley wrote: [...] To change how a cell is rendered you will need to add a CellRenderer to the column, a CellRendererText would be used for rendering text and it has a foreground property to change the

Re: GtkD help

2017-11-19 Thread Ivan Trombley via Digitalmars-d-learn
On Sunday, 19 November 2017 at 09:54:06 UTC, Antonio Corbi wrote: On Saturday, 18 November 2017 at 22:31:15 UTC, Ivan Trombley wrote: Any information about using gio.Settings would be really appreciated too. Hi Ivan, I would recommend you to search for information about Gtk under valadoc

Re: GtkD help

2017-11-18 Thread Ivan Trombley via Digitalmars-d-learn
Any information about using gio.Settings would be really appreciated too.

GtkD help

2017-11-18 Thread Ivan Trombley via Digitalmars-d-learn
I have this small application for viewing select log data from a certain game that I originally wrote in C++/Qt. For various reasons, I decided to rewrite this app in D using gtk-d. First, I have to say that the documentation for gtk-d is atrocious! However, I managed to cobble together enough

DUB: "Invalid source/import path"

2017-05-14 Thread Ivan Trombley via Digitalmars-d-dwt
If I use DWT 3.0.0 as a dependency in my dub.json then DUB reports "Invalid source/import path" for ~/.dub/packages/dwtlib-3.0.0/dwtlib/dwt/src and ~/.dub/packages/dwtlib-3.0.0/dwtlib/dwt/views. Any ideas?

Re: DUB: Multiprocess?

2017-05-14 Thread Ivan Trombley via Digitalmars-d
On Sunday, 14 May 2017 at 21:01:37 UTC, Basile B. wrote: On Sunday, 14 May 2017 at 20:23:17 UTC, Ivan Trombley wrote: When I build C++ projects using make, I can specify how many processes I want to use (-j). This keeps the processors full and happy and greatly reduces the overall build time.

DUB: Multiprocess?

2017-05-14 Thread Ivan Trombley via Digitalmars-d
When I build C++ projects using make, I can specify how many processes I want to use (-j). This keeps the processors full and happy and greatly reduces the overall build time. Does DUB have a similar way of compiling each file in it's own process or thread?