Re: Dgame 0.3.2

2014-12-16 Thread Joel via Digitalmars-d-announce
[snip] Sorry to hear you've left D behind! Hopefully it's only temporarily because I'm finding Dgame is great fun to use. Cheers, uri I'm glad to hear that. :) Maybe I will come back but currently I'm absolute happy with C++ (11, 14) I would second that, on having Dgame maintained.

Re: [OT?] C compiler written form scratch in D

2014-12-16 Thread TiberiuGal via Digitalmars-d-announce
On Monday, 15 December 2014 at 12:37:18 UTC, Stefan Koch wrote: New videos are online :) part 1: https://www.youtube.com/watch?v=_YAUfd41URA part 2: https://www.youtube.com/watch?v=RGLgiPhwskM please give me feedback in this thread Hi. I'm an intermediate level programmer and I'm interested

Re: [OT?] C compiler written form scratch in D

2014-12-16 Thread Stefan Koch via Digitalmars-d-announce
please tell me what concepts you would like to have explained. perhaps I should do a live-stream for QA maybe ?

Re: Dgame 0.3.2

2014-12-16 Thread Namespace via Digitalmars-d-announce
On Tuesday, 16 December 2014 at 08:28:43 UTC, Joel wrote: [snip] Sorry to hear you've left D behind! Hopefully it's only temporarily because I'm finding Dgame is great fun to use. Cheers, uri I'm glad to hear that. :) Maybe I will come back but currently I'm absolute happy with C++ (11,

Re: Programming in D book, decent ebook versions

2014-12-16 Thread Mengu via Digitalmars-d-announce
On Monday, 15 December 2014 at 19:45:34 UTC, Ali Çehreli wrote: On 12/15/2014 03:17 AM, Mengu wrote: blank space on the left which is caused by the width of the div#content. I was hoping that no one would notice. :p if you can change width in styling of div#content The design of the whole

Re: Programming in D book, decent ebook versions

2014-12-16 Thread Ali Çehreli via Digitalmars-d-announce
On 12/16/2014 07:55 AM, Mengu wrote: is the source open at somewhere so i can help? https://bitbucket.org/acehreli/ddili/ Ali

Re: ArrayFire, a GPU library, is now open source

2014-12-16 Thread Shehzan via Digitalmars-d-announce
Am I the only one to be left completely cold with the new wave of C++ to GPU libraries (Bolt/ArrayFire/OpenACC) which take back the control compute APIs give? For example this one removes double precision and multiple devices, something that is builtin with OpenCL. These libraries build on

Re: Sargon component library now on Dub

2014-12-16 Thread poucave via Digitalmars-d-announce
On Sunday, 14 December 2014 at 13:31:57 UTC, disapoint wrote: On Sunday, 14 December 2014 at 03:26:56 UTC, Walter Bright wrote: http://code.dlang.org/packages/sargon These two modules failed to generate much interest in incorporating them into Phobos, but I'm still rather proud of them :-)

Re: Sargon component library now on Dub

2014-12-16 Thread uri via Digitalmars-d-announce
On Tuesday, 16 December 2014 at 23:16:32 UTC, poucave wrote: On Sunday, 14 December 2014 at 13:31:57 UTC, disapoint wrote: On Sunday, 14 December 2014 at 03:26:56 UTC, Walter Bright wrote: http://code.dlang.org/packages/sargon These two modules failed to generate much interest in

Re: Blog: making sure your D projects won't break

2014-12-16 Thread Joseph Rushton Wakeling via Digitalmars-d-announce
On Monday, 15 December 2014 at 05:51:56 UTC, Dicebot wrote: Short story about my attempt to put a bit more efforts in detecting user projects breakage by compiler changes: http://blog.dicebot.lv/2014/12/making-sure-your-d-projects-wont-break.html Quoting important bit: It is quite likely

Re: Dgame 0.3.2

