Re: std.experimental.checkedint is ready for comments!

2016-06-18 Thread tsbockman via Digitalmars-d
On Saturday, 18 June 2016 at 19:49:07 UTC, Walter Bright wrote: On 6/18/2016 8:38 AM, tsbockman wrote: removing auto decode (what's the point, when Andrei is emphatic that the feature itself cannot ever be deprecated?). Even so, those discussions were very recent; it is quite possible that

Re: std.experimental.checkedint is ready for comments!

2016-06-18 Thread Walter Bright via Digitalmars-d
On 6/18/2016 8:38 AM, tsbockman wrote: There are specific reasons, aired in the discussions, as to why people may not be interested in working on BigDecimal (perceived as being of importance mainly to the finance industry, who is unlikely to contribute anything back in return) or removing auto

Re: std.experimental.checkedint is ready for comments!

2016-06-18 Thread Walter Bright via Digitalmars-d
On 6/18/2016 4:21 AM, Jacob Carlborg wrote: Now you're doing exactly as you're telling us not to do. Writing an important post deep inside a thread, with a completely different subject, that nobody will see. Put it on the front page of dlang.org or somewhere visible. Good point.

Re: std.experimental.checkedint is ready for comments!

2016-06-18 Thread Walter Bright via Digitalmars-d
On 6/18/2016 6:46 AM, Robert burner Schadek wrote: I created this: https://wiki.dlang.org/Walter_Andrei_Action_List And PR's to dmd, druntime, and phobos' README.md that points to it. If you could keep that list up to date, would be really hopeful IMO. Having it in the readme is a good idea.

Re: std.experimental.checkedint is ready for comments!

2016-06-18 Thread tsbockman via Digitalmars-d
On Saturday, 18 June 2016 at 10:25:43 UTC, Walter Bright wrote: [...] I've given them a list, and they did something else, every time. Off the top of my head, work items for phobos I've repeatedly posted in various forms: [...] People actually have been working on a lot of the stuff in your

Re: std.experimental.checkedint is ready for comments!

2016-06-18 Thread Robert burner Schadek via Digitalmars-d
I created this: https://wiki.dlang.org/Walter_Andrei_Action_List And PR's to dmd, druntime, and phobos' README.md that points to it. If you could keep that list up to date, would be really hopeful IMO. https://github.com/dlang/druntime/pull/1597 https://github.com/dlang/dmd/pull/5874

Re: std.experimental.checkedint is ready for comments!

2016-06-18 Thread Jacob Carlborg via Digitalmars-d
On 2016-06-18 12:25, Walter Bright wrote: Off the top of my head, work items for phobos I've repeatedly posted in various forms: 1. eliminate all gratuitous use of gc 2. review all Phobos modules for compatibility with ranges - std.zip, for example, was done before ranges and does not work

Re: std.experimental.checkedint is ready for comments!

2016-06-18 Thread Walter Bright via Digitalmars-d
On 6/18/2016 1:52 AM, Robert burner Schadek wrote: Ok, where is this list? And where is list for phobos? I've posted them from time to time. Most recently I put a "call to action" in the thread "size_t vs uintptr_t". Many people have come up to me and asked for a list of ideas, I've given

Re: std.experimental.checkedint is ready for comments!

2016-06-18 Thread Robert burner Schadek via Digitalmars-d
Ok, where is this list? And where is list for phobos? Sure, some people are a allowed to pull stuff into phobos. But only stuff that does not introduce new names and Andrei does not veto. Of course you can not appoint people, but you should have an idea who you think is sharing your overall

Re: std.experimental.checkedint is ready for comments!

2016-06-17 Thread Walter Bright via Digitalmars-d
On 6/17/2016 7:20 PM, tsbockman wrote: It's been on DUB since before this review started, and I plan to support it (including incorporating some of the feedback from this thread). Thanks, that's a good plan.

Re: std.experimental.checkedint is ready for comments!

2016-06-17 Thread tsbockman via Digitalmars-d
On Saturday, 18 June 2016 at 01:28:38 UTC, Walter Bright wrote: On 6/17/2016 4:38 PM, tsbockman wrote: This is, of course, his prerogative as lead designer for Phobos, but it also kills any interest I have in working on the project for free. You know, I do sympathize, even if I don't agree.

Re: std.experimental.checkedint is ready for comments!

2016-06-17 Thread Walter Bright via Digitalmars-d
On 6/17/2016 4:38 PM, tsbockman wrote: This is, of course, his prerogative as lead designer for Phobos, but it also kills any interest I have in working on the project for free. You know, I do sympathize, even if I don't agree. One big motivation for D in the first place was the C++

Re: std.experimental.checkedint is ready for comments!

2016-06-17 Thread Walter Bright via Digitalmars-d
On 6/17/2016 3:17 PM, Robert burner Schadek wrote: * Andrei, Walter create a specific task list and designs I do all the time. The net result - nothing happens. People do what they want to do when it's volunteer work. Presenting people with a list of things to work on does not result in work

Re: std.experimental.checkedint is ready for comments!

2016-06-17 Thread tsbockman via Digitalmars-d
On Friday, 17 June 2016 at 20:49:54 UTC, Walter Bright wrote: On 6/17/2016 7:52 AM, tsbockman wrote: What caught me off guard here isn't that Andrei had to approve it in some sense - it's that the judgment of everyone else who approved my design seemingly became irrelevant the moment that

Re: std.experimental.checkedint is ready for comments!

2016-06-17 Thread Robert burner Schadek via Digitalmars-d
What you said is true, but IMO you're missing the point. IMO the current D Process is just backward. Having people working on stuff openly, with intend for phobos inclusion, for a lot of months and that putting it up for review clearly does not work. And if you and/or Andrei at that point say

Re: std.experimental.checkedint is ready for comments!

2016-06-17 Thread Walter Bright via Digitalmars-d
On 6/17/2016 7:52 AM, tsbockman wrote: What caught me off guard here isn't that Andrei had to approve it in some sense - it's that the judgment of everyone else who approved my design seemingly became irrelevant the moment that Andrei decided he could do better. History is full of examples of

Re: std.experimental.checkedint is ready for comments!

2016-06-17 Thread jmh530 via Digitalmars-d
On Friday, 17 June 2016 at 14:52:27 UTC, tsbockman wrote: What caught me off guard here isn't that Andrei had to approve it in some sense - it's that the judgment of everyone else who approved my design seemingly became irrelevant the moment that Andrei decided he could do better. I hope

Re: std.experimental.checkedint is ready for comments!

2016-06-17 Thread tsbockman via Digitalmars-d
On Friday, 17 June 2016 at 08:58:51 UTC, Jacob Carlborg wrote: On 2016-06-17 00:30, Walter Bright wrote: Andrei is in charge of the library and has my full support. We have to make it very clear, somewhere, exactly what requires Andrei's approval and what doesn't. No, I cannot do that

Re: std.experimental.checkedint is ready for comments!

2016-06-17 Thread Walter Bright via Digitalmars-d
On 6/17/2016 1:58 AM, Jacob Carlborg wrote: On 2016-06-17 00:30, Walter Bright wrote: Andrei is in charge of the library and has my full support. We have to make it very clear, somewhere, exactly what requires Andrei's approval and what doesn't. No, I cannot do that because I don't know the

Re: std.experimental.checkedint is ready for comments!

2016-06-17 Thread Jacob Carlborg via Digitalmars-d
On 2016-06-17 00:30, Walter Bright wrote: Andrei is in charge of the library and has my full support. We have to make it very clear, somewhere, exactly what requires Andrei's approval and what doesn't. No, I cannot do that because I don't know the requirements. -- /Jacob Carlborg

Re: std.experimental.checkedint is ready for comments!

2016-06-17 Thread Ola Fosheim Grøstad via Digitalmars-d
On Friday, 17 June 2016 at 07:16:20 UTC, deadalnix wrote: On Friday, 17 June 2016 at 06:54:20 UTC, Ola Fosheim Grøstad wrote: On Thursday, 16 June 2016 at 23:27:06 UTC, tsbockman wrote: I do not think this approach will scale in the long run, no matter who is given that role. Of course, I

Re: std.experimental.checkedint is ready for comments!

2016-06-17 Thread deadalnix via Digitalmars-d
On Friday, 17 June 2016 at 06:54:20 UTC, Ola Fosheim Grøstad wrote: On Thursday, 16 June 2016 at 23:27:06 UTC, tsbockman wrote: I do not think this approach will scale in the long run, no matter who is given that role. Of course, I would be happy to be proven wrong. I think maybe the C++

Re: std.experimental.checkedint is ready for comments!

2016-06-17 Thread Ola Fosheim Grøstad via Digitalmars-d
On Thursday, 16 June 2016 at 23:27:06 UTC, tsbockman wrote: I do not think this approach will scale in the long run, no matter who is given that role. Of course, I would be happy to be proven wrong. I think maybe the C++ approach is better. If you want something into C++ std your best bet is

Re: std.experimental.checkedint is ready for comments!

2016-06-16 Thread tsbockman via Digitalmars-d
On Thursday, 16 June 2016 at 22:30:48 UTC, Walter Bright wrote: Andrei is in charge of the library and has my full support. We've talked many times about raising the bar much higher on Phobos. It's a tough competitive environment for programming languages out there, and we should all expect

Re: std.experimental.checkedint is ready for comments!

2016-06-16 Thread Walter Bright via Digitalmars-d
On 6/16/2016 2:11 PM, tsbockman wrote: My problem with `checkedint` was that I formed a wrong idea of whose approval I needed (interested Phobos devs collectively, versus Andrei specifically). Andrei is in charge of the library and has my full support. We've talked many times about raising

Re: std.experimental.checkedint is ready for comments!

2016-06-16 Thread Jack Stouffer via Digitalmars-d
On Thursday, 16 June 2016 at 21:52:16 UTC, Walter Bright wrote: https://www.digitalmars.com/sargon/halffloat.html Your HTTPS cert seems to be broken

Re: std.experimental.checkedint is ready for comments!

2016-06-16 Thread Walter Bright via Digitalmars-d
On 6/16/2016 6:56 AM, Steven Schveighoffer wrote: I understand your frustration. All I can say is, open source contributors have to have a thicker skin (and I'm not saying you don't). We are all human and have our faults, and any team in any context can have miscommunication, or

Re: std.experimental.checkedint is ready for comments!

2016-06-16 Thread tsbockman via Digitalmars-d
On Thursday, 16 June 2016 at 21:02:32 UTC, Walter Bright wrote: On 6/15/2016 8:56 PM, tsbockman wrote: Pull requests are routinely reviewed in an upside-down fashion: 1) Formatting 2) Typos 3) Names 4) Tests (and names again) 6) Docs (and names) 8) Design (and more about names) 9) Does this

