Re: Speed of math function atan: comparison D and C++

2018-03-06 Thread jmh530 via Digitalmars-d-learn
On Tuesday, 6 March 2018 at 17:51:54 UTC, H. S. Teoh wrote: [snip] I'm not advocating for getting *rid* of 80-bit float support, but only to make it *optional* rather than the default, as currently done in std.math. T Aren't there two issues: 1) std.math functions that cast to real to

Re: Article: Why Const Sucks

2018-03-06 Thread Jonathan M Davis via Digitalmars-d-announce
On Tuesday, March 06, 2018 09:36:43 H. S. Teoh via Digitalmars-d-announce wrote: > Andrei has said before, and probably on more than one occasion, that if > he were to redesign ranges today, one of the things he would do > differently was to change the definition of forward range so that .save >

Re: I have a patch to let lldb demangle D symbols ; help welcome to improve it

2018-03-06 Thread Luís Marques via Digitalmars-d
On Friday, 2 March 2018 at 00:17:13 UTC, Timothee Cour wrote: yes, I've fixed the issue with crashes on large symbols using a patched `demangle` ; will update code soon; but feel free to take a look at lldb side of things What version of LLVM did you base it on? On my LLVM fork for RISC-V

[Issue 17448] Move semantics cause memory corruption and cryptic bugs

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17448 --- Comment #28 from Tomer Filiba (weka) --- My point is, @safe is so constrained that it's practically unusable, so I don't consider it a viable solution for this problem. --

Re: DIP 1006 - Preliminary Review Round 1

2018-03-06 Thread 12345swordy via Digitalmars-d
On Tuesday, 6 March 2018 at 18:49:42 UTC, Paolo Invernizzi wrote: I simply don't understand why enforce or a custom check can't be used @safe code, if you want that behaviour. /Paolo Easy: the custom check itself could be wrong the custom check itself is right, but the implementation is

Advent of D

2018-03-06 Thread Jordi Gutiérrez Hermoso via Digitalmars-d
I wrote a blog post about working on Advent of Code in D. You can read it here: http://jordi.inversethought.com/blog/advent-of-d/

Re: Speed of math function atan: comparison D and C++

2018-03-06 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Mar 06, 2018 at 06:05:59PM +, jmh530 via Digitalmars-d-learn wrote: > On Tuesday, 6 March 2018 at 17:51:54 UTC, H. S. Teoh wrote: > > [snip] > > > > I'm not advocating for getting *rid* of 80-bit float support, but > > only to make it *optional* rather than the default, as currently >

can't build libuid examples

2018-03-06 Thread greatsam4sure via Digitalmars-d-learn
Try to build libuid examples get the following error. dub build, build successfully on the root folder. I will appreciate any help. Just try to build a gui app using dlang. OPTLINK (R) for Win32 Release 8.00.17 Copyright (C) Digital Mars 1989-2013 All rights reserved.

Re: How to use globals correctly?

2018-03-06 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Mar 06, 2018 at 11:46:04AM -0700, Jonathan M Davis via Digitalmars-d-learn wrote: > On Tuesday, March 06, 2018 18:34:34 bauss via Digitalmars-d-learn wrote: [...] > > Singletons are always smelly code tbh. > > > > Especially in D with thread-local storage. > > > > I can't think of a

Re: Advent of D

2018-03-06 Thread Patrick Schluter via Digitalmars-d
On Tuesday, 6 March 2018 at 18:09:21 UTC, Jordi Gutiérrez Hermoso wrote: I wrote a blog post about working on Advent of Code in D. You can read it here: http://jordi.inversethought.com/blog/advent-of-d/ Really nice, thank you.

Replace import expression with intrinsic

2018-03-06 Thread Kagamin via Digitalmars-d
In case it didn't get enough visibility: https://issues.dlang.org/show_bug.cgi?id=1985#c11 give your opinion. Not sure if a better disruption management is desired for a possibly low profit change, e.g. it can have a long grace period.

[Issue 17448] Move semantics cause memory corruption and cryptic bugs

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17448 --- Comment #27 from Tomer Filiba (weka) --- (In reply to Andrei Alexandrescu from comment #25) > > So... more special cases? > > That's a straight use of scope per DIP 1000, in fact the very design intent: > scope in a function

