Re: on interfacing w/C++

2014-04-16 Thread Moritz Maxeiner via Digitalmars-d
On Tuesday, 15 April 2014 at 11:04:42 UTC, Daniel Murphy wrote: "Manu via Digitalmars-d" wrote in message news:mailman.9.1397553786.2763.digitalmar...@puremagic.com... Huh? Do methods work now? Since when? Since I needed them for DDMD. Is this[1] then out of date and I can interface wit

Re: on interfacing w/C++

2014-04-16 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 16 April 2014 at 14:00:24 UTC, Daniel Murphy wrote: "Moritz Maxeiner" wrote in message news:kvzwlecwougswrqka...@forum.dlang.org... Is this[1] then out of date and I can interface with non-virtual methods? Because that's what your post seems to imply (unless I misunderstood).

Re: const as default for variables

2015-03-19 Thread Moritz Maxeiner via Digitalmars-d
On Saturday, 14 March 2015 at 20:15:30 UTC, Walter Bright wrote: I've often thought, as do many others here, that immutability should be the default for variables. Case (1) is what I'm talking about here. If it is made const, then there are a couple ways forward in declaring a mutable variabl

Re: A reason to choose D over Go

2015-03-28 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 22 March 2015 at 01:44:32 UTC, weaselcat wrote: On Sunday, 22 March 2015 at 01:24:10 UTC, Martin Nowak wrote: On Saturday, 21 March 2015 at 23:49:26 UTC, Atila Neves wrote: I actually think that there are two large categories of programmers: those like writing the same loops over and

Re: [OT] Regarding most used operating system among devs

2015-04-12 Thread Moritz Maxeiner via Digitalmars-d
On Thursday, 9 April 2015 at 18:28:46 UTC, Marco Leise wrote: Am Wed, 08 Apr 2015 13:05:01 + schrieb "Szymon Gatner" : On Wednesday, 8 April 2015 at 12:34:06 UTC, Paulo Pinto wrote: > > Since then, I always favor spaces over tabs. One space is > always one space. > Not to start a war bu

Re: all OS functions should be "nothrow @trusted @nogc"

2017-08-02 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 2 August 2017 at 16:32:44 UTC, Andrei Alexandrescu wrote: import std.algorithm; // I probably wouldn't even define this but use the body as is auto strnlen_safe(in char[] str) { return countUntil(cast(ubyte[]) str, '\0'); } Oh that cast it irks me so. -Steve return str

Re: How do you use D?

2017-08-02 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 2 August 2017 at 21:30:11 UTC, SCev wrote: guys don't do your own IDE, i see everyone working on his own IDE, please just make plugin for famous crossplatform IDE.. this will be better for comunity But I'm NIH interested in having my own plugin for Sublime which does exactly wha

Re: Who maintains the D website?

2017-08-02 Thread Moritz Maxeiner via Digitalmars-d
On Thursday, 3 August 2017 at 00:18:38 UTC, Andrej Mitrovic wrote: Is there a single person who's the main maintainer of the D website..? If not, I have some ideas on how to improve it. Not just ideas, I'd like to give a host at improving it myself, really. AFAIK the website is maintained v

Re: Who maintains the D website?

2017-08-02 Thread Moritz Maxeiner via Digitalmars-d
On Thursday, 3 August 2017 at 00:48:41 UTC, Andrej Mitrovic wrote: On Thursday, 3 August 2017 at 00:26:31 UTC, Moritz Maxeiner wrote: On Thursday, 3 August 2017 at 00:18:38 UTC, Andrej Mitrovic wrote: Is there a single person who's the main maintainer of the D website..? If not, I have some

Re: delegate confusion

2017-08-04 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 4 August 2017 at 16:57:37 UTC, bitwise wrote: I'm confused about how D's lambda capture actually works, and can't find any clear specification on the issue. I've read the comments on the bug about what's described below, but I'm still confused. The conversation there dropped off in 2

Re: delegate confusion

2017-08-04 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 4 August 2017 at 17:44:23 UTC, Timon Gehr wrote: On 04.08.2017 19:36, Moritz Maxeiner wrote: Next I run `bar`. I get the same output of "4 4 4 4 4". While this hack works in C#, I suppose it's reasonable to assume the D compiler would just reuse stack space for `j`, and that the C

Re: delegate confusion

2017-08-04 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 4 August 2017 at 17:47:01 UTC, Moritz Maxeiner wrote: On Friday, 4 August 2017 at 17:44:23 UTC, Timon Gehr wrote: On 04.08.2017 19:36, Moritz Maxeiner wrote: [...] I was (explicitly) arguing that it's in keeping with the current spec. That the spec is unsound and should be update

Re: Jetbrains announce support for rust plugin, show them we want one too!

2017-08-06 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 6 August 2017 at 12:14:16 UTC, Dmitry wrote: I don't think so. Why developer should use MacOS/Linux if the target platform is Windows in most of cases? A developer who mostly targets Windows wouldn't. But if you look at the statistics [1] you'd see that in the category of systems

