Re: Wannabe contributor frustrations

2016-02-12 Thread Daniel Murphy via Digitalmars-d
On 12/02/2016 4:10 AM, Jonathan M Davis wrote: IIRC, it uses 2.067 and will continue to do so until GDC and LDC have switched to using the D version of the frontend instead of the older, C++ version. Most likely we will stick with 2.067 until GDC and LDC both have 2.068 releases. There are

Great new website

2016-02-12 Thread SomeDude via Digitalmars-d
Hey, just a post to say how cool the new website is. I can browse it on an iPhone without issue.

Re: OT: 'conduct unbecoming of a hacker'

2016-02-12 Thread Abdulhaq via Digitalmars-d
On Friday, 12 February 2016 at 03:19:52 UTC, Nick Sabalausky wrote: On 02/11/2016 04:54 PM, w0rp wrote: His article is way too long. It seems like an article about whining about how people whine too much. It's metawhine! :) These meta whines get on my nerves, everything was much better in

[Issue 3191] std.zlib.UnCompress errors if buffer is reused

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3191 Andre changed: What|Removed |Added Assignee|alver...@gmail.com |nob...@puremagic.com --

Re: Just because it's a slow Thursday on this forum

2016-02-12 Thread ixid via Digitalmars-d
On Friday, 12 February 2016 at 03:18:47 UTC, Nick Sabalausky wrote: I'd be perfectly happy to have it, particularly if it had a less confusing name, but can definitely see it being debatable whether it really is Phobos-worthy. Andrei has previously expressed a desire for a big standard

[Issue 9505] std.zlib seem to be bugged

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9505 Andre changed: What|Removed |Added CC||alver...@gmail.com --

[Issue 8779] std.zlib.UnCompress needs a way to detect end-of-stream

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8779 Andre changed: What|Removed |Added Assignee|alver...@gmail.com |nob...@puremagic.com --

Re: Weird issue with std.range.iota.length

