[Issue 16485] Add trait for determining whether a member variable is static or not

2017-03-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16485 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/d79da1d3cac16043b3599a234875c20c9a9e7b0c Issue 16485 - Add trait for testing if a member is

Re: Date formatting in D

2017-03-08 Thread aberba via Digitalmars-d-learn
On Wednesday, 8 March 2017 at 15:46:42 UTC, Adam D. Ruppe wrote: On Wednesday, 8 March 2017 at 15:29:11 UTC, aberba wrote: [...] The PHP function is basically just (translated to D): string date(string format, time_t timestamp) { char[256] buffer; auto ret = strftime(buffer.ptr,

Re: Date formatting in D

2017-03-08 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 8 March 2017 at 15:29:11 UTC, aberba wrote: Having to do these stuff with C is a punch in the face. Or PHP was: date(format, timestamp); The PHP function is basically just (translated to D): string date(string format, time_t timestamp) { char[256] buffer; auto ret =

[Issue 17075] ctRegex BacktrackingMatcher.prevStack: free(): invalid pointer

2017-03-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17075 Dmitry Olshansky changed: What|Removed |Added CC|

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

2017-03-08 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 8 March 2017 at 14:50:18 UTC, XavierAP wrote: On Wednesday, 8 March 2017 at 14:02:40 UTC, Moritz Maxeiner wrote: [...] This is true for controlled experiments like the one I pointed to and this model works fine for those sciences where controlled experiments are applicable

Re: Date formatting in D

2017-03-08 Thread aberba via Digitalmars-d-learn
On Tuesday, 7 March 2017 at 20:52:39 UTC, ikod wrote: On Tuesday, 7 March 2017 at 20:29:07 UTC, aberba wrote: I've been trying to figure out an inbuilt functionality in phobos for formatting date. In my use case, I've been trying to format current Unix timestamp to something like "Thu, 08 Mar

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

2017-03-08 Thread Timon Gehr via Digitalmars-d
On 07.03.2017 16:48, Kagamin wrote: On Monday, 6 March 2017 at 21:05:13 UTC, Timon Gehr wrote: Not every program with a wrong assertion in it exceeds array bounds. Until it does. Not necessarily so. With -release, it will be able to both exceed and not exceed array bounds at the same time

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

2017-03-08 Thread XavierAP via Digitalmars-d
On Wednesday, 8 March 2017 at 14:02:40 UTC, Moritz Maxeiner wrote: On Wednesday, 8 March 2017 at 13:14:19 UTC, XavierAP wrote: On Wednesday, 8 March 2017 at 12:42:37 UTC, Moritz Maxeiner wrote: On Tuesday, 7 March 2017 at 22:07:51 UTC, XavierAP wrote: Plus statistics can prove nothing -- this

Re: DMD + Dynamic Library.

2017-03-08 Thread evilrat via Digitalmars-d-learn
On Wednesday, 8 March 2017 at 18:21:35 UTC, Damien Gibson wrote: On Wednesday, 8 March 2017 at 06:28:47 UTC, Jerry wrote: You have to use "export" for any symbol to be visible from a dll. On Windows by default nothing is exported. Would "export" and "export extern(D):" not be the same? Im

Re: Best way to manage non-memory resources in current D, ex: database handles.

2017-03-08 Thread Chad Joan via Digitalmars-d-learn
Awesome, thank you! On Thursday, 9 March 2017 at 00:47:48 UTC, Adam D. Ruppe wrote: Now, if you forget to scope(exit), it is OK, the garbage collector WILL get around to it eventually, and it is legal to work with C handles and functions from a destructor. It is only illegal to call D's

Re: DMD + Dynamic Library.

2017-03-08 Thread Damien Gibson via Digitalmars-d-learn
Well i guess ill try turning it to export everywhere then in a bit and report back if it worked out.

Re: Passing macros from commandline or enumerating versions

2017-03-08 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 8 March 2017 at 12:00:40 UTC, Martin Drašar wrote: Yeah, that's definitely an option, but I expect to have troubles with DUB if I use this approach. ugh dub really show offer some way to pass individual modules too. Maybe we can request a `--passthrough

[Issue 17157] ctRegex.matchAll doesn't set last item in Captures

2017-03-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17157 Dmitry Olshansky changed: What|Removed |Added Keywords||pull --- Comment

Re: Date formatting in D

2017-03-08 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 8 March 2017 at 16:00:26 UTC, aberba wrote: Your docs page is really effective, not pretty though. If you have specific complaints/suggestions, feel free to make a thread in the General forum, or email me destructiona...@gmail.com and I'll see what I can do (just don't want to

[Issue 15593] ctRegex: "munmap_chunk(): invalid pointer"

2017-03-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15593 Dmitry Olshansky changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 15637] Region allocator assert failure when expanding the last allocation

2017-03-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15637 Sönke Ludwig changed: What|Removed |Added Assignee|nob...@puremagic.com|and...@erdani.com

[Issue 17246] Extra destructor call.

2017-03-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17246 Ketmar Dark changed: What|Removed |Added CC|

[Issue 15637] Region allocator assert failure when expanding the last allocation

2017-03-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15637 Sönke Ludwig changed: What|Removed |Added CC|

Re: DMD + Dynamic Library.

2017-03-08 Thread Damien Gibson via Digitalmars-d-learn
On Wednesday, 8 March 2017 at 06:28:47 UTC, Jerry wrote: You have to use "export" for any symbol to be visible from a dll. On Windows by default nothing is exported. Would "export" and "export extern(D):" not be the same? Im confuseled..

Re: Clarification on D.

2017-03-08 Thread aberba via Digitalmars-d
On Wednesday, 8 March 2017 at 22:13:26 UTC, XavierAP wrote: On Wednesday, 8 March 2017 at 20:00:54 UTC, aberba wrote: (To make my problem clear, how is D's current state not going to allow / make it so difficult for developers (who know what they are doing) to write say Photoshop-scale

Re: DIP-1000 and return

2017-03-08 Thread Ilya Yaroshenko via Digitalmars-d-learn
On Monday, 2 January 2017 at 15:28:57 UTC, Nordlöw wrote: Should I file a bug report? Yes please

Re: Phobos and LTO

2017-03-08 Thread Johan Engelen via Digitalmars-d
On Tuesday, 7 March 2017 at 22:38:33 UTC, kinke wrote: Yep, I gave LLD 3.9 a try on Win64 some weeks ago. Works out of the box as drop-in replacement for Microsoft's link.exe, incl. usage of environment variables. Niiice. Awesome indeed! Does LLVM trunk automatically build an LLD LTO

[Issue 16612] Bug in std.regex? in dmd? Segmentation fault

2017-03-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16612 Dmitry Olshansky changed: What|Removed |Added Status|NEW |RESOLVED

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

2017-03-08 Thread Brad Roberts via Digitalmars-d
On 3/8/2017 5:56 AM, Moritz Maxeiner via Digitalmars-d wrote: On Wednesday, 8 March 2017 at 13:30:42 UTC, XavierAP wrote: On Wednesday, 8 March 2017 at 12:42:37 UTC, Moritz Maxeiner wrote: Doing anything else is reckless endangerment since it gives you the feeling of being safe without

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

2017-03-08 Thread Dukc via Digitalmars-d
On Wednesday, 8 March 2017 at 19:21:58 UTC, Dukc wrote: On Wednesday, 8 March 2017 at 15:48:47 UTC, Timon Gehr wrote: On 07.03.2017 16:48, Kagamin wrote: [snip] Sorry, accidently accounted that quote to a wrong person.

[Issue 17247] std.bitmanip.read should not assume sliceable range is assign-copyable to ubyte[].

2017-03-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17247 hst...@quickfur.ath.cx changed: What|Removed |Added Keywords||pull --- Comment #2 from

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

2017-03-08 Thread Dukc via Digitalmars-d
On Wednesday, 8 March 2017 at 15:48:47 UTC, Timon Gehr wrote: On 07.03.2017 16:48, Kagamin wrote: I might need to point out that -release does not disable bounds checking in @safe code while it has been stated that -release introduces UB for assertion failures in @safe code. There is no flag

Re: From the D Blog: Editable and Runnable Doc Examples on dlang.org

2017-03-08 Thread Joakim via Digitalmars-d-announce
On Wednesday, 8 March 2017 at 13:24:15 UTC, Mike Parker wrote: Sebastian Wilzbach lays out how the new editable & runnable documentation examples came to be. The blog: https://dlang.org/blog/2017/03/08/editable-and-runnable-doc-examples-on-dlang-org/ Reddit:

Re: Spotted on twitter: Rust user enthusiastically blogs about moving to D

2017-03-08 Thread deadalnix via Digitalmars-d
On Tuesday, 7 March 2017 at 19:07:29 UTC, Jack Stouffer wrote: I've seen this mentioned serval times now by people coming from Rust. Rust users: Is the PC/politicking really that pervasive in their community? https://www.youtube.com/watch?v=dIageYT0Vgg Lot of good stuff in there, but, if

[Issue 17247] std.bitmanip.read should not assume sliceable range is assign-copyable to ubyte[].

2017-03-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17247 --- Comment #1 from hst...@quickfur.ath.cx --- In other words, std.bitmanip.read should not assume that slicing a ubyte range will return ubyte[] or similar, since it could be a user-defined type. --

Re: Phobos and LTO

2017-03-08 Thread Johan Engelen via Digitalmars-d
On Wednesday, 8 March 2017 at 17:16:58 UTC, Johan Engelen wrote: Does LLVM trunk automatically build an LLD LTO plugin on Windows? If not, we should ask about it on the LLVM mailing list. Er... stop me before doing something stupid :) LTO is of course a native feature of LLD.

[Issue 17247] New: std.bitmanip.read should not assume sliceable range is assign-copyable to ubyte[].

2017-03-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17247 Issue ID: 17247 Summary: std.bitmanip.read should not assume sliceable range is assign-copyable to ubyte[]. Product: D Version: D2 Hardware: x86_64 OS: Linux

Clarification on D.

2017-03-08 Thread aberba via Digitalmars-d
I don't really have much experience with large code base, so spare me. From a technical and experience point of view (those with experience in large D code-base), how is only D's GC & optional MMM a significant production-use blocker? (To make my problem clear, how is D's current state not

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

2017-03-08 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 8 March 2017 at 17:40:29 UTC, Brad Roberts wrote: [...] You can hide unsafe code in D by annotating a function with @trusted the same way you can hide unsafe code in Rust with unsafe blocks. Clearly marked is an interesting definition of hidden. --- module

Re: Of the use of unpredictableSeed

2017-03-08 Thread Yuxuan Shui via Digitalmars-d
On Tuesday, 7 March 2017 at 20:15:56 UTC, Nick Sabalausky (Abscissa) wrote: On 03/07/2017 05:18 AM, Seb wrote: [...] Ooh, that's great to know! (Kinda sad that it seems necessary, given the "unix filesystem and unix design" ideals, but oh well, realities are realities.) Is there a

[Tidbit] making your D code more modular & unittestable

2017-03-08 Thread H. S. Teoh via Digitalmars-d
While writing a tool for dissecting various file formats, I found a useful coding pattern that helps your D code be cleaner, more modular, and more easily unittestable. Initially, I wrote a parser module that directly accessed std.stdio.File to parse file contents. Pretty standard approach, but

Re: Clarification on D.

2017-03-08 Thread deadalnix via Digitalmars-d
On Wednesday, 8 March 2017 at 20:00:54 UTC, aberba wrote: I don't really have much experience with large code base, so spare me. From a technical and experience point of view (those with experience in large D code-base), how is only D's GC & optional MMM a significant production-use blocker?

Re: Spotted on twitter: Rust user enthusiastically blogs about moving to D

2017-03-08 Thread Jack Stouffer via Digitalmars-d
On Wednesday, 8 March 2017 at 20:21:24 UTC, deadalnix wrote: Lot of good stuff in there, but, if you know how to read between the lines, all you need to know about the PC/politicking as well. Oh, you and I travel in the same circles (*those* subreddits), I think I can id PC when I see it ;).

[Issue 17247] std.bitmanip.read should not assume sliceable range is assign-copyable to ubyte[].

2017-03-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17247 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/6111a6cb377279912f47bf3e50846715006a9510 Fix issue 17247.

[Issue 17247] std.bitmanip.read should not assume sliceable range is assign-copyable to ubyte[].

2017-03-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17247 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: Passing macros from commandline or enumerating versions

2017-03-08 Thread Martin Drašar via Digitalmars-d-learn
Dne 7.3.2017 v 22:36 Adam D. Ruppe via Digitalmars-d-learn napsal(a): > The way I like to do it is to pass a module on the command line that > contains the custom config. So in the app: > > --- > import myapp.config; > > // use the variables defined in there like normal > --- > > > Now, to

Re: Best memory management D idioms

2017-03-08 Thread Moritz Maxeiner via Digitalmars-d-learn
On Wednesday, 8 March 2017 at 06:42:40 UTC, ag0aep6g wrote: [...] Yes and yes. GCAllocator.allocate calls core.memory.GC.malloc with does pretty much the same thing as the builtin `new`. Nitpicking: `new` is typed (i.e. allocation+construction), `malloc` and `allocate` are not (only

Aedi 0.2.0 release.

2017-03-08 Thread Alexandru Ermicioi via Digitalmars-d-announce
Good day. Announcing Aedi 0.2.0 release! Aedi is dependency injection framework. It is used to construct and wire your application's components (objects, structures, unions, etc.). New features introduced are: 1. Ability to construct, inject any type of data in D. 2. Tutorials with examples

Is it possible to use std.experimental.allocator without the runtime or with the runtime disabled?

2017-03-08 Thread Guillaume Piolat via Digitalmars-d-learn
Is it possible to use std.experimental.allocator without the runtime or with the runtime disabled? It would be ideal for allocating audio buffers in the audio thread. malloc is tolerated but using a pre-allocated area with a fallback on malloc would be way better and faster too.

Re: Is it possible to use std.experimental.allocator without the runtime or with the runtime disabled?

2017-03-08 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-03-08 12:59, Guillaume Piolat wrote: Is it possible to use std.experimental.allocator without the runtime or with the runtime disabled? I had a quick look through the imports, I could not find anything that I know uses the runtime. Although it does use exceptions and asserts in some

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

2017-03-08 Thread Moritz Maxeiner via Digitalmars-d
On Tuesday, 7 March 2017 at 22:07:51 UTC, XavierAP wrote: On Tuesday, 7 March 2017 at 21:24:43 UTC, Moritz Maxeiner wrote: [...] D does not claim to be memory-safe always.It does afaik do so within @safe environments (barring internal runtime or compiler bugs of course). Even C# has the

Re: [Tidbit] making your D code more modular & unittestable

2017-03-08 Thread H. S. Teoh via Digitalmars-d
On Wed, Mar 08, 2017 at 10:03:28PM +, XavierAP via Digitalmars-d wrote: > On Wednesday, 8 March 2017 at 21:34:19 UTC, H. S. Teoh wrote: > > While writing a tool for dissecting various file formats, I found a > > useful coding pattern that helps your D code be cleaner, more > > modular, and

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

2017-03-08 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 8 March 2017 at 22:38:24 UTC, XavierAP wrote: On Wednesday, 8 March 2017 at 21:02:23 UTC, Moritz Maxeiner wrote: [...] The operating word here being "can". The above is semantically equivalent (assuming the delegate gets optimized out) to an unsafe block inside a Rust

Re: Spotted on twitter: Rust user enthusiastically blogs about moving to D

2017-03-08 Thread sarn via Digitalmars-d
PSA: please don't feed the trolls.

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

2017-03-08 Thread H. S. Teoh via Digitalmars-d
On Wed, Mar 08, 2017 at 10:38:24PM +, XavierAP via Digitalmars-d wrote: [...] > Also at least as of 2010 Andrei's book stated that "At the time of > this writing, SafeD is of alpha quality -- meaning that there may be > unsafe programs [@safe code blocks] that pass compilation, and safe >

[Issue 17108] Associative array byKeyValue is unsafe

2017-03-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17108 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --- Comment

[Issue 17075] ctRegex BacktrackingMatcher.prevStack: free(): invalid pointer

2017-03-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17075 Dmitry Olshansky changed: What|Removed |Added Keywords||pull

Re: Spotted on twitter: Rust user enthusiastically blogs about moving to D

2017-03-08 Thread realdonaldtrump via Digitalmars-d
On Wednesday, 8 March 2017 at 22:43:49 UTC, XavierAP wrote: On Wednesday, 8 March 2017 at 21:25:41 UTC, Jack Stouffer wrote: On Wednesday, 8 March 2017 at 20:21:24 UTC, deadalnix wrote: https://www.youtube.com/watch?v=dIageYT0Vgg If anyone wanted a manual on "How to Build an Echo-Chamber", I

Re: Is it possible to use std.experimental.allocator without the runtime or with the runtime disabled?

2017-03-08 Thread Guillaume Piolat via Digitalmars-d-learn
On Wednesday, 8 March 2017 at 12:28:13 UTC, Jacob Carlborg wrote: On 2017-03-08 12:59, Guillaume Piolat wrote: Is it possible to use std.experimental.allocator without the runtime or with the runtime disabled? I had a quick look through the imports, I could not find anything that I know

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

2017-03-08 Thread Minty Fresh via Digitalmars-d
On Sunday, 5 March 2017 at 11:48:23 UTC, Jacob Carlborg wrote: On 2017-03-03 16:23, Moritz Maxeiner wrote: That would be a good next step from an engineering standpoint, I agree, to proceed to minimize the amount of trust in people you need to have vs verifiable safety. I have considered

Re: Spotted on twitter: Rust user enthusiastically blogs about moving to D

2017-03-08 Thread deadalnix via Digitalmars-d
On Tuesday, 7 March 2017 at 16:18:15 UTC, Wyatt wrote: On Tuesday, 7 March 2017 at 03:04:05 UTC, Joakim wrote: https://z0ltan.wordpress.com/2017/02/21/goodbye-rust-and-hello-d/ I like the bit in the comments where he says this: "It doesn’t have to be idiomatic to work just fine, which is

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

2017-03-08 Thread XavierAP via Digitalmars-d
On Wednesday, 8 March 2017 at 12:42:37 UTC, Moritz Maxeiner wrote: On Tuesday, 7 March 2017 at 22:07:51 UTC, XavierAP wrote: Plus statistics can prove nothing -- this logical truth cannot be overstated. It's called empirical evidence and it's one of the most important techniques in

From the D Blog: Editable and Runnable Doc Examples on dlang.org

2017-03-08 Thread Mike Parker via Digitalmars-d-announce
Sebastian Wilzbach lays out how the new editable & runnable documentation examples came to be. The blog: https://dlang.org/blog/2017/03/08/editable-and-runnable-doc-examples-on-dlang-org/ Reddit:

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

2017-03-08 Thread XavierAP via Digitalmars-d
On Wednesday, 8 March 2017 at 12:42:37 UTC, Moritz Maxeiner wrote: Doing anything else is reckless endangerment since it gives you the feeling of being safe without actually being safe. Like using @safe in D, or Rust, and being unaware of unsafe code hidden from you behind "safe" facades.

Re: Spotted on twitter: Rust user enthusiastically blogs about moving to D

2017-03-08 Thread Yuxuan Shui via Digitalmars-d
On Wednesday, 8 March 2017 at 04:56:55 UTC, thedeemon wrote: On Tuesday, 7 March 2017 at 19:09:11 UTC, bachmeier wrote: Yep. If you want to give someone enough rope to get maximum performance, you have to give them enough rope to shoot themselves in the foot. Once you've moved into this

Re: [Tidbit] making your D code more modular & unittestable

2017-03-08 Thread XavierAP via Digitalmars-d
On Wednesday, 8 March 2017 at 21:34:19 UTC, H. S. Teoh wrote: While writing a tool for dissecting various file formats, I found a useful coding pattern that helps your D code be cleaner, more modular, and more easily unittestable. https://en.wikipedia.org/wiki/Dependency_inversion_principle

Re: Spotted on twitter: Rust user enthusiastically blogs about moving to D

2017-03-08 Thread Chris via Digitalmars-d
On Wednesday, 8 March 2017 at 21:25:41 UTC, Jack Stouffer wrote: On Wednesday, 8 March 2017 at 20:21:24 UTC, deadalnix wrote: Oh, you and I travel in the same circles (*those* subreddits), I think I can id PC when I see it ;). https://www.youtube.com/watch?v=dIageYT0Vgg If anyone wanted a

Re: From the D Blog: Editable and Runnable Doc Examples on dlang.org

2017-03-08 Thread Seb via Digitalmars-d-announce
On Wednesday, 8 March 2017 at 20:12:51 UTC, Joakim wrote: On Wednesday, 8 March 2017 at 13:24:15 UTC, Mike Parker wrote: Sebastian Wilzbach lays out how the new editable & runnable documentation examples came to be. The blog:

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

2017-03-08 Thread XavierAP via Digitalmars-d
On Wednesday, 8 March 2017 at 21:02:23 UTC, Moritz Maxeiner wrote: On Wednesday, 8 March 2017 at 17:40:29 UTC, Brad Roberts wrote: [...] You can hide unsafe code in D by annotating a function with @trusted the same way you can hide unsafe code in Rust with unsafe blocks. Clearly marked is

Re: [Tidbit] making your D code more modular & unittestable

2017-03-08 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 8 March 2017 at 21:34:19 UTC, H. S. Teoh wrote: [...] tl;dr: Whenever you have a data structure or a function that depends on a concrete type like File that introduces a dependency between modules, templatize it! In fact, templatize your code whenever possible -- the more the

Re: Spotted on twitter: Rust user enthusiastically blogs about moving to D

2017-03-08 Thread Chris via Digitalmars-d
On Tuesday, 7 March 2017 at 19:07:29 UTC, Jack Stouffer wrote: On Tuesday, 7 March 2017 at 03:04:05 UTC, Joakim wrote: https://z0ltan.wordpress.com/2017/02/21/goodbye-rust-and-hello-d/ This reenforces my estimation that the most persuasive feature of any language is the ability to get shit

Re: Clarification on D.

2017-03-08 Thread XavierAP via Digitalmars-d
On Wednesday, 8 March 2017 at 20:00:54 UTC, aberba wrote: (To make my problem clear, how is D's current state not going to allow / make it so difficult for developers (who know what they are doing) to write say Photoshop-scale software: This is probably a common question, and it would be

Re: Spotted on twitter: Rust user enthusiastically blogs about moving to D

2017-03-08 Thread XavierAP via Digitalmars-d
On Wednesday, 8 March 2017 at 21:25:41 UTC, Jack Stouffer wrote: On Wednesday, 8 March 2017 at 20:21:24 UTC, deadalnix wrote: https://www.youtube.com/watch?v=dIageYT0Vgg If anyone wanted a manual on "How to Build an Echo-Chamber", I would advise you to watch this video starting at about the

[Issue 17157] ctRegex.matchAll doesn't set last item in Captures

2017-03-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17157 Dmitry Olshansky changed: What|Removed |Added CC|

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

2017-03-08 Thread Paulo Pinto via Digitalmars-d
On Wednesday, 8 March 2017 at 13:12:12 UTC, Minty Fresh wrote: On Sunday, 5 March 2017 at 11:48:23 UTC, Jacob Carlborg wrote: On 2017-03-03 16:23, Moritz Maxeiner wrote: That would be a good next step from an engineering standpoint, I agree, to proceed to minimize the amount of trust in

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

2017-03-08 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 8 March 2017 at 13:30:42 UTC, XavierAP wrote: On Wednesday, 8 March 2017 at 12:42:37 UTC, Moritz Maxeiner wrote: Doing anything else is reckless endangerment since it gives you the feeling of being safe without actually being safe. Like using @safe in D, or Rust, and being

[Issue 13156] `abstract` attribute should be disallowed in `interface`s

2017-03-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13156 b2.t...@gmx.com changed: What|Removed |Added Status|NEW |RESOLVED CC|

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

2017-03-08 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 8 March 2017 at 13:14:19 UTC, XavierAP wrote: On Wednesday, 8 March 2017 at 12:42:37 UTC, Moritz Maxeiner wrote: On Tuesday, 7 March 2017 at 22:07:51 UTC, XavierAP wrote: Plus statistics can prove nothing -- this logical truth cannot be overstated. It's called empirical

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

2017-03-08 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 8 March 2017 at 13:50:28 UTC, Paulo Pinto wrote: [...] I will just leave this here. https://muen.codelabs.ch/ This seems really cool, but I though seL4[1] were the first in the field. Guess I'll have some more research to do :p [1] https://sel4.systems/

Re: [Tidbit] making your D code more modular & unittestable

2017-03-08 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 8 March 2017 at 21:34:19 UTC, H. S. Teoh wrote: So I came up with an idea to abstract file contents as a random-access range of ubyte with lazy loading, so that I can rewrite file parsing code in the nice Sounds like what the kernel does when you memory-map a file...

[Issue 17108] Associative array byKeyValue is unsafe

2017-03-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17108 --- Comment #2 from hst...@quickfur.ath.cx --- Bah. Regardless of whether the void* cast is allowed or not, _aaRange() is @system so it's still a no-go. --

Re: [Tidbit] making your D code more modular & unittestable

2017-03-08 Thread H. S. Teoh via Digitalmars-d
On Thu, Mar 09, 2017 at 12:21:48AM +, Adam D. Ruppe via Digitalmars-d wrote: > On Wednesday, 8 March 2017 at 21:34:19 UTC, H. S. Teoh wrote: > > So I came up with an idea to abstract file contents as a > > random-access range of ubyte with lazy loading, so that I can > > rewrite file parsing

Re: Best way to manage non-memory resources in current D, ex: database handles.

2017-03-08 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 8 March 2017 at 23:54:56 UTC, Chad Joan wrote: What's the best way to implement such a range in current D? I'd go with a struct with disabled copying and default construction, then make the destructor free it and the function that returns it populate it. So basically Unique.

Re: Of the use of unpredictableSeed

2017-03-08 Thread Jacob Carlborg via Digitalmars-d
On 2017-03-07 21:15, Nick Sabalausky (Abscissa) wrote: And anyone know about OSX? Would OSX use the getentropy the article you linked to mentions for OpenBSD? As far as I can see, there's no "getentropy" on macOS. I see references to it online, but I cannot find it in any header files. Or

Re: DUB specify version identifier on command line?

2017-03-08 Thread XavierAP via Digitalmars-d-learn
On Wednesday, 8 March 2017 at 02:15:00 UTC, Nicholas Wilson wrote: Setting version identifiers is done by the `-version=ident` command line flag (this is equivalent to `version = ident` at source level) . This should therefore be settable by the "dflags" dub configuration setting. The way I

[Issue 17246] New: Extra destructor call.

2017-03-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17246 Issue ID: 17246 Summary: Extra destructor call. Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: critical Priority: P1

Re: Cconditional expression in return statement. Bug?

2017-03-08 Thread Jack Applegame via Digitalmars-d-learn
On Tuesday, 7 March 2017 at 16:00:54 UTC, kinke wrote: Definitely a very bad bug. It works too if you mark `fun()` as nothrow. Please file a DMD issue. https://issues.dlang.org/show_bug.cgi?id=17246

Re: Can i using D & LLVM & SDL2 for Android?

2017-03-08 Thread Joakim via Digitalmars-d-learn
On Tuesday, 7 March 2017 at 12:06:48 UTC, dummy wrote: Just thought. I do want to know. :-) As far as I know is, * LDC2 woring on NDK(yah!) * Native OpenGLES: http://wiki.dlang.org/Build_LDC_for_Android#Build_a_sample_OpenGL_Android_app_ported_to_D * Dlangui working on Android that based