[Issue 14437] Double scope(failure) ignored

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

[Issue 13790] Spellchecker doesn't work for enum members

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

[Issue 13238] getMember trait changes function linkage

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

Re: Best memory management D idioms

2017-03-07 Thread ag0aep6g via Digitalmars-d-learn
On 03/08/2017 02:15 AM, XavierAP wrote: I see the default allocator is the same GC heap used by 'new'. Just for my learning curiosity, does this mean that if I theAllocator.make() something and then forget to dispose() it, it will be garbage collected the same once no longer referenced? And so

Re: DMD + Dynamic Library.

2017-03-07 Thread Jerry via Digitalmars-d-learn
You have to use "export" for any symbol to be visible from a dll. On Windows by default nothing is exported.

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

2017-03-07 Thread thedeemon via Digitalmars-d
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 territory, you've made a decision to throw away safety and

DMD + Dynamic Library.

2017-03-07 Thread Damien Gibson via Digitalmars-d-learn
Hi everyone. My first post here - I'm not one to usually resort to trying to ask forums directly for help but I'm a bit desperate at this point as I have wasted about 3 days in total of no-life googling trying to figure something out here. My current setup works fine for creation of EXE's and

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

2017-03-07 Thread Soulsbane via Digitalmars-d
On Tuesday, 7 March 2017 at 20:47:12 UTC, Ali Çehreli wrote: On 03/07/2017 11:33 AM, Soulsbane wrote: What does he mean by sidetracked by social causes? I've seen this mentioned before. Is this a big thing in the Rust community? The author had opened the following thread:

Re: DUB specify version identifier on command line?

2017-03-07 Thread Nicholas Wilson via Digitalmars-d-learn
On Tuesday, 7 March 2017 at 22:30:30 UTC, XavierAP wrote: I'm talking about the conditional compilation keyword "version", not about version strings. I've looked in DUB's help and reference [1][2] but can't seem to find how to solve my problem. On the command line it seems to be possible to

Re: Best memory management D idioms

2017-03-07 Thread XavierAP via Digitalmars-d-learn
On Tuesday, 7 March 2017 at 18:21:43 UTC, Eugene Wissner wrote: To avoid this from the beginning, it may be better to use allocators. You can use "make" and "dispose" from std.experimental.allocator the same way as New/Delete. OK I've been reading on std.experimental.allocator; it looks

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

2017-03-07 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 7 March 2017 at 20:44:26 UTC, Nick Sabalausky (Abscissa) wrote: I found it horribly scary at first myself, but what surprised me is that in all the years I've used D, I've never hit an problem resulting from that, not even once. Just wait till you use a library that added a

[Issue 17215] [Reg 2.073] ICE(cgcod.c:findreg) with SIMD and -O -inline

2017-03-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17215 --- Comment #8 from github-bugzi...@puremagic.com --- Commit pushed to revert-6566-fix17215 at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/4373a211ed16d05650aeb1779881b12e09c2ca80 Revert "fix Issue 17215 - ICE(cgcod.c:findreg)

Re: DMD Refuses to Compile Multiple Source Files

2017-03-07 Thread Samwise via Digitalmars-d-learn
On Wednesday, 18 January 2017 at 04:25:42 UTC, Mike Parker wrote: extern(C), not simply extern. It turns off the name mangling. But really, the proper thing to do is to drop the prototype and import the module with the implementation. It's tge way modules are intended to be used. Unless

Re: Date formatting in D

2017-03-07 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, March 07, 2017 22:15:39 Daniel Kozak via Digitalmars-d-learn wrote: > I do not know? Is this some ISO/ANSI format for dates? If yes than we > should add it. If no there is no reason. The ISO formats are already there. There's to/fromISOString and to/fromISOExtString on SysTime,

Re: Problems with setting up dub for publication

2017-03-07 Thread Samwise via Digitalmars-d-learn
On Sunday, 5 March 2017 at 01:54:22 UTC, Mike Parker wrote: ... I was getting the same problem and created on issue on this project's repository (https://github.com/ZILtoid1991/pixelperfectengine), which I think (although I don't know) was the reason this thread was created. Using the

Re: Phobos and LTO