Re: Jetbrains announce support for rust plugin, show them we want one too!

2017-08-06 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 6 August 2017 at 14:30:48 UTC, Ryion wrote: On Sunday, 6 August 2017 at 14:16:20 UTC, Moritz Maxeiner wrote: [...] How sure are you even with statistics... On my work half the developers are on Mac, the other half are on Windows. There is not a single Linux system. From the windo

Re: Jetbrains announce support for rust plugin, show them we want one too!

2017-08-06 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 6 August 2017 at 15:18:49 UTC, Ryion wrote: On Sunday, 6 August 2017 at 14:49:47 UTC, Moritz Maxeiner wrote: 1) Anecdotes are not useful here 2) macOS is UNIX, same as Linux, so I'm not sure why the distinction matters as a reply to me Same two points as above. Thanks for the int

Re: Jetbrains announce support for rust plugin, show them we want one too!

2017-08-06 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 6 August 2017 at 15:32:07 UTC, Paulo Pinto wrote: On Sunday, 6 August 2017 at 14:16:20 UTC, Moritz Maxeiner wrote: On Sunday, 6 August 2017 at 12:14:16 UTC, Dmitry wrote: [...] A developer who mostly targets Windows wouldn't. But if you look at the statistics [1] you'd see that in

Re: Jetbrains announce support for rust plugin, show them we want one too!

2017-08-08 Thread Moritz Maxeiner via Digitalmars-d
On Tuesday, 8 August 2017 at 15:40:08 UTC, Ryion wrote: On Sunday, 6 August 2017 at 19:15:59 UTC, bachmeier wrote: Your claim to have limited D skills doesn't prevent you from writing a blog post detailing the things that are missing for Windows development and showing how other languages deal

Re: Jetbrains announce support for rust plugin, show them we want one too!

2017-08-09 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 9 August 2017 at 07:59:46 UTC, Ryion wrote: Maybe i made myself not very clear. Sorry about that. I mention this as reading topics here shows the same behavior. People complain. Specific people here keep responding how the complainer needs to do it themselves or pay for it. Traci

Re: Jetbrains announce support for rust plugin, show them we want one too!

2017-08-09 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 9 August 2017 at 08:22:05 UTC, Daniel Kozak wrote: You can write it yourself :P, or pay someone to do it for you. On Wed, Aug 9, 2017 at 10:02 AM, Ryion via Digitalmars-d < digitalmars-d@puremagic.com> wrote: On Wednesday, 9 August 2017 at 07:59:46 UTC, Ryion wrote: And that

Re: Stefan Koch: New CTFE fix

2017-08-14 Thread Moritz Maxeiner via Digitalmars-d
On Monday, 14 August 2017 at 22:51:04 UTC, Johnson Jones wrote: string do() { string x; x = "adsf"; pragma(msg, x); return x; } "do" is a keyword in D, you can't use it as an identifier. fails because the compiler believes that x is not known at compile time. There are multip

Re: Stefan Koch: New CTFE fix

2017-08-14 Thread Moritz Maxeiner via Digitalmars-d
On Tuesday, 15 August 2017 at 01:41:58 UTC, Johnson wrote: On Tuesday, 15 August 2017 at 01:31:13 UTC, Moritz Maxeiner wrote: On Monday, 14 August 2017 at 22:51:04 UTC, Johnson Jones wrote: string do() { string x; x = "adsf"; pragma(msg, x); return x; } "do" is a keyword in D, yo

Re: RFC: Implementation of binary assignment operators (e.g s.x += 2) for @property functions

2017-08-15 Thread Moritz Maxeiner via Digitalmars-d
On Tuesday, 15 August 2017 at 07:52:17 UTC, Gary Willoughby wrote: On Tuesday, 15 August 2017 at 03:53:44 UTC, Michael V. Franklin wrote: An implementation of binary assignment operators for @property functions has been submitted to the DMD pull request queue at https://github.com/dlang/dmd/pul

Re: Stefan Koch: New CTFE fix