2014-12-16 Thread Joel via Digitalmars-d-announce
[snip] I'm glad to hear that. :) Maybe I will come back but currently I'm absolute happy with C++ (11, 14) I would second that, on having Dgame maintained. That is nice to hear. :) I will try to maintain Dgame in my holidays next week, if you have any questions, you can post them on the

Re: Blog: making sure your D projects won't break

2014-12-16 Thread Dicebot via Digitalmars-d-announce
On Wednesday, 17 December 2014 at 01:40:05 UTC, Joseph Rushton Wakeling wrote: Thanks very much for this, it's a very valuable piece of work. I'd be very happy if you were to add https://github.com/WebDrake/Dgraph https://github.com/WebDrake/hap to your testing list. I've just tried them out

Re: D/Objective-C 64bit

2014-12-16 Thread Jacob Carlborg via Digitalmars-d-announce
On 2014-11-04 10:07, Christian Schneider wrote: Ok, some more info: I changed the mapping in tableview.d to: void setDoubleAction(void __selector(ObjcObject)) [setDoubleAction:] ; This should be the way to do it. Now in the implementation of the action: void

Why does std.container.BinaryHeap use RefCounted?

2014-12-16 Thread Tobias Pankrath via Digitalmars-d
Original: http://forum.dlang.org/thread/uapqmdbtadpwnciwf...@forum.dlang.org Reposting here, because I got no answer in D.learn: std.container.BinrayHeap (http://dlang.org/library/std/container/BinaryHeap.html) implements a binary heap on top of a) a given random access range or b) another

Re: i want my bounty!

2014-12-16 Thread ketmar via Digitalmars-d
On Tue, 16 Dec 2014 13:24:34 +1300 Rikki Cattermole via Digitalmars-d digitalmars-d@puremagic.com wrote: On 16/12/2014 8:30 a.m., ketmar via Digitalmars-d wrote: so as you can see this is not about GPL or something. this is about attitude which i don't like. maybe i'm overreacting, but i'm

Re: D game development: a call to action

2014-12-16 Thread ketmar via Digitalmars-d
On Mon, 15 Dec 2014 23:40:43 + bitwise via Digitalmars-d digitalmars-d@puremagic.com wrote: @manu I'm a little confused.. Looking through your Fuji/Source/Drivers folder, I see folders for IPhone and Android, among others... does your engine actually run on these platforms? I was

Re: i want my bounty!

2014-12-16 Thread Rikki Cattermole via Digitalmars-d
On 16/12/2014 9:01 p.m., ketmar via Digitalmars-d wrote: On Tue, 16 Dec 2014 13:24:34 +1300 Rikki Cattermole via Digitalmars-d digitalmars-d@puremagic.com wrote: On 16/12/2014 8:30 a.m., ketmar via Digitalmars-d wrote: so as you can see this is not about GPL or something. this is about

Re: i want my bounty!

2014-12-16 Thread ketmar via Digitalmars-d
On Tue, 16 Dec 2014 21:20:39 +1300 Rikki Cattermole via Digitalmars-d digitalmars-d@puremagic.com wrote: Yes but in this case this is mute. You will talk about Github negatively. You having an account won't cause you to talk positively about it. but it will add one more user to their

Re: D game development: a call to action

2014-12-16 Thread Namespaces via Digitalmars-d
On Sunday, 14 December 2014 at 00:30:22 UTC, Joel wrote: I'm using Windows. I get this error trying to compile the demo on DGame. C:\jpro\dpro2\OtherPeoples\Dgame-0.3.2\builddmd build.d Using the Digital Mars DMD compiler. C:\jpro\dpro2\OtherPeoples\Dgame-0.3.2\buildbuild.exe Assume

Re: DIP69 - Implement scope for escape proof references

2014-12-16 Thread deadalnix via Digitalmars-d
On Tuesday, 16 December 2014 at 01:00:47 UTC, Walter Bright wrote: On 12/15/2014 5:38 AM, deadalnix wrote: On Monday, 15 December 2014 at 11:32:11 UTC, Dicebot wrote: For me scopeness is a property of view, not object itself - this also makes ownership method of actual data irrelevant. Only