Re: std.experimental.checkedint is ready for comments!

2016-06-16 Thread Walter Bright via Digitalmars-d
On 6/15/2016 8:56 PM, tsbockman wrote: Pull requests are routinely reviewed in an upside-down fashion: 1) Formatting 2) Typos 3) Names 4) Tests (and names again) 6) Docs (and names) 8) Design (and more about names) 9) Does this even belong in Phobos? It's a consequence of starting to read a

Re: std.experimental.checkedint is ready for comments!

2016-06-16 Thread tsbockman via Digitalmars-d
On Thursday, 16 June 2016 at 13:56:26 UTC, Steven Schveighoffer wrote: And there is a further problem -- Walter and Andrei are gatekeepers, but are stretched incredibly thin. Having had some time to think about all it now, I believe this was my actual problem. When I started working on

Re: std.experimental.checkedint is ready for comments!

2016-06-16 Thread tsbockman via Digitalmars-d
On Thursday, 16 June 2016 at 06:55:00 UTC, lobo wrote: Has this work/design been submitted as a DIP? I cannot find it. I thought all Phobos additions of any magnitude were required to pass the DIP submission first in order to avoid this sort of situation. If there is a DIP that was accepted

Re: std.experimental.checkedint is ready for comments!

2016-06-16 Thread tsbockman via Digitalmars-d
On Thursday, 16 June 2016 at 12:25:39 UTC, Andrei Alexandrescu wrote: Pull requests are routinely reviewed in an upside-down fashion: 1) Formatting 2) Typos 3) Names 4) Tests (and names again) 6) Docs (and names) 8) Design (and more about names) 9) Does this even belong in Phobos? I don't

