Re: Rather D1 then D2

2018-09-24 Thread Meta via Digitalmars-d
On Monday, 24 September 2018 at 09:19:34 UTC, Chris wrote: On Sunday, 23 September 2018 at 02:05:42 UTC, Jonathan M Davis wrote: With regards to D1 users who are unhappy with D2, I think that it makes some sense to point out that a subset of D2 can be used in a way that's a lot like D1, but

Re: John Regehr on "Use of Assertions"

2018-09-10 Thread Meta via Digitalmars-d
On Monday, 10 September 2018 at 20:25:21 UTC, Jonathan M Davis wrote: I propose: - 'assume': aborts on false condition in debug builds, not checked in release builds, used as optimizer hint; - 'insist': aborts on false condition in debug builds, aborts on false condition in release buil

Re: Small @nogc experience report

2018-09-07 Thread Meta via Digitalmars-d
On Friday, 7 September 2018 at 17:35:12 UTC, Eugene Wissner wrote: On Friday, 7 September 2018 at 17:01:09 UTC, Meta wrote: Semi-unrelated, but I think you should open a bug for this one. I remember Andrei stating before that every function in std.algorithm except for LevehnsteinDistance(?) is

Re: Small @nogc experience report

2018-09-07 Thread Meta via Digitalmars-d
On Friday, 7 September 2018 at 16:44:05 UTC, Peter Alexander wrote: I recently wrote a small program of ~600 lines of code to solve an optimisation puzzle. Profiling showed that GC allocations were using non-trivial CPU, so I decided to try and apply @nogc to remove allocations. This is a small

Re: Messing with betterC and string type.

2018-09-07 Thread Meta via Digitalmars-d
On Friday, 7 September 2018 at 15:57:19 UTC, Adam D. Ruppe wrote: On Friday, 7 September 2018 at 15:48:39 UTC, SrMordred wrote: Yes, but you don't really need this function. Whoa, when was that added?! I don't remember ctors via ufcs being there but indeed, it works on newest dmd. I'm prett

Re: What changes to D would you like to pay for?

2018-09-05 Thread Meta via Digitalmars-d
On Wednesday, 5 September 2018 at 07:32:54 UTC, Simen Kjærås wrote: On Wednesday, 5 September 2018 at 07:00:49 UTC, Joakim wrote: Please answer these two questions if you're using or would like to use D, I have supplied my own answers as an example: 1. What D initiatives would you like to fund

Re: John Regehr on "Use of Assertions"

2018-09-05 Thread Meta via Digitalmars-d
On Wednesday, 5 September 2018 at 10:30:46 UTC, Ola Fosheim Grøstad wrote: On Monday, 3 September 2018 at 16:53:35 UTC, Meta wrote: This battle has been fought over and over, with no movement on either side, so I'll just comment that nobody what John Nails or anyone else says, my personal opini

Re: Static foreach bug?

2018-09-03 Thread Meta via Digitalmars-d
On Monday, 3 September 2018 at 18:03:18 UTC, Soma wrote: Sorry to disrupt your threat, but as a lurking in this forum using D for small projects, and after looking such snippet my first impression is how D is getting polluted and becoming more like Java and C++. "final class", "public final t

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread Meta via Digitalmars-d
On Monday, 3 September 2018 at 14:26:46 UTC, Laeeth Isharc wrote: I just spoke with Dicebot about work stuff. He incidentally mentioned what I said before based on my impressions. The people doing work with a language have better things to do than spend a lot of time on forums. And I think i

Re: John Regehr on "Use of Assertions"

2018-09-03 Thread Meta via Digitalmars-d
On Saturday, 1 September 2018 at 20:15:15 UTC, Walter Bright wrote: https://blog.regehr.org/archives/1091 As usual, John nails it in a particularly well-written essay. "ASSERT(expr) Asserts that an expression is true. The expression may or may not be evaluated. If the expression is true, exec

Re: [OT] "I like writing in D" - Hans Zimmer

2018-08-26 Thread Meta via Digitalmars-d
On Sunday, 26 August 2018 at 11:46:17 UTC, Olivier Pisano wrote: On Wednesday, 22 August 2018 at 22:51:58 UTC, Piotrek wrote: You may already know that from youtube. It seems D starts getting traction even among musicians: https://www.youtube.com/watch?v=yCX1Ze3OcKo&feature=youtu.be&t=64 That

Re: Dicebot on leaving D: It is anarchy driven development in all its glory.

2018-08-24 Thread Meta via Digitalmars-d
On Friday, 24 August 2018 at 21:53:18 UTC, H. S. Teoh wrote: I think it's clear by now that most of D's woes are not really technical in nature, but managerial. Agreed. I'm not sure how to improve this situation, since I'm no manager type either. Money is the only feasible solution IMO. How

Re: Dicebot on leaving D: It is anarchy driven development in all its glory.

2018-08-24 Thread Meta via Digitalmars-d
On Friday, 24 August 2018 at 21:43:45 UTC, Steven Schveighoffer wrote: According to this comment: https://github.com/dlang/phobos/pull/5291#issuecomment-360929553 There was no way to get a deprecation to work. When we can't get a deprecation to work, we face a hard decision -- actually break

