[Issue 15054] New: DMD doesn't work with hardening-wrapper

2015-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15054 Issue ID: 15054 Summary: DMD doesn't work with hardening-wrapper Product: D Version: D2 Hardware: All OS: Linux Status: NEW Severity: minor Priority:

[Issue 14593] operator overloading can't be used with expression templates

2015-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14593 Artem Borisovskiy changed: What|Removed |Added CC||kolo...@bk.ru ---

Template detection

2015-09-13 Thread Alexandru Ermicioi via Digitalmars-d-learn
Hello, Given: class SomeClass { public { void someSimpleMethod() {} template setOfTemplatedMethods(Type) { void templatedMethodOne() {} void templatedMethodTwo() {} } } } Is there a way to detect at compile time if a member of

Re: Operator overloading or alternatives to expression templates

2015-09-13 Thread Sönke Ludwig via Digitalmars-d
Am 11.09.2015 um 21:40 schrieb Martin Nowak: I find the reasons for turining down my ER a bit moot. [Issue 14593 – operator overloading can't be used with expression templates](https://issues.dlang.org/show_bug.cgi?id=14593) (...) The missing support for overloading the individual relational

Re: Operator overloading or alternatives to expression templates

2015-09-13 Thread Ola Fosheim Grøstad via Digitalmars-d
On Sunday, 13 September 2015 at 03:03:44 UTC, Andrei Alexandrescu wrote: Yah, understood. Problem here is the approach is bound to run into walls at every few steps. Say you fix the comparisons to work. Then you have operators such as LIKE that are necessary like(Person.Name,"peter%")

Re: Calling D from C, C++, Python…

2015-09-13 Thread Jakob Ovrum via Digitalmars-d-learn
On Thursday, 10 September 2015 at 18:01:10 UTC, Russel Winder wrote: Is there an easy way of knowing when you do not have to initialize the D runtime system to call D code from, in this case, Python via a C adapter? I naïvely transformed some C++ to D, without consideration of D runtime

Re: Calling D from C, C++, Python…

2015-09-13 Thread Jakob Ovrum via Digitalmars-d-learn
On Sunday, 13 September 2015 at 10:10:32 UTC, Jakob Ovrum wrote: On Thursday, 10 September 2015 at 18:01:10 UTC, Russel Winder wrote: Is there an easy way of knowing when you do not have to initialize the D runtime system to call D code from, in this case, Python via a C adapter? I naïvely

Re: Operator overloading or alternatives to expression templates

2015-09-13 Thread deadalnix via Digitalmars-d
On Sunday, 13 September 2015 at 03:03:44 UTC, Andrei Alexandrescu wrote: On 09/12/2015 04:08 PM, Martin Nowak wrote: On Friday, 11 September 2015 at 23:47:42 UTC, Andrei Alexandrescu wrote: 1. Use lambdas, which seem to already do what you want: db.get!Person.filter!(p => p.age > 21 && p.name

[Issue 14140] Bad codegen for CTFE union initialisers for immutable structs

2015-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14140 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 14140] Bad codegen for CTFE union initialisers for immutable structs

2015-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14140 --- Comment #5 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/c8c56038c1876b24a499e6728f8ae9c2088a80da fix Issue 14140 - Bad

[Issue 9057] Regression(Beta): Segfault or "Non-constant expression" error with local import

2015-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9057 --- Comment #3 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/069f570005c1e571f23cd046b0e89503e2553f70 Add workaround for issue

Re: Template detection

2015-09-13 Thread Enamex via Digitalmars-d-learn
On Sunday, 13 September 2015 at 08:26:55 UTC, Alexandru Ermicioi wrote: Hello, Given: class SomeClass { public { void someSimpleMethod() {} template setOfTemplatedMethods(Type) { void templatedMethodOne() {} void templatedMethodTwo() {} }

Re: std.experimental.testing formal review

2015-09-13 Thread Dicebot via Digitalmars-d
On Saturday, 12 September 2015 at 14:50:32 UTC, Jacob Carlborg wrote: On 2015-09-12 15:34, Dicebot wrote: I also don't like mixing unittest and higher level functional tests (with setup and cleanup phases) into the same buckets - this doesn't fit nice with D module system. Latter should be

Re: Operator overloading or alternatives to expression templates

2015-09-13 Thread Dicebot via Digitalmars-d
I am pretty sure I'd prefer hygienic string DSL (with explicit alias list for used context symbols, like in Diet) over LINQ-like magic.

Re: std.experimental.testing formal review

2015-09-13 Thread Atila Neves via Digitalmars-d
On Sunday, 13 September 2015 at 09:59:18 UTC, Dicebot wrote: On Saturday, 12 September 2015 at 14:50:32 UTC, Jacob Carlborg wrote: On 2015-09-12 15:34, Dicebot wrote: I also don't like mixing unittest and higher level functional tests (with setup and cleanup phases) into the same buckets -

D + Dub + Sublime +... build/run in terminal?

2015-09-13 Thread SuperLuigi via Digitalmars-d-learn
Just wondering if anyone here might know how I can accomplish this... basically I'm editing my D code in Sublime using the Dkit plugin to access DCD which so far is more reliable than monodevelop's autocomplete but I do need to reset the server pretty often... but that's neither here nor

Re: Calling D from C, C++, Python…

2015-09-13 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-09-13 12:10, Jakob Ovrum wrote: On Linux and other ELF-using platforms, initialization and deinitialization functions could be placed in the .init and .deinit special sections, but I don't know if druntime has any convenient provisions for this. With GDC and LDC you can probably use a

Re: reading file byLine

2015-09-13 Thread deed via Digitalmars-d-learn
On Sunday, 13 September 2015 at 03:20:31 UTC, deed wrote: string s = "Some text"; s.retro.find("e"); // `Some te` (Surprising to me. Error? 2.067.1) Sorry, the above is wrong, .retro.find does indeed return what's expected. string s = "Some text"; s.retro.find("e").writeln; //

[Issue 15019] [ICE] Heisencrash on OS X 32-bit with non-trivial projects

2015-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15019 Vladimir Panteleev changed: What|Removed |Added Assignee|nob...@puremagic.com

[Issue 15055] New: isArray!NonArray doesn't short-circuit an expression

2015-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15055 Issue ID: 15055 Summary: isArray!NonArray doesn't short-circuit an expression Product: D Version: D2 Hardware: x86_64 OS: Mac OS X Status: NEW Severity: normal

Re: Operator overloading or alternatives to expression templates

2015-09-13 Thread Jack Stouffer via Digitalmars-d
On Saturday, 12 September 2015 at 22:38:53 UTC, Bahman Movaqar wrote: Django's approach is, IMO, the cleverest and least magical one while keeping it expressive and efficient: Person.objects.filter(age__gt=21, name__eq='peter') As the main examples in this thread are for ORMs, I think

D, finance, London,…

2015-09-13 Thread Russel Winder via Digitalmars-d
An acquaintance of mine is trying to find someone to speak on the use of D in finance and/or investment banking. Conference is early November in London. Is anyone interested in investigating this further? If so, please email me offlist. (I had a couple of people in mind to ask, but I cannot find

Re: Operator overloading or alternatives to expression templates

2015-09-13 Thread Martin Nowak via Digitalmars-d
On 09/13/2015 03:15 PM, Jack Stouffer wrote: > > I know that this effect is much harder to create in a explicitly and > strongly typed language, but I just wanted to show a real world example > of how these could be used to great effect. But it is doable in D, and even better it's possible to

Re: Operator overloading or alternatives to expression templates

2015-09-13 Thread Jack Stouffer via Digitalmars-d
On Sunday, 13 September 2015 at 14:06:46 UTC, Martin Nowak wrote: - logical indexing x[x < 20] e.g. opBinary!"<" returns a bit mask to select entries of a large vector Oh yes please! This is one of the more powerful features of numpy.

Combining Unique type with concurrency module

2015-09-13 Thread Alex via Digitalmars-d-learn
Hi everybody! I'm new to this forum so, please excuse me in advance for asking silly questions. I think I'm not the first person which wondering about this topic, but I'm trying to combine Unique type and concurrency module, getting the compiler error struct std.typecons.Unique!(S).Unique is

Re: shared array?

2015-09-13 Thread ponce via Digitalmars-d-learn
On Sunday, 13 September 2015 at 15:35:07 UTC, Jonathan M Davis wrote: But the idea that your average D program is going to run into problems with the GC while using Phobos is just plain wrong. The folks who need to care are the rare folks who need extreme enough performance that they can't

Re: Type helpers instead of UFCS

2015-09-13 Thread Kagamin via Digitalmars-d
On Saturday, 12 September 2015 at 21:04:47 UTC, BBasile wrote: You've got the idea. IDE plugins can not decently provide completion based on the UFCS possibilities. It's possible, just not implemented yet.

[Issue 15055] isArray!NonArray doesn't short-circuit an expression

2015-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15055 --- Comment #1 from Kenji Hara --- This is a duplication of enhancement issue 9073. With static if and static assert, short circuit works for the logical expressions, like A && B - If A is evaluated to false at compile time, B

Re: std.experimental.testing formal review

2015-09-13 Thread Martin Nowak via Digitalmars-d
On 09/11/2015 01:27 PM, Atila Neves wrote: >> How about Fuzz-tests, randomize input for test on each run? > > Like QuickCheck? Robert has something for that. There is also https://github.com/MartinNowak/qcheck for that.

Re: reading file byLine

2015-09-13 Thread deed via Digitalmars-d-learn
On Sunday, 13 September 2015 at 03:20:31 UTC, deed wrote: ... and since `string` is an alias for `const(char)[]`, it's not ... string is an alias for immutable(char)[], not const(char)[]. http://dlang.org/arrays.html#strings Sorry about the noise.

how do I check if a member of a T has a member ?

2015-09-13 Thread Laeeth Isharc via Digitalmars-d-learn
can I check if a member of a T has a member without using a mixin? hid_t createDataType(T)() if (__traits(isSame, TemplateOf!(T), PriceBar)) { auto tid=H5T.create(H5TClass.Compound,T.sizeof); enum offsetof(alias type, string field) = mixin(type.stringof ~"."~field~".offsetof");

Re: Interesting user mistake

2015-09-13 Thread Marco Leise via Digitalmars-d
Am Fri, 4 Sep 2015 19:13:45 -0400 schrieb Andrei Alexandrescu : > Most likely. My question was whether to put it in bugzilla or not. Guess > not. > > > Andrei Put it here: https://github.com/Hackerpilot/Dscanner/issues ;) -- Marco

Re: [D Cookbook]about "Communicating with external processes" part.

2015-09-13 Thread anonymous via Digitalmars-d-learn
On Sunday 13 September 2015 15:32, xky wrote: > [ pipe.d ]: > == > import std.process; > import std.stdio; > > void main(){ > auto info = pipeProcess("child.exe"); > scope(exit) wait(info.pid); > >

Re: Operator overloading or alternatives to expression templates

2015-09-13 Thread Martin Nowak via Digitalmars-d
On 09/13/2015 05:03 AM, Andrei Alexandrescu wrote: > Yah, understood. Problem here is the approach is bound to run into walls > at every few steps. Say you fix the comparisons to work. Then you have > operators such as LIKE that are necessary yet not representable in D. So > more tricks are in

Re: associative arrays with manual memory management

2015-09-13 Thread Ilya Yaroshenko via Digitalmars-d-announce
On Wednesday, 26 August 2015 at 12:10:17 UTC, Per Nordlöw wrote: On Wednesday, 26 August 2015 at 10:48:11 UTC, Ilya Yaroshenko >> auto a = aa!(string, int)(Mallocator.instance); // 3rd CT highlights It would be nice to also see an example at https://github.com/arexeu/aammm that shows

Re: std.experimental.testing formal review

2015-09-13 Thread Jacob Carlborg via Digitalmars-d
On 2015-09-13 12:44, Atila Neves wrote: I've never heard of functionality like that, but should be easy to implement. We're using that at work, but on a different level. We have two separate jobs in Jenkins, one depends on the other one. If the first one fails, the second one is not run.

Re: [D Cookbook]about "Communicating with external processes" part.

2015-09-13 Thread xky via Digitalmars-d-learn
On Sunday, 13 September 2015 at 13:34:18 UTC, Adam D. Ruppe wrote: I'm in a super rush, running late to something else, but try using readln in the child before writing and see what happens. You sent data to it but the child never read it. oh my... you're right. lol so, i fix "pipe.d" this:

Re: Type helpers instead of UFCS

2015-09-13 Thread Puming via Digitalmars-d
On Sunday, 13 September 2015 at 14:37:36 UTC, Kagamin wrote: On Saturday, 12 September 2015 at 21:04:47 UTC, BBasile wrote: You've got the idea. IDE plugins can not decently provide completion based on the UFCS possibilities. It's possible, just not implemented yet. Mono-d seems to have

Re: Operator overloading or alternatives to expression templates

2015-09-13 Thread Martin Nowak via Digitalmars-d
On 09/13/2015 11:00 AM, Sönke Ludwig wrote: > I had played around with some ideas for a similar project, but didn't > find a really satisfying solution: > https://github.com/rejectedsoftware/dotter/blob/11ec72325e76c3329a58545526940c1df5328a2d/source/dotter/orm.d#L320 Yeah, that doesn't look too

Re: Looking for someone that could work on 32 bits support for SDC

2015-09-13 Thread BBasile via Digitalmars-d
On Sunday, 13 September 2015 at 05:53:27 UTC, deadalnix wrote: On Sunday, 13 September 2015 at 02:19:27 UTC, BBasile wrote: On Wednesday, 9 September 2015 at 20:33:43 UTC, deadalnix wrote: All is in the title. ARM/Mips/pNaCl/WebAssembly require 32bits to work. These are valuable targets IMO.

Re: D + Dub + Sublime +... build/run in terminal?

2015-09-13 Thread SuperLuigi via Digitalmars-d-learn
On Sunday, 13 September 2015 at 12:45:02 UTC, Gary Willoughby wrote: On Sunday, 13 September 2015 at 10:00:13 UTC, SuperLuigi wrote: but whatever I put in messes up and I just get errors... So what are the errors? Depends what I put in, but they're just basically saying what I'm putting in

Re: shared array?

2015-09-13 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, September 12, 2015 13:42:42 Prudence via Digitalmars-d-learn wrote: > On Saturday, 12 September 2015 at 06:23:12 UTC, Jonathan M Davis > wrote: > > On Friday, September 11, 2015 23:29:05 Laeeth Isharc via > > Digitalmars-d-learn wrote: > >> On Friday, 11 September 2015 at 21:58:28

Re: shared array?

2015-09-13 Thread Kagamin via Digitalmars-d-learn
On Friday, 11 September 2015 at 17:29:47 UTC, Prudence wrote: I don't care about "maybe" working. Since the array is hidden inside a class I can control who and how it is used and deal with the race conditions. Looks like destruction slipped out of your control. That is solved by making

Re: D + Dub + Sublime +... build/run in terminal?

2015-09-13 Thread Gary Willoughby via Digitalmars-d-learn
On Sunday, 13 September 2015 at 10:00:13 UTC, SuperLuigi wrote: but whatever I put in messes up and I just get errors... So what are the errors?

Re: [D Cookbook]about "Communicating with external processes" part.

2015-09-13 Thread Adam D. Ruppe via Digitalmars-d-learn
I'm in a super rush, running late to something else, but try using readln in the child before writing and see what happens. You sent data to it but the child never read it.

[D Cookbook]about "Communicating with external processes" part.

2015-09-13 Thread xky via Digitalmars-d-learn
Hello. :) I just got a this problem when i read "D Cookbook". [ pipe.d ]: == import std.process; import std.stdio; void main(){ auto info = pipeProcess("child.exe"); scope(exit) wait(info.pid);

Re: Interesting user mistake

2015-09-13 Thread Marco Leise via Digitalmars-d
Am Fri, 04 Sep 2015 13:38:26 + schrieb "Jonathan M Davis" : > I didn't realize that a unary + operator existed. I would have > assumed that +a as an expression would be illegal. It doesn't > even mean anything. > > - Jonathan M Davis Often (mostly with linear algebra)

Re: shared array?

2015-09-13 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Sunday, 13 September 2015 at 16:53:20 UTC, ponce wrote: GC is basically ok for anything soft-realtime, where you already spend a lot of time to go fast enough. And if you want hard-realtime, well you wouldn't want malloc either. It's a non-problem. If this was true then Go would not have

Re: shared array?

2015-09-13 Thread Prudence via Digitalmars-d-learn
On Sunday, 13 September 2015 at 16:58:22 UTC, Ola Fosheim Grøstad wrote: On Sunday, 13 September 2015 at 15:35:07 UTC, Jonathan M Davis wrote: the GC heavily. And the reality of the matter is that the vast majority of programs will have _no_ problems with using the GC so long as they don't use

Re: Type helpers instead of UFCS

2015-09-13 Thread BBasile via Digitalmars-d
On Sunday, 13 September 2015 at 17:17:18 UTC, bitwise wrote: On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote: UFCS is good but there are two huge problems: - code completion in IDE. It'will never work. By this do you mean completion will be flooded? If so, then +1. I would

Re: Operator overloading or alternatives to expression templates

2015-09-13 Thread Martin Nowak via Digitalmars-d
On 09/13/2015 07:16 PM, Daniel N wrote: > > Could you try this? > > int opCmp(Foo rhs) > { > return (id > rhs.id) - (id < rhs.id); > } That's not the point, opCmp requires twice as many comparisons as needed for <. If they are more expansive, e.g. string comparison, your trick won't work.

Re: Type helpers instead of UFCS

2015-09-13 Thread bitwise via Digitalmars-d
On Sunday, 13 September 2015 at 17:23:25 UTC, BBasile wrote: On Sunday, 13 September 2015 at 17:17:18 UTC, bitwise wrote: On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote: [...] By this do you mean completion will be flooded? If so, then +1. I would much prefer something like

Re: dmd codegen improvements

2015-09-13 Thread BBasile via Digitalmars-d
On Tuesday, 18 August 2015 at 10:45:49 UTC, Walter Bright wrote: Martin ran some benchmarks recently that showed that ddmd compiled with dmd was about 30% slower than when compiled with gdc/ldc. This seems to be fairly typical. I'm interested in ways to reduce that gap. There are 3 broad

Re: how do I check if a member of a T has a member ?

2015-09-13 Thread BBasile via Digitalmars-d-learn
On Sunday, 13 September 2015 at 17:24:20 UTC, Laeeth Isharc wrote: On Sunday, 13 September 2015 at 17:09:57 UTC, wobbles wrote: Use __traits(compiles, date.second)? Thanks. This works: static if (__traits(compiles, { T bar; bar.date.hour;})) pragma(msg,"hour"); else

Re: shared array?

2015-09-13 Thread Ola Fosheim Grostad via Digitalmars-d-learn
On Sunday, 13 September 2015 at 17:16:02 UTC, ponce wrote: On Sunday, 13 September 2015 at 17:00:30 UTC, Ola Fosheim If this was true then Go would not have a concurrent collector. I was speaking of the D language. Go only added concurrent GC now at version 1.5 and keep improving it to

alias for regular expressions

2015-09-13 Thread Thunderbird via Digitalmars-d-learn
Some special interest thingamabob: I've tried to redefine "else if" as "elif" using "alias elif = else if;". No matter what to no avail. I know this is probably useless fancy stuff, but is there any way to get this done without much ado?

Re: how do I check if a member of a T has a member ?

2015-09-13 Thread wobbles via Digitalmars-d-learn
On Sunday, 13 September 2015 at 16:46:54 UTC, Laeeth Isharc wrote: can I check if a member of a T has a member without using a mixin? hid_t createDataType(T)() if (__traits(isSame, TemplateOf!(T), PriceBar)) { auto tid=H5T.create(H5TClass.Compound,T.sizeof); enum offsetof(alias type,

Re: how do I check if a member of a T has a member ?

2015-09-13 Thread Laeeth Isharc via Digitalmars-d-learn
On Sunday, 13 September 2015 at 17:09:57 UTC, wobbles wrote: Use __traits(compiles, date.second)? Thanks. This works: static if (__traits(compiles, { T bar; bar.date.hour;})) pragma(msg,"hour"); else pragma(msg,"nohour");

Re: dmd codegen improvements

2015-09-13 Thread ponce via Digitalmars-d
On Sunday, 13 September 2015 at 17:30:12 UTC, BBasile wrote: It seems that since the Pentium I, ENTER is always slower. But i don't know if it's used as a kind of optimization for the binary size. Actually before using DMD I had **never** seen an ENTER. Same here, I thought nobody used

Re: dmd codegen improvements

2015-09-13 Thread Martin Nowak via Digitalmars-d
On 09/13/2015 07:30 PM, BBasile wrote: > It seems that since the Pentium I, ENTER is always slower. But i don't > know if it's used as a kind of optimization for the binary size. > Actually before using DMD I had **never** seen an ENTER. https://github.com/D-Programming-Language/dmd/pull/5073

Re: dmd codegen improvements

2015-09-13 Thread BBasile via Digitalmars-d
On Sunday, 13 September 2015 at 18:33:52 UTC, Martin Nowak wrote: On 09/13/2015 07:30 PM, BBasile wrote: It seems that since the Pentium I, ENTER is always slower. But i don't know if it's used as a kind of optimization for the binary size. Actually before using DMD I had **never** seen an

Re: dmd codegen improvements

2015-09-13 Thread Martin Nowak via Digitalmars-d
On 09/13/2015 08:45 PM, BBasile wrote: > Yeah, that was fast. With the hope it'll be approved. If only it wasn't for me to do this...

Re: Looking for someone that could work on 32 bits support for SDC

2015-09-13 Thread deadalnix via Digitalmars-d
On Sunday, 13 September 2015 at 13:26:05 UTC, BBasile wrote: On Sunday, 13 September 2015 at 05:53:27 UTC, deadalnix wrote: On Sunday, 13 September 2015 at 02:19:27 UTC, BBasile wrote: On Wednesday, 9 September 2015 at 20:33:43 UTC, deadalnix wrote: All is in the title.

Re: shared array?

2015-09-13 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Sunday, 13 September 2015 at 15:35:07 UTC, Jonathan M Davis wrote: the GC heavily. And the reality of the matter is that the vast majority of programs will have _no_ problems with using the GC so long as they don't use it heavily. Programming like you're in Java and allocating everything on

Re: Interesting user mistake

2015-09-13 Thread Martin Nowak via Digitalmars-d
On 09/03/2015 06:46 PM, Andrei Alexandrescu wrote: > http://stackoverflow.com/questions/32369114/leap-years-not-working-in-date-and-time-program-in-dlang > > > The gist of it is the user wrote =+ instead of +=. I wonder if we should > disallow during tokenization the sequence "=", "+",

Re: Type helpers instead of UFCS

2015-09-13 Thread bitwise via Digitalmars-d
On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote: UFCS is good but there are two huge problems: - code completion in IDE. It'will never work. By this do you mean completion will be flooded? If so, then +1. I would much prefer something like C# extension methods, but where the

Re: Operator overloading or alternatives to expression templates

2015-09-13 Thread Daniel N via Digitalmars-d
On Sunday, 13 September 2015 at 14:06:46 UTC, Martin Nowak wrote: struct Foo { size_t id; int opCmp(Foo rhs) { if (id < rhs.id) return -1; if (id == rhs.id) return 0; else return 1; } bool opBinary(string s:"<")(Foo rhs) {

Re: shared array?

2015-09-13 Thread ponce via Digitalmars-d-learn
On Sunday, 13 September 2015 at 17:00:30 UTC, Ola Fosheim Grøstad wrote: On Sunday, 13 September 2015 at 16:53:20 UTC, ponce wrote: GC is basically ok for anything soft-realtime, where you already spend a lot of time to go fast enough. And if you want hard-realtime, well you wouldn't want

Re: shared array?

2015-09-13 Thread Prudence via Digitalmars-d-learn
On Sunday, 13 September 2015 at 17:16:02 UTC, ponce wrote: On Sunday, 13 September 2015 at 17:00:30 UTC, Ola Fosheim Grøstad wrote: On Sunday, 13 September 2015 at 16:53:20 UTC, ponce wrote: GC is basically ok for anything soft-realtime, where you already spend a lot of time to go fast enough.

Re: alias for regular expressions

2015-09-13 Thread Thunderbird via Digitalmars-d-learn
On Sunday, 13 September 2015 at 19:51:38 UTC, anonymous wrote: On Sunday 13 September 2015 21:47, Thunderbird wrote: Some special interest thingamabob: I've tried to redefine "else if" as "elif" using "alias elif = else if;". No matter what to no avail. I know this is probably useless

Re: alias for regular expressions

2015-09-13 Thread anonymous via Digitalmars-d-learn
On Sunday 13 September 2015 21:47, Thunderbird wrote: > Some special interest thingamabob: > > I've tried to redefine "else if" as "elif" using "alias elif = > else if;". No matter what to no avail. > > I know this is probably useless fancy stuff, but is there any way > to get this done

Re: shared array?

2015-09-13 Thread ponce via Digitalmars-d-learn
On Sunday, 13 September 2015 at 19:39:20 UTC, Ola Fosheim Grostad wrote: The theoretical limit for 10ms mark sweep collection on current desktop cpus is 60 megabytes at peak performance. That means you'll have to stay below 30 MiB in total memory use with pointers. 30 MiB of scannable

Re: Looking for someone that could work on 32 bits support for SDC

2015-09-13 Thread dnewbie via Digitalmars-d
On Sunday, 13 September 2015 at 19:49:58 UTC, deadalnix wrote: That's a pitty. libd itself could be usefull to program some tools for the language. I particularly think to IDE stuff like symbol list, module name finder, etc. So far in Coedit I use libdparse but if libd would be available for

[Issue 15056] [REG2.068] Unstored RAII struct return yields bogus error: "cannot mix core.std.stdlib.alloca() and exception handling"

2015-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15056 --- Comment #1 from Marco Leise --- Digger found this commit in 2.069: https://github.com/D-Programming-Language/dmd/commit/4f0a458f6072a281892f3d26fdd8aeb30d250c03 Since this can not be the commit that broke 2.068 I assume that

[Issue 15056] New: [REG2.068] Unstored RAII struct return yields bogus error: "cannot mix core.std.stdlib.alloca() and exception handling"

2015-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15056 Issue ID: 15056 Summary: [REG2.068] Unstored RAII struct return yields bogus error: "cannot mix core.std.stdlib.alloca() and exception handling" Product: D Version: D2

[Issue 15056] [REG2.068] Unstored RAII struct return yields bogus error: "cannot mix core.std.stdlib.alloca() and exception handling"

2015-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15056 Vladimir Panteleev changed: What|Removed |Added CC|

Re: Why does reverse also flips my other dynamic array?

2015-09-13 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, September 13, 2015 17:17:01 Ali Çehreli via Digitalmars-d-learn wrote: > On 09/13/2015 08:21 AM, Jonathan M Davis via Digitalmars-d-learn wrote: > > On Saturday, September 12, 2015 14:59:23 Ali Çehreli via > Digitalmars-d-learn wrote: > >> On 09/12/2015 02:29 PM, Marco Leise wrote: >

[Issue 15042] [REG2.068] isInstanceOf fails when a template argument is an instance of the tested template

2015-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15042 Kenji Hara changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 14756] cannot deduce function with template constraint

2015-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14756 Kenji Hara changed: What|Removed |Added CC||marco.le...@gmx.de ---

Re: Combining Unique type with concurrency module

2015-09-13 Thread Ali Çehreli via Digitalmars-d-learn
On 09/13/2015 09:09 AM, Alex wrote: > I'm new to this forum so, please excuse me in advance for > asking silly questions. Before somebody else says it: There are no silly questions. :) > struct std.typecons.Unique!(S).Unique is not copyable because it is > annotated with @disable I have made

Re: shared array?

2015-09-13 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, September 13, 2015 16:53:18 ponce via Digitalmars-d-learn wrote: > On Sunday, 13 September 2015 at 15:35:07 UTC, Jonathan M Davis > wrote: > > But the idea that your average D program is going to run into > > problems with the GC while using Phobos is just plain wrong. > > The folks who

[Issue 15056] [REG2.068] Unstored RAII struct return yields bogus error: "cannot mix core.std.stdlib.alloca() and exception handling"

2015-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15056 --- Comment #3 from Marco Leise --- I also found those changes in this merge commit for 2.068: https://github.com/D-Programming-Language/dmd/commit/38d31b0364e555ce42a8f47ca656e59b1cf90aad Should I bisect 9rnsr/fix14696_cdmd or

Re: shared array?

2015-09-13 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, September 13, 2015 16:58:21 Ola Fosheim Grøstad via Digitalmars-d-learn wrote: > On Sunday, 13 September 2015 at 15:35:07 UTC, Jonathan M Davis > wrote: > > the GC heavily. And the reality of the matter is that the vast > > majority of programs will have _no_ problems with using the GC

[Issue 15056] [REG2.068.1] Unstored RAII struct return yields bogus error: "cannot mix core.std.stdlib.alloca() and exception handling"

2015-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15056 Marco Leise changed: What|Removed |Added Summary|[REG2.068] Unstored RAII|[REG2.068.1] Unstored RAII

Re: shared array?

2015-09-13 Thread Ola Fosheim Grostad via Digitalmars-d-learn
On Monday, 14 September 2015 at 00:41:28 UTC, Jonathan M Davis wrote: stop-the-world GC. For instance, this has come up in discussions on games where a certain framerate needs to be maintained. Even a 100 ms stop would be way too much for them. In fact, it came up with the concurrent GC that

Re: Why does reverse also flips my other dynamic array?

2015-09-13 Thread Ali Çehreli via Digitalmars-d-learn
On 09/13/2015 08:21 AM, Jonathan M Davis via Digitalmars-d-learn wrote: > On Saturday, September 12, 2015 14:59:23 Ali Çehreli via Digitalmars-d-learn wrote: >> On 09/12/2015 02:29 PM, Marco Leise wrote: >> >> > Note that often the original dynamic array has additional >> > capacity beyond

[Issue 15054] DMD doesn't work with hardening-wrapper

2015-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15054 Marco Leise changed: What|Removed |Added Hardware|x86_64 |All --

Re: Beta D 2.068.2-b1

2015-09-13 Thread Marco Leise via Digitalmars-d-announce
And I found another regression in 2.068.1: https://issues.dlang.org/show_bug.cgi?id=15056 -- Marco

Re: shared array?

2015-09-13 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, September 13, 2015 17:14:05 Prudence via Digitalmars-d-learn wrote: > On Sunday, 13 September 2015 at 16:58:22 UTC, Ola Fosheim Grøstad > wrote: > > On Sunday, 13 September 2015 at 15:35:07 UTC, Jonathan M Davis > > wrote: > >> the GC heavily. And the reality of the matter is that the

[Issue 15056] [REG2.068.1] Unstored RAII struct return yields bogus error: "cannot mix core.std.stdlib.alloca() and exception handling"

2015-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15056 Marco Leise changed: What|Removed |Added Hardware|All |x86_64

[Issue 15054] DMD doesn't work with hardening-wrapper

2015-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15054 Marco Leise changed: What|Removed |Added CC||marco.le...@gmx.de

[Issue 15045] [Reg 2.069-devel] hasElaborateCopyConstructor is true for struct with opDispatch

2015-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15045 --- Comment #1 from Kenji Hara --- (In reply to Martin Nowak from comment #0) > I'd suggest to fix __traits(hasMember) to not instantiate opDispatch in > which case issue 14605 needs to be refixed. Today, hasMember, getMember,

Re: Adjacent Pairs Range

2015-09-13 Thread Nordlöw via Digitalmars-d-learn
On Sunday, 13 September 2015 at 01:49:56 UTC, deed wrote: zip(arr[0 .. $-1], arr[1 .. $]) ? Assumes arrays. Better is zip(arr.dropOne, arr)

More This Week in D!

2015-09-13 Thread Adam D. Ruppe via Digitalmars-d-announce
This week, a tip about working around a bug with some quick philosophy about getting stuff done: http://arsdnet.net/this-week-in-d/sep-13.html Last week, new DMD, new LDC, and interview with Atila Neves! http://arsdnet.net/this-week-in-d/sep-06.html BTW, another thing I've been writing the

Re: More This Week in D!

2015-09-13 Thread Rikki Cattermole via Digitalmars-d-announce
On 14/09/15 3:51 PM, Adam D. Ruppe wrote: This week, a tip about working around a bug with some quick philosophy about getting stuff done: http://arsdnet.net/this-week-in-d/sep-13.html Last week, new DMD, new LDC, and interview with Atila Neves! http://arsdnet.net/this-week-in-d/sep-06.html

Passing Elements of A Static Array as Function Parameters

2015-09-13 Thread Nordlöw via Digitalmars-d-learn
If I have a static array `x` defined as enum N = 3; int[N] x; how do I pass it's elements into a variadic function f(T...)(T xs) if (T.length >= 3) ?

[Issue 15045] [Reg 2.069-devel] hasElaborateCopyConstructor is true for struct with opDispatch

2015-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15045 --- Comment #2 from Kenji Hara --- IMHO, it would be better to prevent forwarding some built-in special member names prefixed by double-underscore through alias this or opDispatch. As we've already patched in library code like,

[Issue 14992] static array local variables always require .init

2015-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14992 Kenji Hara changed: What|Removed |Added CC||c...@dawg.eu --- Comment

[Issue 14014] struct init required for zero initialized static arrays

2015-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14014 Kenji Hara changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 15019] [ICE] Heisencrash on OS X 32-bit with non-trivial projects

2015-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15019 --- Comment #15 from Walter Bright --- I applied the patches and cannot reproduce it :-( --

  1   2   >