2017-08-16 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 16 August 2017 at 07:24:36 UTC, Biotronic wrote: When Moritz commented on your use of 'do' as a function name, that may have been unnecessary for a discussion of your problem. I would contend that when discussing semantics (that is the PL's syntax is not open for change as part

Re: Stefan Koch: New CTFE fix

2017-08-16 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 16 August 2017 at 10:03:56 UTC, Moritz Maxeiner wrote: You're right in that it was unnecessary to discuss the issue he was describing, but it was relevant to me as a matter of principle. * You're right in that it was unnecessary for discussing the issue he was describing Sorr

Re: Stefan Koch: New CTFE fix

2017-08-16 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 16 August 2017 at 13:53:40 UTC, Johnson wrote: On Wednesday, 16 August 2017 at 10:03:56 UTC, Moritz Maxeiner wrote: On Wednesday, 16 August 2017 at 07:24:36 UTC, Biotronic wrote: When Moritz commented on your use of 'do' as a function name, that may have been unnecessary for a d

Re: @safe(bool)

2017-08-17 Thread Moritz Maxeiner via Digitalmars-d
On Thursday, 17 August 2017 at 16:32:20 UTC, bitwise wrote: The only problem would be the lack of actual @safe annotations on the container, as they would only be applicable to one variant, and otherwise cause a compile-time error. [...] Shouldn't the already compiler derive the appropriate a

Re: Static inline field initialization

2017-08-22 Thread Moritz Maxeiner via Digitalmars-d
On Tuesday, 22 August 2017 at 11:50:50 UTC, Jonas Mminnberg wrote: Because of D's static initialization of members, this assert fails: class Test { ubyte[] buf = new ubyte[1000]; } void main() { auto a = new Test(); auto b = new Test(); assert(a.buf.ptr != b.buf.ptr); } This i

Re: Static inline field initialization

2017-08-22 Thread Moritz Maxeiner via Digitalmars-d
On Tuesday, 22 August 2017 at 13:53:05 UTC, Daniel Kozak wrote: s/buf/bug/ On Tue, Aug 22, 2017 at 3:52 PM, Daniel Kozak wrote: On Tue, Aug 22, 2017 at 2:20 PM, Moritz Maxeiner via Digitalmars-d < digitalmars-d@puremagic.com> wrote: On Tuesday, 22 August 2017 at 11:50:50 UTC,

Re: Static inline field initialization

2017-08-22 Thread Moritz Maxeiner via Digitalmars-d
On Tuesday, 22 August 2017 at 12:38:50 UTC, Jonas Mminnberg wrote: On Tuesday, 22 August 2017 at 12:20:45 UTC, Moritz Maxeiner wrote: I agree that it can be confusing if you try to read it with C++ semantics [1]; the solution, however, imho is not to change D semantics or throw warnings [2]

Re: Static inline field initialization

2017-08-22 Thread Moritz Maxeiner via Digitalmars-d
On Tuesday, 22 August 2017 at 15:52:48 UTC, Kagamin wrote: On Tuesday, 22 August 2017 at 14:53:21 UTC, Moritz Maxeiner wrote: There is a bug [1] - as others have pointed out - that the static array isn't stored in TLS, but in global storage, however, but that doesn't apply in this single thread

Re: Another reason to use BetterC

2017-08-22 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 23 August 2017 at 01:22:44 UTC, Walter Bright wrote: https://news.ycombinator.com/item?id=15075242 Or better yet, full :D. I still find it strange how people willingly increase their own attack surface with such software, when even a single missed malware program is a total loss

Re: Static inline field initialization

2017-08-23 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 23 August 2017 at 09:12:19 UTC, Kagamin wrote: On Tuesday, 22 August 2017 at 16:28:43 UTC, Moritz Maxeiner wrote: class Test { ubyte[] buf = new ubyte[1000]; // thread local storage, instances in the same thread refer to the same static array } Dynamic initialization is don

Re: gdc and ldc in MacPorts

2017-08-23 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 23 August 2017 at 18:03:22 UTC, lanphuonglien wrote: Whilst DMD seems to be in MacPorts, GDC and LDC appear not to be. Is this right? If it is then it is wrong – it would be great if the person handling the DMD port could be supported to get a LDC and GDC ports in place. I am a

Re: gdc and ldc in MacPorts

2017-08-26 Thread Moritz Maxeiner via Digitalmars-d
On Saturday, 26 August 2017 at 15:28:32 UTC, MacPortsUser wrote: On Wednesday, 23 August 2017 at 22:55:20 UTC, Moritz Maxeiner wrote: [...] If you aren't set on MacPorts, you can use homebrew for ldc. With regards to gdc: A word of caution: Supporting it as a separate package is a bit of a has

Re: Editor recommendations for new users.

2017-08-27 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 27 August 2017 at 10:05:29 UTC, Nicholas Wilson wrote: So I will be doing a workshop on programming for the biology department at my university and I was wondering what would best suit the users. The following are a must: support windows & mac ( the more consistent between the t

Re: Promoting TutorialsPoint's D tutorial

2017-08-27 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 27 August 2017 at 11:26:58 UTC, Ecstatic Coder wrote: [...] Just add the 4 examples I suggested, and you have a brand-new beginner-friendly website without changing anything else to the website canvas. If you want a change in D's web presence submit a PR to [1] or one of [2] as a

Re: Promoting TutorialsPoint's D tutorial

2017-08-27 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 27 August 2017 at 11:50:18 UTC, Ecstatic Coder wrote: On Sunday, 27 August 2017 at 11:36:57 UTC, Moritz Maxeiner wrote: On Sunday, 27 August 2017 at 11:26:58 UTC, Ecstatic Coder wrote: [...] Just add the 4 examples I suggested, and you have a brand-new beginner-friendly website wit

Re: Promoting TutorialsPoint's D tutorial

2017-08-27 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 27 August 2017 at 13:12:22 UTC, Ecstatic Coder wrote: I agree, but here it's not a local modification I've done to a D library that I want to push so that other people can use it too. It's a change to the main landing page of the dlang.org website, which is by definition global and

Re: Editor recommendations for new users.

2017-08-27 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 27 August 2017 at 13:15:41 UTC, Ryion wrote: On Sunday, 27 August 2017 at 10:05:29 UTC, Nicholas Wilson wrote: The following are a must: no large install footprint Visual Studio Code seems to be what you need. [...] Relative low memory footprint for the functionality ( compare

Re: Editor recommendations for new users.

2017-08-27 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 27 August 2017 at 16:22:44 UTC, Jerry wrote: On Sunday, 27 August 2017 at 15:17:51 UTC, Moritz Maxeiner wrote: On Sunday, 27 August 2017 at 13:15:41 UTC, Ryion wrote: On Sunday, 27 August 2017 at 10:05:29 UTC, Nicholas Wilson wrote: The following are a must: no large install foo

Re: Promoting TutorialsPoint's D tutorial

2017-08-27 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 27 August 2017 at 18:07:27 UTC, Ecstatic Coder wrote: I've already received enough "No, not interested" answers till now to the same proposal to think that this will be ok this time. Add my voice to that corpus - I honestly don't care what the website looks like. Ok, message rece

Re: Editor recommendations for new users.

2017-08-27 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 27 August 2017 at 18:14:07 UTC, Adam D. Ruppe wrote: On Sunday, 27 August 2017 at 18:08:52 UTC, Moritz Maxeiner wrote: Indeed, but that's only the raw executable, not the full package (which includes things like syntax highlighting), which adds another 26MB. But, yes, Textadept and v

Re: Promoting TutorialsPoint's D tutorial

2017-08-27 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 27 August 2017 at 19:29:03 UTC, Ryion wrote: On Sunday, 27 August 2017 at 18:51:00 UTC, Moritz Maxeiner wrote: Thanks, but as I pointed out, the website's design is of no interest to me personally. As I said, you aren't going to change my interests (and I'm reasonable convinced you

Re: Promoting TutorialsPoint's D tutorial

2017-08-27 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 27 August 2017 at 20:13:35 UTC, Ecstatic Coder wrote: Following what you said, I've just looked at both Github accounts, and I can clearly see that it's much above my skill set to merge the content of both D-based websites so that the main page of the Dlang website looks exactly like

Re: Editor recommendations for new users.

2017-08-28 Thread Moritz Maxeiner via Digitalmars-d
On Monday, 28 August 2017 at 20:48:44 UTC, Ryion wrote: On Sunday, 27 August 2017 at 18:08:52 UTC, Moritz Maxeiner wrote: It's nearly ten times the size, so yeah, it is relative to Textadept. You can say the same thing in comparison with vim which is only a 2MB install size, 20MB in comparis

Re: D Tour is down

2017-08-28 Thread Moritz Maxeiner via Digitalmars-d
On Monday, 28 August 2017 at 23:57:01 UTC, Mengu wrote: On Monday, 28 August 2017 at 17:16:59 UTC, Mengu wrote: On Monday, 28 August 2017 at 08:19:10 UTC, Petar Kirov [ZombineDev] wrote: On Monday, 28 August 2017 at 07:52:00 UTC, Joakim wrote: On Monday, 28 August 2017 at 07:44:48 UTC, Wulfkla

Re: Editor recommendations for new users.

2017-08-29 Thread Moritz Maxeiner via Digitalmars-d
On Tuesday, 29 August 2017 at 14:05:13 UTC, Ryion wrote: On Monday, 28 August 2017 at 21:17:19 UTC, Moritz Maxeiner wrote: Why "again"? You've not stated so before AFAICT. Regardless, I disagree that discussing the validity of recommendations in a thread specifically made to gather such recomm

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

2017-08-30 Thread Moritz Maxeiner via Digitalmars-d
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] http://forum.dlang.org/post/oihbot$134s$1...@digitalmars.com

Re: Symbols missing, unmangle!

2017-08-30 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 30 August 2017 at 20:23:18 UTC, Johnson Jones wrote: It would be nice if, when symbols are missing, they are unmangled! Error 42: Symbol Undefined _D12mMunchhousin12iMunchhousin11__T4GoTsZ4GoMFS12mMunchhousin18__T10MunchhousinTsZ10sMunchhousinfE12mMunchhousin9eGoffZv (void Munchh

Re: Editor recommendations for new users.

2017-08-30 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 30 August 2017 at 21:30:44 UTC, Jerry wrote: On Sunday, 27 August 2017 at 18:08:52 UTC, Moritz Maxeiner wrote: The requirements are rather vague, you can interpret it in a number of ways. The sensible interpretation imho is "as low an install footprint as possible while still fu

Re: Symbols missing, unmangle!

2017-08-31 Thread Moritz Maxeiner via Digitalmars-d
On Thursday, 31 August 2017 at 14:51:59 UTC, Mike Wey wrote: On 30-08-17 23:51, Moritz Maxeiner wrote: 2) Try to get demangling of D symbols into upstream of the currently common linkers (GNU linker, gold, lld, etc.) The GNU linker and gold support demangling D symbols, so if you are on linux

Re: Editor recommendations for new users.

2017-08-31 Thread Moritz Maxeiner via Digitalmars-d
On Thursday, 31 August 2017 at 23:20:52 UTC, Jerry wrote: On Wednesday, 30 August 2017 at 22:42:40 UTC, Moritz Maxeiner wrote: On Wednesday, 30 August 2017 at 21:30:44 UTC, Jerry wrote: The install requirement is arbitrary, and why 20MB? It just seems like you are trying to advertise that progr

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

2017-09-02 Thread Moritz Maxeiner via Digitalmars-d
On Saturday, 2 September 2017 at 20:17:40 UTC, Robert M. Münch wrote: On 2017-08-31 07:13:55 +, drug said: Interesting. How is it comparable with iterators and ranges ideas? Well, see: http://www.rebol.com/docs/core23/rebolcore-6.html#section-6 Thanks for your post about Rebol, I didn'

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

2017-09-02 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 3 September 2017 at 02:08:20 UTC, Ilya Yaroshenko wrote: 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 has

Re: C `restrict` keyword in D

2017-09-02 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 3 September 2017 at 03:04:58 UTC, Uknown wrote: [...] void foo(ref RCArray!int arr, ref int val) @safe { { auto copy = arr; //arr's (and copy's) reference counts are both 2 arr = RCArray!int([]); // There is another owner, so arr // forget

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

2017-09-03 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 3 September 2017 at 09:24:03 UTC, Ilya Yaroshenko wrote: On Sunday, 3 September 2017 at 02:43:51 UTC, Moritz Maxeiner wrote: On Sunday, 3 September 2017 at 02:08:20 UTC, Ilya Yaroshenko wrote: On Tuesday, 29 August 2017 at 12:50:08 UTC, Robert M. Münch wrote: Maybe of interest: http

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

2017-09-03 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 3 September 2017 at 08:37:36 UTC, Robert M. Münch wrote: On 2017-09-02 21:27:58 +, Moritz Maxeiner said: Thanks for your post about Rebol, I didn't know it before. As said, the official Rebol-2 version is a dead-end. Even our main product is still based on it :-) 15 years old

Re: C `restrict` keyword in D

2017-09-03 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 3 September 2017 at 06:11:10 UTC, Uknown wrote: On Sunday, 3 September 2017 at 03:49:21 UTC, Moritz Maxeiner wrote: On Sunday, 3 September 2017 at 03:04:58 UTC, Uknown wrote: [...] void foo(ref RCArray!int arr, ref int val) @safe { { auto copy = arr; //arr's (and copy's) refere

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

2017-09-03 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 3 September 2017 at 14:19:19 UTC, Ilya Yaroshenko wrote: On Sunday, 3 September 2017 at 12:35:16 UTC, Moritz Maxeiner wrote: On Sunday, 3 September 2017 at 09:24:03 UTC, Ilya Yaroshenko wrote: On Sunday, 3 September 2017 at 02:43:51 UTC, Moritz Maxeiner wrote: On Sunday, 3 September

Re: C `restrict` keyword in D

2017-09-03 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 3 September 2017 at 15:39:58 UTC, Uknown wrote: On Sunday, 3 September 2017 at 12:59:25 UTC, Moritz Maxeiner wrote: [...] The main issue I see is that pointers/references can change at runtime, so I don't think a static analysis in the compiler can cover this in general (which, I th

Re: C `restrict` keyword in D

2017-09-03 Thread Moritz Maxeiner via Digitalmars-d
On Monday, 4 September 2017 at 02:43:48 UTC, Uknown wrote: On Sunday, 3 September 2017 at 16:55:51 UTC, Moritz Maxeiner wrote: On Sunday, 3 September 2017 at 15:39:58 UTC, Uknown wrote: On Sunday, 3 September 2017 at 12:59:25 UTC, Moritz Maxeiner wrote: [...] The main issue I see is that point

Re: C `restrict` keyword in D

2017-09-04 Thread Moritz Maxeiner via Digitalmars-d
On Monday, 4 September 2017 at 09:15:30 UTC, ag0aep6g wrote: On 09/04/2017 06:10 AM, Moritz Maxeiner wrote: Indeed, but it also means that - other than null dereferencing - pointer issues can by made into reference issues my dereferencing a pointer and passing that into a function that takes t

Re: C `restrict` keyword in D

2017-09-04 Thread Moritz Maxeiner via Digitalmars-d
On Monday, 4 September 2017 at 10:24:48 UTC, ag0aep6g wrote: On 09/04/2017 11:47 AM, Moritz Maxeiner wrote: Still, though, this is surprising to me, because this means taking the address of a parameter passed by reference (which is in your case is typed as an existing int) can be null. Is this

Re: C `restrict` keyword in D

2017-09-04 Thread Moritz Maxeiner via Digitalmars-d
On Monday, 4 September 2017 at 17:58:41 UTC, Johan Engelen wrote: On Monday, 4 September 2017 at 09:47:12 UTC, Moritz Maxeiner wrote: On Monday, 4 September 2017 at 09:15:30 UTC, ag0aep6g wrote: On 09/04/2017 06:10 AM, Moritz Maxeiner wrote: Indeed, but it also means that - other than null der

Re: C `restrict` keyword in D

2017-09-05 Thread Moritz Maxeiner via Digitalmars-d
On Tuesday, 5 September 2017 at 18:32:34 UTC, Johan Engelen wrote: On Monday, 4 September 2017 at 21:23:50 UTC, Moritz Maxeiner wrote: On Monday, 4 September 2017 at 17:58:41 UTC, Johan Engelen wrote: (The spec requires crashing on null dereferencing, but this spec bit is ignored by DMD and L

Re: Testing whether static foreach is available

2017-09-10 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 10 September 2017 at 01:49:42 UTC, Mike Parker wrote: On Saturday, 9 September 2017 at 16:53:19 UTC, jmh530 wrote: version(DLANGSEMVER >= 2.076.0) { //include static foreach code. } but we can't do conditionals in version blocks, so you'd need a static if. Alternately, we'd also

Re: -betterC and extern(C++) classes

2017-09-10 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 10 September 2017 at 09:31:55 UTC, Walter Bright wrote: On 9/10/2017 1:40 AM, Yuxuan Shui wrote: I was experimenting with -betterC and found out that C++ classes doesn't work. Because the resulting object file needs a symbol "_D14TypeInfo_Class6__vtblZ" which is in druntime. I suppo

Re: -betterC and extern(C++) classes

2017-09-10 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 10 September 2017 at 14:04:20 UTC, rikki cattermole wrote: On 10/09/2017 2:19 PM, Moritz Maxeiner wrote: If TypeInfo for extern(C++) classes is removed, couldn't final extern(C++) classes without base class and which don't implement any interfaces omit the vtable so that the followin

Re: -betterC and extern(C++) classes

2017-09-10 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 10 September 2017 at 15:12:12 UTC, Yuxuan Shui wrote: On Sunday, 10 September 2017 at 14:42:42 UTC, Moritz Maxeiner wrote: On Sunday, 10 September 2017 at 14:04:20 UTC, rikki cattermole wrote: On 10/09/2017 2:19 PM, Moritz Maxeiner wrote: If TypeInfo for extern(C++) classes is remove

Re: -betterC and extern(C++) classes

2017-09-10 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 10 September 2017 at 15:08:50 UTC, Yuxuan Shui wrote: By the way, can we dynamic_cast extern(C++) classes in C++? It doesn't work for me OOTB with dmd 2.075, at least (though I may be missing something): --- classes.d --- import core.memory; extern(C++) class Parent { char id

Re: Known reasons why D crashes without any message?

2017-09-13 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 13 September 2017 at 10:20:48 UTC, Thorsten Sommer wrote: [...] Besides the unit tests, the main program is now able to startup but crashes after a while without any message at all. No stack trace, no exception, nothing. Obviously, this makes it hard to debug anything... [...]

Re: The case for integer overflow checks?

2017-09-18 Thread Moritz Maxeiner via Digitalmars-d
On Monday, 18 September 2017 at 22:32:28 UTC, Dennis Cote wrote: On Monday, 18 September 2017 at 13:25:55 UTC, Andrei Alexandrescu wrote: For the record, with the help of std.experimental.checkedint, the change that fixes the code would be: malloc(width * height * 4) ==> malloc((checked(width)

Re: Passing data and ownership to new thread

2017-09-26 Thread Moritz Maxeiner via Digitalmars-d
On Tuesday, 26 September 2017 at 09:10:41 UTC, James Brister wrote: I'm pretty new to D, but from what I've seen there are two modes of using data across threads: (a) immutable message passing and the new thread copies the data if it needs to be modified, (b) shared, assuming the data will be m

Re: Passing data and ownership to new thread

2017-09-26 Thread Moritz Maxeiner via Digitalmars-d
On Tuesday, 26 September 2017 at 09:10:41 UTC, James Brister wrote: I'm pretty new to D, but from what I've seen there are two modes of using data across threads: (a) immutable message passing and the new thread copies the data if it needs to be modified, (b) shared, assuming the data will be m

Re: Default allocator of container plus element type

2017-10-05 Thread Moritz Maxeiner via Digitalmars-d
On Thursday, 5 October 2017 at 11:35:30 UTC, Nordlöw wrote: Would it be possible to set up a mapping (either formal or informal) of each typical container (such as array, linked-list etc) plus element type to a suitable default allocator? And perhaps add this to the documentation of `std.exper

Re: D on quora ...

2017-10-06 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 6 October 2017 at 21:12:58 UTC, Rion wrote: I can make a few simple demos and have D use by default 5 to 10 more memory then the exact same C or C++ program. While D does not actually use it ( its only marked as allocated for the GC ), it does not dispel the notion or feeling of pe

DIP 1009 Status ?

2017-10-11 Thread Moritz Maxeiner via Digitalmars-d
As it has been a while since I've seen an update on DIP 1009 I'd like to ask what the current status of it is: Has it been closed for feedback and the second stage (submission to language authors) been initiated (as [1] requires)? [1] https://github.com/dlang/DIPs

Re: What is the Philosophy of D?

2017-10-16 Thread Moritz Maxeiner 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 maint

Re: what means... auto ref Args args?

2017-10-18 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 18 October 2017 at 21:38:41 UTC, Dave Jones wrote: Poking around in the source code for emplace and I noticed... T* emplace(T, Args...)(T* chunk, auto ref Args args) what does the "auto ref" do in this situiation? Cant seem to find any explanation in the docs. It means that any

Re: My first experience as a D Newbie

2017-10-19 Thread Moritz Maxeiner via Digitalmars-d
On Thursday, 19 October 2017 at 06:32:10 UTC, Ecstatic Coder wrote: [...] OK actually my initial proposal was this one : http://forum.dlang.org/post/mailman.6425.1503876081.31550.digitalmars-d-b...@puremagic.com [...] And the definitive answer about that is of course something like "Hey man,

Re: My first experience as a D Newbie

2017-10-19 Thread Moritz Maxeiner via Digitalmars-d
On Thursday, 19 October 2017 at 08:17:04 UTC, Ecstatic Coder wrote: On Thursday, 19 October 2017 at 07:04:14 UTC, Moritz Maxeiner wrote: On Thursday, 19 October 2017 at 06:32:10 UTC, Ecstatic Coder wrote: [...] OK actually my initial proposal was this one : http://forum.dlang.org/post/mailman

Re: My first experience as a D Newbie

2017-10-19 Thread Moritz Maxeiner via Digitalmars-d
On Thursday, 19 October 2017 at 09:10:04 UTC, Ecstatic Coder wrote: For instance, here I say that I don't agree that the "easy" way to use D is by using FreeBSD instead of Windows. Here is the answer : "I remember those events very differently, so here they are for posterity: That post of

Re: CTFE Status 2

2017-02-18 Thread Moritz Maxeiner via Digitalmars-d
On Thursday, 16 February 2017 at 21:05:51 UTC, Stefan Koch wrote: Hi Guys, due to the old CTFE status thread getting to page 30, I am now starting a new one. [...] Thank you for your continued work on this. I heavily rely on D's CTFE functionality and I try to read all your updates on it.

Re: CTFE Status 2

2017-02-18 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 19 February 2017 at 01:52:07 UTC, Stefan Koch wrote: On Saturday, 18 February 2017 at 22:40:44 UTC, Moritz Maxeiner wrote: On Thursday, 16 February 2017 at 21:05:51 UTC, Stefan Koch wrote: Hi Guys, due to the old CTFE status thread getting to page 30, I am now starting a new one. [

Re: Threads not garbage collected ?

2017-02-22 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 22 February 2017 at 05:28:17 UTC, Alex wrote: [...] In both gdc and dmd I need to use manually delete this object or the program is blocked after main. Is by design ? Yes, it's documented here[1] (others have already replied on the GC subject, so I won't go into that). If you w

Re: code.dlang.org major outage

2017-02-23 Thread Moritz Maxeiner via Digitalmars-d
On Thursday, 23 February 2017 at 22:55:05 UTC, Sönke Ludwig wrote: The virtual server that is running code.dlang.org has frozen about an hour ago and fails to boot further than to the bootloader. Initial attempts to recover from within Grub have failed and it's unclear what the root cause is. I

Re: If you needed any more evidence that memory safety is the future...

2017-02-24 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 24 February 2017 at 06:59:16 UTC, Jack Stouffer wrote: https://bugs.chromium.org/p/project-zero/issues/detail?id=1139 [...] This isn't evidence that memory safety is "the future", though. This is evidence that people do not follow basic engineering practices (for whatever seemingly

Re: code.dlang.org major outage

2017-02-24 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 24 February 2017 at 11:22:34 UTC, Sönke Ludwig wrote: [...] Would be good if someone could have a look. Once this is merged, anyone can run this on a server using `./dub-registry --mirror https://code.dlang.org/` and then forward incoming requests using a reverse proxy to http://12

Re: If you needed any more evidence that memory safety is the future...

2017-02-24 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 24 February 2017 at 14:35:44 UTC, Jack Stouffer wrote: On Friday, 24 February 2017 at 13:38:57 UTC, Moritz Maxeiner wrote: This isn't evidence that memory safety is "the future", though. This is evidence that people do not follow basic engineering practices (for whatever seemingly va

Re: If you needed any more evidence that memory safety is the future...

2017-03-02 Thread Moritz Maxeiner via Digitalmars-d
On Thursday, 2 March 2017 at 22:25:49 UTC, H. S. Teoh wrote: [...] http://www.geekwire.com/2017/amazon-explains-massive-aws-outage-says-employee-error-took-servers-offline-promises-changes/ Yes, which inevitably happens every now and then, because of human fallability. But again, the eleph

Re: If you needed any more evidence that memory safety is the future...

2017-03-02 Thread Moritz Maxeiner via Digitalmars-d
On Thursday, 2 March 2017 at 23:00:34 UTC, Guillaume Piolat wrote: On Friday, 24 February 2017 at 13:38:57 UTC, Moritz Maxeiner wrote: On Friday, 24 February 2017 at 06:59:16 UTC, Jack Stouffer wrote: https://bugs.chromium.org/p/project-zero/issues/detail?id=1139 [...] This isn't evidence th

Re: If you needed any more evidence that memory safety is the future...

2017-03-03 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 3 March 2017 at 09:22:31 UTC, Jacob Carlborg wrote: On 2017-03-03 03:11, Moritz Maxeiner wrote: [...] TL/DR: I wish people would write more native libraries in safe languages, but who has the time for that? So we need operating systems and the core libraries to be built from the g

Re: If you needed any more evidence that memory safety is the future...

2017-03-03 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 3 March 2017 at 02:48:46 UTC, Nick Sabalausky (Abscissa) wrote: On 03/02/2017 06:00 PM, Guillaume Piolat wrote: On Friday, 24 February 2017 at 13:38:57 UTC, Moritz Maxeiner wrote: On Friday, 24 February 2017 at 06:59:16 UTC, Jack Stouffer wrote: https://bugs.chromium.org/p/project-z

Re: If you needed any more evidence that memory safety is the future...

2017-03-03 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 3 March 2017 at 16:38:52 UTC, Kagamin wrote: On Friday, 3 March 2017 at 02:11:38 UTC, Moritz Maxeiner wrote: My major gripe, though, is still that people tend to create "safe" wrappers around "unsafe" (mostly) C libraries, which (in the sense of safety) doesn't really help me as a de

Re: If you needed any more evidence that memory safety is the future...

2017-03-03 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 3 March 2017 at 16:43:05 UTC, Kagamin wrote: On Friday, 24 February 2017 at 19:19:57 UTC, Moritz Maxeiner wrote: *Then* you have to provide conclusive (or at the very least hard to refute) proof that the reason that no one could break them were the memory safety features; and then, *

Re: What about this logo ":D" to advertise the D language ?

2017-03-03 Thread Moritz Maxeiner via Digitalmars-d
On Thursday, 2 March 2017 at 18:45:23 UTC, Ali Çehreli wrote: On 03/02/2017 07:46 AM, angel wrote: >> Isn't it :C => :C++ => :D >> >> Much better than :C# of course. > > > Your :C++ looks like someone throwing up. > Well ... maybe this is intentional. I like it more than "two band aids". :)

Poor man's Result implementation

2017-03-03 Thread Moritz Maxeiner via Digitalmars-d
Having taken a bit of time to get more familiar with Rust I wondered if we could have something like Rust's algebraic result type[1] using Phobos' Algebraic template and started to experiment: --- Usage enum DivisionError { ZeroDivisor } Result!(int, DivisionError) divide(int dividend, in

Re: D street cred: Just a thought

2017-03-04 Thread Moritz Maxeiner via Digitalmars-d
On Saturday, 4 March 2017 at 15:35:13 UTC, Ilya Yaroshenko wrote: [...] my 1 cent: we should stop trying to convert C++ users. Please, do no push devs to do not do something. There are two directions: betterC and DRuntime. I've tried to follow the "betterC" discussion, but so far a precis

Re: Deterministic Memory Management With Standard Library Progress

2017-03-04 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 5 March 2017 at 00:58:44 UTC, Anthony wrote: [...] I've learned the basics of D. I read the tutorial book, as I would call it, and some further tutorials on templates and other cool things. I just don't feel comfortable investing a significant effort acquainting myself further with

Re: If you needed any more evidence that memory safety is the future...

2017-03-05 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 5 March 2017 at 11:48:23 UTC, Jacob Carlborg wrote: [...] I agree. The only potential hope I see would be to port Linux to a memory safe language. That would indeed eliminate essentially all of those tasks; unfortunately porting Linux in itself would require a tremendous amount o

  1   2   3   4   >