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

2017-06-21 Thread H. S. Teoh via Digitalmars-d
On Thu, Jun 22, 2017 at 05:46:06AM +, MysticZach via Digitalmars-d wrote: [...] > As far as syntax subtrees not belonging to their parent, I can see > where the cognitive dissonance comes from. But it just doesn't seem > that bad to me, since contracts are always executed as if they are > seque

Re: What is your favorite D feature?

2017-06-21 Thread Ecstatic Coder via Digitalmars-d
Lack of verbosity. Clear concise code, thanks to the automatic initialization of class members, native strings/arrays/maps/slices, UFCS, declaration-order independence, etc. class TOTO { bool IsCool; int Age; TUTU[] Tutus; TOTO[string] Totos; void Foo( TUTU tutu ) {

Re: gdc is in

2017-06-21 Thread Johan Engelen via Digitalmars-d
On Wednesday, 21 June 2017 at 15:11:39 UTC, Joakim wrote: the gcc tree: https://gcc.gnu.org/ml/gcc/2017-06/msg00111.html Congratulations to Iain and the gdc team. :) Congratulations! Great achievement. - Johan

Re: dmd -betterC

2017-06-21 Thread Laeeth Isharc via Digitalmars-d
On Tuesday, 20 June 2017 at 01:51:26 UTC, Walter Bright wrote: Is getting a whole lot better: https://github.com/dlang/dmd/pull/6918 You can now build D executables that do not link in anything from Phobos - only from the standard C library. Very cool - this plus Adam's changes. The next lo

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

2017-06-21 Thread MysticZach via Digitalmars-d
On Wednesday, 21 June 2017 at 19:34:53 UTC, H. S. Teoh wrote: This is a sticky point about D's current DbC implementation that myself and several others feel is a design flaw. In particular, that in-contracts are executed as part of the *callee*, when the intent of DbC is really that it is the

Re: What is your favorite D feature?

2017-06-21 Thread Paulo Pinto via Digitalmars-d
On Thursday, 22 June 2017 at 00:48:25 UTC, Seb wrote: Hi, I am currently trying to modernize the D code example roulette on the dlang.org front page [1]. Hence, I would love to hear about your favorite feature(s) in D. Ideas: - favorite language construct - favorite code sample - "only possib

Re: What is your favorite D feature?

2017-06-21 Thread bauss via Digitalmars-d
On Thursday, 22 June 2017 at 00:48:25 UTC, Seb wrote: Hi, I am currently trying to modernize the D code example roulette on the dlang.org front page [1]. Hence, I would love to hear about your favorite feature(s) in D. Ideas: - favorite language construct - favorite code sample - "only possib

Re: Windows integration [was: Re: There really needs to be some moderation]

2017-06-21 Thread Brad Anderson via Digitalmars-d
On Sunday, 18 June 2017 at 21:47:48 UTC, Laeeth Isharc wrote: [snip] Windows has been a bit of a pain, but mostly from the native code library side. It should be easy to install google snappy right? On Linux it is. On Windows, not so much... And that's just one library. vcpkg is making i

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

2017-06-21 Thread MysticZach via Digitalmars-d
On Thursday, 22 June 2017 at 00:27:38 UTC, Timon Gehr wrote: On 21.06.2017 19:39, MysticZach wrote: My counterargument to that is that it's possible that the cognitive dissonance only occurs because of what people are used to, rather than what is inherent to the syntax. This is a purely philo

Re: What is your favorite D feature?

2017-06-21 Thread ketmar via Digitalmars-d
"friendship ".writeln = ((_) => "is"~_)(" magic"); "friendship ".writeln = ((_) => "is"~_)(" magic"); just couldn't resist the temptaion, sorry.

Re: gdc is in

2017-06-21 Thread ANtlord via Digitalmars-d
On Wednesday, 21 June 2017 at 15:11:39 UTC, Joakim wrote: the gcc tree: https://gcc.gnu.org/ml/gcc/2017-06/msg00111.html Congratulations to Iain and the gdc team. :) I join in the congratulations. Iain, you rock!

Re: How can I use ldc2 and link to full runtime on arm with no OS

2017-06-21 Thread Mike via Digitalmars-d
On Wednesday, 21 June 2017 at 22:11:04 UTC, David Nadlinger wrote: This way, you'll end up having to port all of druntime to your target, though, only to then throw away considerable amounts of work that went into the parts you don't want to use. You are correct, but if you omit certain parts

Re: What is your favorite D feature?

2017-06-21 Thread Jon Degenhardt via Digitalmars-d
On Thursday, 22 June 2017 at 00:48:25 UTC, Seb wrote: Hi, I am currently trying to modernize the D code example roulette on the dlang.org front page [1]. Hence, I would love to hear about your favorite feature(s) in D. A couple more: - std.conv.to - Safe, convenient conversions that just wor

Re: What is your favorite D feature?

2017-06-21 Thread Seb via Digitalmars-d
On Thursday, 22 June 2017 at 01:42:10 UTC, Brad Anderson wrote: A very simple vibe app could be added using dub's single-file package format. Hmm this is a great idea, but it wouldn't be "runnable" on the web. Here's a PR for discussion: https://github.com/dlang/dlang.org/pull/1763 Somethi

Re: What is your favorite D feature?

2017-06-21 Thread Seb via Digitalmars-d
On Thursday, 22 June 2017 at 01:13:43 UTC, H. S. Teoh wrote: Slices! And preferably in an example where it beats C performance by not needing to duplicate strings everywhere. There's one in the queue, feel free to vote for or destroy it: https://github.com/dlang/dlang.org/pull/1756 Built-in

Re: dmd -betterC

2017-06-21 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 21 June 2017 at 15:37:03 UTC, Adam D. Ruppe wrote: we have a *working* "better C". I applied my two PRs along with Walter's patch and now have runtimeless D actually working. Take a look at this: // dmd still assumes these are present // and they are in the C lib, but n

Re: dmd -betterC

2017-06-21 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 21 June 2017 at 20:11:25 UTC, Walter Bright wrote: All I did was make them do what the host C compiler does. I propose that the reason the host C compiler does it is because it is a useful behavior. If these little strings actually are too large, you can easily suppress it by

Re: What is your favorite D feature?

2017-06-21 Thread Jon Degenhardt via Digitalmars-d
On Thursday, 22 June 2017 at 01:13:43 UTC, H. S. Teoh wrote: On Thu, Jun 22, 2017 at 12:48:25AM +, Seb via Digitalmars-d wrote: [snip] Slices! And preferably in an example where it beats C performance by not needing to duplicate strings everywhere. ... For slices the example in blog p

Re: What is your favorite D feature?

2017-06-21 Thread Eugene Wissner via Digitalmars-d
On Thursday, 22 June 2017 at 00:48:25 UTC, Seb wrote: Hi, I am currently trying to modernize the D code example roulette on the dlang.org front page [1]. Hence, I would love to hear about your favorite feature(s) in D. Ideas: - favorite language construct - favorite code sample - "only possib

Re: What is your favorite D feature?

2017-06-21 Thread Brad Anderson via Digitalmars-d
On Thursday, 22 June 2017 at 00:48:25 UTC, Seb wrote: Hi, I am currently trying to modernize the D code example roulette on the dlang.org front page [1]. Hence, I would love to hear about your favorite feature(s) in D. Ideas: - favorite language construct - favorite code sample - "only possib

Re: What is your favorite D feature?

2017-06-21 Thread H. S. Teoh via Digitalmars-d
On Thu, Jun 22, 2017 at 12:48:25AM +, Seb via Digitalmars-d wrote: > Hi, > > I am currently trying to modernize the D code example roulette on the > dlang.org front page [1]. Hence, I would love to hear about your > favorite feature(s) in D. > > Ideas: > - favorite language construct > - favor

Re: What is your favorite D feature?

2017-06-21 Thread Adam D. Ruppe via Digitalmars-d
My fav is that familiar code just works.

Re: What is your favorite D feature?

2017-06-21 Thread Mike via Digitalmars-d
On Thursday, 22 June 2017 at 00:48:25 UTC, Seb wrote: I would love to hear about your favorite feature(s) in D. Beginning with most favorite: - CTFE - static if - If you don't consider that part of CTFE - Template Mixins - Templates - Pretty much goes along with the top 2 - String Mixins

What is your favorite D feature?

2017-06-21 Thread Seb via Digitalmars-d
Hi, I am currently trying to modernize the D code example roulette on the dlang.org front page [1]. Hence, I would love to hear about your favorite feature(s) in D. Ideas: - favorite language construct - favorite code sample - "only possible in D" Before you ask, yes - I want to add a couple

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

2017-06-21 Thread Timon Gehr via Digitalmars-d
On 21.06.2017 19:39, MysticZach wrote: On Wednesday, 21 June 2017 at 15:18:21 UTC, Timon Gehr wrote: On 21.06.2017 02:51, MysticZach wrote: I think people could get used to the cognitive dissonance. That's really not what D is about. My counterargument to that is that it's possible that th

Re: dmd -betterC

2017-06-21 Thread Walter Bright via Digitalmars-d
On 6/21/2017 9:24 AM, Adam D. Ruppe wrote: If you want bugzilla entries It isn't a question of me "wanting" bugzilla entries or me "liking" bugzilla (as another member recently put it). It's our process so that issues can be logged, tracked, changelogs compiled, etc. Please follow our process

Re: Unittests and extern(C)

2017-06-21 Thread Meta via Digitalmars-d
On Wednesday, 21 June 2017 at 22:19:48 UTC, H. S. Teoh wrote: Finally, the moral of the story is that had I written unittests for compile(), I would have caught this bug much earlier than I did. Also, DRY. Writing the same code more than once is always a recipe for disaster. It's bitten me so

Unittests and extern(C)

2017-06-21 Thread H. S. Teoh via Digitalmars-d
Never thought to mention these two things in the same subject line? Haha, well today I finally have reason to. This post is about an obscure bug I encountered today in one of my projects, with a moral lesson on why you really, really, ought to be using unittest blocks everywhere. First, a bit of a

Re: How can I use ldc2 and link to full runtime on arm with no OS

2017-06-21 Thread David Nadlinger via Digitalmars-d
On Wednesday, 21 June 2017 at 16:10:41 UTC, Dan Walmsley wrote: My idea is to build the whole thing, see what the code size and performance is, and then one by one reduce things down as needed. Starting from nothing so far has been a bit of a none starter! This way, you'll end up having to p

Re: gdc is in

2017-06-21 Thread Jonathan Marler via Digitalmars-d
On Wednesday, 21 June 2017 at 15:11:39 UTC, Joakim wrote: the gcc tree: https://gcc.gnu.org/ml/gcc/2017-06/msg00111.html Congratulations to Iain and the gdc team. :) I found out because it's on the front page of HN right now, where commenters are asking questions about D. Terrific news, con

Re: gdc is in

2017-06-21 Thread Wulfklaue via Digitalmars-d
On Wednesday, 21 June 2017 at 15:11:39 UTC, Joakim wrote: the gcc tree: https://gcc.gnu.org/ml/gcc/2017-06/msg00111.html Congratulations to Iain and the gdc team. :) Nice job Iain ... Especially after 6 years pushing for it and the whole rewrite.

Re: gdc is in

2017-06-21 Thread Eugene Wissner via Digitalmars-d
On Wednesday, 21 June 2017 at 15:11:39 UTC, Joakim wrote: the gcc tree: https://gcc.gnu.org/ml/gcc/2017-06/msg00111.html Congratulations to Iain and the gdc team. :) I found out because it's on the front page of HN right now, where commenters are asking questions about D. Many thanks and co

Re: gdc is in

2017-06-21 Thread Walter Bright via Digitalmars-d
On 6/21/2017 8:11 AM, Joakim wrote: the gcc tree: https://gcc.gnu.org/ml/gcc/2017-06/msg00111.html Congratulations to Iain and the gdc team. :) I found out because it's on the front page of HN right now, where commenters are asking questions about D. Pretty dazz! Made my week!

Re: dmd -betterC

2017-06-21 Thread Walter Bright via Digitalmars-d
On 6/21/2017 6:21 AM, Adam D. Ruppe wrote: If you are seriously concerned about the bytes, why include them in -betterC? All I did was make them do what the host C compiler does.

Re: D needs to get its shit together!

2017-06-21 Thread jmh530 via Digitalmars-d
On Wednesday, 21 June 2017 at 18:35:33 UTC, data pulverizer wrote: On Monday, 19 June 2017 at 12:46:19 UTC, jmh530 wrote: I just hope that we can get some operator overloading so that I don't have to write mtimes all over the place. My ideal would be a DIP that adds the option to overload opBin

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

2017-06-21 Thread H. S. Teoh via Digitalmars-d
On Wed, Jun 21, 2017 at 07:18:18PM +, MysticZach via Digitalmars-d wrote: > [...] Or are all contracts basically just fancy sugar for asserts at > the beginning and end of a function body? [...] This is a sticky point about D's current DbC implementation that myself and several others feel is

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

2017-06-21 Thread MysticZach via Digitalmars-d
On Wednesday, 21 June 2017 at 18:04:07 UTC, Moritz Maxeiner wrote: On Wednesday, 21 June 2017 at 17:55:05 UTC, MysticZach wrote: Question: If `assert` itself allowed a user-defined hook, what would the remaining justification be for decoupling `in` and `out` contracts from the `assert` logic?

Re: D needs to get its shit together!

2017-06-21 Thread data pulverizer via Digitalmars-d
On Monday, 19 June 2017 at 12:46:19 UTC, jmh530 wrote: I just hope that we can get some operator overloading so that I don't have to write mtimes all over the place. My ideal would be a DIP that adds the option to overload opBinary for \, .+, .-, .*, ./. Lubeck could use \ for inverse, .+ etc.

Re: gdc is in

2017-06-21 Thread Paulo Pinto via Digitalmars-d
On Wednesday, 21 June 2017 at 15:11:39 UTC, Joakim wrote: the gcc tree: https://gcc.gnu.org/ml/gcc/2017-06/msg00111.html Congratulations to Iain and the gdc team. :) I found out because it's on the front page of HN right now, where commenters are asking questions about D. As already mention

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

2017-06-21 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 21 June 2017 at 17:55:05 UTC, MysticZach wrote: This would be added flexibility, rather than a one-size-fits-all solution. So the word "universal" is a little deceptive. The options could also include a user-defined hook for assert. Question: If `assert` itself allowed a user-

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

2017-06-21 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 21 June 2017 at 17:38:02 UTC, Moritz Maxeiner wrote: Well, for me it would be this: - The compact syntax with `in (cond)` and `out (ident)(cond)` - Don't lower those contracts directly to any fixed implementation; lower them to a template (similar to what I posted) that you stick

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

2017-06-21 Thread MysticZach via Digitalmars-d
On Wednesday, 21 June 2017 at 17:38:02 UTC, Moritz Maxeiner wrote: But another option is simply to upgrade `assert` to make sure it offers what everyone wants. That would be really cool, but I doubt it will be feasible here. I think that in this case it will more likely end up with everyone h

Re: gdc is in

2017-06-21 Thread kinke via Digitalmars-d
On Wednesday, 21 June 2017 at 15:11:39 UTC, Joakim wrote: Congratulations to Iain and the gdc team. :) +1. Awesome!

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

2017-06-21 Thread MysticZach via Digitalmars-d
On Wednesday, 21 June 2017 at 15:18:21 UTC, Timon Gehr wrote: On 21.06.2017 02:51, MysticZach wrote: I think people could get used to the cognitive dissonance. That's really not what D is about. My counterargument to that is that it's possible that the cognitive dissonance only occurs beca

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

2017-06-21 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 21 June 2017 at 16:52:24 UTC, MysticZach wrote: Well I'd be just as happy expanding the design limits of the language, i.e. `assert`, if that were a better option. The issue you raise is just how different are `in` and `out` contracts from regular `assert` contracts. Well, a c

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

2017-06-21 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 21 June 2017 at 16:23:53 UTC, MysticZach wrote: void foo() { int bar(Args...)(Args args) if (Args.length > 2) in (args[0] != 0) in (args[1] > 1) out /*whoops, forgot `( )`*/(result) { ... } do { ... } while (true); // Error: while statement cannot c

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

2017-06-21 Thread MysticZach via Digitalmars-d
On Wednesday, 21 June 2017 at 14:49:09 UTC, Moritz Maxeiner wrote: On Wednesday, 21 June 2017 at 13:24:24 UTC, MysticZach wrote: So weird how this discussion is happening in parallel with this other discussion :-) : http://forum.dlang.org/post/rkdpuuggltowhqmcm...@forum.dlang.org It is, th

Re: gdc is in

2017-06-21 Thread Meta via Digitalmars-d
On Wednesday, 21 June 2017 at 15:11:39 UTC, Joakim wrote: the gcc tree: https://gcc.gnu.org/ml/gcc/2017-06/msg00111.html Congratulations to Iain and the gdc team. :) I found out because it's on the front page of HN right now, where commenters are asking questions about D. Congratulations in

Re: dmd -betterC

2017-06-21 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 21 June 2017 at 15:37:03 UTC, Adam D. Ruppe wrote: Then, the last thing from my complaint list (which I wrote in TWID and emailed to you back October) is that struct destructors don't work https://github.com/dlang/dmd/pull/6923 If you want bugzilla entries you can make them

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

2017-06-21 Thread MysticZach via Digitalmars-d
On Wednesday, 21 June 2017 at 14:22:52 UTC, Moritz Maxeiner wrote: If you do accidentally forget the extra set of parens on the `out` contract, you would get "Error: `do` expected before function body after a bracketed `out` contract" at the end of the function. (If, however, it a happens to

Re: How can I use ldc2 and link to full runtime on arm with no OS

2017-06-21 Thread Dan Walmsley via Digitalmars-d
On Wednesday, 21 June 2017 at 15:45:32 UTC, David Nadlinger wrote: On Wednesday, 21 June 2017 at 14:53:04 UTC, Dan Walmsley wrote: when trying to compile I'm getting lots of errors like this one: C:\dev\repos\druntime\src\gc\impl\manual\gc.d(28): Error: module config is in file 'gc\config.d'

Re: gdc is in

2017-06-21 Thread Johannes Pfau via Digitalmars-d
Am Wed, 21 Jun 2017 15:44:08 + schrieb Nordlöw : > On Wednesday, 21 June 2017 at 15:11:39 UTC, Joakim wrote: > > the gcc tree: > > > > https://gcc.gnu.org/ml/gcc/2017-06/msg00111.html > > > > Congratulations to Iain and the gdc team. :) > > > > I found out because it's on the front page of HN

Re: gdc is in

2017-06-21 Thread Johannes Pfau via Digitalmars-d
Am Wed, 21 Jun 2017 15:11:39 + schrieb Joakim : > the gcc tree: > > https://gcc.gnu.org/ml/gcc/2017-06/msg00111.html > > Congratulations to Iain and the gdc team. :) > > I found out because it's on the front page of HN right now, where > commenters are asking questions about D. Awesome! A

Re: How can I use ldc2 and link to full runtime on arm with no OS

2017-06-21 Thread David Nadlinger via Digitalmars-d
On Wednesday, 21 June 2017 at 14:53:04 UTC, Dan Walmsley wrote: when trying to compile I'm getting lots of errors like this one: C:\dev\repos\druntime\src\gc\impl\manual\gc.d(28): Error: module config is in file 'gc\config.d' which cannot be read import path[0] = C:\Users\danw\AvalonStudio\A

Re: gdc is in

2017-06-21 Thread Nordlöw via Digitalmars-d
On Wednesday, 21 June 2017 at 15:11:39 UTC, Joakim wrote: Congratulations to Iain and the gdc team. :) BTW: Thanks, Ian!

Re: gdc is in

2017-06-21 Thread Nordlöw via Digitalmars-d
On Wednesday, 21 June 2017 at 15:11:39 UTC, Joakim wrote: the gcc tree: https://gcc.gnu.org/ml/gcc/2017-06/msg00111.html Congratulations to Iain and the gdc team. :) I found out because it's on the front page of HN right now, where commenters are asking questions about D. Which frontend ver

Re: gdc is in

2017-06-21 Thread Kapps via Digitalmars-d
On Wednesday, 21 June 2017 at 15:11:39 UTC, Joakim wrote: the gcc tree: https://gcc.gnu.org/ml/gcc/2017-06/msg00111.html Congratulations to Iain and the gdc team. :) I found out because it's on the front page of HN right now, where commenters are asking questions about D. Awesome, congratul

Re: dmd -betterC

2017-06-21 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 20 June 2017 at 04:45:21 UTC, Walter Bright wrote: Please file bugzilla issues for remaining problems. I'll do you one better: https://github.com/dlang/dmd/pull/6922 It is a trivial patch to hack fix the big issue I have. Then the real fix is what Lucia is working on, based on her

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

2017-06-21 Thread Timon Gehr via Digitalmars-d
On 21.06.2017 02:51, MysticZach wrote: I think people could get used to the cognitive dissonance. That's really not what D is about. I've already gotten used to it just by writing this DIP. I think it is likely that you are an outlier. If such an alternative checking system is utilized,

Re: gdc is in

2017-06-21 Thread Mike Parker via Digitalmars-d
On Wednesday, 21 June 2017 at 15:11:39 UTC, Joakim wrote: the gcc tree: https://gcc.gnu.org/ml/gcc/2017-06/msg00111.html Congratulations to Iain and the gdc team. :) I found out because it's on the front page of HN right now, where commenters are asking questions about D. It's on reddit, to

gdc is in

2017-06-21 Thread Joakim via Digitalmars-d
the gcc tree: https://gcc.gnu.org/ml/gcc/2017-06/msg00111.html Congratulations to Iain and the gdc team. :) I found out because it's on the front page of HN right now, where commenters are asking questions about D.

Re: How can I use ldc2 and link to full runtime on arm with no OS

2017-06-21 Thread Dan Walmsley via Digitalmars-d
On Wednesday, 21 June 2017 at 14:53:04 UTC, Dan Walmsley wrote: On Tuesday, 20 June 2017 at 19:44:46 UTC, kinke wrote: [...] when trying to compile I'm getting lots of errors like this one: C:\dev\repos\druntime\src\gc\impl\manual\gc.d(28): Error: module config is in file 'gc\config.d' which

Re: How can I use ldc2 and link to full runtime on arm with no OS

2017-06-21 Thread Dan Walmsley via Digitalmars-d
On Tuesday, 20 June 2017 at 19:44:46 UTC, kinke wrote: On Tuesday, 20 June 2017 at 17:52:59 UTC, Dan Walmsley wrote: How do I link in the run time and gc, etc? In your case, you firstly need to cross-compile druntime to your target. This means compiling most files in the src subdirectory of

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

2017-06-21 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 21 June 2017 at 13:24:24 UTC, MysticZach wrote: So weird how this discussion is happening in parallel with this other discussion :-) : http://forum.dlang.org/post/rkdpuuggltowhqmcm...@forum.dlang.org It is, though as I have pointer out over there, I would really like to decou