2017-03-07 Thread kinke via Digitalmars-d
On Tuesday, 7 March 2017 at 18:46:15 UTC, Johan Engelen wrote: On Tuesday, 7 March 2017 at 18:42:40 UTC, Johan Engelen wrote: It works on OS X too. And OS X is the only platform for which we package the LTO linker binaries in the release. Has anybody tried LLD on Windows for D already?

DUB specify version identifier on command line?

2017-03-07 Thread XavierAP via Digitalmars-d-learn
I'm talking about the conditional compilation keyword "version", not about version strings. I've looked in DUB's help and reference [1][2] but can't seem to find how to solve my problem. On the command line it seems to be possible to specify debug identifiers, but not version identifiers. [3]

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

2017-03-07 Thread XavierAP via Digitalmars-d
On Tuesday, 7 March 2017 at 21:24:43 UTC, Moritz Maxeiner wrote: Then we need to define "memory safe language" a lot stricter than it's currently being used, and both D and Rust won't qualify as memory safe (since you can write unsafe code in them). D does not claim to be memory-safe always.

Re: [OT] Why don't you advertise more your language on Quora etc ?

2017-03-07 Thread H. S. Teoh via Digitalmars-d
On Mon, Mar 06, 2017 at 10:41:06PM -0500, Nick Sabalausky (Abscissa) via Digitalmars-d wrote: [...] > Yes, this. Although, granted, the OO-koolaid *was* quite strong indeed > in those days. > > It really is strange to look back on all that, when I was fairly sold > on OO too (just not quite as

Re: Passing macros from commandline or enumerating versions

2017-03-07 Thread Adam D. Ruppe via Digitalmars-d-learn
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 define a config file, you do something like: myconfiguration.d # note that the file name

[Issue 17245] Errors about expressions with no effect only are given for basic types

2017-03-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17245 Walter Bright changed: What|Removed |Added CC|

Re: Zcoin implementation bug enabled attacker to create 548,000 Zcoins

2017-03-07 Thread Walter Bright via Digitalmars-d
On 3/7/2017 9:45 AM, Atila Neves wrote: 1 warning generated. Pretty much all C++ compilers will generate warnings for this. The thing about warnings, though, is they imply that there are situations where the code is acceptable. I can't think of any. It needs to be an error. It should never

Passing macros from commandline or enumerating versions

2017-03-07 Thread Martin Drašar via Digitalmars-d-learn
Hi, I was wondering, if there is a way to pass a macro with value to the compiled program, i.e., something like -Dfoo="bar". And if that is not possible, if there is a way to enumerate all set versions. I want my application built with different string imported configurations and I have no idea

Re: Date formatting in D

2017-03-07 Thread Daniel Kozak via Digitalmars-d-learn
Dne 7.3.2017 v 21:29 aberba via Digitalmars-d-learn napsal(a): 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 2017 12:00:00 GMT". How do I go by this

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

2017-03-07 Thread Moritz Maxeiner via Digitalmars-d
On Tuesday, 7 March 2017 at 16:18:01 UTC, Kagamin wrote: On Friday, 3 March 2017 at 17:33:14 UTC, Moritz Maxeiner wrote: And you can write memory incorrect programs in what's currently called memory safe languages[1] Those look like mistakes in interfacing between C and Rust. So it's not

Re: Date formatting in D

2017-03-07 Thread Daniel Kozak via Digitalmars-d-learn
Dne 7.3.2017 v 22:07 aberba via Digitalmars-d-learn napsal(a): 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

Re: Phobos and LTO

2017-03-07 Thread Daniel Kozak via Digitalmars-d
Dne 7.3.2017 v 19:42 Johan Engelen via Digitalmars-d napsal(a): On Tuesday, 7 March 2017 at 18:15:52 UTC, Temtaime wrote: On Sunday, 5 March 2017 at 19:52:12 UTC, Daniel Kozak wrote: Dne 5.3.2017 v 20:31 Temtaime via Digitalmars-d napsal(a): On Sunday, 5 March 2017 at 17:17:13 UTC, Las

Re: Date formatting in D

2017-03-07 Thread Daniel Kozak via Digitalmars-d-learn
I do not know? Is this some ISO/ANSI format for dates? If yes than we should add it. If no there is no reason. Dne 7.3.2017 v 22:07 aberba via Digitalmars-d-learn napsal(a): On Tuesday, 7 March 2017 at 20:29:07 UTC, aberba wrote: I've been trying to figure out an inbuilt functionality in

Re: Ordering comparisons

2017-03-07 Thread Andrei Alexandrescu via Digitalmars-d
On 03/07/2017 03:49 PM, H. S. Teoh via Digitalmars-d wrote: Unfortunately, because strings are arrays, deprecating array comparisons *will* break a *lot* of code. Misunderstanding, string comparisons are legit because character comparisons are legit. This is about deprecating array

Re: Date formatting in D

2017-03-07 Thread aberba via Digitalmars-d-learn
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 2017 12:00:00 GMT". How do I go by this easily

Re: Ordering comparisons

2017-03-07 Thread H. S. Teoh via Digitalmars-d
On Tue, Mar 07, 2017 at 07:53:37PM +, Stefan Koch via Digitalmars-d wrote: > On Tuesday, 7 March 2017 at 19:40:53 UTC, Andrei Alexandrescu wrote: > > On 03/07/2017 12:54 PM, H. S. Teoh via Digitalmars-d wrote: > > > (1) I may be remembering wrong, but I thought structs had always > > > been

[Issue 17232] The index page for std.algorithm looks bad on mobile

2017-03-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17232 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/bc7d20a638d4c14feb7b2b12a44d35078a140530 Issue 17232 - make std.algorithm table more digestable

Re: Date formatting in D

2017-03-07 Thread ikod via Digitalmars-d-learn
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 2017 12:00:00 GMT". How do I go by this easily

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

2017-03-07 Thread Ali Çehreli via Digitalmars-d
On 03/07/2017 11:33 AM, Soulsbane wrote: What does he mean by sidetracked by social causes? I've seen this mentioned before. Is this a big thing in the Rust community? The author had opened the following thread: http://forum.dlang.org/post/dvmsnoxvdbmraisoc...@forum.dlang.org "community

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

2017-03-07 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 03/07/2017 12:52 PM, Ola Fosheim Grøstad wrote: On Tuesday, 7 March 2017 at 12:53:42 UTC, bachmeier wrote: D's arrays are sane, consistent, and logically intuitive even accounting for the "determinism issue". I've never understood why this behavior is surprising - it's exactly what I'd

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

2017-03-07 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 7 March 2017 at 18:49:15 UTC, Guillaume Piolat wrote: On Tuesday, 7 March 2017 at 18:19:47 UTC, Ola Fosheim Grøstad wrote: On Tuesday, 7 March 2017 at 17:59:28 UTC, Meta wrote: What exactly are we talking about here? The array stomping protection stuff? Lack of static guarantees

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

2017-03-07 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 03/07/2017 02:07 PM, 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? That surprised me too. My impression is that us D community folks chastise ourselves plenty for

Re: Best memory management D idioms

2017-03-07 Thread Eugene Wissner via Digitalmars-d-learn
On Tuesday, 7 March 2017 at 20:15:37 UTC, XavierAP wrote: On Tuesday, 7 March 2017 at 18:21:43 UTC, Eugene Wissner wrote: To avoid this from the beginning, it may be better to use allocators. You can use "make" and "dispose" from std.experimental.allocator the same way as New/Delete. Thanks!

Re: Independent Study at my university using D

2017-03-07 Thread Random D user via Digitalmars-d-announce
On Monday, 6 March 2017 at 02:25:41 UTC, Jeremy DeHaan wrote: The precise GC is going to continue to hang until it can be tweaked to be as fast or faster than the conservative GC we have now. In which cases? Shouldn't this be pulled and put behind a switch? I thought D's GC was supposed to

Date formatting in D

2017-03-07 Thread aberba via Digitalmars-d-learn
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 2017 12:00:00 GMT". How do I go by this easily (Currently, long concatenation of strings is what I'm

Re: Of the use of unpredictableSeed

2017-03-07 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 03/07/2017 05:18 AM, Seb wrote: As apparently no one here hasn't mentioned this, Linux >= 3.17 has a dedicated syscall API. Please see: http://man7.org/linux/man-pages/man2/getrandom.2.html And this excellent introductory article: https://lwn.net/Articles/605828 Ooh, that's great to

Re: Best memory management D idioms

2017-03-07 Thread XavierAP via Digitalmars-d-learn
On Tuesday, 7 March 2017 at 18:21:43 UTC, Eugene Wissner wrote: To avoid this from the beginning, it may be better to use allocators. You can use "make" and "dispose" from std.experimental.allocator the same way as New/Delete. Thanks! looking into it. Does std.experimental.allocator have a

Re: Of the use of unpredictableSeed

2017-03-07 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 03/07/2017 09:46 AM, Kagamin wrote: On Tuesday, 7 March 2017 at 10:18:52 UTC, Seb wrote: http://man7.org/linux/man-pages/man2/getrandom.2.html Unnecessarily reading large quantities of data will have a negative impact on other users of the /dev/random and /dev/urandom devices. Therefore,

Re: Ordering comparisons

2017-03-07 Thread Stefan Koch via Digitalmars-d
On Tuesday, 7 March 2017 at 19:40:53 UTC, Andrei Alexandrescu wrote: On 03/07/2017 12:54 PM, H. S. Teoh via Digitalmars-d wrote: (1) I may be remembering wrong, but I thought structs had always been intended to be compared field-wise? I remember when working on AA's that the compiler would

Re: Ordering comparisons

2017-03-07 Thread Andrei Alexandrescu via Digitalmars-d
On 03/07/2017 12:54 PM, H. S. Teoh via Digitalmars-d wrote: (1) I may be remembering wrong, but I thought structs had always been intended to be compared field-wise? I remember when working on AA's that the compiler would emit a default implementation of opEquals that did member-wise

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

2017-03-07 Thread Soulsbane via Digitalmars-d
On Tuesday, 7 March 2017 at 03:04:05 UTC, Joakim wrote: https://z0ltan.wordpress.com/2017/02/21/goodbye-rust-and-hello-d/ Very welcoming and helpful community that actually focuses on the technical side of things rather than getting sidetracked by social causes What does he mean by

removing module level from ddox output

2017-03-07 Thread Bryce via Digitalmars-d-learn
Is there a way to flatten out the documentation hierarchy generated by ddox? To be more clear, when we generate documentation with dub -b ddox, the main page lists all my modules, and each module page lists all the classes in that module, etc. I want to remove the modules from the main page

Re: [OT] Re: Why don't you advertise more your language on Quora etc ?

2017-03-07 Thread H. S. Teoh via Digitalmars-d
On Tue, Mar 07, 2017 at 06:45:55PM +, Rico Decho via Digitalmars-d wrote: [...] > But I don't think that D's GC is fine for people who care about it. > > If it is, why are people on this forum giving advices on how to > disable and/or avoid it for soft real-time applications where a GC >

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

2017-03-07 Thread bachmeier via Digitalmars-d
On Tuesday, 7 March 2017 at 18:06:05 UTC, H. S. Teoh wrote: Like bachmeier, I have found D arrays (well, slices) to be exactly how I expect arrays to work. The "determinism issue" is really only a problem in exceptional cases where you probably should be using a custom type instead. Or in

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

2017-03-07 Thread Jack Stouffer via Digitalmars-d
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 done. That's not a positive value judgement on that focus

Re: Deterministic Memory Management With Standard Library Progress

2017-03-07 Thread Guillaume Piolat via Digitalmars-d
On Monday, 6 March 2017 at 16:10:51 UTC, Anthony wrote: This is also encouraging! Thanks for the concrete advice. But, I think due to my inexperience, to don't really understand some of your advice. Specifically, the only-memory recourses like strings and arrays can be managed by the GC, and

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

2017-03-07 Thread Guillaume Piolat via Digitalmars-d
On Tuesday, 7 March 2017 at 18:19:47 UTC, Ola Fosheim Grøstad wrote: On Tuesday, 7 March 2017 at 17:59:28 UTC, Meta wrote: What exactly are we talking about here? The array stomping protection stuff? Lack of static guarantees on the underlying array buffer. Like with pointers, ownership

Re: Phobos and LTO

2017-03-07 Thread Johan Engelen via Digitalmars-d
On Tuesday, 7 March 2017 at 18:42:40 UTC, Johan Engelen wrote: It works on OS X too. And OS X is the only platform for which we package the LTO linker binaries in the release. Has anybody tried LLD on Windows for D already? https://lld.llvm.org/windows_support.html If LLD works (or another

Re: [OT] Re: Why don't you advertise more your language on Quora etc ?

2017-03-07 Thread Rico Decho via Digitalmars-d
D seems to be in a situation where those who don't care have a crap GC which needs to be improved and those who do care have the tools to deal with it. So there needs to be ongoing replacement of the D GC until there is something good, this is a technical problem. That people who care about

Re: Phobos and LTO

2017-03-07 Thread Johan Engelen via Digitalmars-d
On Tuesday, 7 March 2017 at 18:15:52 UTC, Temtaime wrote: On Sunday, 5 March 2017 at 19:52:12 UTC, Daniel Kozak wrote: Dne 5.3.2017 v 20:31 Temtaime via Digitalmars-d napsal(a): On Sunday, 5 March 2017 at 17:17:13 UTC, Las wrote: Is Phobos compiled with LTO enabled? There is no LTO with D.

Re: D street cred: Just a thought

2017-03-07 Thread ketmar via Digitalmars-d
Ilya Yaroshenko wrote: I don't care about existing D users. i wonder if "existing D users" care about your "betterC" and other initiatives then. rethorical sentence, no need to answer to it.

Re: Best memory management D idioms

2017-03-07 Thread Eugene Wissner via Digitalmars-d-learn
On Tuesday, 7 March 2017 at 17:37:43 UTC, XavierAP wrote: On Tuesday, 7 March 2017 at 16:51:23 UTC, Kagamin wrote: There's nothing like that of C++. Don't you think New/Delete from dlib.core.memory fills the bill? for C++ style manual dynamic memory management? It looks quite nice to me,

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

2017-03-07 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 7 March 2017 at 17:59:28 UTC, Meta wrote: What exactly are we talking about here? The array stomping protection stuff? Lack of static guarantees on the underlying array buffer.

Re: Phobos and LTO

2017-03-07 Thread Temtaime via Digitalmars-d
On Sunday, 5 March 2017 at 19:52:12 UTC, Daniel Kozak wrote: Dne 5.3.2017 v 20:31 Temtaime via Digitalmars-d napsal(a): On Sunday, 5 March 2017 at 17:17:13 UTC, Las wrote: Is Phobos compiled with LTO enabled? There is no LTO with D. Yes it is

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

2017-03-07 Thread H. S. Teoh via Digitalmars-d
On Tue, Mar 07, 2017 at 05:52:23PM +, Ola Fosheim Grøstad via Digitalmars-d wrote: > On Tuesday, 7 March 2017 at 12:53:42 UTC, bachmeier wrote: > > D's arrays are sane, consistent, and logically intuitive even > > accounting for the "determinism issue". I've never understood why > > this

[Issue 17245] Errors about expressions with no effect only are given for basic types

2017-03-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17245 --- Comment #1 from Jack Stouffer --- This should also apply to opCmp, and opBinaryRight --

Re: Ordering comparisons

2017-03-07 Thread H. S. Teoh via Digitalmars-d
On Mon, Mar 06, 2017 at 08:27:56PM -0500, Andrei Alexandrescu via Digitalmars-d wrote: > While reviewing work on array comparisons, Vladimir found an odd issue: > > https://issues.dlang.org/show_bug.cgi?id=17244 > > Investigation reveals that during array comparison for inequality, > structs

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

2017-03-07 Thread Meta via Digitalmars-d
On Tuesday, 7 March 2017 at 17:52:23 UTC, Ola Fosheim Grøstad wrote: On Tuesday, 7 March 2017 at 12:53:42 UTC, bachmeier wrote: D's arrays are sane, consistent, and logically intuitive even accounting for the "determinism issue". I've never understood why this behavior is surprising - it's

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

2017-03-07 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 7 March 2017 at 12:53:42 UTC, bachmeier wrote: D's arrays are sane, consistent, and logically intuitive even accounting for the "determinism issue". I've never understood why this behavior is surprising - it's exactly what I'd expect. But then I don't program in a way that it's

Re: Zcoin implementation bug enabled attacker to create 548, 000 Zcoins

2017-03-07 Thread Atila Neves via Digitalmars-d
On Tuesday, 7 March 2017 at 06:59:38 UTC, Walter Bright wrote: On 3/6/2017 10:06 PM, Jack Stouffer wrote: To be fair, this also would have been caught with proper testing ... which obviously didn't happen. My idea of fair is it should never have gotten past the compiler. It's a simple

Re: Best memory management D idioms

2017-03-07 Thread XavierAP via Digitalmars-d-learn
On Tuesday, 7 March 2017 at 16:51:23 UTC, Kagamin wrote: There's nothing like that of C++. Don't you think New/Delete from dlib.core.memory fills the bill? for C++ style manual dynamic memory management? It looks quite nice to me, being no more than a simple malloc wrapper with

Re: WebAssembly design is done?

2017-03-07 Thread Ola Fosheim Grøstad via Digitalmars-d
This looks like a nice tool for those wanting to learn more about WebAssembly: https://mbebenita.github.io/WasmExplorer/

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

2017-03-07 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 7 March 2017 at 15:48:12 UTC, 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. Going outside array bounds isn't necessarily the same as a contradiction.

Re: Best memory management D idioms

2017-03-07 Thread Kagamin via Digitalmars-d-learn
On Sunday, 5 March 2017 at 20:54:06 UTC, XavierAP wrote: What I want to learn (not debate) is the currently available types, idioms etc. whenever one wants deterministic memory management. There's nothing like that of C++. Currently you have Unique, RefCounted, scoped and individual people

Re: [OT] Re: Why don't you advertise more your language on Quora etc ?

2017-03-07 Thread Russel Winder via Digitalmars-d
On Mon, 2017-03-06 at 10:22 -0800, H. S. Teoh via Digitalmars-d wrote: > […] > Nevertheless, it's certainly true that D's GC could use a major > upgrade > at some point.  While it's not horrible, the present implementation > does > leave more to be desired.  Hopefully the various efforts at GC by

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

2017-03-07 Thread Wyatt via Digitalmars-d
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 relaxing." People often don't get how nice this is.

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

2017-03-07 Thread Kagamin via Digitalmars-d
On Friday, 3 March 2017 at 17:33:14 UTC, Moritz Maxeiner wrote: And you can write memory incorrect programs in what's currently called memory safe languages[1] Those look like mistakes in interfacing between C and Rust. So it's not really written in a safe language. And most of them are in

Re: Cconditional expression in return statement. Bug?

2017-03-07 Thread kinke via Digitalmars-d-learn
On Tuesday, 7 March 2017 at 14:26:18 UTC, Jack Applegame wrote: I'm pretty sure this is a bug. And very bad bug. I spent several hours looking for it. What do you think? Definitely a very bad bug. It works too if you mark `fun()` as nothrow. Please file a DMD issue.

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

2017-03-07 Thread Kagamin via Digitalmars-d
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.

Re: Zcoin implementation bug enabled attacker to create 548, 000 Zcoins

2017-03-07 Thread ketmar via Digitalmars-d
Jack Stouffer wrote: On Tuesday, 7 March 2017 at 15:05:45 UTC, ketmar wrote: only for primitive types, sadly. void main () { Object a, b; a == b; } oops. no more error messages. yes, i know that this invokes `opEquals()`, and `opEquals()` can have side-effects. but what are the chances of

Re: Zcoin implementation bug enabled attacker to create 548, 000 Zcoins

2017-03-07 Thread ketmar via Digitalmars-d
Walter Bright wrote: https://makebitcoingreatagain.wordpress.com/2017/02/18/is-the-zcoin-bug-in-checktransaction/#update6 The error is here: https://github.com/zcoinofficial/zcoin/blob/81a667867b5d8489... and the line of code: zccoinSpend.denomination == libzerocoin::ZQ_LOVELACE; In other

Re: Zcoin implementation bug enabled attacker to create 548, 000 Zcoins

2017-03-07 Thread Jack Stouffer via Digitalmars-d
On Tuesday, 7 March 2017 at 15:05:45 UTC, ketmar wrote: only for primitive types, sadly. void main () { Object a, b; a == b; } oops. no more error messages. yes, i know that this invokes `opEquals()`, and `opEquals()` can have side-effects. but what are the chances of writing such

[Issue 17245] New: Errors about expressions with no effect only are given for basic types

2017-03-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17245 Issue ID: 17245 Summary: Errors about expressions with no effect only are given for basic types Product: D Version: D2 Hardware: All OS: All Status:

Re: Of the use of unpredictableSeed

2017-03-07 Thread Kagamin via Digitalmars-d
On Tuesday, 7 March 2017 at 10:18:52 UTC, Seb wrote: http://man7.org/linux/man-pages/man2/getrandom.2.html Unnecessarily reading large quantities of data will have a negative impact on other users of the /dev/random and /dev/urandom devices. Therefore, getrandom() should not be used for

Cconditional expression in return statement. Bug?

2017-03-07 Thread Jack Applegame via Digitalmars-d-learn
Code (https://dpaste.dzfl.pl/8e7a9c380e99): import std.stdio; struct Foo { int val; this(int val) { writefln("%s.this(int)", val); this.val = val; } this(this) { writefln("%s.this(this)", val); this.val = val; } ~this() {

Re: Ordering comparisons

2017-03-07 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Tuesday, 7 March 2017 at 02:51:37 UTC, Jonathan M Davis wrote: If we can, we should probably make structs that have opCmp use opCmp like they should, and those that don't continue to use memcmp for the moment but get a deprecation message. Then after whatever amount of time we think is

Re: Ordering comparisons

2017-03-07 Thread Andrei Alexandrescu via Digitalmars-d
On 03/06/2017 10:44 PM, Nick Sabalausky (Abscissa) wrote: On 03/06/2017 08:27 PM, Andrei Alexandrescu wrote: * A struct S { int x; } compares differently on little endian and big endian system (!) This one is very surprising. How is that so, if both structs being compared are of the same

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

2017-03-07 Thread bachmeier via Digitalmars-d
On Tuesday, 7 March 2017 at 09:54:36 UTC, qznc wrote: I somewhat wonder about "Arrays (arguably the most important data structure) are actually sane, consistent, and very much logically intuitive in D unlike the mess that’s C (and C++)." At some points, people get bitten by the determinism

Re: Ordering comparisons

2017-03-07 Thread deadalnix via Digitalmars-d
On Tuesday, 7 March 2017 at 01:27:56 UTC, Andrei Alexandrescu wrote: The question is what to do to minimize breakage yet "break the bad code". The most backward-compatible solution is to define opCmp automatically to do a field-by-field lexicographical comparison. The most radical solution is

Can i using D & LLVM & SDL2 for Android?

2017-03-07 Thread dummy via Digitalmars-d-learn
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 on SDL2: https://github.com/buggins/dlangui /

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

2017-03-07 Thread XavierAP via Digitalmars-d
On Tuesday, 7 March 2017 at 09:54:36 UTC, qznc wrote: I somewhat wonder about "Arrays (arguably the most important data structure) are actually sane, consistent, and very much logically intuitive in D unlike the mess that’s C (and C++)." At some points, people get bitten by the determinism

Re: How to compile against GitHub fork of Phobos?

2017-03-07 Thread XavierAP via Digitalmars-d-learn
On Tuesday, 7 March 2017 at 01:14:28 UTC, Q. Schroll wrote: I have a fork of the standard-library in the folder "phobos". DMD looking for the built-in phobos is specified in the configuration file (sc.ini on Windows, dmd.conf on Linux), not hardcoded. You may want to remove it from there.

[Issue 13855] Allow multiple selective imports from different modules in a single import statement

2017-03-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13855 Walter Bright changed: What|Removed |Added CC|

Re: Of the use of unpredictableSeed

2017-03-07 Thread Seb via Digitalmars-d
On Tuesday, 7 March 2017 at 03:43:42 UTC, Jonathan M Davis wrote: On Monday, March 06, 2017 22:04:44 Nick Sabalausky via Digitalmars-d wrote: On 03/06/2017 05:19 PM, sarn wrote: > On Monday, 6 March 2017 at 10:12:09 UTC, Shachar Shemesh > wrote: >> Excuse me if I'm asking a trivial question.

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

2017-03-07 Thread qznc via Digitalmars-d
On Tuesday, 7 March 2017 at 03:04:05 UTC, Joakim wrote: https://z0ltan.wordpress.com/2017/02/21/goodbye-rust-and-hello-d/ "A much much safer language than C++ while being much more programmer-friendly than Rust." Nice quote. :) I somewhat wonder about "Arrays (arguably the most important

[Issue 14245] Immutable reference to immutable field in constructor allows breaking type system

2017-03-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14245 Eduard Staniloiu changed: What|Removed |Added CC||edi33...@gmail.com

Re: Ordering comparisons

2017-03-07 Thread Jacob Carlborg via Digitalmars-d
On 2017-03-07 04:44, Nick Sabalausky (Abscissa) wrote: This one is very surprising. How is that so, if both structs being compared are of the same endian-ness? The structs for a given run will be of the same endian-ness. But if you run the same code on two different systems, one with little