[Issue 18134] BitArray >>= broken when length % (8 * size_t.sizeof) == 0

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18134 github-bugzi...@puremagic.com changed: What|Removed |Added Status|ASSIGNED|RESOLVED

[Issue 18134] BitArray >>= broken when length % (8 * size_t.sizeof) == 0

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18134 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/b211347454b70fdb5a539f3fd8bc82fcec846e70 Fix issue 18134 - BitArray right shift broken if length

Re: Article: Why Const Sucks

2018-03-06 Thread Martin Nowak via Digitalmars-d-announce
On Monday, 5 March 2018 at 17:38:52 UTC, H. S. Teoh wrote: struct Container { auto opSlice() const { static struct Result { private Container impl; private int n; // internal mutable

5000 Merged Phobos Pull Requests

2018-03-06 Thread Jack Stouffer via Digitalmars-d
Nine days ago, Phobos hit 5000 merged pull requests: https://github.com/dlang/phobos/pulls?page=201=is%3Apr+is%3Amerged+sort%3Amerged-desc=✓ Thats an average of 1.93 merged PRs per day (first PR merged on Jan 31, 2011). A huge thank you to everyone who made this happen.

Re: Release D 2.079.0

2018-03-06 Thread Martin Nowak via Digitalmars-d-announce
On Tuesday, 6 March 2018 at 12:21:41 UTC, Steven Schveighoffer wrote: That being said, I'm wondering if it wouldn't be better to have std.experimental be in its own repository. Just showing that phobos is not the right place to develop modules/packages, also mir. IMO std.experimental provides

Re: Speed of math function atan: comparison D and C++

2018-03-06 Thread jmh530 via Digitalmars-d-learn
On Tuesday, 6 March 2018 at 18:41:15 UTC, H. S. Teoh wrote: The fix itself may be straightforward, but how to do it without breaking tons of existing code and provoking user backlash is the tricky part. [snip] Ah, I see what you're saying. People may be depending on the extra accuracy for

Re: Release D 2.079.0

2018-03-06 Thread Steven Schveighoffer via Digitalmars-d-announce
On 3/6/18 2:30 PM, Martin Nowak wrote: On Tuesday, 6 March 2018 at 12:21:41 UTC, Steven Schveighoffer wrote: But if needed, you could have your dub package depend on a prior version. http://code.dlang.org/packages/stdx-allocator ;) This is the answer, vibe.d should depend on

Re: How to use globals correctly?

2018-03-06 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, March 06, 2018 11:52:05 H. S. Teoh via Digitalmars-d-learn wrote: > On Tue, Mar 06, 2018 at 11:46:04AM -0700, Jonathan M Davis via Digitalmars-d-learn wrote: > > On Tuesday, March 06, 2018 18:34:34 bauss via Digitalmars-d-learn wrote: > [...] > > > > Singletons are always smelly code

Re: Is it possible to return the subclass from a method of the parent class in dlang?

2018-03-06 Thread Jacob Carlborg via Digitalmars-d-learn
On 2018-03-02 21:23, Christian Köstlin wrote: To give an example: class Thread { ... Thread start() {...} } class Timer : Thread { ... } void main() { // Timer timer = new Timer().start; // this does not work auto timer = new Timer().start; // because timer is of type Thread

Re: DIP 1006 - Preliminary Review Round 1

2018-03-06 Thread Paolo Invernizzi via Digitalmars-d
On Tuesday, 6 March 2018 at 17:34:08 UTC, 12345swordy wrote: On Tuesday, 6 March 2018 at 17:24:35 UTC, Jonathan M Davis wrote: On Tuesday, March 06, 2018 16:30:09 John Colvin via Digitalmars-d wrote: On Tuesday, 6 March 2018 at 02:05:58 UTC, Walter Bright wrote: > [...] So, to clarify, adding

[Issue 17448] Move semantics cause memory corruption and cryptic bugs

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17448 Jonathan M Davis changed: What|Removed |Added CC|

Re: Article: Why Const Sucks

2018-03-06 Thread Jonathan M Davis via Digitalmars-d-announce
On Tuesday, March 06, 2018 19:06:25 Martin Nowak via Digitalmars-d-announce wrote: > On Tuesday, 6 March 2018 at 18:17:58 UTC, Jonathan M Davis wrote: > > I'm not actually convinced that killing auto-decoding is really > > much better. > > I don't think the problem is auto-decoding in string

Re: DIP 1006 - Preliminary Review Round 1

2018-03-06 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, March 06, 2018 18:49:42 Paolo Invernizzi via Digitalmars-d wrote: > I simply don't understand why enforce or a custom check can't be > used @safe code, if you want that behaviour. > > If the program must HALT on this or that, well, what is better > than an explicit piece of

Re: I have a patch to let lldb demangle D symbols ; help welcome to improve it

2018-03-06 Thread Johan Engelen via Digitalmars-d
On Tuesday, 6 March 2018 at 20:25:10 UTC, Johan Engelen wrote: On Tuesday, 6 March 2018 at 18:19:13 UTC, Luís Marques wrote: On my LLVM fork for RISC-V and MSP430 work it doesn't build (no llvm/Support/DJB.h) and on the latest stable, 5.0.1, cmake fails to configure (Unknown CMake command

Re: I have a patch to let lldb demangle D symbols ; help welcome to improve it

2018-03-06 Thread Johan Engelen via Digitalmars-d
On Tuesday, 6 March 2018 at 18:19:13 UTC, Luís Marques wrote: On my LLVM fork for RISC-V and MSP430 work it doesn't build (no llvm/Support/DJB.h) and on the latest stable, 5.0.1, cmake fails to configure (Unknown CMake command "add_llvm_install_targets"). LLDB and LLVM need to be version

[Issue 18541] comparison `==` of two typeid() should always be rewritten as a "is"

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18541 Ketmar Dark changed: What|Removed |Added CC|

[Issue 17448] Move semantics cause memory corruption and cryptic bugs

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17448 --- Comment #26 from Eyal --- What solution is there for this use-case then? We need objects to register themselves (i.e: set out-of-scope pointers to point at them) and RAII-wise have them de-register themselves. While they are

[Issue 1985] import expression should return ubyte[] not string

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1985 --- Comment #11 from anonymous4 --- I think it's better to replace import expression with intrinsic, say, importText (like std.file.readText). This will also reduce grammar complexity and remove second and rarely used

[Issue 1985] import expression should return ubyte[] not string

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1985 anonymous4 changed: What|Removed |Added Keywords||spec --

Re: Release D 2.079.0

2018-03-06 Thread Martin Nowak via Digitalmars-d-announce
On Tuesday, 6 March 2018 at 11:10:49 UTC, Atila Neves wrote: The problem with that is I was waiting for 2.079.0 since it fixes a bug that prevented me from upgrading to any of the 2.078.x releases on Windows. I think 2.078 would make an excellent starting point for a LTS because of the

[OT] Gaming Meetup

2018-03-06 Thread WebFreak001 via Digitalmars-d
Hi, I was planning on going to what is basically a LAN Party in the Netherlands near Venlo and was wondering if anyone in this community also went or would want to go. It is themed after a certain computer game called osu! which probably not a lot of you play, but it might still be a nice

[Issue 18564] core.demangle exception Range violation

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18564 johanenge...@weka.io changed: What|Removed |Added Keywords||industry CC|

[Issue 18564] core.demangle exception Range violation

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18564 johanenge...@weka.io changed: What|Removed |Added Keywords||mangling --

Re: Article: Why Const Sucks

2018-03-06 Thread Jonathan M Davis via Digitalmars-d-announce
On Tuesday, March 06, 2018 09:41:42 H. S. Teoh via Digitalmars-d-announce wrote: > As they say, hindsight is always 20/20. But it wasn't so easy to > foresee the consequences at the time when the very concept of ranges was > still brand new. Except that even worse, I'd argue that hindsight

Re: Article: Why Const Sucks

2018-03-06 Thread H. S. Teoh via Digitalmars-d-announce
On Tue, Mar 06, 2018 at 11:20:56AM -0700, Jonathan M Davis via Digitalmars-d-announce wrote: > On Tuesday, March 06, 2018 09:41:42 H. S. Teoh via Digitalmars-d-announce > wrote: > > As they say, hindsight is always 20/20. But it wasn't so easy to > > foresee the consequences at the time when

Re: mysql-native v2.1.0

2018-03-06 Thread bauss via Digitalmars-d-announce
On Tuesday, 6 March 2018 at 18:31:08 UTC, bauss wrote: On Saturday, 3 March 2018 at 07:37:38 UTC, Nick Sabalausky (Abscissa) wrote: [...] I'm unsure how I'd go about implementing prepared statements in a vibe.d application correctly. [...] Like more specifically do I still call

Re: Article: Why Const Sucks

2018-03-06 Thread H. S. Teoh via Digitalmars-d-announce
On Tue, Mar 06, 2018 at 01:31:39PM -0500, Steven Schveighoffer via Digitalmars-d-announce wrote: > On 3/6/18 10:39 AM, Jonathan M Davis wrote: > > Yeah. If you're dealing with generic code rather than a specific > > range type that you know is implicitly saved when copied, you have > > to use

Re: Article: Why Const Sucks

2018-03-06 Thread Jonathan M Davis via Digitalmars-d-announce
On Tuesday, March 06, 2018 10:47:36 H. S. Teoh via Digitalmars-d-announce wrote: > On Tue, Mar 06, 2018 at 01:31:39PM -0500, Steven Schveighoffer via Digitalmars-d-announce wrote: > > On 3/6/18 10:39 AM, Jonathan M Davis wrote: > > > Yeah. If you're dealing with generic code rather than a

Re: 5000 Merged Phobos Pull Requests

2018-03-06 Thread H. S. Teoh via Digitalmars-d
On Tue, Mar 06, 2018 at 07:21:10PM +, Jack Stouffer via Digitalmars-d wrote: > Nine days ago, Phobos hit 5000 merged pull requests: > > https://github.com/dlang/phobos/pulls?page=201=is%3Apr+is%3Amerged+sort%3Amerged-desc=✓ > > Thats an average of 1.93 merged PRs per day (first PR merged on

Re: Speed of math function atan: comparison D and C++

2018-03-06 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Mar 06, 2018 at 08:12:57AM +0100, Robert M. Münch via Digitalmars-d-learn wrote: > On 2018-03-05 20:11:06 +, H. S. Teoh said: > > > Walter has been adamant that we should always compute std.math.* > > functions with the `real` type, which on x86 maps to the non-IEEE > > 80-bit

Re: What's the proper way to add a local file dependence to dub?

2018-03-06 Thread Jacob Carlborg via Digitalmars-d-learn
On 2018-03-04 17:46, Marc wrote: then copy it to sources folder? let's say I have a small library folder at C:\mylibrary\D where I want to use dir.d from it. How do I add that file dependence to dub? But I do not want to that file be passed directly to dmd, I want to that file be copied to

[Issue 9983] inout type can not be used as a parameter for structure template

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9983 Martin Nowak changed: What|Removed |Added CC||c...@dawg.eu

Re: Release D 2.079.0

2018-03-06 Thread Martin Nowak via Digitalmars-d-announce
On Monday, 5 March 2018 at 16:18:11 UTC, Chris M. wrote: Good stuff. Still bothers me that we had to special case "throw new Exception();" in order to make it nogc. I can't think of any better ways right now Implementing EH for values (instead of class references) would have been a lot more

Re: Release D 2.079.0

2018-03-06 Thread Martin Nowak via Digitalmars-d-announce
On Tuesday, 6 March 2018 at 05:22:58 UTC, Void-995 wrote: Can somebody explain how [0] is more safe than array.ptr? Just want to understand why second statement isn't allowed in safe anymore. [0] is runtime bounds-checked array.ptr is unchecked and might return an out-of-bounds pointer (to

Re: Advent of D

2018-03-06 Thread Steven Schveighoffer via Digitalmars-d
On 3/6/18 1:09 PM, Jordi Gutiérrez Hermoso wrote: I wrote a blog post about working on Advent of Code in D. You can read it here: http://jordi.inversethought.com/blog/advent-of-d/ I'm enjoying this. One thing jumped out at me: static does not mean execute at compile time (exactly), it

Re: Article: Why Const Sucks

2018-03-06 Thread Martin Nowak via Digitalmars-d-announce
On Tuesday, 6 March 2018 at 18:17:58 UTC, Jonathan M Davis wrote: I'm not actually convinced that killing auto-decoding is really much better. I don't think the problem is auto-decoding in string range adapters, but repeated validation. https://issues.dlang.org/show_bug.cgi?id=14519#c32 If

[Issue 18561] postblit should allow writing const/immutable members just like constructors

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18561 --- Comment #4 from ajiesk...@gmail.com --- (In reply to anonymous4 from comment #3) > This passes: > --- > struct A > { > int a; > this(int b) const { a=b; } > } > int main() > { > const A a; > assert(a.a==0,"0"); > a.__ctor(1);

Re: See docs compiler message

2018-03-06 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/6/18 9:50 AM, ixid wrote: On Tuesday, 6 March 2018 at 14:37:27 UTC, Steven Schveighoffer wrote: Now, there aren't actually docs for Transposed, but you can find it if you look at std.range.transposed: https://dlang.org/phobos/std_range.html#transposed Thanks, I had found that but that

Re: Advent of D

2018-03-06 Thread Joakim via Digitalmars-d
On Tuesday, 6 March 2018 at 18:09:21 UTC, Jordi Gutiérrez Hermoso wrote: I wrote a blog post about working on Advent of Code in D. You can read it here: http://jordi.inversethought.com/blog/advent-of-d/ What's with the mammoth D blog posts lately? Nice write-up, worth sharing on reddit/HN.

[Issue 18561] postblit should allow writing const/immutable members just like constructors

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18561 --- Comment #5 from Steven Schveighoffer --- (In reply to anonymous4 from comment #3) > a.__ctor(1); This is another bug. One should only be able to call const __ctor on a struct once, before using it. --

Re: Profiling after exit()

2018-03-06 Thread Martin Nowak via Digitalmars-d-learn
On Thursday, 27 July 2017 at 15:16:35 UTC, Eugene Wissner wrote: Are there profilers that work well with dmd? valgrind? OProfile? Yes, any sampling profiler works fine, e.g. perf on linux, Intel VTune/AMD CodeXL on Windows. Those directly monitor CPU performance counters and have a

Fetch and pre-build dub dependencies

2018-03-06 Thread Tamas via Digitalmars-d
I have a Dockerfile to build a vibe.d project. Docker has a nice caching system so it continues building the docker image from the step where it's needed when something changes. This is typically at the step of adding my source files, then building the binary. The problem is that fetching and

[Issue 18561] postblit should allow writing const/immutable members just like constructors

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18561 --- Comment #3 from anonymous4 --- This passes: --- struct A { int a; this(int b) const { a=b; } } int main() { const A a; assert(a.a==0,"0"); a.__ctor(1); assert(a.a==1,"1"); return 0; } --- --

Re: How to use globals correctly?

2018-03-06 Thread bauss via Digitalmars-d-learn
On Monday, 5 March 2018 at 19:51:33 UTC, Steven Schveighoffer wrote: On 3/5/18 2:25 PM, Marc wrote: Can __gshared be used instead of static in the singleton pattern? I, comming from C++, ignorantly, have never used _gshared so I went to static instead of (being static also means

Re: Article: Why Const Sucks

2018-03-06 Thread Steven Schveighoffer via Digitalmars-d-announce
On 3/6/18 10:39 AM, Jonathan M Davis wrote: Yeah. If you're dealing with generic code rather than a specific range type that you know is implicitly saved when copied, you have to use save so often that it's painful, and almost no one does it. e.g. equal(lhs.save, rhs.save) or immutable

Re: Advent of D

2018-03-06 Thread David Gileadi via Digitalmars-d
On 3/6/18 11:09 AM, Jordi Gutiérrez Hermoso wrote: I wrote a blog post about working on Advent of Code in D. You can read it here: http://jordi.inversethought.com/blog/advent-of-d/ I really enjoyed this. Thank you!

Re: How to use globals correctly?

2018-03-06 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, March 06, 2018 18:34:34 bauss via Digitalmars-d-learn wrote: > On Monday, 5 March 2018 at 19:51:33 UTC, Steven Schveighoffer > > wrote: > > On 3/5/18 2:25 PM, Marc wrote: > >> Can __gshared be used instead of static in the singleton > >> pattern? I, comming from C++, ignorantly, have

Re: mysql-native v2.1.0

2018-03-06 Thread bauss via Digitalmars-d-announce
On Tuesday, 6 March 2018 at 18:36:45 UTC, bauss wrote: On Tuesday, 6 March 2018 at 18:31:08 UTC, bauss wrote: On Saturday, 3 March 2018 at 07:37:38 UTC, Nick Sabalausky (Abscissa) wrote: [...] I'm unsure how I'd go about implementing prepared statements in a vibe.d application correctly.

[Issue 18564] New: core.demangle exception Range violation

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18564 Issue ID: 18564 Summary: core.demangle exception Range violation Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority:

Setting executable's information by resources

2018-03-06 Thread Marc via Digitalmars-d-learn
I'm trying to use this resource to set executable's information/metadata but it fail to set anything but the icon, without any error message. Could anyone point out if there's anything wrong with my approach? (if anyone use a different approach/toolset to set those data, your suggestion is

[Issue 18563] context pointer inside structs constness problems

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18563 Ketmar Dark changed: What|Removed |Added CC|

Re: DIP 1006 - Preliminary Review Round 1

2018-03-06 Thread Timon Gehr via Digitalmars-d
On 06.03.2018 11:17, Walter Bright wrote: On 3/6/2018 1:58 AM, Jonathan M Davis wrote: [...] The entire point of making assert a core language feature was so that the compiler could take advantage of it to generate better code. It does not need to be a core language feature for that. It

Re: Advent of D

2018-03-06 Thread JN via Digitalmars-d
On Tuesday, 6 March 2018 at 18:09:21 UTC, Jordi Gutiérrez Hermoso wrote: I wrote a blog post about working on Advent of Code in D. You can read it here: http://jordi.inversethought.com/blog/advent-of-d/ on Day 8, I think the original "verbose" code is better in the end. Mixin at least for

Re: Advent of D

2018-03-06 Thread Jordi Gutiérrez Hermoso via Digitalmars-d
On Tuesday, 6 March 2018 at 21:03:47 UTC, JN wrote: On Tuesday, 6 March 2018 at 18:09:21 UTC, Jordi Gutiérrez Hermoso wrote: I wrote a blog post about working on Advent of Code in D. You can read it here: http://jordi.inversethought.com/blog/advent-of-d/ on Day 8, I think the original

Re: Advent of D

2018-03-06 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 6 March 2018 at 21:09:06 UTC, Jordi Gutiérrez Hermoso wrote: I did post it to Lobsters, though: This is random but I have been thinking about asking for a lobsters invite... can you hook me up?

Vtable for virtual functions in D

2018-03-06 Thread Henrik via Digitalmars-d
Does anyone know if D is using the vtable implementation for virtual functions just like most C++ compilers? If yes, can someone explain the advantages of this strategy? A function pointer in C is regarded as expensive because of missing inlining, but a double indirection through a vtable just

[Issue 18557] Types with 0 size should not be usable as aa key types

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18557 Ketmar Dark changed: What|Removed |Added CC|

Re: DIP 1006 - Preliminary Review Round 1

2018-03-06 Thread Timon Gehr via Digitalmars-d
On 06.03.2018 10:02, Walter Bright wrote: On 3/6/2018 12:45 AM, Timon Gehr wrote: Anyway, "do not use assert" is not the solution, as I have explained many times now. My interpretation is you want D assert to behave like C assert. This interpretation is wrong. I, as well as other people,

[Issue 18565] New: std.regex Captures opAssign returns void since v2.079.0

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18565 Issue ID: 18565 Summary: std.regex Captures opAssign returns void since v2.079.0 Product: D Version: D2 Hardware: All OS: All Status: NEW

Re: Vtable for virtual functions in D

2018-03-06 Thread sarn via Digitalmars-d
On Tuesday, 6 March 2018 at 21:20:22 UTC, Henrik wrote: Does anyone know if D is using the vtable implementation for virtual functions just like most C++ compilers? If yes, can someone explain the advantages of this strategy? A function pointer in C is regarded as expensive because of missing

Re: Release D 2.079.0

2018-03-06 Thread Jack Stouffer via Digitalmars-d-announce
On Tuesday, 6 March 2018 at 12:21:41 UTC, Steven Schveighoffer wrote: That being said, I'm wondering if it wouldn't be better to have std.experimental be in its own repository. This allows selection of the dependency on std.experimental separate from phobos. It still would be an "official"

[Issue 18542] DMD could generate better assembly for common range check idioms

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18542 Ketmar Dark changed: What|Removed |Added CC|

Re: Why does this not compile?

2018-03-06 Thread Timon Gehr via Digitalmars-d
On 06.03.2018 17:19, Steven Schveighoffer wrote: unittest { int n = 0; struct S { int fun() const { return n; } } immutable S s; assert(s.fun == 0); n++; assert(s.fun == 1); // Not so immutable now, are you? } That's not a demonstration of breaking

[Issue 17448] Move semantics cause memory corruption and cryptic bugs

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17448 --- Comment #30 from Andrei Alexandrescu --- Indeed it seems we are not supporting registration by address with ease for D value types. There are good reasons for that; by allowing value types to be moved around we avoid a swath

Re: Release D 2.079.0

2018-03-06 Thread H. S. Teoh via Digitalmars-d-announce
On Tue, Mar 06, 2018 at 08:50:37PM +, Jack Stouffer via Digitalmars-d-announce wrote: [...] > Also, if you'll allow me to have crazy ideas for a moment, one wonders > why we shouldn't just release Phobos itself through dub? Rust makes > people use their build tool, why not us? Please don't.

Re: DIP 1006 - Preliminary Review Round 1

2018-03-06 Thread Timon Gehr via Digitalmars-d
On 06.03.2018 19:49, Paolo Invernizzi wrote: I simply don't understand why enforce or a custom check can't be used @safe code, if you want that behaviour. ... I have explained why. UB is non-modular and you don't (want to) control all the code that you use. Also, enforce cannot be

Re: Advent of D

2018-03-06 Thread Jordi Gutiérrez Hermoso via Digitalmars-d
On Tuesday, 6 March 2018 at 20:09:58 UTC, Joakim wrote: Nice write-up, worth sharing on reddit/HN. Thanks. I tried posting it to HN, but it didn't pick up. If several of you try posting it too, it might pick up. Posting to Reddit is easier, but I don't have a recognisable account on Reddit

[Issue 18566] New: const on method of nested data type is not applied to variables in context

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18566 Issue ID: 18566 Summary: const on method of nested data type is not applied to variables in context Product: D Version: D2 Hardware: All OS: All

Re: can't build libuid examples

2018-03-06 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 6 March 2018 at 19:19:05 UTC, greatsam4sure wrote: Try to build libuid examples get the following error. dub build, build successfully on the root folder. I will appreciate any help. Just try to build a gui app using dlang. OPTLINK (R) for Win32 Release 8.00.17 Those

Re: Release D 2.079.0

2018-03-06 Thread Random D user via Digitalmars-d-announce
On Monday, 5 March 2018 at 23:40:35 UTC, Atila Neves wrote: I'd have a snowball's chance in hell convincing anyone at a "regular" company of adopting D if anyone there even imagined any of the above could happen. We have to do better than this. Atila I don't think this is unusual even

[Issue 18562] expression is not evaluated when accessing manifest constant

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18562 Ketmar Dark changed: What|Removed |Added CC|

[Issue 18541] comparison `==` of two typeid() should always be rewritten as a "is"

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18541 --- Comment #9 from Ketmar Dark --- compiler transforms `==` for objects to virtual call, and dmd cannot devirtualize calls (yet? ;-). so yeah, no inlining. it is quite possible to rewrite the call into `e1 is e1 ||

Re: Advent of D

2018-03-06 Thread Mike Parker via Digitalmars-d
On Tuesday, 6 March 2018 at 21:09:06 UTC, Jordi Gutiérrez Hermoso wrote: Posting to Reddit is easier, but I don't have a recognisable account on Reddit to post it from. I'll post it. There are good times and bad times to post on /r/programming in terms of getting attention. A good time

Re: Advent of D

2018-03-06 Thread Jordi Gutiérrez Hermoso via Digitalmars-d
On Tuesday, 6 March 2018 at 20:37:34 UTC, Steven Schveighoffer wrote: On 3/6/18 1:09 PM, Jordi Gutiérrez Hermoso wrote: I wrote a blog post about working on Advent of Code in D. You can read it here: http://jordi.inversethought.com/blog/advent-of-d/ I'm enjoying this. One thing jumped out

[Issue 18560] find on infinite ranges is broken

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18560 Ketmar Dark changed: What|Removed |Added CC|

[Issue 18567] New: immutability hole related to context pointers accessed through const pure methods

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18567 Issue ID: 18567 Summary: immutability hole related to context pointers accessed through const pure methods Product: D Version: D2 Hardware: All OS: All

[Issue 18564] core.demangle exception Range violation

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18564 --- Comment #1 from Rainer Schuetze --- Did you try latest dmd master? There have been a couple of recent fixes that look similar, e.g. https://issues.dlang.org/show_bug.cgi?id=18300 and

[Issue 17961] std.uni does not compile with -unittest -dip1000

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17961 --- Comment #11 from Carsten Blüggel --- (In reply to hsteoh from comment #10) > Link: https://github.com/dlang/phobos/pull/6041 Due to lack of acceptance I closed PR https://github.com/dlang/phobos/pull/6041. Maybe

Re: Release D 2.079.0

2018-03-06 Thread psychoticRabbit via Digitalmars-d-announce
On Tuesday, 6 March 2018 at 20:50:37 UTC, Jack Stouffer wrote: Also, if you'll allow me to have crazy ideas for a moment, one wonders why we shouldn't just release Phobos itself through dub? Rust makes people use their build tool, why not us? That's the day I stop using D. I do not, and

Re: Fetch and pre-build dub dependencies

2018-03-06 Thread Seb via Digitalmars-d
On Tuesday, 6 March 2018 at 18:03:34 UTC, Tamas wrote: I have a Dockerfile to build a vibe.d project. Docker has a nice caching system so it continues building the docker image from the step where it's needed when something changes. This is typically at the step of adding my source files, then

Re: Fetch and pre-build dub dependencies

2018-03-06 Thread Tamas via Digitalmars-d
On Wednesday, 7 March 2018 at 04:28:11 UTC, Seb wrote: For run.dlang.io, I fetch all dependencies and build them into the Docker image. That has the advantage that executions with dub packages are a lot faster. It's just dub fetch and dub build though. Take a look:

Re: Release D 2.079.0

2018-03-06 Thread Seb via Digitalmars-d-announce
On Tuesday, 6 March 2018 at 19:57:13 UTC, Steven Schveighoffer wrote: On 3/6/18 2:30 PM, Martin Nowak wrote: On Tuesday, 6 March 2018 at 12:21:41 UTC, Steven Schveighoffer wrote: But if needed, you could have your dub package depend on a prior version.

Why not flag away the mistakes of the past?

2018-03-06 Thread Taylor Hillegeist via Digitalmars-d
So i've seen on the forum over the years arguments about auto-decoding (mostly) and some other things. Things that have been considered mistakes, and cannot be corrected because of the breaking changes it would create. And I always wonder why not make a solution to the tune of a flag that

Re: Release D 2.079.0

2018-03-06 Thread rikki cattermole via Digitalmars-d-announce
On 07/03/2018 2:54 PM, psychoticRabbit wrote: On Tuesday, 6 March 2018 at 20:50:37 UTC, Jack Stouffer wrote: Also, if you'll allow me to have crazy ideas for a moment, one wonders why we shouldn't just release Phobos itself through dub? Rust makes people use their build tool, why not us?

[Issue 14242] destruction of static arrays with elaborate destructor elements does not propagate attributes

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14242 Mike Franklin changed: What|Removed |Added Status|NEW |RESOLVED

Re: DIP 1006 - Preliminary Review Round 1

2018-03-06 Thread Paolo Invernizzi via Digitalmars-d
On Tuesday, 6 March 2018 at 16:30:09 UTC, John Colvin wrote: On Tuesday, 6 March 2018 at 02:05:58 UTC, Walter Bright wrote: On 3/5/2018 2:30 PM, John Colvin wrote: This just feels bad. Adding extra failsafes for my debug program shouldn't make my release program less safe. Then use

Re: LDC 1.8.0

2018-03-06 Thread Martin Tschierschke via Digitalmars-d-announce
On Tuesday, 6 March 2018 at 16:54:59 UTC, Joakim wrote: [...] Nothing new, unfortunately, though you can follow progress here: https://github.com/ldc-developers/ldc/issues/2153 I plan to spend some time on it, but have been putting it off. Thank you!

Re: DIP 1006 - Preliminary Review Round 1

2018-03-06 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, March 06, 2018 17:01:04 Paolo Invernizzi via Digitalmars-d wrote: > On Tuesday, 6 March 2018 at 16:30:09 UTC, John Colvin wrote: > > On Tuesday, 6 March 2018 at 02:05:58 UTC, Walter Bright wrote: > >> On 3/5/2018 2:30 PM, John Colvin wrote: > >>> This just feels bad. Adding extra

  1   2   >