Re: Replacing Make for the DMD build

2017-06-21 Thread jmh530 via Digitalmars-d
On Wednesday, 21 June 2017 at 14:11:58 UTC, Atila Neves wrote: I'm not the best at documentation. Funnily enough, I made an effort with reggae, which might just show how bad I am at this. Ha, well maybe ask one of the users then? There's not much to compare/constrast - dub is a package ma

Re: dmd -betterC

2017-06-21 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 21 June 2017 at 13:53:02 UTC, MysticZach wrote: On Wednesday, 21 June 2017 at 10:51:39 UTC, ketmar wrote: there, of course, *IS* The difference. besides the aesthetical one (seeing failed condition immediately "clicks" in your head, and generic "assertion failed" message is only

Re: dmd -betterC

2017-06-21 Thread Kagamin via Digitalmars-d
On Wednesday, 21 June 2017 at 14:00:33 UTC, ketmar wrote: i did in aliced: just added printing of `assert` condition. that's all. no variable dumps, no other things -- just `.toChar()` the condition, and print it. and you know what? it is *surprisingly* effective, eats *no* additional compiler

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

2017-06-21 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 21 June 2017 at 13:11:10 UTC, MysticZach wrote: [...] My fix would be to require two sets of parentheses for the new conditional, like so: OutStatement: ... // new version out ( Identifier ) ( IfCondition ) out ( ) ( IfCondition ) This makes the grammar unambiguous

Re: Replacing Make for the DMD build

2017-06-21 Thread Atila Neves via Digitalmars-d
On Tuesday, 20 June 2017 at 19:38:14 UTC, jmh530 wrote: On Tuesday, 20 June 2017 at 19:06:05 UTC, Nick Sabalausky (Abscissa) wrote: On 06/19/2017 04:06 AM, Russel Winder via Digitalmars-d wrote: Reggae is D's pitch in the CMake and Meson class of meta-build tools. Why aren't all the D compil

Re: dmd -betterC

2017-06-21 Thread ketmar via Digitalmars-d
p.s.: `assert` is not there to debug your code, it is there to *guard* your code. if it is not clear what is wrong from printing ONLY failed condition (without variable values), then you have to debug it "for real".

Re: dmd -betterC

2017-06-21 Thread ketmar via Digitalmars-d
MysticZach wrote: On Wednesday, 21 June 2017 at 10:51:39 UTC, ketmar wrote: there, of course, *IS* The difference. besides the aesthetical one (seeing failed condition immediately "clicks" in your head, and generic "assertion failed" message is only frustrating), there may be the case when so

Re: dmd -betterC

2017-06-21 Thread MysticZach via Digitalmars-d
On Wednesday, 21 June 2017 at 10:51:39 UTC, ketmar wrote: there, of course, *IS* The difference. besides the aesthetical one (seeing failed condition immediately "clicks" in your head, and generic "assertion failed" message is only frustrating), there may be the case when source code changed si

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

2017-06-21 Thread MysticZach via Digitalmars-d
On Wednesday, 21 June 2017 at 09:10:33 UTC, MysticZach wrote: On Wednesday, 21 June 2017 at 05:19:26 UTC, H. S. Teoh wrote: Umm... I think we're not quite on the same page here. What *else* are people supposed to use inside their contracts besides the built-in assert?? I believe `assert` wou

Re: dmd -betterC

2017-06-21 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 20 June 2017 at 23:43:47 UTC, Walter Bright wrote: Those strings eat up space and are of pretty marginal utility. Don't want to make assert's so bloatsome that people are discouraged from using them. Ah, so that's why you exclude the strings in -betterC whose main reason for exist

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

2017-06-21 Thread MysticZach via Digitalmars-d
On Wednesday, 21 June 2017 at 12:05:55 UTC, Moritz Maxeiner wrote: On Wednesday, 21 June 2017 at 09:53:40 UTC, meppl wrote: On Wednesday, 21 June 2017 at 09:27:20 UTC, MysticZach wrote: On Wednesday, 21 June 2017 at 08:15:34 UTC, MysticZach wrote: On Wednesday, 21 June 2017 at 04:16:22 UTC, Mo

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

2017-06-21 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 21 June 2017 at 12:43:46 UTC, meppl wrote: yeah, i was probably not thinking too carefully about it. My idea was to keep the code readable, if the contracts are long. but as long as the "do" must appear behind a '}', everything is still fine, more or less. both are readable, b

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

2017-06-21 Thread meppl via Digitalmars-d
On Wednesday, 21 June 2017 at 12:05:55 UTC, Moritz Maxeiner wrote: On Wednesday, 21 June 2017 at 09:53:40 UTC, meppl wrote: On Wednesday, 21 June 2017 at 09:27:20 UTC, MysticZach wrote: On Wednesday, 21 June 2017 at 08:15:34 UTC, MysticZach wrote: On Wednesday, 21 June 2017 at 04:16:22 UTC, Mor

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

2017-06-21 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 21 June 2017 at 09:53:40 UTC, meppl wrote: On Wednesday, 21 June 2017 at 09:27:20 UTC, MysticZach wrote: On Wednesday, 21 June 2017 at 08:15:34 UTC, MysticZach wrote: On Wednesday, 21 June 2017 at 04:16:22 UTC, Moritz Maxeiner wrote: int myFunc(Args...)(Args args) if (Args.leng

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

2017-06-21 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 21 June 2017 at 11:31:41 UTC, Moritz Maxeiner wrote: [...] Sorry for double post, please ignore this one.

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

2017-06-21 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 21 June 2017 at 09:10:33 UTC, MysticZach wrote: On Wednesday, 21 June 2017 at 05:19:26 UTC, H. S. Teoh wrote: On Wed, Jun 21, 2017 at 01:06:40AM +, MysticZach via Digitalmars-d wrote: On Tuesday, 20 June 2017 at 21:04:16 UTC, Steven Schveighoffer wrote: > This is much much bet

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

2017-06-21 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 21 June 2017 at 09:10:33 UTC, MysticZach wrote: On Wednesday, 21 June 2017 at 05:19:26 UTC, H. S. Teoh wrote: On Wed, Jun 21, 2017 at 01:06:40AM +, MysticZach via Digitalmars-d wrote: On Tuesday, 20 June 2017 at 21:04:16 UTC, Steven Schveighoffer wrote: > This is much much bet

Re: dmd -betterC

2017-06-21 Thread ketmar via Digitalmars-d
Kagamin wrote: On Wednesday, 21 June 2017 at 06:21:37 UTC, ketmar wrote: but refusing to generate such strings for *all* code They are not useful enough for that, in 99% of cases location of assert is enough to know what's wrong, when it isn't, the string is not going to tell where it went

Re: dmd -betterC

2017-06-21 Thread Kagamin via Digitalmars-d
On Wednesday, 21 June 2017 at 06:21:37 UTC, ketmar wrote: but refusing to generate such strings for *all* code They are not useful enough for that, in 99% of cases location of assert is enough to know what's wrong, when it isn't, the string is not going to tell where it went wrong, so you nee

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

2017-06-21 Thread meppl via Digitalmars-d
On Wednesday, 21 June 2017 at 09:27:20 UTC, MysticZach wrote: On Wednesday, 21 June 2017 at 08:15:34 UTC, MysticZach wrote: On Wednesday, 21 June 2017 at 04:16:22 UTC, Moritz Maxeiner wrote: int myFunc(Args...)(Args args) if (Args.length > 2) in (args[0] != 0) in (args[1] > 1) out (resu

Re: What is the state of Microcontroller support in d?

2017-06-21 Thread Nicholas Wilson via Digitalmars-d
On Wednesday, 21 June 2017 at 09:12:56 UTC, Dan Walmsley wrote: On Wednesday, 21 June 2017 at 08:38:21 UTC, Nicholas Wilson wrote: On Tuesday, 20 June 2017 at 14:12:36 UTC, Dan Walmsley wrote: Firstly who do we need to talk to about the bloat in LDC? I'll be happy to help with the LDC stuff o

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

2017-06-21 Thread MysticZach via Digitalmars-d
On Wednesday, 21 June 2017 at 08:15:34 UTC, MysticZach wrote: On Wednesday, 21 June 2017 at 04:16:22 UTC, Moritz Maxeiner wrote: int myFunc(Args...)(Args args) if (Args.length > 2) in (args[0] != 0) in (args[1] > 1) out (result => result > 0) { ... } --- - in contracts take a parenthesi

Re: What is the state of Microcontroller support in d?

2017-06-21 Thread Dan Walmsley via Digitalmars-d
On Wednesday, 21 June 2017 at 08:38:21 UTC, Nicholas Wilson wrote: On Tuesday, 20 June 2017 at 14:12:36 UTC, Dan Walmsley wrote: Firstly who do we need to talk to about the bloat in LDC? I'll be happy to help with the LDC stuff once I hand in my Honours thesis on the 3rd of July, just ask on

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

2017-06-21 Thread MysticZach via Digitalmars-d
On Wednesday, 21 June 2017 at 05:19:26 UTC, H. S. Teoh wrote: On Wed, Jun 21, 2017 at 01:06:40AM +, MysticZach via Digitalmars-d wrote: On Tuesday, 20 June 2017 at 21:04:16 UTC, Steven Schveighoffer wrote: > This is much much better. The verbosity of contracts isn't > really the brace, it's

Re: What is the state of Microcontroller support in d?

2017-06-21 Thread Mike via Digitalmars-d
On Wednesday, 21 June 2017 at 08:25:35 UTC, Dan Walmsley wrote: Mike, is there an email address I can contact you outside the forum? "slavo"~"5150"~AT_SYMBOL~"yahoo"~PERIOD~"com";

Re: What is the state of Microcontroller support in d?

2017-06-21 Thread Nicholas Wilson via Digitalmars-d
On Tuesday, 20 June 2017 at 14:12:36 UTC, Dan Walmsley wrote: Firstly who do we need to talk to about the bloat in LDC? I'll be happy to help with the LDC stuff once I hand in my Honours thesis on the 3rd of July, just ask on https://gitter.im/ldc-developers/main or send me a message on gitt

Re: What is the state of Microcontroller support in d?

2017-06-21 Thread Dan Walmsley via Digitalmars-d
On Wednesday, 21 June 2017 at 00:50:35 UTC, Mike wrote: On Tuesday, 20 June 2017 at 13:45:31 UTC, Mike wrote: [...] The more I think about this, the more it seems like the best approach. All this time I've been trying to find a way to build just enough runtime code to support the features

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

2017-06-21 Thread MysticZach via Digitalmars-d
On Wednesday, 21 June 2017 at 04:16:22 UTC, Moritz Maxeiner wrote: What *I* need from a DIP that addresses DbC in D (to make it viable for me) is to make the simple case as easy as possible to read while not introducing language inconsistencies. With that in mind I am strongly in favor of the sy

Re: What is the state of Microcontroller support in d?

2017-06-21 Thread Iain Buclaw via Digitalmars-d
On Wednesday, 21 June 2017 at 00:08:24 UTC, Mike wrote: GDC may have fixed the problem recently with [2], but I haven't tested it. Lucia Cojocaru is (was?) also working on addressing the problem by lowering TypeInfo calls in the compiler to templates [3]. I've decoupled the code generati

Re: What is the state of Microcontroller support in d?

2017-06-21 Thread Dan Walmsley via Digitalmars-d
On Wednesday, 21 June 2017 at 00:50:35 UTC, Mike wrote: On Tuesday, 20 June 2017 at 13:45:31 UTC, Mike wrote: [...] The more I think about this, the more it seems like the best approach. All this time I've been trying to find a way to build just enough runtime code to support the features

Re: dmd -betterC

2017-06-21 Thread Walter Bright via Digitalmars-d
On 6/20/2017 11:54 PM, Jacob Carlborg wrote: On 2017-06-20 22:44, Walter Bright wrote: For a C implementation that doesn't support TLS, using it in D with -betterC won't work. I'm thinking more of a C implementation where it *does* work. But perhaps you're not expected to do anything besides