post 2.071 mixin template & import rules

2016-06-30 Thread captaindet via Digitalmars-d
the way import declarations work has changed quite a bit with 2.071. two aspects have been written up nicely by steve schveighoffer ( http://www.schveiguy.com/blog/2016/03/import-changes-in-d-2-071 ). breaking as they might be for some, they are (a) a mere enforcement of the rules as they were

Re: Gravatar is blocked by GFW

2016-06-30 Thread mogu via Digitalmars-d
On Friday, 1 July 2016 at 01:43:40 UTC, Seb wrote: On Thursday, 30 June 2016 at 23:49:16 UTC, mogu wrote: Could dlang.org filter IP addresses from China and use another gravatar mirrors? Here's one solution: https://wordpress.org/plugins/wp-duoshuo-gravatar/ Now I have to always open the VPN

Re: Gravatar is blocked by GFW

2016-06-30 Thread mogu via Digitalmars-d
On Friday, 1 July 2016 at 01:35:51 UTC, Jack Stouffer wrote: On Thursday, 30 June 2016 at 23:49:16 UTC, mogu wrote: Could dlang.org filter IP addresses from China and use another gravatar mirrors? Here's one solution: https://wordpress.org/plugins/wp-duoshuo-gravatar/ Now I have to always

Re: daffodil, a D image processing library

2016-06-30 Thread ketmar via Digitalmars-d-announce
On Friday, 1 July 2016 at 01:47:44 UTC, Jack Stouffer wrote: Way to be a dismissive asshole. why so serious? it is clearly a joke.

Re: daffodil, a D image processing library

2016-06-30 Thread ketmar via Digitalmars-d-announce
On Friday, 1 July 2016 at 01:24:55 UTC, rikki cattermole wrote: Doesn't use allocators great library! definitely worth a closer look.

Re: daffodil, a D image processing library

2016-06-30 Thread rikki cattermole via Digitalmars-d-announce
On 01/07/2016 1:47 PM, Jack Stouffer wrote: On Friday, 1 July 2016 at 01:24:55 UTC, rikki cattermole wrote: Doesn't use allocators or Manu's color work, yup yup not interested. Way to be a dismissive asshole. Let me rewrite that sentence for you: "Hey, nice work, we really need something

Re: daffodil, a D image processing library

2016-06-30 Thread Jack Stouffer via Digitalmars-d-announce
On Friday, 1 July 2016 at 01:24:55 UTC, rikki cattermole wrote: Doesn't use allocators or Manu's color work, yup yup not interested. Way to be a dismissive asshole. Let me rewrite that sentence for you: "Hey, nice work, we really need something like this. I'm a bit concerned about the GC

Re: Gravatar is blocked by GFW

2016-06-30 Thread Seb via Digitalmars-d
On Thursday, 30 June 2016 at 23:49:16 UTC, mogu wrote: Could dlang.org filter IP addresses from China and use another gravatar mirrors? Here's one solution: https://wordpress.org/plugins/wp-duoshuo-gravatar/ Now I have to always open the VPN to access the forum. This may blocks many people

Re: Gravatar is blocked by GFW

2016-06-30 Thread Jack Stouffer via Digitalmars-d
On Thursday, 30 June 2016 at 23:49:16 UTC, mogu wrote: Could dlang.org filter IP addresses from China and use another gravatar mirrors? Here's one solution: https://wordpress.org/plugins/wp-duoshuo-gravatar/ Now I have to always open the VPN to access the forum. This may blocks many people

Re: daffodil, a D image processing library

2016-06-30 Thread rikki cattermole via Digitalmars-d-announce
On 01/07/2016 9:35 AM, Benjamin Schaaf wrote: daffodil is a image processing library inspired by python's Pillow (https://pillow.readthedocs.org/). It is an attempt at designing a clean, extensible and transparent API. https://github.com/BenjaminSchaaf/daffodil

Re: Tuple fields/types

2016-06-30 Thread Meta via Digitalmars-d-learn
On Thursday, 30 June 2016 at 21:53:42 UTC, Jordan Wilson wrote: Hello, For tuples, does the fieldNames property have a 1-1 correspondence with the Types property? It appears that way in my testing: alias MyData = Tuple!(string,"a",int,"b"); foreach (i, type; MyData.Types){ writeln

Re: Google's code ownership

2016-06-30 Thread sarn via Digitalmars-d
On Wednesday, 29 June 2016 at 22:35:03 UTC, qznc wrote: However, I'm not sure if "finding reviewers" is the bottleneck? Not everything applies because Google doesn't host its repo on Github (obviously), but code ownership works very well there. It helps avoid the bystander effect, and

Re: front stability

2016-06-30 Thread Steven Schveighoffer via Digitalmars-d
On 6/30/16 7:50 PM, Walter Bright wrote: On 6/2/2016 5:51 AM, Steven Schveighoffer wrote: I have always treated ranges with this expectation: 1. front gets you the current element of the range. Calling front multiple times without calling popFront should get you the same value. 2. popFront

Re: Tuple fields/types

2016-06-30 Thread Nicholas Wilson via Digitalmars-d-learn
On Thursday, 30 June 2016 at 21:53:42 UTC, Jordan Wilson wrote: Hello, For tuples, does the fieldNames property have a 1-1 correspondence with the Types property? It appears that way in my testing: alias MyData = Tuple!(string,"a",int,"b"); foreach (i, type; MyData.Types){ writeln

Re: Blocking points for further D adoption

2016-06-30 Thread dalailambda via Digitalmars-d
On Thursday, 30 June 2016 at 23:48:29 UTC, Mike Parker wrote: DMD *is* the official compiler. That's what a reference compiler is. The other compilers are there for those who want them and are developed independently of DMD. It's no different from the situation with Java (with the exception

Re: front stability

2016-06-30 Thread Walter Bright via Digitalmars-d
On 6/30/2016 8:32 AM, Steven Schveighoffer wrote: This doesn't solve it, and it can't be solved -- halting problem. We have some expectations that are assumed and some that are mechanically tested. This PR clarifies the assumptions. I made some range drivers that brutally test the protocol:

Re: front stability

2016-06-30 Thread Walter Bright via Digitalmars-d
On 6/2/2016 8:21 AM, deadalnix wrote: I opened some bugs about that in the past, but got shut down. It is especially problematic since some ranges (like filter) are calling front several time when iterating. Please reopen them.

Re: Blocking points for further D adoption

2016-06-30 Thread Mike Parker via Digitalmars-d
On Thursday, 30 June 2016 at 23:48:29 UTC, Mike Parker wrote: On Thursday, 30 June 2016 at 22:48:44 UTC, dalailambda wrote: I think if dub were distributed with DMD, along with a utility to install global programs (that way a D plugin can just call `dub install workspace-d` or similar), it

Re: front stability

2016-06-30 Thread Walter Bright via Digitalmars-d
On 6/2/2016 5:51 AM, Steven Schveighoffer wrote: I have always treated ranges with this expectation: 1. front gets you the current element of the range. Calling front multiple times without calling popFront should get you the same value. 2. popFront moves you to the next element of the range if

Gravatar is blocked by GFW

2016-06-30 Thread mogu via Digitalmars-d
Could dlang.org filter IP addresses from China and use another gravatar mirrors? Here's one solution: https://wordpress.org/plugins/wp-duoshuo-gravatar/ Now I have to always open the VPN to access the forum. This may blocks many people interested in D from China. Please help.

Re: Blocking points for further D adoption

2016-06-30 Thread Mike Parker via Digitalmars-d
On Thursday, 30 June 2016 at 22:48:44 UTC, dalailambda wrote: I think if dub were distributed with DMD, along with a utility to install global programs (that way a D plugin can just call `dub install workspace-d` or similar), it would make it very easy to get started with D. DUB only

[Issue 15191] DIP25: Taking address of ref return is not type checked soundly

2016-06-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15191 --- Comment #4 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/7e057ad1a5dfb86b3cc2d3ba7167c44c053c0253 fix Issue 15191 - DIP25: Taking address of ref return is not

[Issue 15191] DIP25: Taking address of ref return is not type checked soundly

2016-06-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15191 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: Does a Interpretation-Engine fit in phobos ?

2016-06-30 Thread lobo via Digitalmars-d
On Thursday, 30 June 2016 at 11:09:10 UTC, ketmar wrote: On Thursday, 30 June 2016 at 10:36:44 UTC, qznc wrote: Off-topic: Is it possible/feasible/desirable to let dmd use dub packages? please, no. not everybody out there is dub fan. You can always use dub to fetch packages into

Re: front stability

2016-06-30 Thread Jesse Phillips via Digitalmars-d
On Thursday, 2 June 2016 at 12:51:18 UTC, Steven Schveighoffer wrote: The counter-argument seems to be that if you cache the front element, then then making a copy of the range via take can repeat the cached element[4]. I find this argument severely lacking -- non-forward ranges are not meant

Re: Blocking points for further D adoption

2016-06-30 Thread dalailambda via Digitalmars-d
As someone who has recently chosen D for a major project (a game/engine), I can confidently say that the biggest distinction for me between getting start with D versus something like Go is developer tooling. For Go I installed Go, installed a go intellij plugin, which automatically installed

Re: GTKD - CSS class color "flash" delay

2016-06-30 Thread TheDGuy via Digitalmars-d-learn
On Thursday, 30 June 2016 at 20:11:17 UTC, Mike Wey wrote: Is the complete source available some ware? Yes, here: http://pastebin.com/h0Nx1mL6

Re: Call to Action: making Phobos @safe

2016-06-30 Thread Seb via Digitalmars-d
On Thursday, 30 June 2016 at 21:31:25 UTC, Walter Bright wrote: On 6/30/2016 11:54 AM, Bennet Leff wrote: On Sunday, 26 June 2016 at 13:13:01 UTC, Robert burner Schadek wrote: It would be awesome if you would create that process model in the wiki and at it to your action list

Get program stats at run time

2016-06-30 Thread Special opOps via Digitalmars-d-learn
How can I get the program stats at run time such as minimum and maximum amount of memory and cpu used, cpu architecture, os, etc?

Tuple fields/types

2016-06-30 Thread Jordan Wilson via Digitalmars-d-learn
Hello, For tuples, does the fieldNames property have a 1-1 correspondence with the Types property? It appears that way in my testing: alias MyData = Tuple!(string,"a",int,"b"); foreach (i, type; MyData.Types){ writeln (MyData.fieldNames[i]," ",type.stringof); // a string // b int

daffodil, a D image processing library

2016-06-30 Thread Benjamin Schaaf via Digitalmars-d-announce
daffodil is a image processing library inspired by python's Pillow (https://pillow.readthedocs.org/). It is an attempt at designing a clean, extensible and transparent API. https://github.com/BenjaminSchaaf/daffodil https://benjaminschaaf.github.io/daffodil/ The library makes full use out of

Re: Ocean preview finally open sourced

2016-06-30 Thread Chris via Digitalmars-d-announce
On Thursday, 30 June 2016 at 21:20:16 UTC, Leandro Lucarella wrote: I'd say some parts should work out of the box (there many things that are completely OS agnostic, like containers, cache, bindings to other libraries like PCRE, etc.), and some other it would be quite some work (for example

Re: Call to Action: making Phobos @safe

2016-06-30 Thread Walter Bright via Digitalmars-d
On 6/30/2016 11:54 AM, Bennet Leff wrote: On Sunday, 26 June 2016 at 13:13:01 UTC, Robert burner Schadek wrote: It would be awesome if you would create that process model in the wiki and at it to your action list http://wiki.dlang.org/Walter_Andrei_Action_List#Walter_and_Andrei.27s_Action_List

Re: Associative array of const items

2016-06-30 Thread Q. Schroll via Digitalmars-d-learn
On Thursday, 30 June 2016 at 17:08:45 UTC, Jonathan Marler wrote: Is there a way to have an associative array of const values? I thought it would have been: const(T)[K] map; map[x] = y; but the second line gives Error: cannot modify const expression. I would think that the const(T)[K] would

Re: Ocean preview finally open sourced

2016-06-30 Thread Leandro Lucarella via Digitalmars-d-announce
On Thursday, 30 June 2016 at 20:59:42 UTC, Chris wrote: How much would it take to make it cross platform (Windows, Mac). Unfortunately, we still have to cater for those two outliers :) I'd say some parts should work out of the box (there many things that are completely OS agnostic, like

[Issue 12357] Untyped string variable fails silently. No compiler warning given.

2016-06-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12357 --- Comment #5 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/ac01da550f85db3f0e77eb40a5a3850578ca21ba Fix Issue 12357 - Deprecate calling text, wtext and

Re: Get current date and time with std.datetime

2016-06-30 Thread Luke Picardo via Digitalmars-d-learn
On Monday, 24 October 2011 at 15:29:41 UTC, Jonathan M Davis wrote: On Friday, October 07, 2011 19:58:12 Joel Christensen wrote: > http://d-programming-language.org/intro-to-datetime.html Thanks Jonathan, that helped I think, (haven't read it all, though). But I've got errors with some of the

Re: Call to Action: making Phobos @safe

2016-06-30 Thread Walter Bright via Digitalmars-d
On 6/30/2016 4:09 AM, Steven Schveighoffer wrote: I would further say -- if you see a @trusted unit test, whoever wrote it doesn't understand the point of @trusted. Be sure and check the code it is testing too, and file bugs if appropriate. I agree. Using @trusted properly turns out to have

Re: Ocean preview finally open sourced

2016-06-30 Thread Chris via Digitalmars-d-announce
How much would it take to make it cross platform (Windows, Mac). Unfortunately, we still have to cater for those two outliers :)

Re: GTKD - CSS class color "flash" delay

2016-06-30 Thread Mike Wey via Digitalmars-d-learn
On 06/30/2016 08:53 AM, TheDGuy wrote: On Wednesday, 29 June 2016 at 10:41:21 UTC, TheDGuy wrote: I tried to debug a little and what i don't understand is, that i get two times 'blue' on the console, even though yellow and blue lit up but yellow stayed at the flash color: private void

Re: front stability

2016-06-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Thursday, 30 June 2016 at 19:34:47 UTC, H. S. Teoh wrote: arbitrary type. It doesn't seem to make sense that the assignment operator should suddenly be prohibited just because it happens to have members named .front, .empty, .popFront. Seems like this could be resolved by requiring all

Re: front stability

2016-06-30 Thread H. S. Teoh via Digitalmars-d
On Thu, Jun 30, 2016 at 07:23:24PM +, default0 via Digitalmars-d wrote: > On Thursday, 30 June 2016 at 18:07:41 UTC, Steven Schveighoffer wrote: [...] [...] > > Unfortunately, for the likes of forward ranges, copying mainly > > always does the same thing as .save does. So you have tons and

Re: front stability

2016-06-30 Thread default0 via Digitalmars-d
On Thursday, 30 June 2016 at 18:07:41 UTC, Steven Schveighoffer wrote: On 6/30/16 11:56 AM, Mathias Lang via Digitalmars-d wrote: 2016-06-02 14:51 GMT+02:00 Steven Schveighoffer via Digitalmars-d >: I have always treated

Re: Call to Action: making Phobos @safe

2016-06-30 Thread Bennet Leff via Digitalmars-d
On Sunday, 26 June 2016 at 13:13:01 UTC, Robert burner Schadek wrote: It would be awesome if you would create that process model in the wiki and at it to your action list http://wiki.dlang.org/Walter_Andrei_Action_List#Walter_and_Andrei.27s_Action_List So it does not get lost and people can

Re: Ocean preview finally open sourced

2016-06-30 Thread Stefan Koch via Digitalmars-d-announce
On Thursday, 30 June 2016 at 16:45:43 UTC, Leandro Lucarella wrote: Hello again Dland! I'm happy to finally announce the open sourcing of our Ocean base library, just it time to keep our word and make it in June ;-) [...] I like the structTable :)

Re: front stability

2016-06-30 Thread Steven Schveighoffer via Digitalmars-d
On 6/30/16 11:56 AM, Mathias Lang via Digitalmars-d wrote: 2016-06-02 14:51 GMT+02:00 Steven Schveighoffer via Digitalmars-d >: I have always treated ranges with this expectation: I think the case is pretty clear here, and

Re: DConf Videos

2016-06-30 Thread Jack Stouffer via Digitalmars-d
On Tuesday, 7 June 2016 at 17:48:28 UTC, Dicebot wrote: On Tuesday, 7 June 2016 at 04:25:42 UTC, Mike Parker wrote: It's only been a month. In the past, it's generally been a few weeks after each conference before the video uploads began. I'm sure they'll be coming soon. I've reminded Dylan

Re: Does a Interpretation-Engine fit in phobos ?

2016-06-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Thursday, 30 June 2016 at 15:53:19 UTC, ZombineDev wrote: Also almost every dynamic language has some sort of eval function can be used to evaluate arbitrary code at run-time. And almost every language guideline suggest to never use it. When people have to use it, it usually ends in a

Re: Does a Interpretation-Engine fit in phobos ?

2016-06-30 Thread default0 via Digitalmars-d
On Thursday, 30 June 2016 at 15:53:19 UTC, ZombineDev wrote: On Thursday, 30 June 2016 at 14:14:41 UTC, Wyatt wrote: On Thursday, 30 June 2016 at 10:36:44 UTC, qznc wrote: Ok, seriously, it sounds like an awesome feat, but I don't think it is necessary to put it into Phobos. First, a dub

Re: static if enhancement

2016-06-30 Thread Wyatt via Digitalmars-d
On Thursday, 30 June 2016 at 11:06:56 UTC, Steven Schveighoffer wrote: On 6/29/16 11:40 AM, Wyatt wrote: I might be stepping on a land mine by bringing it up, but isn't this sort of thing what contracts are for? No landmines here, but no, that isn't what contracts are for. Perhaps you mean

Associative array of const items

2016-06-30 Thread Jonathan Marler via Digitalmars-d-learn
Is there a way to have an associative array of const values? I thought it would have been: const(T)[K] map; map[x] = y; but the second line gives Error: cannot modify const expression. I would think that the const(T)[K] would behave similarly to const(T)[], where you can modify the array,

Re: Cast vs Virtual Method vs TypeId?

2016-06-30 Thread QAston via Digitalmars-d-learn
On Thursday, 30 June 2016 at 00:25:53 UTC, Jonathan Marler wrote: I'd like to hear peoples thoughts on the various solutions for the following problem. Say you have some hierarchy of classes like: class GameObject { // ... } class Entity : GameObject { // ... } class Player : Entity {

Re: Cast vs Virtual Method vs TypeId?

2016-06-30 Thread Jonathan Marler via Digitalmars-d-learn
On Thursday, 30 June 2016 at 00:27:57 UTC, rikki cattermole wrote: On 30/06/2016 12:25 PM, Jonathan Marler wrote: Assume you have a function that accepts a GameObject but does something special if that GameObject happens to be an instance of the Player class. How would you go about determining

Ocean preview finally open sourced

2016-06-30 Thread Leandro Lucarella via Digitalmars-d-announce
Hello again Dland! I'm happy to finally announce the open sourcing of our Ocean base library, just it time to keep our word and make it in June ;-) https://github.com/sociomantic-tsunami/ocean To quote the README: --- Ocean is a general purpose library, compatible with both D1 and D2, with

[Issue 15413] Foreach over range with @disable this doesn't work

2016-06-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15413 --- Comment #2 from ZombineDev --- I meant: foreach (v; ir) { // user code } // =v for ( ; !ir.empty; ir.popFront()) { auto v = ir.front; // user code } --

[Issue 15413] Foreach over range with @disable this doesn't work

2016-06-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15413 --- Comment #1 from ZombineDev --- I wonder if the solution could be as simple* as changing the lowering to: for ( ; !ir.empty; ir.popFront()) { auto v = __r.front; } That way foreach will work with truly input-only

[Issue 15413] Foreach over range with @disable this doesn't work

2016-06-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15413 ZombineDev changed: What|Removed |Added CC|

Re: Does a Interpretation-Engine fit in phobos ?

2016-06-30 Thread ZombineDev via Digitalmars-d
On Thursday, 30 June 2016 at 14:14:41 UTC, Wyatt wrote: On Thursday, 30 June 2016 at 10:36:44 UTC, qznc wrote: Ok, seriously, it sounds like an awesome feat, but I don't think it is necessary to put it into Phobos. First, a dub package, please. Agree. Does Java even have something like

Re: front stability

2016-06-30 Thread Mathias Lang via Digitalmars-d
2016-06-02 14:51 GMT+02:00 Steven Schveighoffer via Digitalmars-d < digitalmars-d@puremagic.com>: > I have always treated ranges with this expectation: > > I think the case is pretty clear here, and I'm in agreement with you. I just want to add a note on the following point: 2016-06-02 14:51

Re: Version info in library reference

2016-06-30 Thread Chris via Digitalmars-d
On Thursday, 30 June 2016 at 15:47:52 UTC, Chris wrote: I've just had the case where LDC (based on 2.070.2) did not compile code based on Phobos 2.071.1, which is nothing unusual of course. Only it would have been nice, if the function `std.algorithm.maxPos` had had the info "since 2.071.0"

Re: Version info in library reference

2016-06-30 Thread Chris via Digitalmars-d
On Wednesday, 27 April 2016 at 12:47:01 UTC, Jacob Carlborg wrote: On 2016-04-27 11:14, Chris wrote: Something I've wanted to ask for a while: Would it be possible to add version info to the library reference (henceforth)? In Apple's Cocoa API reference they always say since `10.8` etc. which

[Issue 16223] New: BigUint: undefined shift for small instantiation type

2016-06-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16223 Issue ID: 16223 Summary: BigUint: undefined shift for small instantiation type Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal

Re: front stability

2016-06-30 Thread Steven Schveighoffer via Digitalmars-d
On 6/30/16 10:59 AM, jmh530 wrote: On Thursday, 30 June 2016 at 14:17:22 UTC, Steven Schveighoffer wrote: Jack Stouffer has created a PR to formalize this. Please comment if you have objections (the group that argued for current generate behavior was absent from this post that was meant to be

Cool D project: Remove cycle detection code from runtime

2016-06-30 Thread Steven Schveighoffer via Digitalmars-d
For those who wish to have a deeper understanding of D's runtime and/or binary files, there is a project I think would be a nice fun challenge. Currently, when D builds, it uses the linker to assemble a table of ModuleInfo structures, each of which define the pieces of the module that the

Re: Release D 2.071.1

2016-06-30 Thread default0 via Digitalmars-d-announce
On Thursday, 30 June 2016 at 12:55:27 UTC, Johan Engelen wrote: On Monday, 27 June 2016 at 22:11:53 UTC, Martin Nowak wrote: Glad to announce D 2.071.1. Thanks. LDC master is now also at 2.071.1. -Johan I dare say you guys are awesome :o) Having those two frontends synced is really a big

Re: front stability

2016-06-30 Thread Jack Stouffer via Digitalmars-d
On Thursday, 30 June 2016 at 14:59:11 UTC, jmh530 wrote: It looks like this is just documentation changes. This really doesn't prevent anyone from making a Range that violates front stability. No, but what it will do is to make it clear that these are either bugs or intended behavior, as

Re: front stability

2016-06-30 Thread jmh530 via Digitalmars-d
On Thursday, 30 June 2016 at 14:17:22 UTC, Steven Schveighoffer wrote: Jack Stouffer has created a PR to formalize this. Please comment if you have objections (the group that argued for current generate behavior was absent from this post that was meant to be a debate). I think this is the

Re: Battle-plan for CTFE

2016-06-30 Thread Stefan Koch via Digitalmars-d-announce
On Thursday, 30 June 2016 at 14:17:30 UTC, Timon Gehr wrote: Sorry, I had missed this. I see you were able to make progress. It's fine. Honestly the hardest thing was to actually get started. Once I see something working the excitement carries me forward :) I would appreciate a critical

Re: What's the secret to static class members

2016-06-30 Thread Dejan Lekic via Digitalmars-d-learn
On Thursday, 30 June 2016 at 01:11:09 UTC, Mike Parker wrote: I think it's safe to say this guy is just trolling and we can ignore him. I was about to say the same, Mike. He is either trolling, or genuinely did not even bother to learn some language basics...

Re: thread-safe shared field access

2016-06-30 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/30/16 10:10 AM, jj75607 wrote: For example I have a shared from different threads variable. What piece of code is correctly thread-safe? First: shared class A { shared(int) x; Note, no need to mark x shared. 'A' implicitly shares everything. void test1() {

Re: front stability

2016-06-30 Thread Steven Schveighoffer via Digitalmars-d
On 6/2/16 8:51 AM, Steven Schveighoffer wrote: I have always treated ranges with this expectation: 1. front gets you the current element of the range. Calling front multiple times without calling popFront should get you the same value. 2. popFront moves you to the next element of the range if

Re: Battle-plan for CTFE

2016-06-30 Thread Timon Gehr via Digitalmars-d-announce
On 08.06.2016 03:20, Stefan Koch wrote: On Friday, 3 June 2016 at 15:46:27 UTC, Stefan Koch wrote: On Monday, 9 May 2016 at 16:57:39 UTC, Stefan Koch wrote: I will post more details as soon as I dive deeper into the code. Okay I briefly evaluated the current IR dmd uses for backend

Re: Does a Interpretation-Engine fit in phobos ?

2016-06-30 Thread Wyatt via Digitalmars-d
On Thursday, 30 June 2016 at 10:36:44 UTC, qznc wrote: Ok, seriously, it sounds like an awesome feat, but I don't think it is necessary to put it into Phobos. First, a dub package, please. Agree. Does Java even have something like that? That's sort of the exemplar for "hopelessly overdone

thread-safe shared field access

2016-06-30 Thread jj75607 via Digitalmars-d-learn
For example I have a shared from different threads variable. What piece of code is correctly thread-safe? First: shared class A { shared(int) x; void test1() { x = 10; x += 5 writeln(x); } } Or second: import core.atomic; shared

Re: year to date pull statistics (2016-06-25)

2016-06-30 Thread Andrei Alexandrescu via Digitalmars-d
On 06/29/2016 08:58 PM, Brad Roberts via Digitalmars-d wrote: total open: 295 created since 2016-01-01 and still open: 159 created closed delta 2016-06-26 - today 47 37-10 2016-06-19 - 2016-06-25 44 24-20 2016-06-12 - 2016-06-18 37

Re: DMD 2.071.1 and Issue 15925 - [REG 2.071] Import declaration from mixin templates are ignored

2016-06-30 Thread Martin Nowak via Digitalmars-d
On Thursday, 30 June 2016 at 13:05:58 UTC, Martin Nowak wrote: Use selective imports instead to introduce just the necessary steps. s/steps/symbols/

Re: compilation error with shared ReadWriteMutex

2016-06-30 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/30/16 8:41 AM, jj75607 wrote: On Thursday, 30 June 2016 at 12:25:54 UTC, Steven Schveighoffer wrote: On 6/30/16 8:18 AM, jj75607 wrote: [...] You don't need to mark this shared, because the entire class is shared, all members are implicitly marked shared. [...] Thanks! Is this

Re: DMD 2.071.1 and Issue 15925 - [REG 2.071] Import declaration from mixin templates are ignored

2016-06-30 Thread Martin Nowak via Digitalmars-d
On Thursday, 30 June 2016 at 12:20:26 UTC, captaindet wrote: this is really bad news for meta programming. i would have to do this with ugly string mixins from now on, or is this unintended behavior for string mixins as well? No it's not, importing whole modules or packages into the scope of

Re: Release D 2.071.1

2016-06-30 Thread Johan Engelen via Digitalmars-d-announce
On Monday, 27 June 2016 at 22:11:53 UTC, Martin Nowak wrote: Glad to announce D 2.071.1. Thanks. LDC master is now also at 2.071.1. -Johan

[Issue 16222] template failed to infer/coerce types for instantiation

2016-06-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16222 --- Comment #2 from Ketmar Dark --- (In reply to ag0aep6g from comment #1) > In your example, you could of course just take a const(char)[] directly, > without any template parameters. So that isn't a good motivating example

Re: compilation error with shared ReadWriteMutex

2016-06-30 Thread jj75607 via Digitalmars-d-learn
On Thursday, 30 June 2016 at 12:25:54 UTC, Steven Schveighoffer wrote: On 6/30/16 8:18 AM, jj75607 wrote: [...] You don't need to mark this shared, because the entire class is shared, all members are implicitly marked shared. [...] Thanks! Is this a compilation only 'cast' with no

Re: opEquals on shared object

2016-06-30 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/30/16 8:30 AM, jj75607 wrote: On Thursday, 30 June 2016 at 12:21:03 UTC, Steven Schveighoffer wrote: On 6/30/16 6:26 AM, jj75607 wrote: Hello! I need to overload opEquals on shared class C shared class C { override bool opEquals(Object o) { return false; } } But compilation fails

Re: DMD 2.071.1 and Issue 15925 - [REG 2.071] Import declaration from mixin templates are ignored

2016-06-30 Thread Mathias Lang via Digitalmars-d
2016-06-30 14:20 GMT+02:00 captaindet via Digitalmars-d < digitalmars-d@puremagic.com>: > > does this mean mixin templates now have no way of adding imports to the > scope they are mixed in? > That's exactly what it means. Likewise a base class cannot add an import that will be visible by it's

Re: opEquals on shared object

2016-06-30 Thread jj75607 via Digitalmars-d-learn
On Thursday, 30 June 2016 at 12:21:03 UTC, Steven Schveighoffer wrote: On 6/30/16 6:26 AM, jj75607 wrote: Hello! I need to overload opEquals on shared class C shared class C { override bool opEquals(Object o) { return false; } } But compilation fails with the message: Error: function

Re: Does a Interpretation-Engine fit in phobos ?

2016-06-30 Thread ZombineDev via Digitalmars-d
On Thursday, 30 June 2016 at 10:28:03 UTC, Stefan Koch wrote: Hi, I recently had a breakthrough in my CTFE work. Though because habits die hard. I am writing the bytecode-engine in a CTFEable style. Therefore I can be used as a quite comfortable IR for CTFE things as well. It should be

[Issue 16222] template failed to infer/coerce types for instantiation

2016-06-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16222 ag0ae...@gmail.com changed: What|Removed |Added CC||ag0ae...@gmail.com --- Comment #1 from

Re: compilation error with shared ReadWriteMutex

2016-06-30 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/30/16 8:18 AM, jj75607 wrote: I wrote shared class with rwmutex import core.sync.rwmutex; shared class Shared { ReadWriteMutex rwmutex; int[] items; this() { rwmutex = new ReadWriteMutex(); } } But it fails with: Error: cannot implicitly

Re: opEquals on shared object

2016-06-30 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/30/16 6:26 AM, jj75607 wrote: Hello! I need to overload opEquals on shared class C shared class C { override bool opEquals(Object o) { return false; } } But compilation fails with the message: Error: function f700.C.opEquals does not override any function, did you mean to override

Re: DMD 2.071.1 and Issue 15925 - [REG 2.071] Import declaration from mixin templates are ignored

2016-06-30 Thread qznc via Digitalmars-d
On Thursday, 30 June 2016 at 11:40:38 UTC, Mathias Lang wrote: 2016-06-30 11:09 GMT+02:00 qznc via Digitalmars-d < digitalmars-d@puremagic.com>: I don't see this properly documented [0]. It seems that imports in mixins are not visible even if declared public? This means mixin imports are

Re: DMD 2.071.1 and Issue 15925 - [REG 2.071] Import declaration from mixin templates are ignored

2016-06-30 Thread captaindet via Digitalmars-d
Author here. I originally thought the issue was that an 'imported' scope imports are not considered anymore. this is exactly what i was/am afraid of ...[see below] As Walter explained in this issue and in https://issues.dlang.org/show_bug.cgi?id=15966 this behaviour changed to prevent

compilation error with shared ReadWriteMutex

2016-06-30 Thread jj75607 via Digitalmars-d-learn
I wrote shared class with rwmutex import core.sync.rwmutex; shared class Shared { ReadWriteMutex rwmutex; int[] items; this() { rwmutex = new ReadWriteMutex(); } } But it fails with: Error: cannot implicitly convert expression (new

Re: DMD 2.071.1 and Issue 15925 - [REG 2.071] Import declaration from mixin templates are ignored

2016-06-30 Thread Mathias Lang via Digitalmars-d
2016-06-30 11:09 GMT+02:00 qznc via Digitalmars-d < digitalmars-d@puremagic.com>: > > I don't see this properly documented [0]. > > It seems that imports in mixins are not visible even if declared public? > This means mixin imports are special? > > The issue also features a "protected imported".

[Issue 16222] New: template failed to infer/coerce types for instantiation

2016-06-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16222 Issue ID: 16222 Summary: template failed to infer/coerce types for instantiation Product: D Version: D2 Hardware: All OS: All Status: NEW

Re: Does a Interpretation-Engine fit in phobos ?

2016-06-30 Thread Seb via Digitalmars-d
On Thursday, 30 June 2016 at 11:09:10 UTC, ketmar wrote: On Thursday, 30 June 2016 at 10:36:44 UTC, qznc wrote: Off-topic: Is it possible/feasible/desirable to let dmd use dub packages? please, no. not everybody out there is dub fan. Off-topic: @ketmar: if it's on dub (d's official package

Re: EnumToFlags

2016-06-30 Thread Basile B. via Digitalmars-d-learn
On Thursday, 30 June 2016 at 02:39:22 UTC, JS wrote: I created a type that makes working with flags much easier. Please review for issues and enhancements. It would be nice to simplify the value size code. [...] You can look at this, it's more or less the same concept:

Re: Call to Action: making Phobos @safe

2016-06-30 Thread Steven Schveighoffer via Digitalmars-d
On 6/29/16 4:57 PM, Walter Bright wrote: On 6/29/2016 10:25 AM, Atila Neves wrote: On Saturday, 25 June 2016 at 22:56:12 UTC, Walter Bright wrote: On 6/25/2016 3:44 PM, Walter Bright wrote: 4. Add @safe to the unittest A unittest that is deliberately unsafe should be annotated with @system.

Re: Does a Interpretation-Engine fit in phobos ?

2016-06-30 Thread ketmar via Digitalmars-d
On Thursday, 30 June 2016 at 10:36:44 UTC, qznc wrote: Off-topic: Is it possible/feasible/desirable to let dmd use dub packages? please, no. not everybody out there is dub fan.

Re: static if enhancement

2016-06-30 Thread Steven Schveighoffer via Digitalmars-d
On 6/29/16 11:40 AM, Wyatt wrote: On Friday, 24 June 2016 at 18:27:07 UTC, Steven Schveighoffer wrote: void fun(T)(T obj) { static if (!hasMember(T, "gun")) throw new Exception("No gun"); obj.gun; } Call with something that doesn't have a gun member, and even without the reachability

OT: some C++ insights (just for fun)

2016-06-30 Thread Ola Fosheim Grøstad via Digitalmars-d
From the slides: https://codeplay.com/public/uploaded/filehost/0cbdaf_c++17post-oulu2016.pdf « Doesn’t everybody know that C++ is great? No, just from last week • “C++ is a bloated old language” • “Why can’t they let good enough alone?” • “We used D because C++ doesn’t have compile time

NanoVG and OUI ports

2016-06-30 Thread ketmar via Digitalmars-d-announce
yes, it's me again. hello. this time i ported NanoVG[1] drawing library (only OpenGL2 backend) and OUI[2] intermediate UI library. they require some modules from Adam's arsd library[3] to work -- mostly simpledisplay for screen setup and minimal OpenGL bindings, and arsd.png to load png

  1   2   >