Re: Blog Post #0062: Cairo Load & Display Images

2019-08-17 Thread Ron Tarrant via Digitalmars-d-learn
On Friday, 16 August 2019 at 12:58:23 UTC, Andre Pany wrote: This causes some distruction on mobile phone as you have scroll horizontally although it would fit the screen if the source code would start at column 0. That didn't take as long as I thought it would. I removed all excess

Re: Slow UDF call?

2019-08-17 Thread Giovanni Di Maria via Digitalmars-d-learn
On Saturday, 17 August 2019 at 20:57:44 UTC, Giovanni Di Maria wrote: On Saturday, 17 August 2019 at 20:15:02 UTC, Stefan Koch wrote: On Saturday, 17 August 2019 at 19:43:22 UTC, Giovanni Di Maria wrote: [...] Yes they do A function call has a cost. In case of a function which performes a 1

Re: Setting up Dlang Environment

2019-08-17 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 17 August 2019 at 20:42:41 UTC, Mike Brown wrote: Hi All, I've tried installing and setting up Dlang a few times now. I'm struggling to get it reliable and to a decent environment in place. I don't really want to make this thread about specific issues - Id very much like to

Re: Blog Post #0062: Cairo Load & Display Images

2019-08-17 Thread bauss via Digitalmars-d-learn
On Saturday, 17 August 2019 at 19:22:54 UTC, Ron Tarrant wrote: On Friday, 16 August 2019 at 12:44:15 UTC, bauss wrote: Amazing! You might be able to answer me something, whether you could use gtkd solely for image manipulation using ex. Pixbuf? or would it only work with the internals of

Adam D. Ruppe's Minigui using example

2019-08-17 Thread Andre Pany via Digitalmars-d-learn
https://forum.dlang.org/post/mumgkqopnsnowcmhi...@forum.dlang.org On Saturday, 16 January 2016 at 03:14:01 UTC, Adam D. Ruppe wrote: On Saturday, 16 January 2016 at 01:27:32 UTC, Andre Polykanine wrote: Does anyone have an actual example of, say, a simple form with a set of radio buttons or

Re: Slow UDF call?

2019-08-17 Thread Giovanni Di Maria via Digitalmars-d-learn
On Saturday, 17 August 2019 at 20:15:02 UTC, Stefan Koch wrote: On Saturday, 17 August 2019 at 19:43:22 UTC, Giovanni Di Maria wrote: [...] Yes they do A function call has a cost. In case of a function which performes a 1 cycle (nominally without ILP) operation, the overhead of the

Setting up Dlang Environment

2019-08-17 Thread Mike Brown via Digitalmars-d-learn
Hi All, I've tried installing and setting up Dlang a few times now. I'm struggling to get it reliable and to a decent environment in place. I don't really want to make this thread about specific issues - Id very much like to know if there's a decent tutorial or guide to setup Dlang? *

Re: Slow UDF call?

2019-08-17 Thread Stefan Koch via Digitalmars-d-learn
On Saturday, 17 August 2019 at 19:43:22 UTC, Giovanni Di Maria wrote: Hi, i have seen that a simple operation (in a loop) is faster than the equivalent UDF. The first example takes 4 seconds, the second example takes 16 seconds. Local variables influence the speed of execution? Thank you very

Slow UDF call?

2019-08-17 Thread Giovanni Di Maria via Digitalmars-d-learn
Hi, i have seen that a simple operation (in a loop) is faster than the equivalent UDF. The first example takes 4 seconds, the second example takes 16 seconds. Local variables influence the speed of execution? Thank you very much. Giovanni == import

Re: Blog Post #0062: Cairo Load & Display Images

2019-08-17 Thread Ron Tarrant via Digitalmars-d-learn
On Friday, 16 August 2019 at 12:58:23 UTC, Andre Pany wrote: Thanks a lot Ron, your page is really helpful. You're welcome, Andre. And thanks for saying so. Is there a reason why the source code starts after a lot of whitespaces on every line? This causes some distruction on mobile phone as

Re: Blog Post #0062: Cairo Load & Display Images

2019-08-17 Thread Ron Tarrant via Digitalmars-d-learn
On Friday, 16 August 2019 at 12:44:15 UTC, bauss wrote: Amazing! You might be able to answer me something, whether you could use gtkd solely for image manipulation using ex. Pixbuf? or would it only work with the internals of gtkd? Like can you manipulate the image and save it to disk etc.

Re: advise about safety of using move in an opAssign with __traits(isRef

2019-08-17 Thread Paul Backus via Digitalmars-d-learn
On Friday, 16 August 2019 at 08:07:28 UTC, aliak wrote: Hi, I'm trying to fix a use-case where you have a wrapper template type (it's an optional) and the wrapping type has @disable this(this). And having this scenario work: struct S { @disable this(this); } Optional!S fun() {...}

Re: advise about safety of using move in an opAssign with __traits(isRef

2019-08-17 Thread aliak via Digitalmars-d-learn
On Friday, 16 August 2019 at 14:29:26 UTC, Paul Backus wrote: On Friday, 16 August 2019 at 08:07:28 UTC, aliak wrote: [...] Even simpler: void opAssign(auto ref Optional!T rhs) { import core.lifetime: forward; this._value = forward!rhs; } That doesn't work with private members