Re: Classical bug

2015-01-27 Thread Fyodor Ustinov via Digitalmars-d-learn
On Tuesday, 27 January 2015 at 12:02:59 UTC, Vladimir Panteleev wrote: Always. But the check seems very simple, and is easily circumvented. This compiles: byte[] func() { byte[1024] buffer; auto p = buffer[0..3]; return p; } I think this is the first step of a long and difficult way.

Re: NEW asm.dlang.org site

2015-01-27 Thread ZombineDev via Digitalmars-d-announce
Thanks for the good work! It would be really nice if in the future we could compare DMD, GDC and LDC (and SDC when it becomes more usable) at asm.dlang.org. (Btw a nice choice of name :) ) I have a couple of questions about the output when looking at a C++[1] program and the same in GDC[2]

Re: extern(C) symbol conflicts

2015-01-27 Thread Kagamin via Digitalmars-d
Does this work? void main() { version(test1)test1.cfunction(); else test2.cfunction(); } All symbols belong to modules.

Re: Virtual functions and inheritance

2015-01-27 Thread Daniel Kozák via Digitalmars-d-learn
V Tue, 27 Jan 2015 04:38:57 + David Monagle via Digitalmars-d-learn digitalmars-d-learn@puremagic.com napsáno: Hi guys, I'm a former C++ developer and really enjoying working with D now. I have a question that I hope some of you may be able to answer. class Parent { @property

[Issue 14052] `dmd -deps` lists imports from failed __traits(compiles) blocks

2015-01-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14052 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

D Management Site

2015-01-27 Thread Jonathan Marler via Digitalmars-d
Would people want and use a website that tracks who's working on what in the D Programming Language? People would go to the site and be able to find out what's being worked on, what's not being worked on, who's working on what, what bugs are being worked on. People will have to use the site

[website redesign] PR for the one with the big red menu bar

2015-01-27 Thread anonymous via Digitalmars-d
PR: https://github.com/D-Programming-Language/dlang.org/pull/869 - For details see here. Live version: http://ag0aep6g-dlang.rhcloud.com - If you've visited this before, you may have to clear your cache to see the proper logo color.

Re: extern(C) symbol conflicts

2015-01-27 Thread Steven Schveighoffer via Digitalmars-d
On 1/27/15 5:57 AM, Walter Bright wrote: On 1/26/2015 11:06 AM, Steven Schveighoffer wrote: Is there a good reason why we shouldn't allow the duplicate declaration in multiple modules? I understand for D symbols -- those are actually different symbols. D's interface to C and C++ does not

Oplink PR Ping

2015-01-27 Thread Jonathan Marler via Digitalmars-d
I created a PR for optlink about 7 months ago and I don't think it's been looked at. PR: https://github.com/DigitalMars/optlink/pull/16 Bug: https://issues.dlang.org/show_bug.cgi?id=4831 Can someone take a look?

Re: D Management Site

2015-01-27 Thread Andrei Alexandrescu via Digitalmars-d
Jonathan Marler johnnymar...@gmail.com wrote: On Tuesday, 27 January 2015 at 18:25:21 UTC, Andrei Alexandrescu wrote: On 1/27/15 10:10 AM, Jonathan Marler wrote: Would people want and use a website that tracks who's working on what in the D Programming Language? People would go to the site

Re: static class vs. static struct

2015-01-27 Thread Ali Çehreli via Digitalmars-d-learn
On 01/27/2015 08:58 AM, Piotrek wrote: Nice list. :) 1. static variable struct A{int a} // no static before declaration static A s; //note that static is used for struct variable storage class (lifetime) static int b; etc. 2. static declaration static struct A{int a}; //static used

Re: One area where D has the edge

2015-01-27 Thread Paulo Pinto via Digitalmars-d
On Tuesday, 27 January 2015 at 15:09:36 UTC, Laeeth Isharc wrote: I cannot speak about small team experiences. Our projects usually take around 30+ developers. That it is a decent sized team to have to coordinate and it puts emphasis on very different questions. The context I am thinking of

Re: I left my program open for 9 hours and it used up 700mb of ram, could someone review it?

2015-01-27 Thread Gan via Digitalmars-d-learn
On Tuesday, 27 January 2015 at 15:45:47 UTC, bearophile wrote: Gan: How can I make it use less CPU/RAM? Most tiny classes probably should be structs. More generally, use a struct every time you don't need a class. You can start with those two: struct SBRange { double left = 0.0,

Re: Oplink PR Ping

