Re: Property-based testing

2017-01-16 Thread Mark via Digitalmars-d
On Monday, 16 January 2017 at 14:15:16 UTC, Russel Winder wrote: Is anyone out there doing a property-based testing framework for D? There have been several attempts to implement such a framework, e.g. [1]. If you run a search for "quickcheck" in the forums, you'll probably find them all.

Re: Default implementation of opEquals

2016-10-07 Thread Mark via Digitalmars-d
On Friday, 7 October 2016 at 12:34:34 UTC, Adam D. Ruppe wrote: On Friday, 7 October 2016 at 12:04:09 UTC, Mark wrote: "If opEquals is not specified, the compiler provides a default version that does member-wise comparison" That's referring to structs. For classes, it gives an identity

Re: Default implementation of opEquals

2016-10-07 Thread Mark via Digitalmars-d
On Friday, 7 October 2016 at 14:04:10 UTC, Jonathan M Davis wrote: On Friday, October 07, 2016 13:41:00 Mark via Digitalmars-d wrote: [...] It's the plan anyway. It fundamentally doesn't work to have them on Object and be flexible with attributes, so it was decided a while ago

Default implementation of opEquals

2016-10-07 Thread Mark via Digitalmars-d
I'm going over the Object class methods and I have a few concerns about the opEquals method. First, what should be the default implementation of opEquals? The specification (see https://dlang.org/spec/operatoroverloading.html#eqcmp) reads: "If opEquals is not specified, the compiler

Re: [OT] Brokerage for the D Language Foundation

2016-09-18 Thread Mark via Digitalmars-d
On Saturday, 17 September 2016 at 14:22:03 UTC, Andrei Alexandrescu wrote: The Foundation's cash os currently sitting in a checking account at Bank of America. I've googled for things like "brokerage accounts for non-profit" and figured that most or all deep discount brokers (Fidelity,

Re: [OT] Brokerage for the D Language Foundation

2016-09-18 Thread Mark via Digitalmars-d
I think it would be best to speak to people from other non-profit organizations (preferably ones that are very similar, at least in spirit, to the D Language Foundation) about their experience with such matters. Even if the Foundation currently has no more cash than a typical (or not so

Re: [OT] Brokerage for the D Language Foundation

2016-09-25 Thread Mark via Digitalmars-d
On Wednesday, 21 September 2016 at 13:47:38 UTC, Andrea Fontana wrote: On Sunday, 18 September 2016 at 11:16:47 UTC, Mark wrote: [...] I think you can make 1-2% a year without taking a lot of risk, e.g. by investing in investment-grade corporate bonds with short maturity. [...] Or buying

Re: Linus' idea of "good taste" code

2016-10-26 Thread Mark via Digitalmars-d
On Tuesday, 25 October 2016 at 22:53:54 UTC, Walter Bright wrote: It's a small bit, but the idea here is to eliminate if conditionals where possible: https://medium.com/@bartobri/applying-the-linus-tarvolds-good-taste-coding-requirement-99749f37684a#.nhth1eo4e What would you say is the best

Re: Pattern matching in D?

2016-10-21 Thread Mark via Digitalmars-d
On Friday, 21 October 2016 at 06:50:26 UTC, Dennis Ritchie wrote: Previously, there were ideas on the implementation of macros in D, but now they are no longer relevant: http://s3.amazonaws.com/dconf2007/WalterAndrei.pdf AST macros are permanently off the table?

Re: Why are homepage examples too complicated?

2016-10-21 Thread Mark via Digitalmars-d
On Friday, 21 October 2016 at 10:24:40 UTC, Chris wrote: On Thursday, 20 October 2016 at 21:52:09 UTC, Andrei Alexandrescu wrote: On 10/20/2016 04:16 PM, Karabuta wrote: We can't assume all beginners come from imperative languages. D beginners may come from languages where the idiomatic

Re: Linus' idea of "good taste" code

2016-10-26 Thread Mark via Digitalmars-d
On Tuesday, 25 October 2016 at 22:53:54 UTC, Walter Bright wrote: It's a small bit, but the idea here is to eliminate if conditionals where possible: https://medium.com/@bartobri/applying-the-linus-tarvolds-good-taste-coding-requirement-99749f37684a#.nhth1eo4e This is something we could all

Re: Any relation?

2016-10-13 Thread Mark via Digitalmars-d
On Tuesday, 11 October 2016 at 18:13:53 UTC, Andrei Alexandrescu wrote: http://indianautosblog.com/2016/10/most-powerful-suzuki-swift-produces-350-hp-25 -- Andrei Alas, it seems that they're using Swift. :(

Re: Databases and the D Standard Library

2017-01-01 Thread Mark via Digitalmars-d
On Sunday, 1 January 2017 at 03:24:31 UTC, Adam Wilson wrote: 2. There are so many different types of data storage systems, how do you design a system generic enough for all of them? My answer: You don't. Nobody else has bothered trying, and I believe that our worry over that question is a

Re: D future ...

2016-12-21 Thread Mark via Digitalmars-d
On Tuesday, 20 December 2016 at 16:22:43 UTC, Walter Bright wrote: D is quite a bit less formal, but still, if you want action consider that you aren't going to get it with any organization unless you're willing to: 1. pay others to do it 2. convince others that your important issues are

Re: ycombinator"In my Christmas wishlist is a language ..."

2016-12-19 Thread Mark via Digitalmars-d
On Monday, 19 December 2016 at 18:38:32 UTC, Ilya Yaroshenko wrote: Mir can be translated as "Peace". Cooperation with other languages through betterC API is more productive than universality/feature wars :-) And here I thought it was named after the space station. =)