Re: std.experimental.checkedint is ready for comments!

2016-06-16 Thread tsbockman via Digitalmars-d
On Thursday, 16 June 2016 at 07:02:21 UTC, John Colvin wrote: I think anything sufficiently large is likely to be reviewed in that order. In a lot of cases all the work for 1 - 8 is progressively done while working out 9. Should people not mention the smaller mistakes / disagreements they find

Re: std.experimental.checkedint is ready for comments!

2016-06-16 Thread Steven Schveighoffer via Digitalmars-d
On 6/15/16 11:56 PM, tsbockman wrote: On Thursday, 16 June 2016 at 02:53:38 UTC, Andrei Alexandrescu wrote: On 6/15/16 9:34 PM, tsbockman wrote: Why didn't you make your design requirements known at any earlier point in this process? If you are ultimate gate keeper for Phobos (as you seem to

Re: std.experimental.checkedint is ready for comments!

2016-06-16 Thread Andrei Alexandrescu via Digitalmars-d
to intervene, but I'd say this is already true now. Per the title of this thread: "std.experimental.checkedint is ready for comments!". What kind of comments were expected? Andrei

Re: std.experimental.checkedint is ready for comments!

2016-06-16 Thread Andrei Alexandrescu via Digitalmars-d
On 6/15/16 11:56 PM, tsbockman wrote: Numerous other mentions were made of this project in various contexts on the forums, in GitHub pull requests, and on the bug tracker - including discussions in which you participated. 'posts with "checkedint" in the title' is too narrow of a search filter.