2015-01-27 Thread Jonathan Marler via Digitalmars-d
On Tuesday, 27 January 2015 at 19:35:44 UTC, H. S. Teoh wrote: On Tue, Jan 27, 2015 at 07:01:02PM +, Jonathan Marler via Digitalmars-d wrote: I created a PR for optlink about 7 months ago and I don't think it's been looked at. PR: https://github.com/DigitalMars/optlink/pull/16 Bug:

Re: [website redesign] PR for the one with the big red menu bar

2015-01-27 Thread Steven Schveighoffer via Digitalmars-d
On 1/27/15 3:02 PM, anonymous wrote: PR: https://github.com/D-Programming-Language/dlang.org/pull/869 - For details see here. Live version: http://ag0aep6g-dlang.rhcloud.com - If you've visited this before, you may have to clear your cache to see the proper logo color. This one has my vote.

[Issue 2138] Allow more than 65535 files in Zip archives

2015-01-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2138 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/8cc228c4e97b5bc2be2e6ed338faf5bcaed6336b Fix Issue 2138 - Allow

Kythe

2015-01-27 Thread Andrei Alexandrescu via Digitalmars-d
Google just open sourced https://github.com/google/kythe. Would it help Calypso? -- Andrei

Re: D Management Site

2015-01-27 Thread Jonathan Marler via Digitalmars-d
On Tuesday, 27 January 2015 at 18:25:21 UTC, Andrei Alexandrescu wrote: On 1/27/15 10:10 AM, Jonathan Marler wrote: Would people want and use a website that tracks who's working on what in the D Programming Language? People would go to the site and be able to find out what's being worked on,

Re: I left my program open for 9 hours and it used up 700mb of ram, could someone review it?

2015-01-27 Thread bearophile via Digitalmars-d-learn
Gan: Is there some special stuff I gotta do extra with structs? Do they need manually allocated and released? Most of your usages of tiny structs should be by value. So just keep in mind they are values. Even when you iterate with a foreach on a mutable array of them :-) On a second

Re: Calypso and the future of D

2015-01-27 Thread Laeeth Isharc via Digitalmars-d
On Tuesday, 27 January 2015 at 16:39:40 UTC, Elie Morisse wrote: On Monday, 26 January 2015 at 19:35:11 UTC, Laeeth Isharc wrote: I posted some thoughts on web docs writeup of C+= interface here.

Re: std.zip

2015-01-27 Thread FG via Digitalmars-d
On 2015-01-26 at 03:41, Vladimir Panteleev wrote: How about submitting this patch as a pull request? Thanks for this suggestion. The expanded patch is now merged: https://github.com/D-Programming-Language/phobos/pull/2914

Re: accept @pure @nothrow @return attributes

2015-01-27 Thread Nick Treleaven via Digitalmars-d
On 27/01/2015 18:01, Jonathan Marler wrote: On Tuesday, 27 January 2015 at 17:18:11 UTC, Nick Treleaven wrote: On 27/01/2015 16:49, Jonathan M Davis via Digitalmars-d wrote: abstract also applies to classes, as does final. Yes, but they actually only affect the *functions* belonging to the

Re: D Management Site

2015-01-27 Thread Andrei Alexandrescu via Digitalmars-d
On 1/27/15 10:10 AM, Jonathan Marler wrote: Would people want and use a website that tracks who's working on what in the D Programming Language? People would go to the site and be able to find out what's being worked on, what's not being worked on, who's working on what, what bugs are being

[Issue 2138] Allow more than 65535 files in Zip archives

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

[Issue 14053] Hello world generates bloat in the object file

2015-01-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14053 --- Comment #4 from Iain Buclaw ibuc...@gdcproject.org --- The best thing DMD can do is to not rely on these artificial function helpers, and just inline whatever code it is they're emitting. --

Re: One area where D has the edge

2015-01-27 Thread Laeeth Isharc via Digitalmars-d
Out of curiosity, what is lacking in the current commercial offerings for hedge fund management? Why not use an existing engine? In the general sense, lots is lacking across the board. I started a macro fund in 2012 with a former colleague from Citadel in partnership with another company,

Re: Oplink PR Ping

2015-01-27 Thread H. S. Teoh via Digitalmars-d
On Tue, Jan 27, 2015 at 07:01:02PM +, Jonathan Marler via Digitalmars-d wrote: I created a PR for optlink about 7 months ago and I don't think it's been looked at. PR: https://github.com/DigitalMars/optlink/pull/16 Bug: https://issues.dlang.org/show_bug.cgi?id=4831 Can someone take a

Re: I left my program open for 9 hours and it used up 700mb of ram, could someone review it?