2016-02-12 Thread Jonathan M Davis via Digitalmars-d
On Friday, 12 February 2016 at 05:51:34 UTC, Meta wrote: If you try to compile this code, it will currently not work: foreach (n; iota(1UL, 1000).parallel) { //... } This is because of how the length is calculated by iota: auto iota(B, E)(B begin, E end) if (isIntegral!(CommonType!(B,

[Issue 15663] writefln("%#o", 0) should yield "0" instead of "00"

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15663 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/4a762a9ae495b0333ea21c9be20ce33746922c14 Fix issue 15663:

[Issue 12954] deprecated doesn't work with concatenated strings or anything else but a string literal

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12954 --- Comment #3 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/D-Programming-Language/dlang.org https://github.com/D-Programming-Language/dlang.org/commit/ffdb17cde12300f4755ecbd516e7ab6e577c628a Merge pull

Re: Weird issue with std.range.iota.length

2016-02-12 Thread Jonathan M Davis via Digitalmars-d
On Friday, 12 February 2016 at 10:37:31 UTC, tsbockman wrote: On Friday, 12 February 2016 at 10:34:32 UTC, tsbockman wrote: Bounds checking. If iota's length is not expressible as a `size_t`, convert it to one *safely* using `std.conv.to()`. Just to clarify - the bit about `std.conv.to()` is

Re: Algebraic template instance holder

2016-02-12 Thread Voitech via Digitalmars-d-learn
On Wednesday, 10 February 2016 at 20:53:15 UTC, ZombineDev wrote: On Wednesday, 10 February 2016 at 10:31:34 UTC, Voitech wrote: Hi, why this is not working ? class Base{ int a; } class BaseTemplate(E):Base{ E value; this(E value){ this.value=value;

[Issue 12914] std.typecons.alignForSize will not accept immutable names argument

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12914 Lars T. Kyllingstad changed: What|Removed |Added Status|NEW |RESOLVED

Re: Weird issue with std.range.iota.length

2016-02-12 Thread tsbockman via Digitalmars-d
On Friday, 12 February 2016 at 10:34:32 UTC, tsbockman wrote: Bounds checking. If iota's length is not expressible as a `size_t`, convert it to one *safely* using `std.conv.to()`. Just to clarify - the bit about `std.conv.to()` is just an example. A better solution in this specific case

Re: Babylon JS-like game engine or complete port

2016-02-12 Thread Guillaume Piolat via Digitalmars-d
On Friday, 12 February 2016 at 11:24:27 UTC, Karabuta wrote: Was referring to assimp. Which one do you recommended for newbie(physics, animation, importing of prebuilt asserts)? I'd recommend to use SDL2 (or any other windowing library) and OpenGL directly with Derelict until you feel

Re: Weird issue with std.range.iota.length

2016-02-12 Thread tsbockman via Digitalmars-d
On Friday, 12 February 2016 at 08:11:57 UTC, Jonathan M Davis wrote: Regardless of which way we go, the problem will _eventually_ go away when 32-bit systems finally die out, but that's likely to take a while. Many micro-controllers will probably remain 32-bit indefinitely; 64-bit is just a

Re: Babylon JS-like game engine or complete port

2016-02-12 Thread Karabuta via Digitalmars-d
On Thursday, 11 February 2016 at 21:59:55 UTC, Guillaume Piolat wrote: On Thursday, 11 February 2016 at 18:42:41 UTC, karabuta wrote: On Thursday, 11 February 2016 at 10:25:00 UTC, Guillaume Piolat wrote: On Wednesday, 10 February 2016 at 20:07:24 UTC, karabuta wrote: [...] Javascript world

Questions about vibe.d

2016-02-12 Thread Guillaume Piolat via Digitalmars-d-learn
1. Can vibe.d handle HTTPS connections? 2. Can vibe.d "rewrite" HTTP connections to HTTPS? 3. Can vibe.d be put behind a nginx reverse proxy? 4. Can vibe.d send mails? Sorry if these questions are a bit basic, the implied subtext is "and does it work well?".

Re: Questions about vibe.d

2016-02-12 Thread Charles via Digitalmars-d-learn
On Friday, 12 February 2016 at 12:31:57 UTC, Guillaume Piolat wrote: 1. Can vibe.d handle HTTPS connections? 2. Can vibe.d "rewrite" HTTP connections to HTTPS? 3. Can vibe.d be put behind a nginx reverse proxy? 4. Can vibe.d send mails? 1. Yes. Example:

[Issue 7054] std.format.formattedWrite uses code units count as width instead of characters count

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7054 --- Comment #8 from Stewart Gordon --- (In reply to Marco Leise from comment #6) > https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms So "halfwidth" means the width of a character cell, and "fullwidth" means double that

Re: Questions about vibe.d

2016-02-12 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Friday, 12 February 2016 at 12:31:57 UTC, Guillaume Piolat wrote: Sorry if these questions are a bit basic, the implied subtext is "and does it work well?". Just in case you didn't know, browsers now support HTTP/2 (and SPDY)... https://en.wikipedia.org/wiki/HTTP/2

Re: Things that keep D from evolving?

2016-02-12 Thread Matt Elkins via Digitalmars-d-learn
On Friday, 12 February 2016 at 14:03:05 UTC, Steven Schveighoffer wrote: On 2/10/16 11:51 PM, Matt Elkins wrote: * The in keyword. This is nice syntactic sugar over having a special trait in C++ which deduces whether to pass by value or const-reference. "foo(in bar)" is way more readable

Re: Just because it's a slow Thursday on this forum

2016-02-12 Thread Andrei Alexandrescu via Digitalmars-d
On 2/11/16 4:38 PM, H. S. Teoh via Digitalmars-d wrote: (Next thing you know, newbies will be asking why there's both `print` and `write` that do the same thing except different.) That sounds unlikely to me. What would be a few examples/precedents? -- Andrei

Re: Weird issue with std.range.iota.length

2016-02-12 Thread Meta via Digitalmars-d
On Friday, 12 February 2016 at 08:11:57 UTC, Jonathan M Davis wrote: What it comes down to is that length should always be size_t. That's what it is for arrays, and that's what most code expects. Allowing other types just causes trouble for generic code. However, in the case of iota with long,

Re: Safe cast of arrays

2016-02-12 Thread Steven Schveighoffer via Digitalmars-d
On 2/10/16 11:01 PM, Chris Wright wrote: On Wed, 10 Feb 2016 22:39:20 -0500, Steven Schveighoffer wrote: I think casting a mutable array to any array type is a recipe for memory issues, no matter what is in the elements. Remember that you are casting a reference that still has a mutable

Re: Visual studio official d support

2016-02-12 Thread Steven Schveighoffer via Digitalmars-d
On 2/11/16 3:30 PM, Tofu Ninja wrote: On Tuesday, 9 February 2016 at 22:11:12 UTC, Steven Schveighoffer wrote: A while ago there was a movement to get d included officially in visual studio. Just got this email: An idea you supported has been closed. Thank you for your feedback. Message:

Re: Questions about vibe.d

2016-02-12 Thread Charles via Digitalmars-d-learn
On Friday, 12 February 2016 at 14:36:18 UTC, Ola Fosheim Grøstad wrote: On Friday, 12 February 2016 at 12:31:57 UTC, Guillaume Piolat wrote: Sorry if these questions are a bit basic, the implied subtext is "and does it work well?". Just in case you didn't know, browsers now support HTTP/2

Re: Things that keep D from evolving?

2016-02-12 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/12/16 9:37 AM, Matt Elkins wrote: On Friday, 12 February 2016 at 14:03:05 UTC, Steven Schveighoffer wrote: On 2/10/16 11:51 PM, Matt Elkins wrote: * The in keyword. This is nice syntactic sugar over having a special trait in C++ which deduces whether to pass by value or const-reference.

[Issue 15627] @safe code generates access violation

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15627 hst...@quickfur.ath.cx changed: What|Removed |Added Keywords||accepts-invalid, safe

Re: Things that keep D from evolving?

2016-02-12 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/10/16 11:51 PM, Matt Elkins wrote: * The in keyword. This is nice syntactic sugar over having a special trait in C++ which deduces whether to pass by value or const-reference. "foo(in bar)" is way more readable than something like "foo(traits::fast_param bar)" Hm... in is short for scope

[Issue 15674] New: [REG 2.066] alias this rejected for 'out' parameter

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15674 Issue ID: 15674 Summary: [REG 2.066] alias this rejected for 'out' parameter Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: rejects-valid

[Issue 15673] New: [Function atan2]

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15673 Issue ID: 15673 Summary: [Function atan2] Product: D Version: D2 Hardware: All URL: http://dlang.org/library/std/math.html OS: All Status: NEW

[Issue 3191] std.zlib.UnCompress errors if buffer is reused

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3191 Andre changed: What|Removed |Added Assignee|nob...@puremagic.com|alver...@gmail.com --

[Issue 8779] std.zlib.UnCompress needs a way to detect end-of-stream

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8779 Andre changed: What|Removed |Added CC||alver...@gmail.com

Re: Things that keep D from evolving?

2016-02-12 Thread Matt Elkins via Digitalmars-d-learn
On Friday, 12 February 2016 at 17:20:23 UTC, rsw0x wrote: On Friday, 12 February 2016 at 15:12:19 UTC, Steven Schveighoffer wrote: On 2/12/16 9:37 AM, Matt Elkins wrote: [...] Pass by reference and pass by value means different treatment inside the function itself, so it can't differ from

Re: Things that keep D from evolving?

2016-02-12 Thread jmh530 via Digitalmars-d-learn
On Friday, 12 February 2016 at 17:20:23 UTC, rsw0x wrote: note that 'in' and 'scope'(other than for delegates) parameter storage class usage should be avoided. It really should be a warning. Add to docs!

Re: Weird issue with std.range.iota.length

2016-02-12 Thread ixid via Digitalmars-d
On Friday, 12 February 2016 at 15:59:09 UTC, Jonathan M Davis wrote: It would be far better IMHO to just do a check in iota and throw a RangeError if the length wouldn't fit in size_t. Having length ever be anything other than size_t is just going to cause problems with other ranges. On 32-bit

Re: [dlang.org] Getting the ddox pages out of limbo

2016-02-12 Thread via Digitalmars-d
On Fri, Feb 12, 2016 at 06:19:45PM +0100, anonymous via Digitalmars-d wrote: > And then there's Adam D. Ruppe's . No idea how that > plays into the whole mess we're in. It is separate exactly to avoid the trouble of the official site. I certainly wouldn't mind if we were to

Re: Things that keep D from evolving?

2016-02-12 Thread Matt Elkins via Digitalmars-d-learn
On Friday, 12 February 2016 at 15:12:19 UTC, Steven Schveighoffer wrote: It could potentially differ based on the type being passed, Yes, that's what I meant. but I'm unaware of such an optimization, Hm. Unfortunate. and it definitely isn't triggered specifically by 'in'. 'in' is

[Issue 13174] shared ~this() conflicts with this()

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13174 weaselcat changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 8295] Struct member destructor can not be called from shared struct instance

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8295 weaselcat changed: What|Removed |Added CC||vlevenf...@gmail.com

Re: IDE - Coedit 2

2016-02-12 Thread Taylor Hillegeist via Digitalmars-d-announce
On Friday, 12 February 2016 at 16:09:36 UTC, Basile Burg wrote: see https://github.com/BBasile/Coedit/releases/tag/2_gold I was just overjoyed to install this and hit "w" ctl+space and see writeln! It takes a bit of effort to get this stuff packaged so well. Great work!

Re: IDE - Coedit 2

2016-02-12 Thread Basile Burg via Digitalmars-d-announce
On Friday, 12 February 2016 at 16:54:56 UTC, Taylor Hillegeist wrote: On Friday, 12 February 2016 at 16:09:36 UTC, Basile Burg wrote: see https://github.com/BBasile/Coedit/releases/tag/2_gold I was just overjoyed to install this and hit "w" ctl+space and see writeln! It takes a bit of effort

Re: Safe cast of arrays

2016-02-12 Thread Chris Wright via Digitalmars-d
On Fri, 12 Feb 2016 08:45:54 -0500, Steven Schveighoffer wrote: > A cast to const may be viable. Touché. > However, I think casting in safe code is > probably not something to allow. *All* casting? Casting between primitive value types (eg long -> int) is @safe. You can't get memory errors

[dlang.org] Getting the ddox pages out of limbo

2016-02-12 Thread anonymous via Digitalmars-d
We currently have two differently generated versions of the library documentation on dlang.org: 1) dlang.org/phobos/* (and dlang.org/phobos-prerelease/*) is generated by dmd's Ddoc functionality. These are the official docs, part of the "Documentation" section. 2) dlang.org/library/* (and

Re: Things that keep D from evolving?

2016-02-12 Thread rsw0x via Digitalmars-d-learn
On Friday, 12 February 2016 at 15:12:19 UTC, Steven Schveighoffer wrote: On 2/12/16 9:37 AM, Matt Elkins wrote: [...] Pass by reference and pass by value means different treatment inside the function itself, so it can't differ from call to call. It could potentially differ based on the type

[Issue 8295] Struct member destructor can not be called from shared struct instance

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8295 weaselcat changed: What|Removed |Added CC||marco.le...@gmx.de ---

[Issue 15673] [dox] atan2 docs have broken formatting

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15673 --- Comment #1 from hst...@quickfur.ath.cx --- This looks like a bug in the new doc generation code. It's failing to format tables correctly. --

[Issue 15603] ICE in cgxmm.c 647

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15603 hst...@quickfur.ath.cx changed: What|Removed |Added Keywords||ice CC|

Re: Procedural drawing using ndslice

2016-02-12 Thread Claude via Digitalmars-d-learn
Thanks for your replies, John and Ali. I wasn't sure I was clear. I'm going to try to see if I can fit Ali concept (totally lazy, which is what I was looking for) within ndslices, so that I can also use it in 3D and apply window() function to the result and mess around with it.

Re: Weird issue with std.range.iota.length

2016-02-12 Thread Jonathan M Davis via Digitalmars-d
On Friday, 12 February 2016 at 14:36:29 UTC, Meta wrote: On Friday, 12 February 2016 at 08:11:57 UTC, Jonathan M Davis wrote: What it comes down to is that length should always be size_t. That's what it is for arrays, and that's what most code expects. Allowing other types just causes trouble

[Issue 15656] ddox should recognize special meaning of '_' in ddoc, else may generate broken links.

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15656 --- Comment #4 from ag0ae...@gmail.com --- I've filed an issue against ddox: https://github.com/rejectedsoftware/ddox/issues/117 --

[Issue 15673] [dox] atan2 docs have broken formatting

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15673 --- Comment #2 from hst...@quickfur.ath.cx --- You can see the intended formatting here: https://dlang.org/phobos-prerelease/std_math#.atan2 --

[Issue 15675] New: BinaryHeap!(Array!T) is built wrong

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15675 Issue ID: 15675 Summary: BinaryHeap!(Array!T) is built wrong Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: regression

Re: Weird issue with std.range.iota.length

2016-02-12 Thread Steven Schveighoffer via Digitalmars-d
On 2/12/16 10:59 AM, Jonathan M Davis wrote: On Friday, 12 February 2016 at 14:36:29 UTC, Meta wrote: On Friday, 12 February 2016 at 08:11:57 UTC, Jonathan M Davis wrote: What it comes down to is that length should always be size_t. That's what it is for arrays, and that's what most code

[Issue 15673] [dox] atan2 docs have broken formatting

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15673 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx

IDE - Coedit 2

2016-02-12 Thread Basile Burg via Digitalmars-d-announce
see https://github.com/BBasile/Coedit/releases/tag/2_gold

[Issue 15673] [dox] atan2 docs have broken formatting

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15673 ag0ae...@gmail.com changed: What|Removed |Added CC||ag0ae...@gmail.com

[Issue 12004] shared ~this() should not exist

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12004 weaselcat changed: What|Removed |Added Status|NEW |RESOLVED

opApply and opApplyReverse

2016-02-12 Thread Q. Schroll via Digitalmars-d
One upon time, we decided that we can replace opNeg, opCom, etc. and opAdd, opSubtract, etc. by generic names opUnary and opBinary. Why don't we have a single iteration operator? Can't we just provide the "Reverse" information by some bool argument (or string if you like maybe more

Re: Weird issue with std.range.iota.length

2016-02-12 Thread H. S. Teoh via Digitalmars-d
On Fri, Feb 12, 2016 at 05:38:40PM +, Jonathan M Davis via Digitalmars-d wrote: > On Friday, 12 February 2016 at 16:52:17 UTC, ixid wrote: > >On Friday, 12 February 2016 at 15:59:09 UTC, Jonathan M Davis wrote: > >>It would be far better IMHO to just do a check in iota and throw a >

Re: Things that keep D from evolving?

2016-02-12 Thread rsw0x via Digitalmars-d-learn
On Friday, 12 February 2016 at 15:12:19 UTC, Steven Schveighoffer wrote: but I'm unaware of such an optimization, and it definitely isn't triggered specifically by 'in'. 'in' is literally replaced with 'scope const' when it is a storage class. -Steve I'd imagine GCC or LLVM may be able to

[Issue 8295] Struct member destructor can not be called from shared struct instance

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8295 weaselcat changed: What|Removed |Added CC||r9shacklef...@gmail.com

Re: Weird issue with std.range.iota.length

2016-02-12 Thread Jonathan M Davis via Digitalmars-d
On Friday, 12 February 2016 at 16:52:17 UTC, ixid wrote: On Friday, 12 February 2016 at 15:59:09 UTC, Jonathan M Davis wrote: It would be far better IMHO to just do a check in iota and throw a RangeError if the length wouldn't fit in size_t. Having length ever be anything other than size_t is

Re: Things that keep D from evolving?

2016-02-12 Thread rsw0x via Digitalmars-d-learn
On Friday, 12 February 2016 at 17:29:54 UTC, Matt Elkins wrote: On Friday, 12 February 2016 at 17:20:23 UTC, rsw0x wrote: On Friday, 12 February 2016 at 15:12:19 UTC, Steven Schveighoffer wrote: On 2/12/16 9:37 AM, Matt Elkins wrote: [...] Pass by reference and pass by value means different

Re: Weird issue with std.range.iota.length

2016-02-12 Thread Andrei Alexandrescu via Digitalmars-d
On 02/12/2016 12:58 PM, H. S. Teoh via Digitalmars-d wrote: IMO, fixing a specific type for length is a mistake. Truly generic code should treat the length as an opaque type (possibly satisfying some constraints, like <-comparable, ==-comparable, and maybe supporting basic arithmetic

An important pull request: accessing shared affix for immutable data

2016-02-12 Thread Andrei Alexandrescu via Digitalmars-d
https://github.com/D-Programming-Language/phobos/pull/3991 A short while ago Dicebot discussed the notion of using the allocator to store the reference count of objects (and generally metadata). The allocator seems to be a good place because in a way it's a source of "ground truth" - no

Re: Weird issue with std.range.iota.length

2016-02-12 Thread Andrei Alexandrescu via Digitalmars-d
On 02/12/2016 02:18 PM, Meta wrote: On Friday, 12 February 2016 at 19:00:29 UTC, Andrei Alexandrescu wrote: Tried that for a while, it quickly became a mess of entangled intestines. Not worth it. -- Andrei What do you think of the solution I proposed above? It's not pretty but there has to be

[Issue 15638] no common type for const classes

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15638 hst...@quickfur.ath.cx changed: What|Removed |Added Keywords||pull --- Comment #3 from

[Issue 15676] New: The compiler does not preserve @disable while generating .di files

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15676 Issue ID: 15676 Summary: The compiler does not preserve @disable while generating .di files Product: D Version: D2 Hardware: All OS: All Status: NEW

Re: Weird issue with std.range.iota.length

2016-02-12 Thread H. S. Teoh via Digitalmars-d
On Fri, Feb 12, 2016 at 02:00:29PM -0500, Andrei Alexandrescu via Digitalmars-d wrote: > On 02/12/2016 12:58 PM, H. S. Teoh via Digitalmars-d wrote: > >IMO, fixing a specific type for length is a mistake. Truly generic > >code should treat the length as an opaque type (possibly satisfying >

Re: Weird issue with std.range.iota.length

2016-02-12 Thread Meta via Digitalmars-d
On Friday, 12 February 2016 at 19:00:29 UTC, Andrei Alexandrescu wrote: Tried that for a while, it quickly became a mess of entangled intestines. Not worth it. -- Andrei What do you think of the solution I proposed above? It's not pretty but there has to be some kind of workaround. Not being

Re: Weird issue with std.range.iota.length

2016-02-12 Thread Andrei Alexandrescu via Digitalmars-d
On 02/12/2016 02:10 PM, H. S. Teoh via Digitalmars-d wrote: The intestines are still visible in iota(), and anything that uses it in 32-bit. Do we want them everywhere? -- Andrei

Re: Safe cast of arrays

2016-02-12 Thread Steven Schveighoffer via Digitalmars-d
On 2/12/16 12:15 PM, Chris Wright wrote: Casting between primitive value types (eg long -> int) is @safe. You can't get memory errors that way, and the conversions are well-defined. Casting between object references is @safe (assuming the object references are valid; @safe doesn't protect you

Re: Weird issue with std.range.iota.length

2016-02-12 Thread Meta via Digitalmars-d
On Friday, 12 February 2016 at 19:20:29 UTC, Andrei Alexandrescu wrote: On 02/12/2016 02:18 PM, Meta wrote: On Friday, 12 February 2016 at 19:00:29 UTC, Andrei Alexandrescu wrote: Tried that for a while, it quickly became a mess of entangled intestines. Not worth it. -- Andrei What do you

Ddb needs a maintainer

2016-02-12 Thread Piotr Szturmaj via Digitalmars-d-announce
Ddb is a relational database client for D [1]. Currently it only supports PostgreSQL but is not limited to it. It could be extended to support other backends. Built-in postgres client is a native implementation, that is it does not depend on libpq. Instead it communicates directly with the

[Issue 15674] [REG 2.066] alias this rejected for 'out' parameter

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15674 Kenji Hara changed: What|Removed |Added Keywords||pull --- Comment #2 from

[Issue 15678] BigInt("") should fail more prominently

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15678 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --

static array of structs clarification questions

2016-02-12 Thread WhatMeWorry via Digitalmars-d-learn
I was thinking about fixed length arrays of structures the other day so I played around with the flowing code: struct Foo { inti; string str; void info() { writeln("i = ", i, "str = ", str); } } Foo[2] foos; auto f1 = Foo(1, "6chars"); // this

[Issue 15677] New: std.experimental.allocators.expandArray overload with init should take the array by ref.

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15677 Issue ID: 15677 Summary: std.experimental.allocators.expandArray overload with init should take the array by ref. Product: D Version: D2 Hardware: All OS: All

Re: static array of structs clarification questions

2016-02-12 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/12/16 4:08 PM, WhatMeWorry wrote: I was thinking about fixed length arrays of structures the other day so I played around with the flowing code: struct Foo { inti; string str; void info() { writeln("i = ", i, "str = ", str); } } Foo[2]

How to force evaluation of range?

2016-02-12 Thread Taylor Hillegeist via Digitalmars-d-learn
So I have this code and I have to add the element .each!(a => a.each!("a")); to the end in order for it to evaluate the range completely and act like I expect it too. Is there a better thing to put in the place of .each!(a => a.each!("a"));? import std.stdio; import std.path; import

Re: static array of structs clarification questions

2016-02-12 Thread anonymous via Digitalmars-d-learn
On 12.02.2016 22:08, WhatMeWorry wrote: question #1: The static array must contain the fat pointers to str variables. But where is the string data itself actually held: the stack? the heap? somewhere else? (does it vary depending on location or scope) Depends on how the string was created. You

[Issue 15677] std.experimental.allocators.expandArray overload with init should take the array by ref.

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15677 --- Comment #1 from QAston --- I've solved the issue in the following PR: https://github.com/D-Programming-Language/phobos/pull/3979#issuecomment-181714618 --

Re: Safe cast of arrays

2016-02-12 Thread Chris Wright via Digitalmars-d
On Fri, 12 Feb 2016 14:32:32 -0500, Steven Schveighoffer wrote: > what I'm trying to say safe shouldn't allow is reinterpret casting. > i.e.: *cast(T*)() > > So casting IMO shouldn't be allowed unless it invokes some kind of > handler that ensures the conversion is safe. > > I'd include in this

[Issue 15538] final switch statement raises an exception even though all cases are covered under certain conditions

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15538 Johannes Loher changed: What|Removed |Added Summary|final switch statement |final switch

learn some d those days, can't understand the code here

2016-02-12 Thread Junfeng via Digitalmars-d
Hi, Come here for help. what I doing is setup vim and use dcd for goto define, but sometimes dcd-server got crash, issue is here: https://github.com/Hackerpilot/DCD/issues/294 Then I build the debug version, and an assert error comes out:

[Issue 15155] ')' cannot be expressed in code examples

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15155 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --

Re: An important pull request: accessing shared affix for immutable data

2016-02-12 Thread deadalnix via Digitalmars-d
On Friday, 12 February 2016 at 19:12:48 UTC, Andrei Alexandrescu wrote: https://github.com/D-Programming-Language/phobos/pull/3991 A short while ago Dicebot discussed the notion of using the allocator to store the reference count of objects (and generally metadata). The allocator seems to be

Re: An important pull request: accessing shared affix for immutable data

2016-02-12 Thread Andrei Alexandrescu via Digitalmars-d
On 02/12/2016 06:29 PM, Timon Gehr wrote: The first thing that comes to mind is that accessing a global associative array is not 'pure'. The weird thing is in this case is. The analogy is limited. -- Andrei

Re: Is this nogc? dmd and gdc disagree

2016-02-12 Thread tsbockman via Digitalmars-d-learn
On Friday, 12 February 2016 at 23:46:09 UTC, Kapps wrote: You'll encounter this pretty often in Phobos I think. I really don't think @nogc is ready, and tend to avoid it in my code. Exceptions are a big reason for it, and lots of functions in Phobos throw exceptions which prevents them from

[Issue 15678] New: BigInt("") should fail more prominently

2016-02-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15678 Issue ID: 15678 Summary: BigInt("") should fail more prominently Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

Re: Questions about vibe.d

2016-02-12 Thread Guillaume Piolat via Digitalmars-d-learn
On Friday, 12 February 2016 at 13:00:30 UTC, Charles wrote: 1. Yes. Example: https://github.com/rejectedsoftware/vibe.d/tree/master/examples/https_server 2. I'd do this with nginx. Example: http://serverfault.com/a/337893 3. Yes. 4. Yes. Example:

Re: An important pull request: accessing shared affix for immutable data

2016-02-12 Thread tsbockman via Digitalmars-d
On Friday, 12 February 2016 at 19:12:48 UTC, Andrei Alexandrescu wrote: * If the buffer is const, then the allocator must conservatively assume it might have been immutable and subsequently shared among threads. Therefore, several threads may request the affix of the same buffer

Re: An important pull request: accessing shared affix for immutable data

2016-02-12 Thread tsbockman via Digitalmars-d
On Friday, 12 February 2016 at 19:12:48 UTC, Andrei Alexandrescu wrote: * If the buffer is const, then the allocator must conservatively assume it might have been immutable and subsequently shared among threads. Therefore, several threads may request the affix of the same buffer

Re: An important pull request: accessing shared affix for immutable data

2016-02-12 Thread Dicebot via Digitalmars-d
On 02/12/2016 09:12 PM, Andrei Alexandrescu wrote: > So after thinking a bit I managed to convince myself that the affixes in > an AffixAllocator can be accessed with removing immutable, but without > actually breaking any guarantee made by the type system. (Affixes are > extra bytes allocated

Re: An important pull request: accessing shared affix for immutable data

2016-02-12 Thread Dicebot via Digitalmars-d
On 02/13/2016 03:35 AM, Andrei Alexandrescu wrote: > Folks who defined refcounted types use the special AffixAllocator > internally in an encapsulated manner. They define it, they use it - > outside intervention is not possible. Those who use their own allocation > calls and then use assumeUnique

Re: How to force evaluation of range?

2016-02-12 Thread Xinok via Digitalmars-d-learn
On Friday, 12 February 2016 at 20:43:24 UTC, Taylor Hillegeist wrote: So I have this code and I have to add the element .each!(a => a.each!("a")); to the end in order for it to evaluate the range completely and act like I expect it too. Is there a better thing to put in the place of .each!(a

Re: An important pull request: accessing shared affix for immutable data

2016-02-12 Thread Andrei Alexandrescu via Digitalmars-d
On 02/12/2016 08:42 PM, Dicebot wrote: So you envision this kind of metadata support to be only available via specific type of allocator, AffixAllocator, and not being supported by most of them? That is correct. You want metadata, you put an AffixAllocator together. -- Andrei

Re: An important pull request: accessing shared affix for immutable data

2016-02-12 Thread Timon Gehr via Digitalmars-d
On 12.02.2016 20:12, Andrei Alexandrescu wrote: https://github.com/D-Programming-Language/phobos/pull/3991 A short while ago Dicebot discussed the notion of using the allocator to store the reference count of objects (and generally metadata). The allocator seems to be a good place because in a

  1   2   >