Re: std.experimental.checkedint is ready for comments!

2016-06-16 Thread John Colvin via Digitalmars-d
On Thursday, 16 June 2016 at 03:56:02 UTC, tsbockman wrote: That is part of the problem, but this is also a fine example of a broader pattern that I have noticed in D's review process: Pull requests are routinely reviewed in an upside-down fashion: 1) Formatting 2) Typos 3) Names 4) Tests

Re: std.experimental.checkedint is ready for comments!

2016-06-16 Thread lobo via Digitalmars-d
On Thursday, 16 June 2016 at 03:56:02 UTC, tsbockman wrote: On Thursday, 16 June 2016 at 02:53:38 UTC, Andrei Alexandrescu wrote: [...] Numerous other mentions were made of this project in various contexts on the forums, in GitHub pull requests, and on the bug tracker - including

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread tsbockman via Digitalmars-d
On Thursday, 16 June 2016 at 02:53:38 UTC, Andrei Alexandrescu wrote: On 6/15/16 9:34 PM, tsbockman wrote: Why didn't you make your design requirements known at any earlier point in this process? If you are ultimate gate keeper for Phobos (as you seem to be), you ought to make your

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread Andrei Alexandrescu via Digitalmars-d
On 6/15/16 9:34 PM, tsbockman wrote: `checkedint` (and @burner's `SafeInt` before it) have been under development in the open for over a year now. There have been several discussions in the forums, with feedback being actively solicited. Significant design changes were made to address various

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread tsbockman via Digitalmars-d
On Thursday, 16 June 2016 at 00:33:38 UTC, Andrei Alexandrescu wrote: On 06/15/2016 08:07 PM, tsbockman wrote: But, I would appreciate it if comments distinguished between: 1) My goals and philosophy differ from yours, versus 2) My implementation is bad. I think a lot of the high-level

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread tsbockman via Digitalmars-d
On Thursday, 16 June 2016 at 00:31:38 UTC, Andrei Alexandrescu wrote: On 06/15/2016 02:50 PM, tsbockman wrote: What you are proposing is *not* "fixing" my design - it is basically scrapping it and replacing it with a ground-up rewrite, with perhaps some bits and pieces and general inspiration

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread Andrei Alexandrescu via Digitalmars-d
On 06/15/2016 08:07 PM, tsbockman wrote: On Thursday, 16 June 2016 at 00:03:26 UTC, Andrei Alexandrescu wrote: On 06/15/2016 07:34 PM, tsbockman wrote: The whole point of `checkedint` is to be able to write algorithms based on the simplifying assumption that your variables behave like real,

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread Andrei Alexandrescu via Digitalmars-d
On 06/15/2016 02:50 PM, tsbockman wrote: On Wednesday, 15 June 2016 at 16:40:19 UTC, Andrei Alexandrescu wrote: I think there are a few considerable issues with the proposal, but also that all are fixable. I already sent a much longer message detailing some of the reasons why I believe my

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread tsbockman via Digitalmars-d
On Thursday, 16 June 2016 at 00:06:13 UTC, Andrei Alexandrescu wrote: On 06/15/2016 07:13 PM, tsbockman wrote: Standardizing the error handling methods is also important for other interoperability-related reasons: [...] I don't agree with this. On the face of it, three built-in policies

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread tsbockman via Digitalmars-d
On Thursday, 16 June 2016 at 00:03:26 UTC, Andrei Alexandrescu wrote: On 06/15/2016 07:34 PM, tsbockman wrote: The whole point of `checkedint` is to be able to write algorithms based on the simplifying assumption that your variables behave like real, UNbounded mathematical integers, secure in

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread Andrei Alexandrescu via Digitalmars-d
On 06/15/2016 07:13 PM, tsbockman wrote: Standardizing the error handling methods is also important for other interoperability-related reasons: * If every third-party library designs a different error handling method, people writing applications that depend on many libraries will

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread Andrei Alexandrescu via Digitalmars-d
On 06/15/2016 07:34 PM, tsbockman wrote: The whole point of `checkedint` is to be able to write algorithms based on the simplifying assumption that your variables behave like real, UNbounded mathematical integers, secure in the knowledge that an error message will be generated if that assumption

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread tsbockman via Digitalmars-d
On Wednesday, 15 June 2016 at 16:40:19 UTC, Andrei Alexandrescu wrote: One of the first things I looked for was establishing bounds for numbers, like Smart!(int, 0, 100) for percentage. For all its might, this package does not offer this basic facility, and from what I can tell does not allow

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread tsbockman via Digitalmars-d
On Wednesday, 15 June 2016 at 18:34:15 UTC, tsbockman wrote: On Wednesday, 15 June 2016 at 16:40:19 UTC, Andrei Alexandrescu wrote: Getting to the design: the root of the problem is a byzantine design that is closed to extension. The design was closed deliberately because of (8). Template

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread Andrei Alexandrescu via Digitalmars-d
On 06/15/2016 05:32 PM, Timon Gehr wrote: On 15.06.2016 18:40, Andrei Alexandrescu wrote: The only remaining matter is to implement a few preexisting policies (Hook implementations) to implement typical choices (such as the ones present today), and the core algorithms for doing bounded

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread Timon Gehr via Digitalmars-d
On 15.06.2016 18:40, Andrei Alexandrescu wrote: The only remaining matter is to implement a few preexisting policies (Hook implementations) to implement typical choices (such as the ones present today), and the core algorithms for doing bounded operations. The most interesting algorithms are

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread tsbockman via Digitalmars-d
On Wednesday, 15 June 2016 at 18:50:32 UTC, tsbockman wrote: What you are proposing is *not* "fixing" my design - it is basically scrapping it and replacing it with a ground-up rewrite, with perhaps some bits and pieces and general inspiration taken from my work. [...] If the decision is made

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread tsbockman via Digitalmars-d
On Wednesday, 15 June 2016 at 16:40:19 UTC, Andrei Alexandrescu wrote: I think there are a few considerable issues with the proposal, but also that all are fixable. I already sent a much longer message detailing some of the reasons why I believe my design is sensible. But, before we continue

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread Andrei Alexandrescu via Digitalmars-d
On 06/15/2016 02:26 PM, Walter Bright wrote: On 6/15/2016 9:40 AM, Andrei Alexandrescu wrote: Looking at the IntFlagPolicy, it offers three canned behavior: throws, asserts, and noex. Users cannot customize behavior and there is no information passed into the policy (e.g. the operands in case

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread tsbockman via Digitalmars-d
On Wednesday, 15 June 2016 at 16:40:19 UTC, Andrei Alexandrescu wrote: Thanks for this work. [...] I think there are a few considerable issues with the proposal, but also that all are fixable. Your message was very long, so for the moment I'm going to filter it down to just the high-level

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread Walter Bright via Digitalmars-d
On 6/15/2016 9:40 AM, Andrei Alexandrescu wrote: Looking at the IntFlagPolicy, it offers three canned behavior: throws, asserts, and noex. Users cannot customize behavior and there is no information passed into the policy (e.g. the operands in case of overflow, or the numerator in case of

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread Andrei Alexandrescu via Digitalmars-d
PR: https://github.com/dlang/phobos/pull/4407 DUB: http://code.dlang.org/packages/checkedint Thanks for this work. Documentation can be seen here:

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread tsbockman via Digitalmars-d
On Wednesday, 15 June 2016 at 07:17:56 UTC, Walter Bright wrote: On 6/14/2016 11:16 PM, tsbockman wrote: On Wednesday, 15 June 2016 at 00:16:12 UTC, Walter Bright wrote: Remove all use of 'you' and 'your' from the documentation. Done. I hope you like the results, and are not doing it just

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread tsbockman via Digitalmars-d
On Wednesday, 15 June 2016 at 07:16:18 UTC, Walter Bright wrote: On 6/14/2016 9:48 PM, tsbockman wrote: `Int`? `Base`? 'Integer' would work fine. `BaseInt`? `SmartInt!Integer` looks weird to me, because of the repetition. Also, if we're going to use a long name like that I think it

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread tsbockman via Digitalmars-d
On Wednesday, 15 June 2016 at 07:08:22 UTC, Walter Bright wrote: On 6/14/2016 9:57 PM, tsbockman wrote: The intent is just as clear this way, and it's less verbose. Ok. I'd just change the constraint to: if (isIntegral!N || isCheckedint!N) You can do the qualification machinations using

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread Walter Bright via Digitalmars-d
On 6/14/2016 11:32 PM, tsbockman wrote: On Wednesday, 15 June 2016 at 00:16:12 UTC, Walter Bright wrote: -O (DMD) should be a link to the -O flag instructions http://dlang.org/dmd-windows.html#switch-O Done. '--inline' is not a DMD switch Fixed and linked, like -O. Tip 'o the hat.

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread Walter Bright via Digitalmars-d
On 6/14/2016 11:16 PM, tsbockman wrote: On Wednesday, 15 June 2016 at 00:16:12 UTC, Walter Bright wrote: Remove all use of 'you' and 'your' from the documentation. Done. I hope you like the results, and are not doing it just because I asked.

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread Walter Bright via Digitalmars-d
On 6/14/2016 11:17 PM, tsbockman wrote: Done. Pretty dazz! > (It turns out that they were actually already supported, but I updated the > docs to make this clearer.) Ain't it cool when that happens?

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread Walter Bright via Digitalmars-d
On 6/14/2016 9:48 PM, tsbockman wrote: On Wednesday, 15 June 2016 at 03:42:52 UTC, Walter Bright wrote: On 6/14/2016 8:15 PM, tsbockman wrote: Do I really need to give it some giant multi-word name? Something better than 'N'. `Int`? `Base`? 'Integer' would work fine. Whatever it is

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread Walter Bright via Digitalmars-d
On 6/14/2016 9:57 PM, tsbockman wrote: The intent is just as clear this way, and it's less verbose. Ok. I'd just change the constraint to: if (isIntegral!N || isCheckedint!N) You can do the qualification machinations using a static if inside the template.

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread Jacob Carlborg via Digitalmars-d
On 2016-06-15 05:15, tsbockman wrote: Originally I wanted to have the policies just be `throws` and `nothrow` - but of course `nothrow` is a keyword, so I chose `noex` (short for "no exceptions") instead. I agree it looks kind of odd though, especially since I later added the `asserts` policy.

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread tsbockman via Digitalmars-d
On Wednesday, 15 June 2016 at 00:16:12 UTC, Walter Bright wrote: -O (DMD) should be a link to the -O flag instructions http://dlang.org/dmd-windows.html#switch-O Done. '--inline' is not a DMD switch Fixed and linked, like -O.

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread tsbockman via Digitalmars-d
On Wednesday, 15 June 2016 at 04:48:02 UTC, tsbockman wrote: On Wednesday, 15 June 2016 at 03:42:52 UTC, Walter Bright wrote: * SmartInt.toString(sink, fmt) * SafeInt.toString(sink, fmt) * checkedint.to() * IntFlag.toString(sink, fmt) * IntFlags.toString(sink, fmt) I see no love for output

Re: std.experimental.checkedint is ready for comments!

2016-06-15 Thread tsbockman via Digitalmars-d
On Wednesday, 15 June 2016 at 00:16:12 UTC, Walter Bright wrote: Remove all use of 'you' and 'your' from the documentation. Done. "debuggin" => "debugging" Done.

Re: std.experimental.checkedint is ready for comments!

2016-06-14 Thread tsbockman via Digitalmars-d
On Wednesday, 15 June 2016 at 03:45:39 UTC, Walter Bright wrote: On 6/14/2016 8:23 PM, tsbockman wrote: This is specified fully in the template constraints: if (isIntegral!N && isUnqual!N) if ((isIntegral!N && !isUnqual!N) || isCheckedint!N) The second overload simply forwards to the

Re: std.experimental.checkedint is ready for comments!

2016-06-14 Thread tsbockman via Digitalmars-d
On Wednesday, 15 June 2016 at 03:42:52 UTC, Walter Bright wrote: On 6/14/2016 8:15 PM, tsbockman wrote: Do I really need to give it some giant multi-word name? Something better than 'N'. `Int`? `Base`? Whatever it is needs to be short; `BaseIntegralType` is *way* too long for this and

Re: std.experimental.checkedint is ready for comments!

2016-06-14 Thread Walter Bright via Digitalmars-d
On 6/14/2016 8:23 PM, tsbockman wrote: On Wednesday, 15 June 2016 at 00:16:12 UTC, Walter Bright wrote: A complete list of what types are acceptable for 'N' would be desirous, too. This is specified fully in the template constraints: if (isIntegral!N && isUnqual!N) if ((isIntegral!N

Re: std.experimental.checkedint is ready for comments!

2016-06-14 Thread Walter Bright via Digitalmars-d
On 6/14/2016 8:15 PM, tsbockman wrote: N is a basic integral type, it needs a better name than 'N'. How about 'BaseType' or even 'BaseIntegralType'? A complete list of what types are acceptable for 'N' would be desirous, too. `N` is not a public symbol, and it's used all over the place. It

Re: std.experimental.checkedint is ready for comments!

2016-06-14 Thread tsbockman via Digitalmars-d
On Wednesday, 15 June 2016 at 00:16:12 UTC, Walter Bright wrote: A complete list of what types are acceptable for 'N' would be desirous, too. This is specified fully in the template constraints: if (isIntegral!N && isUnqual!N) if ((isIntegral!N && !isUnqual!N) || isCheckedint!N) The

Re: std.experimental.checkedint is ready for comments!

2016-06-14 Thread tsbockman via Digitalmars-d
On Wednesday, 15 June 2016 at 00:16:12 UTC, Walter Bright wrote: Overall, I find the documentation to be unusually good. Nice work! Thanks. :-D .noex The .noex member is oddly named, being a negative and no idea what 'ex' means. It sets a

Re: std.experimental.checkedint is ready for comments!

2016-06-14 Thread Walter Bright via Digitalmars-d
Overall, I find the documentation to be unusually good. Nice work! .noex The .noex member is oddly named, being a negative and no idea what 'ex' means. It sets a sticky flag on error, so perhaps .sticky? --- N is a basic integral type, it

Re: std.experimental.checkedint is ready for comments!

2016-06-14 Thread Walter Bright via Digitalmars-d
On 6/14/2016 4:25 PM, Walter Bright wrote: Thanks for doing this! On 6/7/2016 1:50 AM, Robert burner Schadek wrote: == SmartInt == SmartInt smartOp strive to actually give the mathematically correct answer whenever possible, rather than just signaling an error. == SafeInt == SafeInt safeOp

Re: std.experimental.checkedint is ready for comments!

2016-06-14 Thread Walter Bright via Digitalmars-d
Thanks for doing this! On 6/7/2016 1:50 AM, Robert burner Schadek wrote: == SmartInt == SmartInt smartOp strive to actually give the mathematically correct answer whenever possible, rather than just signaling an error. == SafeInt == SafeInt safeOp strive to match the behaviour of the basic

Re: std.experimental.checkedint is ready for comments!

2016-06-14 Thread Nordlöw via Digitalmars-d
On Tuesday, 14 June 2016 at 13:58:29 UTC, tsbockman wrote: Given the above, I believe we should move forward with `checkedint` as-is. Someone can add a `BoundInt` type to it later, if there is demand. Ok. Thanks.

Re: std.experimental.checkedint is ready for comments!

2016-06-14 Thread tsbockman via Digitalmars-d
On Tuesday, 14 June 2016 at 10:39:01 UTC, Nordlöw wrote: Have you thought about extending checkedint to something similar to bounded integer wrapper type like my `bound.d`? I spent some time studying the possibility of a `BoundInt` type. Some conclusions I reached: 1) Designing and

Re: std.experimental.checkedint is ready for comments!

2016-06-14 Thread tsbockman via Digitalmars-d
On Tuesday, 14 June 2016 at 10:34:49 UTC, Andrea Fontana wrote: On Tuesday, 14 June 2016 at 10:33:34 UTC, Andrea Fontana wrote: Any documentation/example? Whoops I see it's in PR. You should link here too :) I can't, because the link is not stable. The docs are rebuilt and given a new URL

Re: std.experimental.checkedint is ready for comments!

2016-06-14 Thread Nordlöw via Digitalmars-d
On Tuesday, 14 June 2016 at 10:39:01 UTC, Nordlöw wrote: providing Ada-style module type at Should be: providing Ada-style modulo type at

Re: std.experimental.checkedint is ready for comments!

2016-06-14 Thread Nordlöw via Digitalmars-d
On Tuesday, 7 June 2016 at 08:50:07 UTC, Robert burner Schadek wrote: PR: https://github.com/dlang/phobos/pull/4407 I also have https://github.com/nordlow/phobos-next/blob/master/src/bound.d providing Ada-style range type at https://github.com/nordlow/phobos-next/blob/master/src/bound.d#L286

Re: std.experimental.checkedint is ready for comments!

2016-06-14 Thread Andrea Fontana via Digitalmars-d
On Tuesday, 14 June 2016 at 10:33:34 UTC, Andrea Fontana wrote: On Tuesday, 14 June 2016 at 10:20:58 UTC, Robert burner Schadek wrote: In two weeks I will talk to tsbockmann how much time he needs to work in all comments. After he is done I will start the formal review phase. p.s. @everybody

Re: std.experimental.checkedint is ready for comments!

2016-06-14 Thread Andrea Fontana via Digitalmars-d
On Tuesday, 14 June 2016 at 10:20:58 UTC, Robert burner Schadek wrote: In two weeks I will talk to tsbockmann how much time he needs to work in all comments. After he is done I will start the formal review phase. p.s. @everybody please take an interest. This module can give D another

Re: std.experimental.checkedint is ready for comments!

2016-06-14 Thread Robert burner Schadek via Digitalmars-d
In two weeks I will talk to tsbockmann how much time he needs to work in all comments. After he is done I will start the formal review phase. p.s. @everybody please take an interest. This module can give D another strategic advantage over our competition.

std.experimental.checkedint is ready for comments!

2016-06-14 Thread Robert burner Schadek via Digitalmars-d-announce
http://forum.dlang.org/post/jxaisipbdqfifpncn...@forum.dlang.org

Re: std.experimental.checkedint is ready for comments!

2016-06-09 Thread Jack Stouffer via Digitalmars-d
On Tuesday, 7 June 2016 at 08:50:07 UTC, Robert burner Schadek wrote: ... I left my commentary in the PR. Overall it looks pretty good design wise, and I would totally vote for it's inclusion in Phobos.

Re: std.experimental.checkedint is ready for comments!

2016-06-07 Thread tsbockman via Digitalmars-d
On Tuesday, 7 June 2016 at 08:50:07 UTC, Robert burner Schadek wrote: I will do the review management. Thanks.

std.experimental.checkedint is ready for comments!

2016-06-07 Thread Robert burner Schadek via Digitalmars-d
As with many other languages (C, C++, Java, etc.), D's built-in integer data types are quite difficult to use correctly. It is tempting to think of int, for example, as if it were an actual mathematical integer. Doing so, however leads to buggy code due to unintuitive behaviour like: *