2015-01-27 Thread Gan via Digitalmars-d-learn
On Tuesday, 27 January 2015 at 19:26:12 UTC, bearophile wrote: Gan: Is there some special stuff I gotta do extra with structs? Do they need manually allocated and released? Most of your usages of tiny structs should be by value. So just keep in mind they are values. Even when you iterate

Re: static class vs. static struct

2015-01-27 Thread Ali Çehreli via Digitalmars-d-learn
On 01/27/2015 08:33 AM, Piotrek wrote: Non-static means nested. Hmm,this can be misleading. Nesting in structs doesn't introduce context pointer. You must be thinking of structs nested inside user-defined types. Structs that are nested inside functions do have the context pointer. Ali

[Issue 14053] Hello world generates bloat in the object file

2015-01-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14053 Iain Buclaw ibuc...@gdcproject.org changed: What|Removed |Added CC||ibuc...@gdcproject.org

Re: DlangUI

2015-01-27 Thread Gan via Digitalmars-d-announce
On Saturday, 14 June 2014 at 19:40:58 UTC, Jim Hewes wrote: Very nice, thanks. I'm looking forward to trying it out when I can find the time. I'm not a big fan of bindings/wrappers. Jim This is looks fantastic. I tried the demo but I get an error: SDL_GL_CreateContext failed: Failed creating

Re: accept @pure @nothrow @return attributes