Re: Intel MPX

2014-12-16 Thread via Digitalmars-d
On Tuesday, 16 December 2014 at 06:18:10 UTC, Leandro T. C. Melo via Digitalmars-d wrote: including special-purpose registers (4 of them), a bounds directory/tables for storing/loading linearized pointer addresses, specific instructions to independently make/check upper/lower bounds, and even

Re: Intel MPX

2014-12-16 Thread via Digitalmars-d
On Monday, 15 December 2014 at 18:55:42 UTC, Paulo Pinto wrote: Interesting, given that bounds checking support is an old feature http://x86.renejeschke.de/html/file_module_x86_id_18.html If I remember my Assembly days in the 90's BOUND was slower than doing the check explicitly. Yes, and

Re: D game development: a call to action

2014-12-16 Thread Manu via Digitalmars-d
On 16 December 2014 at 09:40, bitwise via Digitalmars-d digitalmars-d@puremagic.com wrote: @manu I'm a little confused.. Looking through your Fuji/Source/Drivers folder, I see folders for IPhone and Android, among others... does your engine actually run on these platforms? I was under the

Variable-length delegates?

2014-12-16 Thread bearophile via Digitalmars-d
Is it a good idea to introduce in D a fat delegate that has a variable length (but its length is known at compile-time), able to contain two or more context pointers and/or one or more values or references, avoiding both some heap allocations of the closure and allowing coding patterns that

Re: Intel MPX

2014-12-16 Thread Leandro T. C. Melo via Digitalmars-d
2014-12-16 10:30 GMT-02:00 via Digitalmars-d digitalmars-d@puremagic.com: Did you run the MPX-enabled executable on an emulator? Exactly, you need to link the code against an MPX runtime and run it through Intel's SDE. -- Leandro