Re: Is there a cleaner way of doing this?

2017-08-12 Thread Mark via Digitalmars-d
On Monday, 7 August 2017 at 08:01:26 UTC, Shachar Shemesh wrote: The problem is what happens when the param is optional. The common way to do this is to set T to void. This results in the following code: struct S(T) { enum HasParam = !is(T == void); static if( HasParam ) {

Re: Is there a cleaner way of doing this?

2017-08-12 Thread Mark via Digitalmars-d
On Saturday, 12 August 2017 at 15:02:34 UTC, Mark wrote: I was going to suggest using Algebraic/Variant, as in: void initialize(Algebraic!(int,void)) { This should read: void initialize(Algebraic!(int,void) param) {

Re: Types: The Next Generation (Was: Why is phobos so wack?)

2017-07-15 Thread Mark via Digitalmars-d
On Sunday, 9 July 2017 at 20:22:16 UTC, Nick Sabalausky (Abscissa) wrote: So, why not encapsulate much of that stuff we merely *describe* in signatures for generic functions into genuine honest-to-goodness types? There would be user-defined symbols, such as "InputRange" or "SomeString", or

Re: D easily overlooked?

2017-07-15 Thread Mark via Digitalmars-d
On Friday, 14 July 2017 at 08:57:17 UTC, Wulfklaue wrote: https://blog.sourced.tech/post/language_migrations/ A recent article where github programming languages popularity and migration got analysed was very interesting but it showed one noticeable thing: A total lack of D even

Re: D easily overlooked?

2017-07-15 Thread Mark via Digitalmars-d
On Saturday, 15 July 2017 at 17:10:56 UTC, Joakim wrote: To answer Mark's original question, the corporates get interested when there are competitors eating their lunch with new tech. They don't actively scout out all the new tech, they're far too lazy for that. But when Sociomantic or Weka

Re: DIP 1009--Improve Contract Usability--Preliminary Review Round 1

2017-06-28 Thread Mark via Digitalmars-d
On Tuesday, 27 June 2017 at 23:17:15 UTC, Moritz Maxeiner wrote: Considering that code is read a lot more than written those two are *critically* important. What more do you expect? It could eventually be optimized to inject the in contract check at the caller's side (before entering the

Re: [WIP] A Big O notation and algebra for D

2017-06-30 Thread Mark via Digitalmars-d
On Sunday, 18 December 2016 at 18:26:27 UTC, Andrei Alexandrescu wrote: Article: http://erdani.com/d/bigo.html (do not publish; should do it with Mike) Code (preliminary): https://github.com/dlang/phobos/pull/4965 Andrei Was this project abandoned? It's no longer in std/experimental.

Re: [WIP] A Big O notation and algebra for D

2017-06-30 Thread Mark via Digitalmars-d
On Friday, 30 June 2017 at 16:28:18 UTC, Andrei Alexandrescu wrote: On 06/30/2017 12:01 PM, Mark wrote: On Sunday, 18 December 2016 at 18:26:27 UTC, Andrei Alexandrescu wrote: Article: http://erdani.com/d/bigo.html (do not publish; should do it with Mike) Code (preliminary):

Re: DIP 1009--Improve Contract Usability--Preliminary Review Round 1

2017-06-30 Thread Mark via Digitalmars-d
On Thursday, 29 June 2017 at 01:37:17 UTC, H. S. Teoh wrote: (1) DbC contracts pertain to *runtime* argument values, so while checking for simple cases at compile-time is nice, it isn't really in the charter of (D's implementation of) DbC. T That's a good point. I guess UDAs combined with

Re: Graph rendering on dlang.org

2017-07-02 Thread Mark via Digitalmars-d
On Saturday, 1 July 2017 at 20:53:07 UTC, Cym13 wrote: On Saturday, 1 July 2017 at 19:19:09 UTC, Jonathan Marler wrote: On Friday, 30 June 2017 at 21:40:05 UTC, Andrei Alexandrescu wrote: [...] There's also mermaid. They have a live editor here: https://knsv.github.io/mermaid/live_editor/

Re: DIP 1009--Improve Contract Usability--Preliminary Review Round 1

2017-06-27 Thread Mark via Digitalmars-d
On Tuesday, 20 June 2017 at 11:57:55 UTC, Mike Parker wrote: DIP 1009 is titled "Improve Contract Usability". [...] Veering a bit off topic,the compiler doesn't treat contracts any different from other code, does it? For instance, consider: int foo() out(result; result>0) { // whatever }

Re: [OT] Generative C++

2017-08-06 Thread Mark via Digitalmars-d
On Friday, 28 July 2017 at 07:49:02 UTC, Yuxuan Shui wrote: Someone made an interesting proposal to C++: https://herbsutter.files.wordpress.com/2017/07/p0707r1.pdf Thoughts? Won't this abstraction compete directly with concepts (lite) and even with templates? Metaclasses appear to be at

Re: DIP 1009--Improve Contract Usability--Preliminary Review Round 1

2017-06-24 Thread Mark via Digitalmars-d
On Saturday, 24 June 2017 at 02:31:09 UTC, Solomon E wrote: I think my proposal to add another use of semicolon in parentheses, like `foreach` or `for` but not the same as either, was needlessly complicated. in (a) out (result) (a) as syntax sugar where each (a) lowers to {assert(a);} and in

Re: D Language Front-End Proposed For GCC 8, 800k Lines of Code

2017-06-17 Thread Mark via Digitalmars-d
On Sunday, 28 May 2017 at 19:23:04 UTC, Nordlöw wrote: Does this, perchance, deserve a post in "Announce"? :) http://www.phoronix.com/scan.php?page=news_item=D-Frontend-For-GCC 800k lines of code! Wow. Is this also how big the DMD frontend is?

Re: Ali's slides from his C++Now talk

2017-06-17 Thread Mark via Digitalmars-d
On Tuesday, 23 May 2017 at 23:31:48 UTC, Joakim wrote: Enjoying going through these: http://ddili.org/AliCehreli_CppNow_2017_Competitive_Advantage_with_D.no_pause.pdf Ali really has a gift for explaining stuff, we're lucky to have him. Yes, the slides are great. And I think "compilable

Re: D needs to get its shit together!

2017-06-17 Thread Mark via Digitalmars-d
On Friday, 16 June 2017 at 13:14:46 UTC, Moritz Maxeiner wrote: If you are interested in donations, there is such infrastructure, it's called the D Foundation. I imagine that it's not possible to make donations to the foundation that are restricted for the use of advancing a specific aspect

Re: D needs to get its shit together!

2017-06-17 Thread Mark via Digitalmars-d
On Saturday, 17 June 2017 at 23:14:24 UTC, Moritz Maxeiner wrote: IANAL, but if you tie a monetary exchange to a specific service, it's not a donation, but payment for services (to be) rendered. Good point. People who work on/with something in their free time for their own purposes are

Re: There really needs to be some moderation

2017-06-18 Thread Mark via Digitalmars-d
On Sunday, 18 June 2017 at 20:04:48 UTC, Joakim wrote: Also, a lot of this polish is missing because D is an OSS project that doesn't have corporate involvement driving it. No pure OSS project without heavy corporate involvement has ever gotten everywhere, you will find corporate hands all

Re: What is the Philosophy of D?

2017-10-16 Thread Mark via Digitalmars-d
On Monday, 16 October 2017 at 00:25:32 UTC, codephantom wrote: D's overview page says "It doesn't come with an overriding philosophy." Is philosophy not important? I'd like to argue, that the problem of focusing on getting the job done quickly and reliably, does *not* leave behind

Re: DIP 1009--Improve Contract Usability--Formal Review

2017-08-30 Thread Mark via Digitalmars-d
On Wednesday, 30 August 2017 at 14:57:38 UTC, Moritz Maxeiner wrote: On Wednesday, 30 August 2017 at 14:05:40 UTC, Mark wrote: [...] int abs(int x) out(_ >= 0) { return x>0 ? x : -x; } The ambiguity issue of having two results in one scope [1] applies. [1]

Re: C++ / Why Iterators Got It All Wrong

2017-09-05 Thread Mark via Digitalmars-d
On Saturday, 2 September 2017 at 20:22:44 UTC, Robert M. Münch wrote: Iterators are not the silver bullet. But IIRC you can specify if you want to iterate over a graph BF or DF. If you just need to "iterate" over the elements things work pretty good IMO. If you want to select a sub-set and

Re: Should we add `a * b` for vectors?

2017-09-24 Thread Mark via Digitalmars-d
On Friday, 22 September 2017 at 17:11:56 UTC, Ilya Yaroshenko wrote: Should we add `a * b` to ndslice for 1d vectors? Discussion at https://github.com/libmir/mir-algorithm/issues/91 Generally I expect that a binary operation denoted by + or * would produce an element from the original domain,

Re: Community Rant

2017-08-24 Thread Mark via Digitalmars-d
On Wednesday, 23 August 2017 at 23:27:22 UTC, Brad Roberts wrote: On 8/23/2017 3:58 PM, Mark via Digitalmars-d wrote: This kind of criticism comes up fairly often in the forums, maybe once every few weeks. I can link to the recent threads on the matter, but I'm sure you can make

Re: Community Rant

2017-08-23 Thread Mark via Digitalmars-d
On Tuesday, 22 August 2017 at 15:14:33 UTC, Jonathan Shamir wrote: [...] But lets be honest. If I was just interested to learn about this "modern system programming language" that is C++ done right, I would dismiss D very quickly. We need to get together as a community and rethink your

Re: C++ / Why Iterators Got It All Wrong

2017-09-04 Thread Mark via Digitalmars-d
On Sunday, 3 September 2017 at 12:46:05 UTC, Moritz Maxeiner wrote: I agree, though I was talking about what the abstract data type of a "series" is, i.e. what operations is exposes. From my observation: A D input range exposes via empty/front/popFront. A classic iterator exposes via

Re: C++ / Why Iterators Got It All Wrong

2017-09-01 Thread Mark via Digitalmars-d
On Tuesday, 29 August 2017 at 12:50:08 UTC, Robert M. Münch wrote: Maybe of interest: https://www.think-cell.com/en/career/talks/iterators/#1 I haven't read everything, so not sure if it worth to take a look. Iterators have many problems. Andrei's talk some years ago, titled "Iterators

Re: DIP 1009--Improve Contract Usability--Formal Review

2017-08-30 Thread Mark via Digitalmars-d
On Wednesday, 30 August 2017 at 12:26:43 UTC, Mike Parker wrote: The first stage of the formal review for DIP 1009 [1], "Improve Contract Syntax", is now underway. From now until 11:59 PM ET on September 13 (3:59 AM GMT on September 14), the community has the opportunity to provide last-minute

Re: On "A New Collections Framework for the Standard Library"

2017-11-13 Thread Mark via Digitalmars-d
On Thursday, 18 May 2017 at 18:27:22 UTC, Andrei Alexandrescu wrote: On 05/18/2017 11:18 AM, Jack Stouffer wrote: I just got around to watching Eduard Staniloiu's talk at DConf [1] about the collections library he was working on. One thing seemed odd, in that Eduard seems to be saying that the

Re: D jobs?

2017-11-25 Thread Mark via Digitalmars-d
On Saturday, 25 November 2017 at 13:16:19 UTC, Tofu Ninja wrote: Are there any places to look for D jobs? It seems really hard to find anything online. I got a really crappy job doing C++ and hate it to bits. Also if anyone is in the bay area and is in a position to higher maybe check out this

Re: Introducing Nullable Reference Types in C#. Is there hope for D, too?

2017-11-22 Thread Mark via Digitalmars-d
On Tuesday, 21 November 2017 at 09:12:25 UTC, Ola Fosheim Grostad wrote: Runtime checks are part of the type system though I wouldn't say that, particularly if we are talking about a statically typed language (which Java is).

Re: Maybe D is right about GC after all !

2017-12-19 Thread Mark via Digitalmars-d
On Tuesday, 19 December 2017 at 09:54:05 UTC, Walter Bright wrote: "C, Python, Go, and the Generalized Greenspun Law" http://esr.ibiblio.org/?p=7804 What do you think of the following comment to that article? "In well-written modern C++, memory management errors are a solved problem. You

Re: Zig mentions D in justifying its existence

2017-11-14 Thread Mark via Digitalmars-d
On Tuesday, 14 November 2017 at 01:01:16 UTC, codephantom wrote: On Monday, 13 November 2017 at 16:12:42 UTC, Joakim wrote: Probably a good sign that they mention D with C++ and Rust and have looked at D features: An interesting project. Some good points made too. As someone new to D, I

Re: Introducing Nullable Reference Types in C#. Is there hope for D, too?

2017-11-20 Thread Mark via Digitalmars-d
On Monday, 20 November 2017 at 22:56:44 UTC, Walter Bright wrote: On 11/20/2017 3:27 AM, Timon Gehr wrote: On 20.11.2017 11:07, Atila Neves wrote: The problem with null as seen in C++/Java/D is that it's a magical value that different types may have. It breaks the type system. In Java,

Re: Improve "Improve Contract Syntax" DIP 1009

2017-11-03 Thread Mark via Digitalmars-d
On Friday, 3 November 2017 at 02:32:41 UTC, Jonathan M Davis wrote: Pretty much the only case where out contracts work well is when you have a very specific, testable condition that all results must have and which does not depend on the input, and most functions simply don't work that way. -

Re: Improve "Improve Contract Syntax" DIP 1009

2017-11-04 Thread Mark via Digitalmars-d
On Saturday, 4 November 2017 at 06:08:22 UTC, Jonathan M Davis wrote: And even if you did have access to the input, some functions consume their input without any way to save it (e.g. an input range that isn't a forward range) [...] - Jonathan M Davis True. I had (strongly) pure functions

Re: Improve "Improve Contract Syntax" DIP 1009

2017-11-04 Thread Mark via Digitalmars-d
On Saturday, 4 November 2017 at 15:38:42 UTC, Jonathan M Davis wrote: On Saturday, November 04, 2017 15:27:39 Ola Fosheim Grøstad via Digitalmars- d wrote: On Saturday, 4 November 2017 at 14:12:08 UTC, Adam D. Ruppe wrote: > On Saturday, 4 November 2017 at 13:59:39 UTC, Jonathan M > Davis > >

Re: Project Elvis

2017-11-01 Thread Mark via Digitalmars-d
On Tuesday, 31 October 2017 at 19:39:17 UTC, bauss wrote: On Tuesday, 31 October 2017 at 08:15:24 UTC, Mark wrote: On Saturday, 28 October 2017 at 11:38:52 UTC, Andrei Alexandrescu wrote: Walter and I decided to kick-off project Elvis for adding the homonym operator to D. [...] Thanks,

Re: My two cents

2017-10-21 Thread Mark via Digitalmars-d
On Wednesday, 18 October 2017 at 08:56:21 UTC, Satoshi wrote: Hi, I had been using D for almost 6 years and I want to share my opinion with you. I don't want to blame anyone but I'll focus more on bad things and possible improvements. And this is just how I see D from my perspective. (Sorry

Re: My first experience as a D Newbie

2017-10-21 Thread Mark via Digitalmars-d
On Saturday, 21 October 2017 at 01:45:40 UTC, codephantom wrote: The real challenge (and ultimate goal) for any open-source project (especially a volunteer based one), is finding equilibria. Honestly, I do not believe that an open-source project, beyond a certain scale, can sustain itself

Re: Project Elvis

2017-10-31 Thread Mark via Digitalmars-d
On Saturday, 28 October 2017 at 11:38:52 UTC, Andrei Alexandrescu wrote: Walter and I decided to kick-off project Elvis for adding the homonym operator to D. [...] Thanks, Andrei The Elvis operator's purpose is to make working with null easier, but isn't null "The Billion Dollar Mistake"?

Re: D vs nim

2018-05-04 Thread Mark via Digitalmars-d
On Thursday, 3 May 2018 at 23:09:34 UTC, Timothee Cour wrote: nim supports static if (`when`) + CTFE. A simple google search or searching would've revealed that. On Thu, May 3, 2018 at 3:20 PM Mark via Digitalmars-d < digitalmars-d@puremagic.com> wrote: On Thursday, 3 May 2018 at 20

Re: Things I found great about TypeScript that D could benefit from

2018-04-27 Thread Mark via Digitalmars-d
On Friday, 27 April 2018 at 19:17:14 UTC, w0rp wrote: * Writing `(InputRange r)` instead of `(T)(T r) if (isInputRange!T)` would be a nice improvement, and writing something like this hypothetical `InputRange` concept could be a lot easier, somehow. (C++20 might finally include concepts.)

Re: auto: useful, annoying or bad practice?

2018-05-12 Thread Mark via Digitalmars-d
On Friday, 11 May 2018 at 18:44:25 UTC, H. S. Teoh wrote: On Fri, May 11, 2018 at 04:57:05PM +, Mark via Digitalmars-d wrote: On Wednesday, 9 May 2018 at 15:06:55 UTC, Jonathan M Davis wrote: > Ultimately, the key is that the user of the function needs > to be able to know how

Re: auto: useful, annoying or bad practice?

2018-05-11 Thread Mark via Digitalmars-d
On Wednesday, 9 May 2018 at 15:06:55 UTC, Jonathan M Davis wrote: Ultimately, the key is that the user of the function needs to be able to know how to use the return type. In some cases, that means returning a specific type, whereas in others, it means using auto and being clear in the

Re: auto: useful, annoying or bad practice?

2018-05-02 Thread Mark via Digitalmars-d
On Wednesday, 2 May 2018 at 14:05:49 UTC, H. S. Teoh wrote: How else would you do DoI, though? With Concepts? The advantage of using structural typing over concepts for DoI is that you would need an exponential number of concepts to catch up with a linear number of optional fields in a

Re: D vs nim

2018-05-03 Thread Mark via Digitalmars-d
On Wednesday, 25 April 2018 at 14:18:07 UTC, Rel wrote: In case you guys like to take a quick look at new emerging, but somewhat unknown systems programming languages: * https://www.red-lang.org/ (own handwritten backend) * https://crystal-lang.org/ (llvm-based backend) * https://ziglang.org/

Re: D vs nim

2018-05-03 Thread Mark via Digitalmars-d
On Thursday, 3 May 2018 at 20:57:16 UTC, Dennis wrote: On Thursday, 3 May 2018 at 19:11:05 UTC, Mark wrote: Funnily, none of these languages have a "static if" construct, nor do Rust, Swift and Nim. Not one that I could find, anyway. What qualifies under "static if"? Because Rust, Swift and

Re: My first experience as a D Newbie

2017-10-20 Thread Mark via Digitalmars-d
On Thursday, 19 October 2017 at 21:18:43 UTC, Rion wrote: D has a bad track record with implementations of proposals, even when the actual code has been written. There has always been a standard: Walter writes it, its going to get accepted with a high ratio in one form or another. Somebody who

Re: I closed a very old bug!

2018-01-16 Thread Mark via Digitalmars-d
On Tuesday, 16 January 2018 at 19:45:06 UTC, Andrei Alexandrescu wrote: https://issues.dlang.org/show_bug.cgi?id=255 I think it would be great to reduce the median age of open issues, and the median longevity of closed issues. I'm in talks with Sebastian about publishing such metrics. One

Re: [theory] What is a type?

2018-01-15 Thread Mark via Digitalmars-d
On Sunday, 10 October 2010 at 12:28:32 UTC, Justin Johansson wrote: Specifically I have a problem in trying to implement a functional language translator in D. My target language has a rather non-conventional type system, in which, superficially at least, types can be described as being

Re: Tuple DIP

2018-01-12 Thread Mark via Digitalmars-d
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote: As promised [1], I have started setting up a DIP to improve tuple ergonomics in D: https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md This DIP aims to make code like the following valid D: --- auto (a, b) = (1,

Re: Tuple DIP

2018-01-13 Thread Mark via Digitalmars-d
On Saturday, 13 January 2018 at 00:51:51 UTC, Timon Gehr wrote: On 13.01.2018 01:20, Mark wrote: int (x,y) = f(1, 2); // x=3, y=-1 int (w,z) = (1, 2).f() // same as above, UFCS int (u,v) = (1, 2).(sum, diff) // same as above, "lambda tuple" In the last example, (sum, diff) is basically lowered

Re: Quora: Why hasn't D started to replace C++?

2018-02-02 Thread Mark via Digitalmars-d
On Wednesday, 31 January 2018 at 23:38:22 UTC, H. S. Teoh wrote: And IIRC, Andrei had already bought into the ddox system by then (the process of merging it might have already begun, I'm not 100% certain), so dpldocs was already starting from a disadvantaged position, whatever merits it may

Re: Which language futures make D overcompicated?

2018-02-09 Thread Mark via Digitalmars-d
On Friday, 9 February 2018 at 18:34:33 UTC, Seb wrote: On Friday, 9 February 2018 at 18:21:55 UTC, Bo wrote: Here are a few more "basics" that are unneeded or confusing. Lets not even talk about the more advanced features like inout, ... /-/ * auto: Static typed language yet we fall back on

Re: Quora: Why hasn't D started to replace C++?

2018-02-09 Thread Mark via Digitalmars-d
On Friday, 9 February 2018 at 13:21:09 UTC, Bo wrote: For basic technology as database's: Mysql, PostgreSQL, Sqlite, Firebird, MongoDB you expect this to be under the standard library for D, with official support. The reason why scripting languages do good in user adaptation is simply

Re: Quora: Why hasn't D started to replace C++?

2018-02-09 Thread Mark via Digitalmars-d
On Friday, 9 February 2018 at 14:01:02 UTC, Atila Neves wrote: Unit tests are a great idea, right? Try convincing a group of 10 programmers who have never written one and don't know anyone else who has. I have; I failed. Atila You should have tried to convince them to do TDD. ;)

Re: Somewhat OT: defining algebras in D

2018-02-09 Thread Mark via Digitalmars-d
On Thursday, 8 February 2018 at 15:23:05 UTC, Simen Kjærås wrote: So I was bored in a meeting and decided to implement a generic template for defining complex numbers, dual numbers, quaternions and many other possible algebras by simply defining a set of rules and the components on which they

"Why Black Boxes are so Hard to Reuse?", a lecture by Gregor Kiczales

2018-02-13 Thread Mark via Digitalmars-d
I came across this one hour lecture [1] on Youtube. It's from 1994, but I think it's still very relevant today, both to developers in general and to the D language in particular. A TL;DR summary of the lecture: Abstraction is a central theme in software engineering, since it allows us to

Re: Flow-Design: OOP component programming

2018-02-14 Thread Mark via Digitalmars-d
On Wednesday, 14 February 2018 at 09:39:20 UTC, Luís Marques wrote: It seems that someone once again rediscovered the benefits of component programming, in the context of OOP, but (as usual) without the more mathematical and principled approach of something like ranges and algorithms: [...]

Re: Flow-Design: OOP component programming

2018-02-14 Thread Mark via Digitalmars-d
On Wednesday, 14 February 2018 at 19:53:31 UTC, H. S. Teoh wrote: On Wed, Feb 14, 2018 at 06:43:34PM +, Mark via Digitalmars-d wrote: On Wednesday, 14 February 2018 at 09:39:20 UTC, Luís Marques wrote: > It seems that someone once again rediscovered the benefits > of component progr

Re: Which language futures make D overcompicated?

2018-02-10 Thread Mark via Digitalmars-d
On Saturday, 10 February 2018 at 12:35:39 UTC, Timon Gehr wrote: So as expected, the difference is that for parametrically polymorphic functions, the type T /does not need to be known at compile time/. According to this definition C++ doesn't support parametric polymorphism either, does it?

Re: Maybe D is right about GC after all !

2017-12-25 Thread Mark via Digitalmars-d
On Tuesday, 26 December 2017 at 07:01:16 UTC, codephantom wrote: On Tuesday, 26 December 2017 at 04:47:35 UTC, Walter Bright wrote: Only if someone considers this as fixed: int foo(int* p) { return p[1]; } int bar(int i) { return foo(); } clang++ -c test.cpp -Wall good

Re: Please do not use 'auto' return types without thoroughly describing the interface

2017-12-26 Thread Mark via Digitalmars-d
On Monday, 25 December 2017 at 22:48:39 UTC, H. S. Teoh wrote: While I agree that all template parameters ought to be documented and all auto return types thoroughly described, I disagree with explicit naming of auto return types. The whole point of auto return types is to return an *opaque*

Re: Please do not use 'auto' return types without thoroughly describing the interface

2017-12-28 Thread Mark via Digitalmars-d
On Wednesday, 27 December 2017 at 16:36:59 UTC, H. S. Teoh wrote: On Tue, Dec 26, 2017 at 11:28:56AM +, Mark via Digitalmars-d wrote: On Monday, 25 December 2017 at 22:48:39 UTC, H. S. Teoh wrote: > [...] Maybe we can document the interface of the return type using signature constrai

Re: Maybe D is right about GC after all !

2017-12-21 Thread Mark via Digitalmars-d
On Thursday, 21 December 2017 at 13:27:55 UTC, Guillaume Piolat wrote: [...] There is also a downside to the C++ scoped owership wa: you have to find an owner for everything even if they are just memory. So small scripts in D will be written almost 2x faster because of that and rich stdlib.

Re: Old Quora post: D vs Go vs Rust by Andrei Alexandrescu

2018-01-03 Thread Mark via Digitalmars-d
On Wednesday, 3 January 2018 at 21:43:00 UTC, Ola Fosheim Grøstad wrote: There are many ways to fix this, which has been discussed to death before (like thread local garbage collection), but there is no real decision making going on to deal with it. Because to deal with it you should also

Re: Old Quora post: D vs Go vs Rust by Andrei Alexandrescu

2018-01-02 Thread Mark via Digitalmars-d
On Tuesday, 2 January 2018 at 16:34:25 UTC, Ali wrote: While randomly browsing online, I found this link below https://www.quora.com/Which-language-has-the-brightest-future-in-replacement-of-C-between-D-Go-and-Rust-And-Why/answer/Andrei-Alexandrescu [...] Yes, it is a great post. I would be

Re: Old Quora post: D vs Go vs Rust by Andrei Alexandrescu

2018-01-04 Thread Mark via Digitalmars-d
On Wednesday, 3 January 2018 at 22:22:12 UTC, Jonathan M Davis wrote: [...] Makes sense. Thanks. I use casting so little that sometimes I forget it exists.

Bizarre Memory leak issue ??? help!

2018-07-26 Thread Mark via Digitalmars-d
Hello, I am building a toy compiler in D, and during this I ran into a situation. It involves checking the header of each function, going through the arguments, and seeing if there is any duplicate identifiers. I have a python script that feeds a whole bunch of source files that have one

Re: Bizarre Memory leak issue ??? help!

2018-07-27 Thread Mark via Digitalmars-d
On Friday, 27 July 2018 at 06:20:57 UTC, Stefan Koch wrote: On Friday, 27 July 2018 at 04:56:01 UTC, Mark wrote: Hello, ... Have you tried using -profile-gc ? No, I haven't. Ill give that a try and see what I find. Thanks!

Re: Bizarre Memory leak issue ??? help!

2018-07-27 Thread Mark via Digitalmars-d
On Friday, 27 July 2018 at 11:50:11 UTC, Mark wrote: On Friday, 27 July 2018 at 06:20:57 UTC, Stefan Koch wrote: On Friday, 27 July 2018 at 04:56:01 UTC, Mark wrote: Hello, ... Have you tried using -profile-gc ? No, I haven't. Ill give that a try and see what I find. Thanks! Hmm,

Re: Tuple DIP

2018-01-13 Thread Mark via Digitalmars-d
On Saturday, 13 January 2018 at 20:57:31 UTC, Timon Gehr wrote: On 13.01.2018 21:39, rjframe wrote: Python and Pony use (). C++17 uses []. Any idea why C++17 went with [] ? Perhaps D should use <>? [not a serious question] It was hard for me not to use angled brackets for templates when I

Re: C++ launched its community survey, too

2018-02-27 Thread Mark via Digitalmars-d
On Tuesday, 27 February 2018 at 17:33:52 UTC, 12345swordy wrote: On Tuesday, 27 February 2018 at 15:52:15 UTC, Andrei Alexandrescu wrote: https://isocpp.org/blog/2018/02/new-cpp-foundation-developer-survey-lite-2018-02 Andrei I have submitted, already. My major complaints boils down to the

Zig talk on youtube (mentions D briefly)

2018-04-15 Thread Mark via Digitalmars-d
There was a talk recently by the creator of the Zig language [1]. Zig which was mentioned on the forums a few times. The creator comes down really hard on languages with hidden memory allocations. He emphasizes correct handling of memory errors, particularly allocation fails. D is mentioned

Re: __has_side_effects

2018-04-01 Thread Mark via Digitalmars-d
On Saturday, 31 March 2018 at 20:44:13 UTC, Andrei Alexandrescu wrote: Yah, only strongly pure functions would qualify. Indeed that's easy for the compiler to figure - so I'm thinking pragma(isStronglyPure, expression) would be easy to define. What would be some good uses of this? Andrei

Can anybody install DDT on Eclipse Neon or Mars?

2016-06-18 Thread Mark via Digitalmars-d-learn
I've spent may hours trying to do this in OSX. Everything goes fine from the marketplace window...until I restart Eclipse and find no files have been added? Any words of consolation or advice will be greatly appreciated. Desperately, Mark

Re: Testing in the D Standard Library

2017-01-22 Thread Mark via Digitalmars-d-announce
On Friday, 20 January 2017 at 13:35:40 UTC, Mike Parker wrote: Jack Stouffer details how unit testing, code review, and code coverage are handled in the development and maintenance of Phobos. Thanks, Jack! Blog: https://dlang.org/blog/2017/01/20/testing-in-the-d-standard-library/ Reddit:

Re: Getters/setters generator

2017-01-19 Thread Mark via Digitalmars-d-announce
On Wednesday, 18 January 2017 at 21:57:42 UTC, Andrei Alexandrescu wrote: On 1/18/17 5:29 PM, Mark wrote: I see. Is there a way to call invariant() of a class/struct directly? That would obviate the need for a particular predicate (copy the class state, run the setter, check if invariants are

Re: Getters/setters generator

2017-01-17 Thread Mark via Digitalmars-d-announce
On Tuesday, 17 January 2017 at 09:17:56 UTC, Andrei Alexandrescu wrote: On 1/17/17 9:32 AM, Eugene Wissner wrote: Ah, well thanks. I don't think it makes much sense since it would be easier to write a complete setter if the user needs extra checks. Accessors are there only for the generation

Re: Getters/setters generator

2017-01-18 Thread Mark via Digitalmars-d-announce
On Tuesday, 17 January 2017 at 15:59:26 UTC, Andrei Alexandrescu wrote: On 1/17/17 12:08 PM, Mark wrote: On Tuesday, 17 January 2017 at 09:17:56 UTC, Andrei Alexandrescu wrote: On 1/17/17 9:32 AM, Eugene Wissner wrote: Ah, well thanks. I don't think it makes much sense since it would be

Re: Is TDPL an accurate description of the D language today?

2016-09-28 Thread Mark via Digitalmars-d-learn
OK. Thanks, Steve.

Is TDPL an accurate description of the D language today?

2016-09-27 Thread Mark via Digitalmars-d-learn
I've been going through Andrei's excellent book and I noticed that the latest printing is from 2010. Since D is still a very young language I can imagine it changing quite a bit within six years. So I wonder if there are any major inconsistincies between the current state of the language and

New to D

2016-10-21 Thread Mark via Digitalmars-d-learn
Hello, Im a 3rd year Comp Sci student in Edmonton Alberta, Canada. Ive learned how to use C, and dabbled in C++ in school. Im also in a Oop course using Java. I picked up the book The D Programming Language by Alexrei Alexandrescu a few years ago. Lately Im really wanting to get into D, as

Re: New to D

2016-10-21 Thread Mark via Digitalmars-d-learn
Thanks for the fast reply. That did work. But now the error is on the line: dictionary[word] = newId; I changed the value to 10, still errors. ?? everything else is as before. thanks.

Re: Please say hello to our third team member: Razvan Nitu

2016-10-20 Thread Mark via Digitalmars-d-announce
Welcome, Razvan! On Tuesday, 18 October 2016 at 18:21:31 UTC, Andrei Alexandrescu wrote: Hi everyone, Please join me in welcoming Razvan Nitu to our fledgling team of Romanian graduate students. Razvan has already some solid industrial experience and has a broad area of interests such as

  1   2   3   >