Re: Dicebot on leaving D: It is anarchy driven development in all its glory.

2018-08-24 Thread Meta via Digitalmars-d
On Friday, 24 August 2018 at 17:12:53 UTC, H. S. Teoh wrote: I got bitten by this just yesterday. Update dmd git master, update vibe.d git master, now my vibe.d project doesn't compile anymore due to some silly string.d error somewhere in one of vibe.d's dependencies. :-/ While we're airin

Re: Whence came UFCS?

2018-07-27 Thread Meta via Digitalmars-d
On Friday, 27 July 2018 at 03:41:29 UTC, Sameer Pradhan wrote: During our Boston D Meetup today, we went through and deconstructed Walter's wonderfully elegant blog post from 2012 called "Component Programming in D" http://www.drdobbs.com/article/print?articleId=240008321&siteSectionName=archi

Re: Copy Constructor DIP

2018-07-13 Thread Meta via Digitalmars-d
On Friday, 13 July 2018 at 21:49:57 UTC, rikki cattermole wrote: On 14/07/2018 9:28 AM, Manu wrote: I've already contributed other points to this DIP in the way you describe. This one however is very strange, and I'm surprised you can find the hand-wavy introduction of a new attribute without a

Re: Guido van Rossum has resigned

2018-07-12 Thread Meta via Digitalmars-d
On Thursday, 12 July 2018 at 21:16:02 UTC, Walter Bright wrote: as Python's BDFL. https://mail.python.org/pipermail/python-committers/2018-July/005664.html I looked up PEP 572 and... *this* is what people are up in arms about? Assignment in expressions, which works fine the majority of the t

Re: Copy Constructor DIP

2018-07-12 Thread Meta via Digitalmars-d
On Friday, 13 July 2018 at 02:32:59 UTC, Manu wrote: Seriously, if I was making this proposal to you, and you were in my position... there is no way in hell that you'd allow any of us to slip something so substantial by like that with the wave of a hand. This DIP depends on @implicit. How can y

Re: D community's view on syntactic sugar

2018-06-30 Thread Meta via Digitalmars-d
On Saturday, 30 June 2018 at 09:34:30 UTC, Dmitry Olshansky wrote: Okay. I see that you see. I “meet” a guy, you know I admire that he _somehow_ made an HTTP Application server that is faster then let’s pick good stuff... Nginx Plus with tuning by Igor himeself (before sweat too mich like

Re: tuple of delegates requires explicit type

2018-06-20 Thread Meta via Digitalmars-d
On Wednesday, 20 June 2018 at 11:43:52 UTC, DigitalDesigns wrote: alias f = void delegate(); Tuple!(f)[] fs; fs ~= tuple(() { }); fails but fs ~= Tuple!(f)(() { }); passes. in tuple, it is seeing the lambda as void and thinks I'm trying to append a tuple of void. I don't see why the compiler

Re: D community's view on syntactic sugar

2018-06-16 Thread Meta via Digitalmars-d
On Saturday, 16 June 2018 at 18:49:43 UTC, Steven Schveighoffer wrote: On 6/15/18 8:53 PM, Seb wrote: On Saturday, 16 June 2018 at 00:32:24 UTC, H. S. Teoh wrote: On Sat, Jun 16, 2018 at 12:20:35AM +, Seb via Digitalmars-d wrote: On Friday, 15 June 2018 at 23:04:40 UTC, Sjoerd Nijboer wrot

Re: import std.traits. std.string;

2018-06-15 Thread Meta via Digitalmars-d
On Saturday, 16 June 2018 at 00:24:42 UTC, DigitalDesigns wrote: space is ignored! Seems like a bug std . traits . std . string is valid? Like most C-family languages, D is a freeform language[1]. Funnily enough, I don't think this is explicitly stated in the D spec (at least not that I could

Re: D community's view on syntactic sugar

2018-06-15 Thread Meta via Digitalmars-d
On Saturday, 16 June 2018 at 05:48:26 UTC, Nick Sabalausky (Abscissa) wrote: Everyone here is probably going to be different (D programmers are a varied bunch), but for me, I absolutely love syntax sugar. And I very much miss the earlier days when D was all about the sugar. Funny that you men

Re: stride in slices

2018-06-04 Thread Meta via Digitalmars-d
On Monday, 4 June 2018 at 23:08:17 UTC, Ethan wrote: On Monday, 4 June 2018 at 18:11:47 UTC, Steven Schveighoffer wrote: BTW, do you have cross-module inlining on? Just to drive this point home. https://run.dlang.io/is/nrdzb0 Manually implemented stride and fill with everything forced inlin

Re: stride in slices

2018-06-03 Thread Meta via Digitalmars-d
On Saturday, 2 June 2018 at 18:49:51 UTC, DigitalDesigns wrote: Proposal: [a..b;m] m is the stride, if ; is not a good char then |, :, !, or # could be good chars. This is exactly what std.range.stride does. The syntax [a..b;m] directly translates to [a..b].stride(m).

Re: Ideas for students' summer projects

2018-05-23 Thread Meta via Digitalmars-d
All of your suggestions are good ideas, Mike, but they're way too big for an 8-10 week student project. We need something smaller, like making key Phobos functions @nogc/@safe/pure/nothrow/etc.

Re: Why is 64-bit dmd not built as part of the Windows release?

2018-05-15 Thread Meta via Digitalmars-d
On Tuesday, 15 May 2018 at 16:01:28 UTC, Atila Neves wrote: I don't know why even bother with 32-bit dmd to begin with, but at least there should be an option. I just spent 45min trying to build 64-bit dmd on Windows. It wasn't fun. "Isn't it just make -f win64.mak?", I hear you ask. Yes. If

Re: Extend the call site default argument expansion mechanism?

2018-05-15 Thread Meta via Digitalmars-d
On Tuesday, 15 May 2018 at 14:52:46 UTC, Steven Schveighoffer wrote: Sadly with(WithAlloc!alloc) doesn't work. (If you have to use withAlloc.func everywhere, it kind of destroy the point, doesn't it?) It seems opDispatch isn't being used in the with statement. That seems like a bug, or maybe