2015-01-27 Thread ketmar via Digitalmars-d
On Tue, 27 Jan 2015 08:47:43 +, Paolo Invernizzi wrote: On Tuesday, 27 January 2015 at 08:07:11 UTC, ketmar wrote: On Tue, 27 Jan 2015 01:32:21 +, Mike wrote: i started the process of migration of all our work projects (i'm a head of software company with ~100 employees, if anybody

[Issue 13726] Build Phobos and Druntime with stack frames enabled (-gs)

2015-01-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13726 --- Comment #15 from Sobirari Muhomori dfj1es...@sneakemail.com --- (In reply to Walter Bright from comment #2) Every bit of performance matters. D is constantly being compared for speed with other tools. Building phobos for maximum debugging

Re: Virtual functions and inheritance

2015-01-27 Thread via Digitalmars-d-learn
On Tuesday, 27 January 2015 at 08:19:46 UTC, Daniel Kozák wrote: You can use this T: class Parent { @property string typeName(this T)() { return T.stringof; } } class Child : Parent { } void main() { auto p = new Parent; auto c = new Child; assert(p.typeName ==

Re: accept @pure @nothrow @return attributes

2015-01-27 Thread Paolo Invernizzi via Digitalmars-d
On Tuesday, 27 January 2015 at 08:07:11 UTC, ketmar wrote: On Tue, 27 Jan 2015 01:32:21 +, Mike wrote: i started the process of migration of all our work projects (i'm a head of software company with ~100 employees, if anybody is interested) to D. but then i realised that D -- being a

Re: static class vs. static struct

2015-01-27 Thread ref2401 via Digitalmars-d-learn
For several times I've met struct(or static struct) usage in Phobos for singleton pattern implementation. Unfortunately now i can remember only core.runtime.Runtime. So I've got a question. Why do Phobos guys use struct or static struct for or singleton pattern implementation? Why don't use

[Issue 13726] Build Phobos and Druntime with stack frames enabled (-gs)

2015-01-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13726 Sobirari Muhomori dfj1es...@sneakemail.com changed: What|Removed |Added URL|

Re: Array List object?

2015-01-27 Thread bearophile via Digitalmars-d-learn
Gan: //Initializing the array tiles = new SBTile[](0); This is often useless. //Clearing the array tiles = []; This doesn't clear the array, it rebinds it to a null pointer. Bye, bearophile

Re: static class vs. static struct

2015-01-27 Thread Daniel Kozak via Digitalmars-d-learn
On Tuesday, 27 January 2015 at 09:01:39 UTC, ref2401 wrote: For several times I've met struct(or static struct) usage in Phobos for singleton pattern implementation. Unfortunately now i can remember only core.runtime.Runtime. So I've got a question. Why do Phobos guys use struct or static

[Issue 5452] Signed file lengths and positions

2015-01-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5452 Sobirari Muhomori dfj1es...@sneakemail.com changed: What|Removed |Added URL|

Re: One area where D has the edge

2015-01-27 Thread Paulo Pinto via Digitalmars-d
On Tuesday, 27 January 2015 at 06:08:34 UTC, Laeeth Isharc wrote: There was also this one from 1998 that was very small http://www.javaworld.com/article/2076641/learn-java/an-introduction-to-the-java-ring.html Java has some history running on small devices. Cheers, uri Indeed, and I

Re: accept @pure @nothrow @return attributes

2015-01-27 Thread ketmar via Digitalmars-d
On Tue, 27 Jan 2015 01:32:21 +, Mike wrote: In fact, it is the attitude against change that has put me on the fence about D, when I was quite an advocate about a year ago. It has also made me reluctant to put forth the necessary effort to study and make any significant contributions

Re: Using dub

2015-01-27 Thread Joel via Digitalmars-d-learn
Oope, yeah, and it ran.

[Issue 14036] Do not throw FinalizeError on OutOfMemoryError or InvalidMemoryOperationError

2015-01-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14036 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/73d7a44eb18f6889ef32e02fd15a8c567e8cfb6d fix Issue 14036 -

Re: accept @pure @nothrow @return attributes

2015-01-27 Thread deadalnix via Digitalmars-d
On Tuesday, 27 January 2015 at 08:07:11 UTC, ketmar wrote: heh. i was very passionate about D, and i started the process of migration of all our work projects (i'm a head of software company with ~100 employees, if anybody is interested) to D. but then i realised that D -- being a best

Re: accept @pure @nothrow @return attributes

2015-01-27 Thread ketmar via Digitalmars-d
On Tue, 27 Jan 2015 08:30:43 +, Jonathan Marler wrote: On Tuesday, 27 January 2015 at 07:50:36 UTC, ketmar wrote: On Tue, 27 Jan 2015 02:11:55 +, Jonathan Marler wrote: This has become quite frustrating. I'm not sure how else to explain myself so maybe I'm just being dumb. you are

Re: accept @pure @nothrow @return attributes

2015-01-27 Thread Paolo Invernizzi via Digitalmars-d
On Tuesday, 27 January 2015 at 08:44:19 UTC, deadalnix wrote: On Tuesday, 27 January 2015 at 08:07:11 UTC, ketmar wrote: heh. i was very passionate about D, and i started the process of migration of all our work projects (i'm a head of software company with ~100 employees, if anybody is

Re: accept @pure @nothrow @return attributes

2015-01-27 Thread ketmar via Digitalmars-d
On Tue, 27 Jan 2015 08:44:17 +, deadalnix wrote: On Tuesday, 27 January 2015 at 08:07:11 UTC, ketmar wrote: heh. i was very passionate about D, and i started the process of migration of all our work projects (i'm a head of software company with ~100 employees, if anybody is interested) to

Re: 521 days, 22 hours, 7 minutes and 52 seconds...

2015-01-27 Thread tn via Digitalmars-d
On Monday, 26 January 2015 at 20:35:31 UTC, Andrei Alexandrescu wrote: On 1/26/15 12:30 PM, Dicebot wrote: We couldn't merge it into std.experimental before because you have stated that even std.experimental modules shouldn't have a breaking changes normally. It was 2 reviews ago. Now you

Re: accept @pure @nothrow @return attributes

2015-01-27 Thread via Digitalmars-d
On Tuesday, 27 January 2015 at 08:30:46 UTC, Jonathan Marler wrote: People are very quick to respond to posts without fully reading them and the meat of the content gets lost in a slew of responses that miss the point. I'm not sure what I'm doing wrong or how this can be improved. But this

Re: accept @pure @nothrow @return attributes

2015-01-27 Thread Jonathan Marler via Digitalmars-d
On Tuesday, 27 January 2015 at 07:50:36 UTC, ketmar wrote: On Tue, 27 Jan 2015 02:11:55 +, Jonathan Marler wrote: This has become quite frustrating. I'm not sure how else to explain myself so maybe I'm just being dumb. you are dumb. you can be dumb for some time, and then BANG! your

Re: 521 days, 22 hours, 7 minutes and 52 seconds...

2015-01-27 Thread aldanor via Digitalmars-d
On Tuesday, 27 January 2015 at 09:07:30 UTC, tn wrote: On Monday, 26 January 2015 at 20:35:31 UTC, Andrei Alexandrescu wrote: On 1/26/15 12:30 PM, Dicebot wrote: We couldn't merge it into std.experimental before because you have stated that even std.experimental modules shouldn't have a

Re: static class vs. static struct

2015-01-27 Thread ketmar via Digitalmars-d-learn
On Tue, 27 Jan 2015 09:40:08 +, Daniel Kozak wrote: import std.stdio; import std.conv; struct S { @disable this(); } final class C { } void main() { writeln(C.sizeof); writeln(S.sizeof); } blind guess: vmt with toString() from Object? ;-) signature.asc

Re: Using dub

2015-01-27 Thread Joel via Digitalmars-d-learn
On Tuesday, 27 January 2015 at 07:44:12 UTC, Rikki Cattermole wrote: On 27/01/2015 8:40 p.m., Joel wrote: On Tuesday, 27 January 2015 at 07:25:18 UTC, Rikki Cattermole wrote: On 27/01/2015 8:03 p.m., Joel wrote: I'm having trouble using dub. Nothing seems to work (-h works though). I would

[Issue 14036] Do not throw FinalizeError on OutOfMemoryError or InvalidMemoryOperationError

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

Re: core.exception.InvalidMemoryOperationError@(0)

2015-01-27 Thread ketmar via Digitalmars-d-learn
On Tue, 27 Jan 2015 06:46:20 +, Bayan Rafeh wrote: This is the first serious project I do with D and now you're lost to other C-like languages, methinks. ;-) signature.asc Description: PGP signature

[Issue 13726] Build Phobos and Druntime with stack frames enabled (-gs)

2015-01-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13726 Vladimir Panteleev thecybersha...@gmail.com changed: What|Removed |Added URL|http://forum.dlang.org/thre

Re: static class vs. static struct

2015-01-27 Thread Daniel Kozak via Digitalmars-d-learn
On Tuesday, 27 January 2015 at 09:36:49 UTC, Daniel Kozak wrote: On Tuesday, 27 January 2015 at 09:01:39 UTC, ref2401 wrote: For several times I've met struct(or static struct) usage in Phobos for singleton pattern implementation. Unfortunately now i can remember only core.runtime.Runtime. So

Re: Array List object?

2015-01-27 Thread bearophile via Digitalmars-d-learn
And it's named dynamic array, instead of Array List object, it's not a class instance. Bye, bearophile

[Issue 2138] Allow more than 65535 files in Zip archives

2015-01-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2138 FG h...@fgda.pl changed: What|Removed |Added Keywords||pull CC|

Re: D Management Site

2015-01-27 Thread Jacob Carlborg via Digitalmars-d
On 2015-01-27 19:10, Jonathan Marler wrote: Would people want and use a website that tracks who's working on what in the D Programming Language? People would go to the site and be able to find out what's being worked on, what's not being worked on, who's working on what, what bugs are being

Re: About variant

2015-01-27 Thread bioinfornatics via Digitalmars-d-learn
I can do this import std.variant; struct Alpha { Variant something; this(Variant v){ something = v; } static Alpha build(T)(T v){ return Alpha( cast(Variant)v ); } } void main(){ auto a =

Re: Oplink PR Ping

2015-01-27 Thread eles via Digitalmars-d
On Tuesday, 27 January 2015 at 20:44:53 UTC, Andrei Alexandrescu wrote: On 1/27/15 12:42 PM, Andrei Alexandrescu wrote: On 1/27/15 12:31 PM, Jonathan Marler wrote: I still haven't figured out how to email someone without knowing their email address. http://goo.gl/go5Dks -- Andrei I got

Re: About variant

2015-01-27 Thread bioinfornatics via Digitalmars-d-learn
On Tuesday, 27 January 2015 at 21:00:16 UTC, Justin Whear wrote: On Tue, 27 Jan 2015 20:46:59 +, bioinfornatics wrote: void main(){ auto a = Alpha!(int)( 6); auto b = Alpha!(string)( hello); The Alpha struct is not a template, only the constructor is. Remove the

Re: [website redesign] PR for the one with the big red menu bar

2015-01-27 Thread Andrej Mitrovic via Digitalmars-d
On 1/27/15, anonymous via Digitalmars-d digitalmars-d@puremagic.com wrote: PR: https://github.com/D-Programming-Language/dlang.org/pull/869 - For details see here. Live version: http://ag0aep6g-dlang.rhcloud.com - If you've visited this before, you may have to clear your cache to see the

Re: One area where D has the edge

2015-01-27 Thread via Digitalmars-d
On Tuesday, 27 January 2015 at 19:27:43 UTC, Laeeth Isharc wrote: One of the things that was striking was the very limited set of choices available for a portfolio management system. Macro involves trading potentially any liquid product in any developed (and sometimes less developed) market,

Re: Kythe

2015-01-27 Thread Jacob Carlborg via Digitalmars-d
On 2015-01-27 19:55, Andrei Alexandrescu wrote: Google just open sourced https://github.com/google/kythe. Would it help Calypso? -- Andrei I had a quick look and my first impression is that it would not help. -- /Jacob Carlborg

Re: I left my program open for 9 hours and it used up 700mb of ram, could someone review it?

2015-01-27 Thread Gan via Digitalmars-d-learn
On Tuesday, 27 January 2015 at 19:59:08 UTC, Gan wrote: On Tuesday, 27 January 2015 at 19:26:12 UTC, bearophile wrote: Gan: Is there some special stuff I gotta do extra with structs? Do they need manually allocated and released? Most of your usages of tiny structs should be by value. So

Re: accept @pure @nothrow @return attributes

2015-01-27 Thread Jonathan Marler via Digitalmars-d
On Tuesday, 27 January 2015 at 18:21:37 UTC, Nick Treleaven wrote: On 27/01/2015 18:01, Jonathan Marler wrote: On Tuesday, 27 January 2015 at 17:18:11 UTC, Nick Treleaven wrote: On 27/01/2015 16:49, Jonathan M Davis via Digitalmars-d wrote: abstract also applies to classes, as does final.

Re: About variant

2015-01-27 Thread Justin Whear via Digitalmars-d-learn
On Tue, 27 Jan 2015 20:46:59 +, bioinfornatics wrote: void main(){ auto a = Alpha!(int)( 6); auto b = Alpha!(string)( hello); The Alpha struct is not a template, only the constructor is. Remove the explicit instantiations and IFTI does the work: void main(){ auto a =

Re: D Management Site

2015-01-27 Thread Jonathan Marler via Digitalmars-d
On Tuesday, 27 January 2015 at 20:59:10 UTC, Jacob Carlborg wrote: On 2015-01-27 19:10, Jonathan Marler wrote: Would people want and use a website that tracks who's working on what in the D Programming Language? People would go to the site and be able to find out what's being worked on,

Re: static class vs. static struct

2015-01-27 Thread Piotrek via Digitalmars-d-learn
On Tuesday, 27 January 2015 at 18:24:29 UTC, Ali Çehreli wrote: On 01/27/2015 08:33 AM, Piotrek wrote: Non-static means nested. Hmm,this can be misleading. Nesting in structs doesn't introduce context pointer. You must be thinking of structs nested inside user-defined types. Structs that

Print to Win Printer

2015-01-27 Thread Paul via Digitalmars-d-learn
How do I print to a Windows printer from a console program? Thanks for your assistance.

Re: static class vs. static struct

2015-01-27 Thread Piotrek via Digitalmars-d-learn
On Tuesday, 27 January 2015 at 18:18:02 UTC, Ali Çehreli wrote: On 01/27/2015 08:58 AM, Piotrek wrote: Nice list. :) 1. static variable struct A{int a} // no static before declaration static A s; //note that static is used for struct variable storage class (lifetime) static int b; etc.

Window creation, for phobos?

2015-01-27 Thread Rikki Cattermole via Digitalmars-d
I have dream! A dream, dream dream. A dream to see GUI's easy to use in D! I must admit it will be hard, but it's time. Prime time I mean! Now enough gabble. I'm proposing to get Devisualization.Window PR'd into phobos. This cannot happen right now. It's blocked on many fronts. 1) Objective-C

Re: [website redesign] PR for the one with the big red menu bar

2015-01-27 Thread H. S. Teoh via Digitalmars-d
On Tue, Jan 27, 2015 at 09:21:20PM +0100, Andrej Mitrovic via Digitalmars-d wrote: On 1/27/15, anonymous via Digitalmars-d digitalmars-d@puremagic.com wrote: PR: https://github.com/D-Programming-Language/dlang.org/pull/869 - For details see here. Live version:

Re: Oplink PR Ping

2015-01-27 Thread Jonathan Marler via Digitalmars-d
On Tuesday, 27 January 2015 at 19:55:06 UTC, H. S. Teoh wrote: On Tue, Jan 27, 2015 at 07:48:15PM +, Jonathan Marler via Digitalmars-d wrote: On Tuesday, 27 January 2015 at 19:35:44 UTC, H. S. Teoh wrote: On Tue, Jan 27, 2015 at 07:01:02PM +, Jonathan Marler via Digitalmars-d wrote: I

Re: extern(C) symbol conflicts

2015-01-27 Thread Steven Schveighoffer via Digitalmars-d
On 1/27/15 3:11 PM, Jacob Carlborg wrote: On 2015-01-27 19:13, Steven Schveighoffer wrote: I would say if two extern(C) declarations are identical (i.e. same parameter types, same attributes), they don't conflict. What does this break? It it's extern(C), shouldn't just the name matter?

Re: Problem with coupling shared object symbol visibility with protection

2015-01-27 Thread Rainer Schuetze via Digitalmars-d
On 26.01.2015 23:24, Walter Bright wrote: The problem here is that you don't want to make someHelperFunc() export because that would mean users could call it directly, but you want it to be available for cross shared library calls. The cross shared library call happens if a template is

Re: accept @pure @nothrow @return attributes

2015-01-27 Thread Jacob Carlborg via Digitalmars-d
On 2015-01-27 17:49, Jonathan M Davis via Digitalmars-d wrote: IMHO, if we have to search for a way to make them consistent, then there's no point. We're just going to end up with making things more consistent in one way and less in another without necessarily making it any easier for anyone to

Re: Oplink PR Ping

2015-01-27 Thread Daniel Murphy via Digitalmars-d
Jonathan Marler wrote in message news:ziogluwispkhxncgr...@forum.dlang.org... I still haven't figured out how to email someone without knowing their email address. Could we get a developer to work on that? Maybe I'll file a bug report. The trick is to find their email address, then use

Re: Oplink PR Ping

2015-01-27 Thread eles via Digitalmars-d
On Tuesday, 27 January 2015 at 20:44:53 UTC, Andrei Alexandrescu wrote: On 1/27/15 12:42 PM, Andrei Alexandrescu wrote: On 1/27/15 12:31 PM, Jonathan Marler wrote: I still haven't figured out how to email someone without knowing their email address. http://goo.gl/go5Dks -- Andrei I got

About variant

2015-01-27 Thread bioinfornatics via Digitalmars-d-learn
Dear that do a lot time wehere I not used std.variant. i would like to hide extra cast from user by using a generic ctor import std.variant; struct Alpha { Variant something; this(T)(T v){ something = cast(Variant)v; } } void main(){

Re: forcing @nogc on class destructors

2015-01-27 Thread via Digitalmars-d
On Saturday, 24 January 2015 at 23:28:35 UTC, Jerry Morrison wrote: This is the first I've heard that allocating GC memory in a destructor will crash. That's an unexpected gotcha. I'd expect to be able to reliably do I/O or throw an exception. Strategy 1. Fix the GC's limitation. (One fewer

Re: accept @pure @nothrow @return attributes

2015-01-27 Thread Daniel Kozak via Digitalmars-d
Jonathan M Davis via Digitalmars-d píše v Út 27. 01. 2015 v 08:49 -0800: On Tuesday, January 27, 2015 11:47:04 Nick Treleaven via Digitalmars-d wrote: On 27/01/2015 02:27, Jonathan M Davis via Digitalmars-d wrote: You're right. I forgot about those two. But it's still the case that the

Re: accept @pure @nothrow @return attributes

2015-01-27 Thread Jonathan Marler via Digitalmars-d
On Tuesday, 27 January 2015 at 21:15:16 UTC, Daniel Kozak wrote: Jonathan M Davis via Digitalmars-d píše v Út 27. 01. 2015 v 08:49 -0800: On Tuesday, January 27, 2015 11:47:04 Nick Treleaven via Digitalmars-d wrote: On 27/01/2015 02:27, Jonathan M Davis via Digitalmars-d wrote: You're

Re: Oplink PR Ping

2015-01-27 Thread Andrei Alexandrescu via Digitalmars-d
On 1/27/15 12:42 PM, Andrei Alexandrescu wrote: On 1/27/15 12:31 PM, Jonathan Marler wrote: I still haven't figured out how to email someone without knowing their email address. http://goo.gl/go5Dks -- Andrei I got destroyed - his Send email to Walter Bright button doesn't work... --

Re: Oplink PR Ping

2015-01-27 Thread Andrei Alexandrescu via Digitalmars-d
On 1/27/15 12:31 PM, Jonathan Marler wrote: I still haven't figured out how to email someone without knowing their email address. http://goo.gl/go5Dks -- Andrei

Re: I left my program open for 9 hours and it used up 700mb of ram, could someone review it?

2015-01-27 Thread Rikki Cattermole via Digitalmars-d-learn
On 28/01/2015 9:59 a.m., Gan wrote: On Tuesday, 27 January 2015 at 19:59:08 UTC, Gan wrote: On Tuesday, 27 January 2015 at 19:26:12 UTC, bearophile wrote: Gan: Is there some special stuff I gotta do extra with structs? Do they need manually allocated and released? Most of your usages of

Re: I left my program open for 9 hours and it used up 700mb of ram, could someone review it?

2015-01-27 Thread Rikki Cattermole via Digitalmars-d-learn
On 28/01/2015 11:30 a.m., Gan wrote: On Tuesday, 27 January 2015 at 21:36:51 UTC, Rikki Cattermole wrote: On 28/01/2015 9:59 a.m., Gan wrote: On Tuesday, 27 January 2015 at 19:59:08 UTC, Gan wrote: On Tuesday, 27 January 2015 at 19:26:12 UTC, bearophile wrote: Gan: Is there some special

Re: I left my program open for 9 hours and it used up 700mb of ram, could someone review it?

2015-01-27 Thread Gan via Digitalmars-d-learn
On Tuesday, 27 January 2015 at 22:30:13 UTC, Gan wrote: On Tuesday, 27 January 2015 at 21:36:51 UTC, Rikki Cattermole wrote: On 28/01/2015 9:59 a.m., Gan wrote: On Tuesday, 27 January 2015 at 19:59:08 UTC, Gan wrote: On Tuesday, 27 January 2015 at 19:26:12 UTC, bearophile wrote: Gan: Is

Re: vibe.d error

2015-01-27 Thread Phil via Digitalmars-d-learn
Bumping as it's still not possible to install lib event via dub. On Sunday, 25 January 2015 at 17:41:38 UTC, Phil wrote: dub init name vibe.d cd name dub Results in Fetching libevent 2.0.1+2.0.16... Error executing command upgrade: Failed to download

Re: About variant

2015-01-27 Thread ketmar via Digitalmars-d-learn
On Tue, 27 Jan 2015 21:55:37 +, bioinfornatics wrote: On Tuesday, 27 January 2015 at 21:00:16 UTC, Justin Whear wrote: On Tue, 27 Jan 2015 20:46:59 +, bioinfornatics wrote: void main(){ auto a = Alpha!(int)( 6); auto b = Alpha!(string)( hello); The Alpha struct is not a

Re: forcing @nogc on class destructors

2015-01-27 Thread via Digitalmars-d
On Saturday, 24 January 2015 at 23:28:35 UTC, Jerry Morrison wrote: On Saturday, 24 January 2015 at 15:04:47 UTC, Ola Fosheim Grøstad wrote: If the classes are written for RAII then the destructors have to be called in reverse order of the constructors. IIRC D does not guarantee this when you

Re: static class vs. static struct

2015-01-27 Thread Ali Çehreli via Digitalmars-d-learn
On 01/27/2015 01:33 PM, Piotrek wrote: On Tuesday, 27 January 2015 at 18:24:29 UTC, Ali Çehreli wrote: On 01/27/2015 08:33 AM, Piotrek wrote: Non-static means nested. Hmm,this can be misleading. Nesting in structs doesn't introduce context pointer. Oh, I misread what you wrote.

Re: D Management Site

2015-01-27 Thread weaselcat via Digitalmars-d
On Tuesday, 27 January 2015 at 18:10:10 UTC, Jonathan Marler wrote: Would people want and use a website that tracks who's working on what in the D Programming Language? People would go to the site and be able to find out what's being worked on, what's not being worked on, who's working on

Re: Using dub

2015-01-27 Thread Joel via Digitalmars-d-learn
On Tuesday, 27 January 2015 at 08:08:19 UTC, Joel wrote: Oope, yeah, and it ran. Thanks Rikki, I wiped off the dub installation. Now, no errors. The small program worked too. I don't now how to set up the dub executable to work with out doing stuff like this - '../dub' (Mac OS 10.10.1)

[Issue 12888] Include template constraints in JSON output

2015-01-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12888 --- Comment #1 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/32f0f33f6a6ff5c7e76ac6e481b2ba0c2607d71f Issue 12888 - Include

Re: Window creation, for phobos?

2015-01-27 Thread Mike Parker via Digitalmars-d
On 1/28/2015 7:04 AM, Rikki Cattermole wrote: First off, Derelict-Util/Derelict-GL3 is a biggy here. Its old code, lets admit it. Its also a standard for loading shared library functions. So Mike Parker, would you be willing for this to be PR'd? And if so, are we ok with this? I have no

Re: I left my program open for 9 hours and it used up 700mb of ram, could someone review it?

2015-01-27 Thread Vladimir Panteleev via Digitalmars-d-learn
On Tuesday, 27 January 2015 at 22:39:31 UTC, Gan wrote: Would you know why this is using hundreds of mb of rams? Hi, What type is CircleShape? If it is a class, or otherwise contains pointers, then this is probably the source of your problem. You are storing high-entropy data

  1   2   3   >