Re: Lost a new commercial user this week :(

2014-12-16 Thread MattCoder via Digitalmars-d
On Tuesday, 16 December 2014 at 05:48:27 UTC, Rikki Cattermole wrote: https://drive.google.com/file/d/0B-EiBquZktsLc0czUzZVeGlLM00/view?usp=sharing No guarantees of how long it'll stay up there. And to reiterate, its only just a start. And I don't know if I ever complete it. There isn't really

Re: Variable-length delegates?

2014-12-16 Thread deadalnix via Digitalmars-d
On Tuesday, 16 December 2014 at 13:26:56 UTC, bearophile wrote: Is it a good idea to introduce in D a fat delegate that has a variable length (but its length is known at compile-time), able to contain two or more context pointers and/or one or more values or references, avoiding both some heap

Re: DIP69 - Implement scope for escape proof references

2014-12-16 Thread via Digitalmars-d
On Tuesday, 16 December 2014 at 01:00:47 UTC, Walter Bright wrote: On 12/15/2014 5:38 AM, deadalnix wrote: On Monday, 15 December 2014 at 11:32:11 UTC, Dicebot wrote: For me scopeness is a property of view, not object itself - this also makes ownership method of actual data irrelevant. Only

Re: i want my bounty!

2014-12-16 Thread Steven Schveighoffer via Digitalmars-d
On 12/16/14 3:20 AM, Rikki Cattermole wrote: Yes but in this case this is mute. moot. Sorry, couldn't stop myself. Carry on :) -Steve

Re: Lost a new commercial user this week :(

2014-12-16 Thread CraigDillabaugh via Digitalmars-d
On Monday, 15 December 2014 at 22:23:17 UTC, evenex wrote: On Monday, 15 December 2014 at 21:15:21 UTC, CraigDillabaugh wrote: Is your project open source? If so as a student we will likely be looking for applications to the 2015 Google Summer of Code, if D is accepted as a mentoring

Re: Variable-length delegates?

2014-12-16 Thread bearophile via Digitalmars-d
deadalnix: http://wiki.dlang.org/DIP30 It seems DIP30 proposes a struct with a pointer as second field. Are the delegates of DIP30 usually @nogc? They don't seem variable-length structs. Bye, bearophile

Re: Variable-length delegates?

2014-12-16 Thread deadalnix via Digitalmars-d
On Tuesday, 16 December 2014 at 14:13:23 UTC, bearophile wrote: deadalnix: http://wiki.dlang.org/DIP30 It seems DIP30 proposes a struct with a pointer as second field. Are the delegates of DIP30 usually @nogc? They don't seem variable-length structs. Bye, bearophile The first element

Re: Intel MPX

2014-12-16 Thread via Digitalmars-d
On Tuesday, 16 December 2014 at 13:37:05 UTC, Leandro T. C. Melo via Digitalmars-d wrote: Exactly, you need to link the code against an MPX runtime and run it through Intel's SDE. Sounds like fun! I guess it is possible to play with ADX (multi precision integers) that came with Broadwell

Re: D game development: a call to action

2014-12-16 Thread bitwise via Digitalmars-d
You'll notice that the engine code is not D code... Hmm... Indeed.. I just assumed when I saw Walter get all excited ;) D will work on most of those platforms just fine if you abandon the GC and exception handler. Unfortunately, I don't know D-compiler/runtime well enough to actually

Re: Why does std.container.BinaryHeap use RefCounted?

2014-12-16 Thread Shammah Chancellor via Digitalmars-d
On 2014-12-16 07:57:32 +, Tobias Pankrath said: Original: http://forum.dlang.org/thread/uapqmdbtadpwnciwf...@forum.dlang.org Reposting here, because I got no answer in D.learn: std.container.BinrayHeap (http://dlang.org/library/std/container/BinaryHeap.html) implements a binary heap on top

Re: unnecessary OS redundancy in druntime

2014-12-16 Thread Joakim via Digitalmars-d
On Saturday, 13 December 2014 at 15:58:29 UTC, Joakim wrote: When should it be redundant, for every single Posix declaration in druntime? That's far from the case now. When the authors think a handful of declarations might vary on some future unspecified platform? Each of the linked

Re: D game development: a call to action

2014-12-16 Thread LaMainNoire via Digitalmars-d
On Monday, 5 August 2013 at 18:18:30 UTC, Jonathan A Dunlap wrote: I am one of the few who have taken a keen interest in D for game development. The concise language and modern conveniences may be able to reduce many hours worth of development time off a game project, while making the code

Re: BNF grammar for D?

2014-12-16 Thread Kingsley via Digitalmars-d
On Monday, 27 October 2014 at 22:40:20 UTC, landaire wrote: On Monday, 27 October 2014 at 22:35:16 UTC, Jeremy Powers via Digitalmars-d wrote: This looks eerily familiar... I took a stab at an Intellij plugin a long time ago, and happened to pick the same name:

Re: BNF grammar for D?

2014-12-16 Thread Kingsley via Digitalmars-d
On Tuesday, 16 December 2014 at 23:25:02 UTC, Kingsley wrote: On Monday, 27 October 2014 at 22:40:20 UTC, landaire wrote: On Monday, 27 October 2014 at 22:35:16 UTC, Jeremy Powers via Digitalmars-d wrote: This looks eerily familiar... I took a stab at an Intellij plugin a long time ago, and

Re: D game development: a call to action

2014-12-16 Thread Manu via Digitalmars-d
On 17 December 2014 at 07:24, LaMainNoire via Digitalmars-d digitalmars-d@puremagic.com wrote: On Monday, 5 August 2013 at 18:18:30 UTC, Jonathan A Dunlap wrote: I am one of the few who have taken a keen interest in D for game development. The concise language and modern conveniences may be

Re: D game development: a call to action

2014-12-16 Thread Joseph Rushton Wakeling via Digitalmars-d
On Tuesday, 16 December 2014 at 12:56:48 UTC, Manu via Digitalmars-d wrote: D will work on most of those platforms just fine if you abandon the GC and exception handler. I'm out of date on the progress in getting @nogc and @nothrow rolled out as widely as possible across the codebase, but

Re: BNF grammar for D?

2014-12-16 Thread Rikki Cattermole via Digitalmars-d
On 17/12/2014 1:35 p.m., Kingsley wrote: On Tuesday, 16 December 2014 at 23:25:02 UTC, Kingsley wrote: On Monday, 27 October 2014 at 22:40:20 UTC, landaire wrote: On Monday, 27 October 2014 at 22:35:16 UTC, Jeremy Powers via Digitalmars-d wrote: This looks eerily familiar... I took a stab at

Re: i want my bounty!

2014-12-16 Thread Rikki Cattermole via Digitalmars-d
On 17/12/2014 2:53 a.m., Steven Schveighoffer wrote: On 12/16/14 3:20 AM, Rikki Cattermole wrote: Yes but in this case this is mute. moot. Sorry, couldn't stop myself. Carry on :) -Steve And this is why I get people to review my work before publication (other than blogs). Well atleast

Re: DIP69 - Implement scope for escape proof references

2014-12-16 Thread Walter Bright via Digitalmars-d
On 12/16/2014 5:37 AM, Ola Fosheim Grøstad ola.fosheim.grostad+dl...@gmail.com wrote: The current proposal is either too limiting or not limiting enough. I'm afraid I don't understand at all what you wrote.

Re: i want my bounty!

2014-12-16 Thread Mike Parker via Digitalmars-d
On 12/16/2014 10:53 PM, Steven Schveighoffer wrote: On 12/16/14 3:20 AM, Rikki Cattermole wrote: Yes but in this case this is mute. moot. Sorry, couldn't stop myself. Carry on :) -Steve You're both wrong :) http://www.1001moviequotes.com/joey-moo-point/

Re: DIP69 - Implement scope for escape proof references

2014-12-16 Thread bearophile via Digitalmars-d
Walter Bright: I'm afraid I don't understand at all what you wrote. Perhaps reading about linear type systems could help: http://en.wikipedia.org/w/index.php?title=Substructural_type_systemredirect=no#Linear_type_systems Bye, bearophile

Re: D game development: a call to action

2014-12-16 Thread Manu via Digitalmars-d
On 17 December 2014 at 11:44, Joseph Rushton Wakeling via Digitalmars-d digitalmars-d@puremagic.com wrote: On Tuesday, 16 December 2014 at 12:56:48 UTC, Manu via Digitalmars-d wrote: D will work on most of those platforms just fine if you abandon the GC and exception handler. I'm out of

Customization of DUB build=DDOX output

2014-12-16 Thread Vadim Lopatin via Digitalmars-d-learn
Hello, I'm trying to use DDOX to generate documentation pages for my library (dlangui). dub --build=ddox produces nice output with navigation by modules, but I cannot find out how to embed some custom navigation pane on all pages. E.g. put links to some additional pages like downloads,

Re: mixin template and const property qualifier?

2014-12-16 Thread aldanor via Digitalmars-d-learn
On Monday, 15 December 2014 at 23:21:05 UTC, anonymous wrote: On Monday, 15 December 2014 at 23:14:30 UTC, aldanor wrote: Could someone please explain why the following doesn't compile with const qualifier while it does work without it? /* test.d */ module test; mixin template Foo() {

Re: Odd Error Message

2014-12-16 Thread CraigDillabaugh via Digitalmars-d-learn
On Monday, 15 December 2014 at 22:20:53 UTC, ketmar via Digitalmars-d-learn wrote: On Mon, 15 Dec 2014 22:09:28 + CraigDillabaugh via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Given the following program: import std.string; import std.stdio; void main() {

Re: UDA and mixins

2014-12-16 Thread Oleg via Digitalmars-d-learn
struct FooPasted(Args...){} class A { mixin foo; void func1() @mark { ... } void func2( int x, string a ) @mark { ... } } must change to: class A { void func1() @mark { ... } void func2( int x, string a ) @mark { ... } FooPasted!() func1_mark; FooPasted!(int,string) func2_mark; }

Re: Asssociative Array by Key-Value-Pair

2014-12-16 Thread Tobias Pankrath via Digitalmars-d-learn
so it will be documented? that was the rhetorical question. Does it need to be? I don't see a reason for anyone to go out of their way to make the implementation inconsistent. Do you? At least I would prefer not to rely on undefined behaviour. If we ever do change the AA implementation

Re: Asssociative Array by Key-Value-Pair

2014-12-16 Thread Steven Schveighoffer via Digitalmars-d-learn
On 12/16/14 10:33 AM, Tobias Pankrath wrote: so it will be documented? that was the rhetorical question. Does it need to be? I don't see a reason for anyone to go out of their way to make the implementation inconsistent. Do you? At least I would prefer not to rely on undefined behaviour.

Re: Asssociative Array by Key-Value-Pair

2014-12-16 Thread Nordlöw
On Monday, 15 December 2014 at 23:21:44 UTC, bearophile wrote: Nordlöw: BTW: Why doesn't aa.byKey.map work? It currently works. Bye, bearophile My mistake. Now both are at https://github.com/nordlow/justd/blob/master/range_ex.d#L527

Re: Asssociative Array by Key-Value-Pair

2014-12-16 Thread Nordlöw
On Tuesday, 16 December 2014 at 16:08:09 UTC, Steven Schveighoffer wrote: I can never ever see a reason to implement 2 different ways to traverse the elements, just to piss off people? If you make a PR that adds that to documentation, I will pull it if it makes you feel better. I don't think

Re: Asssociative Array by Key-Value-Pair

2014-12-16 Thread Steven Schveighoffer via Digitalmars-d-learn
On 12/16/14 11:47 AM, Nordlöw wrote: On Tuesday, 16 December 2014 at 16:08:09 UTC, Steven Schveighoffer wrote: I can never ever see a reason to implement 2 different ways to traverse the elements, just to piss off people? If you make a PR that adds that to documentation, I will pull it if it

Re: Asssociative Array by Key-Value-Pair

2014-12-16 Thread Nordlöw
On Tuesday, 16 December 2014 at 16:56:20 UTC, Steven Schveighoffer wrote: I can do PR for adding https://github.com/nordlow/justd/blob/master/range_ex.d#L527 to Phobos. Were should I put it/them? I think to be clear, the PR I said I will pull is for the documentation update. A doc change

Re: Asssociative Array by Key-Value-Pair

2014-12-16 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Dec 16, 2014 at 11:56:20AM -0500, Steven Schveighoffer via Digitalmars-d-learn wrote: On 12/16/14 11:47 AM, Nordlöw wrote: On Tuesday, 16 December 2014 at 16:08:09 UTC, Steven Schveighoffer wrote: I can never ever see a reason to implement 2 different ways to traverse the elements,

Re: detaching a thread from druntime 2.067

2014-12-16 Thread Sean Kelly via Digitalmars-d-learn
On Tuesday, 16 December 2014 at 04:56:10 UTC, Ellery Newcomer wrote: If I have a thread that I need to detach from druntime, I can call thread_detachInstance, but for 2.066, this function does not exist. Is there any way to do this in 2.066? I notice there is a thread_detachByAddr, but I'm not

Re: Asssociative Array by Key-Value-Pair

2014-12-16 Thread Nordlöw
On Tuesday, 16 December 2014 at 17:47:18 UTC, H. S. Teoh via Digitalmars-d-learn wrote: also rename byPair to something else in the process). What about by Python's byItem() and items()?

Referring to alias parameters in a mixin template

2014-12-16 Thread aldanor via Digitalmars-d-learn
Would something like this be possible at all? A hypothetical mixin template mixin template makeProperty(T, string name, alias func) { ... } that could be called like this: makeProperty!(int, foo, f) and would generate code like int @property foo() { return f(); }

Re: detaching a thread from druntime 2.067

2014-12-16 Thread Ellery Newcomer via Digitalmars-d-learn
On 12/16/2014 10:41 AM, Sean Kelly wrote: On Tuesday, 16 December 2014 at 04:56:10 UTC, Ellery Newcomer wrote: If I have a thread that I need to detach from druntime, I can call thread_detachInstance, but for 2.066, this function does not exist. Is there any way to do this in 2.066? I notice

Re: Referring to alias parameters in a mixin template

2014-12-16 Thread aldanor via Digitalmars-d-learn
A partial solution would be something like this: mixin template makeProperty(T, string name, alias func) { enum p = makeUnnamedProperty!(T, func); mixin(enum %s = p;.format(name)); // or alias } however now the parent namespace is polluted with p, is there any way to

Re: Referring to alias parameters in a mixin template

2014-12-16 Thread anonymous via Digitalmars-d-learn
On Wednesday, 17 December 2014 at 01:14:36 UTC, aldanor wrote: A partial solution would be something like this: mixin template makeProperty(T, string name, alias func) { enum p = makeUnnamedProperty!(T, func); mixin(enum %s = p;.format(name)); // or alias } however now

Binding non-trivial C++ structs

2014-12-16 Thread Paul O'Neil via Digitalmars-d-learn
To make my C++ binding life easier, I wrote a small string structure [1] in C++ to use instead of std::string and produced the D declarations for some of it [2]. (It's not that complicated, I promise.) The important properties of this struct are that it has a non-trivial copy constructor and a

Re: Referring to alias parameters in a mixin template

2014-12-16 Thread aldanor via Digitalmars-d-learn
On Wednesday, 17 December 2014 at 01:39:07 UTC, anonymous wrote: But if you want to avoid `p`, just do the substitution: mixin template makeProperty(T, string name, alias func) { mixin(enum %s = makeUnnamedProperty!(T, func);.format(name)); // or alias } Thanks, that looks

Re: Referring to alias parameters in a mixin template

2014-12-16 Thread anonymous via Digitalmars-d-learn
On Wednesday, 17 December 2014 at 01:49:14 UTC, aldanor wrote: Wonder if this is doable within a single mixin template without using makeUnnamedProperty? Sure, straight forward: mixin template makeProperty(T, string name, alias func) { mixin(T %s() @property { return func();

Re: Referring to alias parameters in a mixin template

2014-12-16 Thread aldanor via Digitalmars-d-learn
On Wednesday, 17 December 2014 at 02:12:52 UTC, anonymous wrote: Sure, straight forward: mixin template makeProperty(T, string name, alias func) { mixin(T %s() @property { return func(); }.format(name)); } Indeed... thanks! Just one thing that I find confusing here --

eraseInPlace (eg using memmove)?

2014-12-16 Thread Timothee Cour via Digitalmars-d-learn
Is there a phobos way to do eraseInPlace (eg with optimization using memmove where appropriate) ? (akin to insertInPlace)

Re: eraseInPlace (eg using memmove)?

2014-12-16 Thread Timothee Cour via Digitalmars-d-learn
Here's what I'd like in phobos: void eraseInPlace(T)(ref T a, size_t index, size_t n=1) if(isArray!T){ enum s=typeof(a[0]).sizeof; auto ptr=a.ptr+index; import core.stdc.string:memmove; memmove(ptr,ptr+n,(a.length-(index+n))*s); a.length-=n; } unittest{ auto a=[0,1,2,3,4,5,6];

[Issue 13868] Types with the same name in different packages produce poor diagnostics

2014-12-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13868 Ketmar Dark ket...@ketmar.no-ip.org changed: What|Removed |Added CC||ket...@ketmar.no-ip.org

[Issue 13861] compiler segfault with nested struct, cannot access frame

2014-12-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13861 --- Comment #8 from John Colvin john.loughran.col...@gmail.com --- Further reduced: struct Foo(alias f) { struct Bar { Bar func() { return Bar(); } } } void main() { Foo!(n = n) a; } --

[Issue 13869] New: Not good error message with not compatible lambda template argument

2014-12-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13869 Issue ID: 13869 Summary: Not good error message with not compatible lambda template argument Product: D Version: D2 Hardware: x86 OS: Windows Status:

[Issue 13866] tools repo 2.066.1 release tag

2014-12-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13866 John Colvin john.loughran.col...@gmail.com changed: What|Removed |Added Severity|critical|major ---

[Issue 8008] static array literal syntax request: auto x=[1,2,3]S;

2014-12-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8008 Nick Treleaven ntrel-...@mybtinternet.com changed: What|Removed |Added CC|

[Issue 8008] static array literal syntax request: auto x=[1,2,3]S;

2014-12-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8008 --- Comment #6 from bearophile_h...@eml.cc --- (In reply to Nick Treleaven from comment #5) Is there an advantage of literal syntax vs. a template function staticArray(1, 2)? There are various small advantages. A template function like that seems

[Issue 13864] tuple expand causes range violation

2014-12-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13864 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --- Comment

[Issue 13825] relativePath not handling . and .. correctly

2014-12-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13825 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --

[Issue 13806] std.bitmanip.BitArray -- use of methods named init() messes up templates

2014-12-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13806 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --

[Issue 13806] std.bitmanip.BitArray -- use of methods named init() messes up templates

2014-12-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13806 --- Comment #1 from hst...@quickfur.ath.cx --- IMO, proper ctors should be used instead of init(), since that is essentially what they do. --

[Issue 13806] std.bitmanip.BitArray -- use of methods named init() messes up templates

2014-12-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13806 hst...@quickfur.ath.cx changed: What|Removed |Added Hardware|x86_64 |All OS|Windows

[Issue 13864] tuple expand causes range violation

2014-12-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13864 --- Comment #2 from Vlad Levenfeld vlevenf...@gmail.com --- I'm using git HEAD, I still get the range violation. Not only that but this: auto y = x[0]; auto z = x[0.tuple.expand]; // ok runs fine. (got rid of writeln) but also

[Issue 13864] tuple expand causes range violation

2014-12-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13864 --- Comment #3 from Vlad Levenfeld vlevenf...@gmail.com --- this works as well: writeln (x[0]); auto y = x[0.tuple.expand]; writeln (x[0.tuple.expand]); // ok again?? --

[Issue 13864] tuple expand causes range violation

2014-12-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13864 --- Comment #4 from Vlad Levenfeld vlevenf...@gmail.com --- its not writeln, this works as well: auto f (T...)(T) { } void main (string[] args) { int[] x = [2,3,4]; f (x[0]); auto a = x[0.tuple.expand];

[Issue 13864] tuple expand causes range violation

2014-12-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13864 --- Comment #5 from Vlad Levenfeld vlevenf...@gmail.com --- It only seems to happen with T[] types, struct with opIndex to catch and print args confirms that the tuple expand call just resolves to a 0 int. Np luck catching it with gdb so far, the

[Issue 13870] New: [ICE] shared or immutable types can not be mapped to C++ (immutable(char))

2014-12-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13870 Issue ID: 13870 Summary: [ICE] shared or immutable types can not be mapped to C++ (immutable(char)) Product: D Version: D2 Hardware: x86_64 OS: Linux

[Issue 13871] New: [REG] Segmentation fault from std/variant.d:609

2014-12-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13871 Issue ID: 13871 Summary: [REG] Segmentation fault from std/variant.d:609 Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: regression

[Issue 6856] Absence of in contract (precondition) on override of method that has one is badly designed

2014-12-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6856 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added CC|