Re: Extend the call site default argument expansion mechanism?

2018-05-11 Thread Meta via Digitalmars-d
On Friday, 11 May 2018 at 15:03:41 UTC, Uknown wrote: I see what you're saying and I agree with you. I think a better way would be to try and extend the `with` syntax to work with arbitrary functions, rather than only objects. That would make it more useful. So something like: --- void f1(all

Re: Extend the call site default argument expansion mechanism?

2018-05-11 Thread Meta via Digitalmars-d
On Friday, 11 May 2018 at 11:42:07 UTC, Dukc wrote: On Thursday, 10 May 2018 at 14:15:18 UTC, Yuxuan Shui wrote: ... // constructor of DataStructure this(Allocator alloc=__ALLOC__) {...} ... auto alloc = new SomeAllocator(); define __ALLOC__ = alloc; // And we don't need to pass alloc everytime

Re: Bugzilla & PR sprint on the first weekend of every month

2018-05-08 Thread Meta via Digitalmars-d
On Tuesday, 8 May 2018 at 18:48:15 UTC, Seb wrote: What do you guys think about having a dedicated "Bugzilla & PR sprint" at the first weekend of very month? We could organize this a bit by posting the currently "hot" bugs a few days ahead and also make sure that there are plenty of "bootcamp

Re: Found on proggit: Krug, a new experimental programming language, compiler written in D

2018-04-30 Thread Meta via Digitalmars-d
On Monday, 30 April 2018 at 16:20:38 UTC, H. S. Teoh wrote: As a native Chinese speaker, I find contortions of this kind mildly amusing but mostly ridiculous, because this is absolutely NOT how the language works. It is carrying an ancient scribal ivory-tower ideal of one syllable per word to

Re: Found on proggit: Krug, a new experimental programming language, compiler written in D

2018-04-27 Thread Meta via Digitalmars-d
On Thursday, 26 April 2018 at 23:26:30 UTC, Walter Bright wrote: Besides, redundancy can make a program easier to read (English has a lot of it, and is hence easy to read). I completely agree. I always make an effort to make my sentences as redundant as possible such that they can be easily re

Re: Found on proggit: Krug, a new experimental programming language, compiler written in D

2018-04-26 Thread Meta via Digitalmars-d
On Thursday, 26 April 2018 at 15:07:37 UTC, H. S. Teoh wrote: On Thu, Apr 26, 2018 at 08:50:27AM +, Joakim via Digitalmars-d wrote: https://github.com/felixangell/krug https://www.reddit.com/r/programming/comments/8dze54/krug_a_systems_programming_language_that_compiles/ It's still too ea

Re: lazy evaluation of logical operators in enum definition

2018-04-18 Thread Meta via Digitalmars-d
On Wednesday, 18 April 2018 at 10:19:20 UTC, Atila Neves wrote: On Wednesday, 18 April 2018 at 04:44:23 UTC, Shachar Shemesh wrote: On 17/04/18 13:59, Simen Kjærås wrote: [...] Also, extremely dangerous. Seriously, guys and gals. __traits(compiles) (and its uglier sibling, is(typeof())) sho

Re: PR duty

2018-04-05 Thread Meta via Digitalmars-d
On Wednesday, 4 April 2018 at 05:31:10 UTC, Andrei Alexandrescu wrote: Hi folks, I was thinking of the following. To keep the PR queue trim and in good shape, we'd need at least one full-time engineer minding it. I've done that occasionally, and the queue size got shorter, but I couldn't do mu

Re: PR duty

2018-04-05 Thread Meta via Digitalmars-d
On Wednesday, 4 April 2018 at 05:31:10 UTC, Andrei Alexandrescu wrote: Hi folks, I was thinking of the following. To keep the PR queue trim and in good shape, we'd need at least one full-time engineer minding it. I've done that occasionally, and the queue size got shorter, but I couldn't do mu

Re: [OT] Unity migrating parts of their engine from C++ into High Performace C# (HPC#)

