Re: Slow UDF call?

2019-08-18 Thread H. S. Teoh via Digitalmars-d-learn
On Sat, Aug 17, 2019 at 09:42:00PM +, Giovanni Di Maria via Digitalmars-d-learn wrote: [...] > I have also compiled with: > dmd program.d -O -release -inline -boundscheck=off > > and the execution speed is very very fast. [...] If performance is important to you, I recommend checking out

Re: can DDOC generate files names including the full path ?

2019-08-18 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, August 14, 2019 3:43:10 AM MDT wjoe via Digitalmars-d-learn wrote: > For example if the source tree looks like this: > >source/ > > > > foo/ > > > > baz.d > > > > bar/ > > > > baz.d > > and generating the docs with something like this: > > dmd -D -Dd=docs foo/baz.d

Re: Problem with aliasing member function

2019-08-18 Thread rjframe via Digitalmars-d-learn
On Sun, 18 Aug 2019 19:17:16 +, Andrey wrote: > Here in tester I want to alias a template method and call it on object > if this object isn't null. But I don't understand how to do it. > How to solve the problem? I don't think you can alias an object method directly; three methods I know

Problem with aliasing member function

2019-08-18 Thread Andrey via Digitalmars-d-learn
Hello, I can't compile this piece of code: struct Object { void run(wstring ending, uint index)(int number) { } } void tester(alias callback, T)(int number, T object = null) { static if(is(T == typeof(null))) alias handler = callback; else auto handler(wstring ending, uint

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

2019-08-18 Thread Ron Tarrant via Digitalmars-d-learn
On Sunday, 18 August 2019 at 17:10:38 UTC, Andre Pany wrote: It looks now very nice, thanks a lot. Excellent. Glad to do it. Wheter you chose 2, 3 or 4 is up to you. 4 is mentioned in Phobos style guide, but it is up to you, what you prefer. I've always been partial to three, but I'm also

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

2019-08-18 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 18 August 2019 at 16:34:21 UTC, Ron Tarrant wrote: On Sunday, 18 August 2019 at 14:44:29 UTC, Andre Pany wrote: the indentation level are 8 spaces. Turns out it's settable in CSS. Tab size for quoted code blocks in the blog posts is now set to three. If you could check a few out

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

2019-08-18 Thread aliak via Digitalmars-d-learn
On Saturday, 17 August 2019 at 16:43:51 UTC, Paul Backus wrote: 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:

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

2019-08-18 Thread Ron Tarrant via Digitalmars-d-learn
On Sunday, 18 August 2019 at 14:44:29 UTC, Andre Pany wrote: the indentation level are 8 spaces. Turns out it's settable in CSS. Tab size for quoted code blocks in the blog posts is now set to three. If you could check a few out and let me know if it's any better. If not, I'll take it down

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

2019-08-18 Thread Ron Tarrant via Digitalmars-d-learn
On Sunday, 18 August 2019 at 14:44:29 UTC, Andre Pany wrote: Hm I am not sure, i just tried lynx (on raspberry pi) and here also the indentation level are 8 spaces. For testing purposes, I replaced each tab with three spaces in this post:

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

2019-08-18 Thread Ron Tarrant via Digitalmars-d-learn
On Sunday, 18 August 2019 at 14:44:29 UTC, Andre Pany wrote: Hm I am not sure, i just tried lynx (on raspberry pi) and here also the indentation level are 8 spaces. Turns out, it's GitHub inserting 8 spaces per tab. No idea why anyone would think this appropriate, but there it is. A

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

2019-08-18 Thread Ron Tarrant via Digitalmars-d-learn
On Sunday, 18 August 2019 at 14:44:29 UTC, Andre Pany wrote: Hm I am not sure, i just tried lynx (on raspberry pi) and here also the indentation level are 8 spaces. Perhaps if I switched from using tabs to spaces... I'll try it with one of the posts and get back to you so you can test it...

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

2019-08-18 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 18 August 2019 at 14:18:23 UTC, Ron Tarrant wrote: On Sunday, 18 August 2019 at 09:28:30 UTC, Andre Pany wrote: II noticed you use an indentation level of 8 spaces. Is this by purpose? As far as I know, 4 spaces is recommended. I only use three in PS Pad, so the extra spaces are

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

2019-08-18 Thread Ron Tarrant via Digitalmars-d-learn
On Sunday, 18 August 2019 at 09:28:30 UTC, Andre Pany wrote: II noticed you use an indentation level of 8 spaces. Is this by purpose? As far as I know, 4 spaces is recommended. I only use three in PS Pad, so the extra spaces are being inserted by either Perl, Jekyll, Liquid, or some part of

D for a safer Linux kernel

2019-08-18 Thread Laeeth Isharc via Digitalmars-d-learn
I noticed a Rust post so why not post. https://www.reddit.com/r/linux_programming/comments/cs0ime/d_for_a_safer_linux_kernel https://www.reddit.com/r/programming/comments/cs0iec/d_for_a_safer_linux_kernel

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

2019-08-18 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 17 August 2019 at 23:40:10 UTC, Ron Tarrant wrote: 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