Re: Ranges: How to take N last of elements of range

2015-12-25 Thread via Digitalmars-d-learn
On Friday, 25 December 2015 at 20:06:04 UTC, drug wrote: 25.12.2015 17:13, Ur@nuz пишет: [...] You can do following http://dpaste.dzfl.pl/41c57f89a5a0 The reason of compile error is your using a range as a separator, change it to single symbol and it works. Also I used 'array' after 'tak

Re: DMD -L Flag, maybe a bug?

2015-12-25 Thread Bubbasaur via Digitalmars-d-learn
On Friday, 25 December 2015 at 23:45:42 UTC, anonymous wrote: ... That means a .lib file, right? Yes. The GtkD docs say to use -L though [2], so I suppose that should work too. Maybe show your exact complete command line, if you want to find out why it doesn't work for you. It's almost l

Re: Graphics/font/platform backends with common interfaces?

2015-12-25 Thread Rikki Cattermole via Digitalmars-d-learn
On 26/12/15 3:46 AM, thedeemon wrote: On Wednesday, 23 December 2015 at 23:34:58 UTC, Rikki Cattermole wrote: So far I've been implementing windowing and image libraries for Phobos. Right now windowing works on Windows minice eventing. Once eventing is done it is ready for the first stage of fe

Re: DMD -L Flag, maybe a bug?

2015-12-25 Thread anonymous via Digitalmars-d-learn
On 25.12.2015 19:32, Bubbasaur wrote: On Friday, 25 December 2015 at 15:06:27 UTC, anonymous wrote: In fact it works without the "-L". Which makes me wonder if I was using it wrongly? I'm convinced that putting a space between "-L" and its argument is nonsense. The "-L" part just means "pass t

Re: Ranges: How to take N last of elements of range

2015-12-25 Thread drug via Digitalmars-d-learn
25.12.2015 17:13, Ur@nuz пишет: static struct LogerInfo { string func; int line; void write(T...)(T data) { import std.stdio; import std.algorithm: splitter; import std.range: retro; import std.range: ta

Re: DMD -L Flag, maybe a bug?

2015-12-25 Thread Bubbasaur via Digitalmars-d-learn
On Friday, 25 December 2015 at 15:06:27 UTC, anonymous wrote: ... You can try removing the "-L" entirely. If it still works... In fact it works without the "-L". Which makes me wonder if I was using it wrongly? What exactly are trying to pass to the linker? A lib: GtkD. Can you give a l

Re: Understand typeof trick

2015-12-25 Thread Joakim Brännström via Digitalmars-d-learn
On Friday, 25 December 2015 at 14:55:04 UTC, anonymous wrote: On 25.12.2015 13:10, Joakim Brännström wrote: [B] Evaluates to the function type "constructed" by binaryFun. Almost. It evaluates to the type of the expression. The expression is a function call, so typeof evaluates to the return

Re: Understand typeof trick

2015-12-25 Thread Adam D. Ruppe via Digitalmars-d-learn
Well, what I'd really want to document here's isn't necessarily the nitty-gritty of the idiom and why it is used (that's a thing for api authors, but these docs are targeted at api consumers), but more just what it actually means at a glance. That line of code simply means "pred must be a func

Re: DMD -L Flag, maybe a bug?

2015-12-25 Thread anonymous via Digitalmars-d-learn
On 25.12.2015 15:40, Bubbasaur wrote: But at least on Windows, you need to put a space between -L and the PATH. Which It's weird, since with "-I" flag you don't need any space. I don't think that's right. Unless something awful is going in Windows dmd, that should be processed as two separate

Re: Understand typeof trick

2015-12-25 Thread anonymous via Digitalmars-d-learn
On 25.12.2015 13:10, Joakim Brännström wrote: In http://forum.dlang.org/post/ojawnpggfaxevqpmr...@forum.dlang.org Adam uses findSkip as an example and especially points out the "D idiom with is/typeof". I'm not quite sure I understand it correctly. Please correct me if I have misunderstood anyth

Re: Graphics/font/platform backends with common interfaces?

2015-12-25 Thread thedeemon via Digitalmars-d-learn
On Wednesday, 23 December 2015 at 23:34:58 UTC, Rikki Cattermole wrote: So far I've been implementing windowing and image libraries for Phobos. Right now windowing works on Windows minice eventing. Once eventing is done it is ready for the first stage of feedback. I don't understand somethin

DMD -L Flag, maybe a bug?

2015-12-25 Thread Bubbasaur via Digitalmars-d-learn
If you follow the link below: https://dlang.org/dmd-windows.html#switch-L It's written: " -Llinkerflag pass linkerflag to the linker link.exe , for example, -L/ma/li " But at least on Windows, you need to put a space between -L and the PATH. Which It's weird, since with "-I" flag you d

Ranges: How to take N last of elements of range

2015-12-25 Thread via Digitalmars-d-learn
How to take N last of elements of range? I have tried the following example in my code, but it says that it deprecated. What is the other possible way? static struct LogerInfo { string func; int line; void write(T...)(T d

Re: Must I compile on the target architecture?

2015-12-25 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 25 December 2015 at 12:43:05 UTC, Jakob Jenkov wrote: If I write a program in D and I use Windows for development but want it to run on Linux, do I have to copy the source code to the target Linux machine and compile it there, to make an executable for that machine? What is the stand

Re: Must I compile on the target architecture?

2015-12-25 Thread Lucien via Digitalmars-d-learn
On Friday, 25 December 2015 at 12:43:05 UTC, Jakob Jenkov wrote: Hi, just a quick question: If I write a program in D and I use Windows for development but want it to run on Linux, do I have to copy the source code to the target Linux machine and compile it there, to make an executable for th

Re: Graphics/font/platform backends with common interfaces?

2015-12-25 Thread Guillaume Piolat via Digitalmars-d-learn
On Wednesday, 23 December 2015 at 19:22:01 UTC, Taylor Hillegeist wrote: Shouldn't there be like a common (interface/abstract class) that these back-ends can fulfill? maybe I am unaware of how these things are done. And perhaps there are performance reasons that many of these are baked in. Th

Must I compile on the target architecture?

2015-12-25 Thread Jakob Jenkov via Digitalmars-d-learn
Hi, just a quick question: If I write a program in D and I use Windows for development but want it to run on Linux, do I have to copy the source code to the target Linux machine and compile it there, to make an executable for that machine? What is the standard process for cross platform compi

Understand typeof trick

2015-12-25 Thread Joakim Brännström via Digitalmars-d-learn
Hello, In http://forum.dlang.org/post/ojawnpggfaxevqpmr...@forum.dlang.org Adam uses findSkip as an example and especially points out the "D idiom with is/typeof". I'm not quite sure I understand it correctly. Please correct me if I have misunderstood anything regarding the idiom. findSki

GTKD - Get the size of the context

2015-12-25 Thread TheDGuy via Digitalmars-d-learn
Hello, i want to draw something to a GTKD context and i need the size of the context in pixel but i don't know how i can get the pixel height and width? Any ideas? With best regards

Re: Graphics/font/platform backends with common interfaces?

2015-12-25 Thread Vadim Lopatin via Digitalmars-d-learn
On Wednesday, 23 December 2015 at 19:22:01 UTC, Taylor Hillegeist wrote: So I have seen alot of projects that need the same sort of stuff. graphics libraries gui libraries game libraries ploting libaries they would all benefit from a backend solution with a common interface for color fonts