2018-04-03 Thread Meta via Digitalmars-d
On Tuesday, 3 April 2018 at 04:50:15 UTC, rumbu wrote: On Monday, 2 April 2018 at 22:55:58 UTC, Meta wrote: On Monday, 2 April 2018 at 20:19:17 UTC, rumbu wrote: void foo(IRange someRange) { //do something with someRange even it's a struct //this includes code completion and other IDE

Re: [OT] Unity migrating parts of their engine from C++ into High Performace C# (HPC#)

2018-04-02 Thread Meta via Digitalmars-d
On Monday, 2 April 2018 at 22:55:58 UTC, Meta wrote: On Monday, 2 April 2018 at 20:19:17 UTC, rumbu wrote: On Monday, 2 April 2018 at 18:54:28 UTC, 12345swordy wrote: - Only structs are used, no classes; - .NET collections are replaced by native collections that manage their own memory - No

Re: [OT] Unity migrating parts of their engine from C++ into High Performace C# (HPC#)

2018-04-02 Thread Meta via Digitalmars-d
On Monday, 2 April 2018 at 20:19:17 UTC, rumbu wrote: On Monday, 2 April 2018 at 18:54:28 UTC, 12345swordy wrote: - Only structs are used, no classes; - .NET collections are replaced by native collections that manage their own memory - No code that would trigger GC is allowed - Compiler is aw

Re: newCTFE Status March 2018

2018-03-30 Thread Meta via Digitalmars-d
On Friday, 30 March 2018 at 19:48:02 UTC, Stefan Koch wrote: Hello Guys, I took a few days off over easter and I have very good news for you. The following code will now compile and execute correctly using newCTFE. --- class C { int i() {return 1;} } class D : C { override int i() {retu

Re: D compiles fast, right? Right??

2018-03-30 Thread Meta via Digitalmars-d
On Friday, 30 March 2018 at 16:12:44 UTC, Atila Neves wrote: Fast code fast, they said. It'll be fun, they said. Here's a D file: import std.path; Yep, that's all there is to it. Let's compile it on my laptop: /tmp % time dmd -c foo.d dmd -c foo.d 0.12s user 0.02s system 98% cp

Re: does it scale to have 1 person approve of all phobos additions?

2018-03-23 Thread Meta via Digitalmars-d
On Wednesday, 21 March 2018 at 21:25:55 UTC, Andrei Alexandrescu wrote: On 03/20/2018 06:56 PM, Meta wrote: Does it make sense? In my opinion, no, but according to Andrei be has tried being less hands-on before and it resulted in measurably worse quality code in Phobos; thus, he re-established

Re: D, Parasail, Pascal, and Rust vs The Steelman

2018-03-22 Thread Meta via Digitalmars-d
On Thursday, 22 March 2018 at 11:58:02 UTC, Shachar Shemesh wrote: Interesting that the author's criticism of Rust lines up very closely with Andrei's. Spoken on the forum for a language that has still not managed to make sure that a destructor actually gets called every time an object is des

Re: D, Parasail, Pascal, and Rust vs The Steelman

2018-03-22 Thread Meta via Digitalmars-d
On Wednesday, 21 March 2018 at 12:52:19 UTC, Paulo Pinto wrote: An article comparing the above languages as per the DoD language requirements [0]. http://jedbarber.id.au/steelman.html [0] - https://en.wikipedia.org/wiki/Steelman_language_requirements "The central failure of the language is

Re: Flaw in DIP1000? Returning a Result Struct in DIP1000

2018-03-21 Thread Meta via Digitalmars-d
On Wednesday, 21 March 2018 at 17:13:40 UTC, Jack Stouffer wrote: Consider this example simplified from this PR https://github.com/dlang/phobos/pull/6281 -- struct GetoptResult { Option[] options; } struct Option { string optShort; string help; } GetoptResult getopt(T...)(scop

Re: does it scale to have 1 person approve of all phobos additions?

2018-03-20 Thread Meta via Digitalmars-d
Does it make sense? In my opinion, no, but according to Andrei be has tried being less hands-on before and it resulted in measurably worse quality code in Phobos; thus, he re-established himself as the gatekeeper. I agree that it doesn't scale and think that at this point, it's probably activel

Re: Bachelor level projects

2018-03-20 Thread Meta via Digitalmars-d
On Tuesday, 20 March 2018 at 14:44:39 UTC, Alexandru Jercaianu wrote: Hello, At the Polytechnic University of Bucharest we are organizing a special program called CDL[1], where Bachelor students are mentored to make their first open source contributions. I think it's a great idea to involve

Re: rvalue types

2018-03-13 Thread Meta via Digitalmars-d
On Tuesday, 13 March 2018 at 17:33:14 UTC, H. S. Teoh wrote: I think the general idea is a good approach, and it seems that ultimately we're just reinventing expression DSLs. Overloading built-in operators works up to a point, and then you really want to just use a string DSL, parse that in CT

Re: D course material

2018-03-13 Thread Meta via Digitalmars-d
On Tuesday, 13 March 2018 at 12:39:24 UTC, Dmitry Olshansky wrote: Hi, folks! I’m testing waters for a D course at one University for first time it’ll be an optional thing. It’s still discussed but may very well become a reality. Before you ask - no, I’m not lecturing and in fact, I didn’t

Re: Fact check: when did D add static if?

2018-03-07 Thread Meta via Digitalmars-d
On Thursday, 8 March 2018 at 04:12:12 UTC, Adam D. Ruppe wrote: On Thursday, 8 March 2018 at 04:09:17 UTC, Meta wrote: Has D had static if since its inception, or was it added somewhere along the way? https://digitalmars.com/d/1.0/changelog1.html What's New for D 0.124 May 19, 2005 New/Change

Fact check: when did D add static if?

2018-03-07 Thread Meta via Digitalmars-d
Has D had static if since its inception, or was it added somewhere along the way?

#dbugfix: Unclear error message when trying to inherit from multiple classes

2018-03-07 Thread Meta via Digitalmars-d
class Test: Foo, Bar, Baz { } class Foo {} class Bar {} class Baz {} Error: class `Test` base type must be interface, not Bar Error: class `Test` base type must be interface, not Baz I thought this error message used to be a lot better; along the lines of "D does not support multiple inheritan

Re: implicit construction operator

2018-02-26 Thread Meta via Digitalmars-d
On Monday, 26 February 2018 at 19:25:06 UTC, WebFreak001 wrote: Now this would be really useful for Variant: --- struct Variant { this(U)(U value) @implicit { ... } } void bar(Variant x, Variant y) {} Variant[] myObjects = [1, 2, "abc", new Node()]; Variant a = 4; bar(4, "asdf"); --- Thi

Re: Aliasing multiple delegates to the same name - very strange behaviour

2018-02-25 Thread Meta via Digitalmars-d
On Sunday, 25 February 2018 at 08:07:03 UTC, user1234 wrote: On Sunday, 25 February 2018 at 05:16:21 UTC, Meta wrote: On Sunday, 25 February 2018 at 04:59:58 UTC, Basile B. wrote: Use templates to prevent implicit conversion: alias f(T = int) = (T n) => 0; alias f(T = char) = (T n) => 'a'; ali

Re: Aliasing multiple delegates to the same name - very strange behaviour

2018-02-24 Thread Meta via Digitalmars-d
On Sunday, 25 February 2018 at 04:59:58 UTC, Basile B. wrote: Use templates to prevent implicit conversion: alias f(T = int) = (T n) => 0; alias f(T = char) = (T n) => 'a'; alias f(T = bool) = (T n) => false; Bug report is invalid and can be closed. Please don't be so hasty. The main focus of

Re: Aliasing multiple delegates to the same name - very strange behaviour

2018-02-24 Thread Meta via Digitalmars-d
On Sunday, 25 February 2018 at 04:47:47 UTC, Nicholas Wilson wrote: On Sunday, 25 February 2018 at 04:06:43 UTC, Meta wrote: I just filed this bug: https://issues.dlang.org/show_bug.cgi?id=18520 Not only does the following code compile and link successfully, it prints 0 three times when ran:

Aliasing multiple delegates to the same name - very strange behaviour

2018-02-24 Thread Meta via Digitalmars-d
I just filed this bug: https://issues.dlang.org/show_bug.cgi?id=18520 Not only does the following code compile and link successfully, it prints 0 three times when ran: alias f = (int n) => 0; alias f = (char c) => 'a'; alias f = (bool b) => false; void main() { import std.stdio; writ

Re: Typedef.toString?

2018-02-23 Thread Meta via Digitalmars-d
On Friday, 23 February 2018 at 13:56:35 UTC, Denis F wrote: On Thursday, 22 February 2018 at 20:26:17 UTC, Meta wrote: find all this inclusions. Maybe it is need to implement simple toString method inside of Typedef struct? Or just disable it at all? Yes. I doubt this behaviour is intended,

Re: Typedef.toString?

2018-02-22 Thread Meta via Digitalmars-d
On Thursday, 22 February 2018 at 19:56:13 UTC, Denis F wrote: Hello! After replacing native type by std.typecons.Typedef I am faced with fact what all typeDefValue.to!string was silently changed its output to output of Typedef struct itself. It was too hard find all this inclusions. Maybe it

Re: how to get typeid of extern(C++) classes?

2018-02-16 Thread Meta via Digitalmars-d
On Friday, 16 February 2018 at 00:42:02 UTC, Timothee Cour wrote: C++ exposes it via typeid so in theory all the info is there ; It's been awhile since I've written any C++ code, but as I remember it, this type of type info is not available unless you enable it with a (C++) compiler switch.

Re: OT: Photo of a single atom by David Nadlinger wins top prize

2018-02-14 Thread Meta via Digitalmars-d
On Wednesday, 14 February 2018 at 16:45:49 UTC, user1234 wrote: On Wednesday, 14 February 2018 at 01:11:33 UTC, David Nadlinger wrote: On Tuesday, 13 February 2018 at 23:09:07 UTC, Ali Çehreli wrote: David (aka klickverbot) is a longtime D contributor […] … who is slightly surprised at the am

Re: Workaround for https://issues.dlang.org/show_bug.cgi?id=18422?

2018-02-11 Thread Meta via Digitalmars-d
On Sunday, 11 February 2018 at 15:34:07 UTC, Andrei Alexandrescu wrote: I'm trying to sketch a simple compile-time reflection system, and https://issues.dlang.org/show_bug.cgi?id=18422 is a blocker of the entire approach. My intent is to have a struct Module, which can be initialized with a mod

Re: Which language futures make D overcompicated?

2018-02-09 Thread Meta via Digitalmars-d
On Friday, 9 February 2018 at 07:54:49 UTC, Suliman wrote: I like D, but sometimes it's look like for me too complicated. Go have a lot of fans even it not simple, but primitive. But some D futures make it very hard to learning. Small list by me: 1. mixins 2. inout 3. too many attributes like:

Re: Which language futures make D overcompicated?

2018-02-09 Thread Meta via Digitalmars-d
On Friday, 9 February 2018 at 17:31:47 UTC, Adam D. Ruppe wrote: On Friday, 9 February 2018 at 16:44:32 UTC, Seb wrote: Forget inout, it's seldomly used and there have even attempts to remove it from the language. inout rox. I think this is more of a documentation discoverability problem. We

Re: Which language futures make D overcompicated?

2018-02-09 Thread Meta via Digitalmars-d
On Friday, 9 February 2018 at 18:21:55 UTC, Bo wrote: * scope() .. just call it "defer" just as every other language now does. It only confuses people who come from other languages. Its now almost a standard. By using scope people have have no clue that D has a defer. Took even me a while to k

Re: Language Idea #6892: in array ops, enable mixing slices and random access ranges

2018-02-05 Thread Meta via Digitalmars-d
On Monday, 5 February 2018 at 17:35:45 UTC, Guillaume Piolat wrote: General idea Currently arrays ops express loops over slices. a[] = b[] * 2 + c[] It would be nice if one could mix a random access range into such an expression. The compiler would have builtin support for r

Re: Annoyance with new integer promotion deprecations

2018-02-05 Thread Meta via Digitalmars-d
On Tuesday, 6 February 2018 at 00:18:08 UTC, Jonathan M Davis wrote: On Monday, February 05, 2018 15:27:45 H. S. Teoh via Digitalmars-d wrote: On Mon, Feb 05, 2018 at 01:56:33PM -0800, Walter Bright via Digitalmars-d wrote: > The idea is a byte can be implicitly converted to a dchar, > [...]

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

2018-02-01 Thread Meta via Digitalmars-d
On Wednesday, 31 January 2018 at 11:42:14 UTC, Seb wrote: Yes, obviously the current situation isn't ideal, but it's not too bad either and we have found one good, but probably not so well-known yet way to tackle this: the dlang-community organization on GH (https://github.com/dlang-community)

Re: The most confusing error message

2018-01-24 Thread Meta via Digitalmars-d
On Wednesday, 24 January 2018 at 07:21:09 UTC, Shachar Shemesh wrote: test.d(6): Error: struct test.A(int var = 3) is used as a type Of course it is. That's how structs are used. Program causing this: struct A(int var = 3) { int a; } void main() { A a; } To resolve, you need to change

Re: static foreach and new identifier names

2018-01-05 Thread Meta via Digitalmars-d
On Friday, 5 January 2018 at 23:52:43 UTC, Meta wrote: On Friday, 5 January 2018 at 23:50:52 UTC, Meta wrote: On Friday, 5 January 2018 at 17:41:23 UTC, Adam D. Ruppe wrote: Make a special identifier known the compiler, let's call it `__unique_name` which is unique for any static foreach itera

Re: static foreach and new identifier names

2018-01-05 Thread Meta via Digitalmars-d
On Friday, 5 January 2018 at 17:41:23 UTC, Adam D. Ruppe wrote: Make a special identifier known the compiler, let's call it `__unique_name` which is unique for any static foreach iteration. You can emulate it by abusing the compiler-generated random names for lambdas: enum uniqueName(string

Re: static foreach and new identifier names

2018-01-05 Thread Meta via Digitalmars-d
On Friday, 5 January 2018 at 23:50:52 UTC, Meta wrote: On Friday, 5 January 2018 at 17:41:23 UTC, Adam D. Ruppe wrote: Make a special identifier known the compiler, let's call it `__unique_name` which is unique for any static foreach iteration. You can emulate it by abusing the compiler-gener

Re: Odd behavior found in GC when terminating application

2018-01-05 Thread Meta via Digitalmars-d
On Friday, 5 January 2018 at 19:18:59 UTC, 12345swordy wrote: On Friday, 5 January 2018 at 17:14:58 UTC, Meta wrote: On Friday, 5 January 2018 at 15:26:03 UTC, 12345swordy wrote: On Friday, 5 January 2018 at 14:35:44 UTC, Jonathan M Davis wrote: On Friday, January 05, 2018 14:29:41 Adam D. Rupp

Re: Odd behavior found in GC when terminating application

2018-01-05 Thread Meta via Digitalmars-d
On Friday, 5 January 2018 at 15:26:03 UTC, 12345swordy wrote: On Friday, 5 January 2018 at 14:35:44 UTC, Jonathan M Davis wrote: On Friday, January 05, 2018 14:29:41 Adam D. Ruppe via Digitalmars-d wrote: [...] Either that or use structs on the stack instead of classes on the heap so that yo

Re: AliasSeq seems to compile slightly faster with static foreach

2018-01-05 Thread Meta via Digitalmars-d
On Friday, 5 January 2018 at 13:10:25 UTC, Jonathan M Davis wrote: There was a recent PR for Phobos where Seb added static to a bunch of foreach's that used AliasSeq. It hadn't actually occurred to me that that was legal (I've basically just been using static foreach where foreach with AliasSeq

Re: What don't you switch to GitHub issues

2017-12-31 Thread Meta via Digitalmars-d
On Sunday, 31 December 2017 at 11:18:26 UTC, Seb wrote: On Saturday, 30 December 2017 at 02:50:48 UTC, Adam D. Ruppe wrote: Bugzilla was the most well-known solution at the time. Keep in mind the D bugzilla has been around since 2006. As far as I understand it, migration at this point is deemed

Re: What do you want to see for a mature DLang?

2017-12-31 Thread Meta via Digitalmars-d
On Sunday, 31 December 2017 at 11:27:41 UTC, Seb wrote: Yes, Dlang-bot was able to detect stalled issues for a while, but we didn't turn this on for all repositories. I have just enabled it: https://github.com/dlang-bots/dlang-bot/pull/153 For the moment, it is just labelling issues with e.g.

Re: What do you want to see for a mature DLang?

2017-12-31 Thread Meta via Digitalmars-d
On Saturday, 30 December 2017 at 14:42:45 UTC, Muld wrote: On Saturday, 30 December 2017 at 06:55:13 UTC, Walter Bright wrote: It's not like we have a shortage of bugzilla issues and are wondering what to do next. Yah there are a ton of Bugzilla issues, that's the problem. More than half of t

Re: What is this "dd" doc format?

2017-12-19 Thread Meta via Digitalmars-d
On Tuesday, 19 December 2017 at 20:20:16 UTC, John Gabriele wrote: I just went looking for the source for the dlang.org overview page, and found [this](https://github.com/dlang/dlang.org/blob/master/overview.dd). I've seen and used a lot of markup formats, but have never run across this. What

Re: Attributes on Enum Members: Call for use cases.

2017-11-29 Thread Meta via Digitalmars-d
On Wednesday, 29 November 2017 at 16:45:04 UTC, Timon Gehr wrote: On 29.11.2017 17:21, Andrei Alexandrescu wrote: On 11/29/2017 07:53 AM, Seb wrote: UDAs for function arguments would be really awesome to have. They should be part of the same DIP. -- Andrei More generally, any declaration sh

Re: Attributes on Enum Members: Call for use cases.

2017-11-28 Thread Meta via Digitalmars-d
On Tuesday, 28 November 2017 at 02:20:15 UTC, Michael V. Franklin wrote: On Sunday, 19 November 2017 at 13:35:13 UTC, Michael V. Franklin wrote: What's the official word? Does it require a DIP? For those who might want to know, Walter has informed me that this change will require a DIP. I

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

2017-11-24 Thread Meta via Digitalmars-d
On Friday, 24 November 2017 at 20:29:23 UTC, codephantom wrote: On Friday, 24 November 2017 at 12:10:28 UTC, Nick Treleaven wrote: On Thursday, 23 November 2017 at 06:35:17 UTC, codephantom wrote: I love not being able to edit posts. It's so convenient. It's not as much of a problem as not be

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

2017-11-21 Thread Meta via Digitalmars-d
On Tuesday, 21 November 2017 at 09:12:25 UTC, Ola Fosheim Grostad wrote: On Tuesday, 21 November 2017 at 06:03:33 UTC, Meta wrote: I'm not clear on whether he means that Java's type system is unsound, or that the type checking algorithm is unsound. From what I can tell, he's asserting the forme

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

2017-11-20 Thread Meta via Digitalmars-d
On Tuesday, 21 November 2017 at 01:03:36 UTC, Mark wrote: 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 t

Re: "body" keyword is unnecessary

2017-11-19 Thread Meta via Digitalmars-d
On Sunday, 19 November 2017 at 21:14:58 UTC, Jonathan M Davis wrote: It would have been better to explain in the documentation that body was being phased out rather than just removing it right when the changes were made to dmd. It's already caused problems due to folks trying to use do and it n

Re: "body" keyword is unnecessary

2017-11-19 Thread Meta via Digitalmars-d
On Sunday, 19 November 2017 at 12:54:37 UTC, Basile B. wrote: Good question, it's even not in the changelog: https://www.google.fr/search?domains=dlang.org&dcr=0&biw=1280&bih=635&tbs=qdr%3Ay&ei=H34RWpKDPIzTgAatnqK4DA&q=body+do+site%3Adlang.org%2Fchangelog&oq=body+do+site%3Adlang.org%2Fchangelog&

Re: "body" keyword is unnecessary

2017-11-19 Thread Meta via Digitalmars-d
On Sunday, 19 November 2017 at 12:54:37 UTC, Basile B. wrote: Yeah, "no worries" but for example a few weeks ago a bug report has drawn my attention: https://issues.dlang.org/show_bug.cgi?id=17925 After testing some code with i've indeed observed that the transition period for `do` had starte

Re: The delang is using merge instead of rebase/squash

2017-11-18 Thread Meta via Digitalmars-d
On Friday, 24 March 2017 at 16:34:46 UTC, Martin Nowak wrote: On Tuesday, 21 March 2017 at 20:16:00 UTC, Atila Neves wrote: git rebase master my_branch git checkout master git merge --no-ff my_branch Yes, that's about what we aim for, rebase w/ --autosquash though, so that people can `git com

Re: DMD PR management hits a new low

2017-11-18 Thread Meta via Digitalmars-d
On Saturday, 18 November 2017 at 13:08:55 UTC, Dmitry Olshansky wrote: On Saturday, 18 November 2017 at 07:52:43 UTC, Michael V. Franklin wrote: I'll just refer you to this comment: https://github.com/dlang/dmd/pull/6947#issuecomment-345423103 Manually merging this pull as it sat around long e

Re: "body" keyword is unnecessary

2017-11-18 Thread Meta via Digitalmars-d
On Saturday, 18 November 2017 at 16:21:30 UTC, Eljay wrote: On Monday, 28 March 2011 at 18:59:03 UTC, Walter Bright wrote: On 3/27/2011 10:35 PM, Jonathan M Davis wrote: I'll be _very_ excited to have both the destructor issues and the const issues sorted out. They are some of the more annoying

Re: Should aliasing a lambda expression be allowed?

2017-11-16 Thread Meta via Digitalmars-d
On Thursday, 16 November 2017 at 16:10:50 UTC, Meta wrote: int function(int) f1 = (int n) => n; int function(int) f2 = (char c) => c; Should be int function(char)

Re: Should aliasing a lambda expression be allowed?

2017-11-16 Thread Meta via Digitalmars-d
On Thursday, 16 November 2017 at 13:05:51 UTC, Petar Kirov [ZombineDev] wrote: On Wednesday, 15 November 2017 at 19:29:29 UTC, Steven Schveighoffer wrote: On 11/15/17 11:59 AM, Andrea Fontana wrote: On Wednesday, 15 November 2017 at 15:25:06 UTC, Steven Schveighoffer wrote: alias foo = lambda1

Re: Project Elvis

2017-11-07 Thread Meta via Digitalmars-d
On Tuesday, 7 November 2017 at 13:43:20 UTC, user1234 wrote: On Monday, 6 November 2017 at 20:14:17 UTC, Meta wrote: [...] import std.stdio; writeln(safeDeref(tree).right.right.val.orElse(-1)); writeln(safeDeref(tree).left.right.left.right.orElse(null)); writeln(safeDeref(tree).left.right.left.r

Re: Project Elvis

2017-11-06 Thread Meta via Digitalmars-d
On Monday, 6 November 2017 at 19:55:13 UTC, Jacob Carlborg wrote: On 2017-11-06 20:40, Dmitry Olshansky wrote: I’d argue this NOT what we want. Nullability is best captured in the typesystem even if in the form of Nullable!T. Yeah, it would be better if the elvis operator good integrate with

Re: Improve "Improve Contract Syntax" DIP 1009

2017-11-01 Thread Meta via Digitalmars-d
On Wednesday, 1 November 2017 at 22:04:10 UTC, Andrei Alexandrescu wrote: We're having difficulty reviewing https://github.com/dlang/DIPs/blob/master/DIPs/DIP1009.md. The value is there, but the informal and sometimes flowery prose affects the document negatively. There are some unsupported cl

Re: My two cents

2017-10-20 Thread Meta via Digitalmars-d
On Friday, 20 October 2017 at 00:26:19 UTC, bauss wrote: On Wednesday, 18 October 2017 at 08:56:21 UTC, Satoshi wrote: conditional dereferencing and stuff about that (same as in C#) foo?.bar; foo?[bar]; return foo ?? null; Tbh. these are some I really wish were in D, because it becomes tediou

Re: Why Physicists Still Use Fortran

2017-10-17 Thread Meta via Digitalmars-d
On Tuesday, 17 October 2017 at 13:09:37 UTC, Steven Schveighoffer wrote: Ouch! I had an experience like that once. I worked at a company that bought a one-man show's company who had an impressive load-balancing software we wanted to incorporate in our system. About 1-2 years into him working

Re: Implicit Constructors

2017-10-13 Thread Meta via Digitalmars-d
On Friday, 13 October 2017 at 14:28:43 UTC, Adam D. Ruppe wrote: On Friday, 13 October 2017 at 14:22:05 UTC, Meta wrote: It'd be nice if it did, because I believe it would enable the following: I don't think so, since the implicit construction would only work one level deep. So you can implic

Re: Implicit Constructors

2017-10-13 Thread Meta via Digitalmars-d
On Friday, 13 October 2017 at 13:19:24 UTC, Adam D. Ruppe wrote: On Friday, 13 October 2017 at 06:33:14 UTC, Jacob Carlborg wrote: Not sure what the purpose of the latter is. I think it is just so you can do (T)(T...) in a template and have it work across more types; unified construction synt

  1   2   3   4   5   6   7   8   >