emplace, immutable members and undefined behaviour

2015-11-15 Thread aewils via Digitalmars-d-learn
According to http://dlang.org/const3.html any modification of immutable data causes undefined behaviour. Now I want to initialise a struct with immutable members in some malloc'd memory and found the emplace function. I came up with the following code: import core.stdc.stdlib; import

Re: Persistent list

2015-11-15 Thread Ola Fosheim Grøstad via Digitalmars-d
On Sunday, 15 November 2015 at 02:49:49 UTC, Jonathan M Davis wrote: the program's data. Certainly, any immutable objects created at runtime are only protected from mutation by the type system. That would be a bad assumption. It could be read only pages with MMU protection. (files, shared

Re: Here's looking at you, kid

2015-11-15 Thread Meta via Digitalmars-d
On Sunday, 15 November 2015 at 07:45:18 UTC, Jack Stouffer wrote: Walter, why didn't you make an announce thread for this talk? It would have been very popular on reddit as well. I'm pretty sure it was. I remember watching it months ago.

Re: Persistent list

2015-11-15 Thread Jonathan M Davis via Digitalmars-d
On Sunday, 15 November 2015 at 14:21:18 UTC, Dicebot wrote: For instance, this code compiles and runs just fine. void main() { auto i = new immutable int(5); assert(*i == 5); auto j = cast(int*)i; *j = 42; assert(*i == 42); } AFAIK this is

Re: Persistent list

2015-11-15 Thread Andrei Alexandrescu via Digitalmars-d
On 11/15/2015 09:34 AM, Dicebot wrote: On Sunday, 15 November 2015 at 14:23:05 UTC, Jonathan M Davis wrote: As I mentioned, he's okay with changing the language to make the casts well defined. -- Andrei Well, that's a big change, since it pretty much means that D's const isn't physical const

Re: Persistent list

2015-11-15 Thread Dicebot via Digitalmars-d
On Sunday, 15 November 2015 at 14:42:25 UTC, Jonathan M Davis wrote: Casting away _const_ is already legal if programmer can himself guarantee underlying object has mutable origin (i.e. not available via immutable reference), by the very definition of const. It is casting away immutable and

Re: Persistent list

2015-11-15 Thread Jonathan M Davis via Digitalmars-d
On Sunday, 15 November 2015 at 14:34:45 UTC, Dicebot wrote: On Sunday, 15 November 2015 at 14:23:05 UTC, Jonathan M Davis wrote: As I mentioned, he's okay with changing the language to make the casts well defined. -- Andrei Well, that's a big change, since it pretty much means that D's const

Re: Please vote for the DConf logo

2015-11-15 Thread Nordlöw via Digitalmars-d-announce
On Wednesday, 4 November 2015 at 09:30:30 UTC, Andrei Alexandrescu wrote: Reply to this with 1.1, 1.2, 2, or 3: 1) by ponce: Variant 1: https://github.com/p0nce/dconf.org/blob/master/2016/images/logo-sample.png Variant 2:

Re: Persistent list

2015-11-15 Thread Jonathan M Davis via Digitalmars-d
On Sunday, 15 November 2015 at 14:55:36 UTC, Dicebot wrote: On Sunday, 15 November 2015 at 14:42:25 UTC, Jonathan M Davis wrote: Casting away _const_ is already legal if programmer can himself guarantee underlying object has mutable origin (i.e. not available via immutable reference), by the

Re: Persistent list

2015-11-15 Thread Dicebot via Digitalmars-d
On Sunday, 15 November 2015 at 15:09:25 UTC, Jonathan M Davis wrote: After the call to bar, the compiler can guarantee that the value of foo has not changed, because it's not possible for bar to access foo except via a const reference, and it can clearly see that, because it can see that it's

Re: Persistent list

2015-11-15 Thread Dicebot via Digitalmars-d
On Sunday, 15 November 2015 at 15:20:24 UTC, Dicebot wrote: On Sunday, 15 November 2015 at 15:09:25 UTC, Jonathan M Davis wrote: After the call to bar, the compiler can guarantee that the value of foo has not changed, because it's not possible for bar to access foo except via a const

[Issue 15331] std.json objects should implement opIn_r

2015-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15331 --- Comment #6 from Chris Wright --- "Interference" is the right word. Interference is when an interloper messes about with something in an obstructionist manner. The opposite approach would be ownership, where you actually try

Re: Persistent list

2015-11-15 Thread Dicebot via Digitalmars-d
On Sunday, 15 November 2015 at 14:23:05 UTC, Jonathan M Davis wrote: As I mentioned, he's okay with changing the language to make the casts well defined. -- Andrei Well, that's a big change, since it pretty much means that D's const isn't physical const anymore, and Walter has been _very_

Re: Persistent list

2015-11-15 Thread Jonathan M Davis via Digitalmars-d
On Sunday, 15 November 2015 at 14:54:51 UTC, Andrei Alexandrescu wrote: On 11/15/2015 09:34 AM, Dicebot wrote: On Sunday, 15 November 2015 at 14:23:05 UTC, Jonathan M Davis wrote: As I mentioned, he's okay with changing the language to make the casts well defined. -- Andrei Well, that's a

Re: D parsing

2015-11-15 Thread Nordlöw via Digitalmars-d
On Sunday, 15 November 2015 at 01:17:47 UTC, Bastiaan Veelo wrote: Left-recursion for Pegged is in the works: https://github.com/PhilippeSigaud/Pegged/pull/164 :-) And merged!: https://github.com/PhilippeSigaud/Pegged/pull/164 Would be nice to have an overview of which languages the, with

Re: Reviewing syntax highlight support in cgdb

2015-11-15 Thread Jacob Carlborg via Digitalmars-d
On 2015-11-14 11:44, Iain Buclaw wrote: Hi, I'm currently making changes to cgdb, and would like to have someone give a quick view over the lexer rules. https://github.com/cgdb/cgdb/blob/master/lib/tokenizer/dlexer.l Having a skim over myself, I see @nogc needs adding, and probably c_long,

Re: Persistent list

2015-11-15 Thread Paolo Invernizzi via Digitalmars-d
On Sunday, 15 November 2015 at 13:30:30 UTC, Dicebot wrote: Because of that I am very unhappy with attempts to break the type system which had costed considerable part of limited language resource for the sake of fake convenience (all @mutable speculation) +1, same attitude here. ---

Re: Here's looking at you, kid

2015-11-15 Thread Warwick via Digitalmars-d
On Sunday, 15 November 2015 at 11:46:54 UTC, Saurabh Das wrote: On Friday, 13 November 2015 at 22:34:18 UTC, Andrei Alexandrescu wrote: Hi everyone, Recently there's been an uptick of site visits on dlang.org and also dmd downloads (http://erdani.com/d/downloads.daily.png). Amid increased

Re: Persistent list

2015-11-15 Thread Jonathan M Davis via Digitalmars-d
On Sunday, 15 November 2015 at 08:59:52 UTC, Ola Fosheim Grøstad wrote: On Sunday, 15 November 2015 at 02:49:49 UTC, Jonathan M Davis wrote: the program's data. Certainly, any immutable objects created at runtime are only protected from mutation by the type system. That would be a bad

Re: Persistent list

2015-11-15 Thread Jonathan M Davis via Digitalmars-d
On Sunday, 15 November 2015 at 12:56:27 UTC, Andrei Alexandrescu wrote: On 11/14/2015 05:49 PM, Timon Gehr wrote: List uses RC internally. I don't think the UB casts will stay for the final version, unless you are willing to completely dilute the meaning of const in ways that Walter has

Re: Persistent list

2015-11-15 Thread Dicebot via Digitalmars-d
For instance, this code compiles and runs just fine. void main() { auto i = new immutable int(5); assert(*i == 5); auto j = cast(int*)i; *j = 42; assert(*i == 42); } AFAIK this is UB already (in practice), you will get different results

Re: Here's looking at you, kid

2015-11-15 Thread Jonathan M Davis via Digitalmars-d
On Sunday, 15 November 2015 at 13:50:36 UTC, Warwick wrote: The problem is you click on "Language Reference" and what you actually get is a "Language Specification". For example you click on "Modules" and you get this... = Module:

LDC, GDC, DMD different phobos versions

2015-11-15 Thread Daniel Kozak via Digitalmars-d
I primary use dmd for my D development, but for production binaries I use ldc or gdc. However because of different version of standard library I have errors cause by missing symbols and so on. Generaly many changes of phobos are backward compatible, so I can use old version of phobos

Re: What does the -betterC switch in dmd do?

2015-11-15 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-11-12 23:24, Justin Whear wrote: I believe the purpose of the switch is to help folks who are trying to write for bare or embedded systems by not emitting references to the D runtime library and runtime module information. Whether it actually does that in its current implementation is

Re: Thought on the 2015H2 Vision Participation Goal

2015-11-15 Thread Adrian Matoga via Digitalmars-d
On Sunday, 15 November 2015 at 02:56:35 UTC, Charles wrote: Hi everyone, Just looked at the vision for this half, and I had an idea pop in my head. Before I get to that idea, let me explain what I think might be an issue with it as-is. I've consistently seen D's participation metrics marked

Re: emplace, immutable members and undefined behaviour

2015-11-15 Thread Tobias Pankrath via Digitalmars-d-learn
this compiles and runs fine. Because emplace expects a typed pointer, it actually modifies (*p).x and (*p).y As far as I understand, this causes undefined behavior. Are there any (safe) alternatives to this code other than making the immutable members mutable? As long as there are no other

[Issue 15340] Spurious "overlapped default initialization" errors with auto fields

2015-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15340 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/528cf6a222df936865e8b7b991ebac83bdf7dacd fix Issue 15340 - Spurious

[Issue 15317] Segfault in Type::kind() with DMD v2.069.0

2015-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15317 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 15317] Segfault in Type::kind() with DMD v2.069.0

2015-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15317 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/0c8415056e801d414222bc6f2cf7a15e6d2a2c7a fix Issue 15317 - Segfault

Re: emplace, immutable members and undefined behaviour

2015-11-15 Thread aewils via Digitalmars-d-learn
On Sunday, 15 November 2015 at 11:12:02 UTC, Tobias Pankrath wrote: On Sunday, 15 November 2015 at 10:59:43 UTC, Tobias Pankrath wrote: Point* p = (allocate memory from somewhere); emplace!Point(p, 1, 2); immutable(Point)* immutableP = cast(immutable(Point)*) p; You could also use the

Re: emplace, immutable members and undefined behaviour

2015-11-15 Thread Tobias Pankrath via Digitalmars-d-learn
On Sunday, 15 November 2015 at 10:59:43 UTC, Tobias Pankrath wrote: Point* p = (allocate memory from somewhere); emplace!Point(p, 1, 2); immutable(Point)* immutableP = cast(immutable(Point)*) p; You could also use the emplace version that takes untyped memory:

Re: Here's looking at you, kid

2015-11-15 Thread Saurabh Das via Digitalmars-d
On Friday, 13 November 2015 at 22:34:18 UTC, Andrei Alexandrescu wrote: Hi everyone, Recently there's been an uptick of site visits on dlang.org and also dmd downloads (http://erdani.com/d/downloads.daily.png). Amid increased scrutiny it's important to focus on improving documentation. I

[Issue 15332] ICE in e2ir.c: assert(irs->sthis) in visit(ThisExp), function literal with keyword 'function' calls method

2015-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15332 Kenji Hara changed: What|Removed |Added Keywords||pull

[Issue 15331] std.json objects should implement opIn_r

2015-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15331 --- Comment #5 from bb.t...@gmx.com --- >(In reply to Chris Wright from comment #4) > > No I wont. > > If you're leaving it to the other person to file the new bug, you could > perhaps leave it to them to resolve the issue as invalid. There's far

Re: Here's looking at you, kid

2015-11-15 Thread Rikki Cattermole via Digitalmars-d
On 16/11/15 12:46 AM, Saurabh Das wrote: On Friday, 13 November 2015 at 22:34:18 UTC, Andrei Alexandrescu wrote: Hi everyone, Recently there's been an uptick of site visits on dlang.org and also dmd downloads (http://erdani.com/d/downloads.daily.png). Amid increased scrutiny it's important

Re: Here's looking at you, kid

2015-11-15 Thread Saurabh Das via Digitalmars-d
On Sunday, 15 November 2015 at 11:50:57 UTC, Rikki Cattermole wrote: Since you have a target audience to test out, would you mind overhauling the getting started page? It is a rather worth well addition/modification :) Yes - Andrei's post has already prompted me to put that on my ToDo list

Re: Persistent list

2015-11-15 Thread Andrei Alexandrescu via Digitalmars-d
On 11/14/2015 06:45 PM, Timon Gehr wrote: How to implement COW without support for writing? That'll be the next topic. -- Andrei

Re: Persistent list

2015-11-15 Thread Andrei Alexandrescu via Digitalmars-d
On 11/14/2015 05:49 PM, Timon Gehr wrote: List uses RC internally. I don't think the UB casts will stay for the final version, unless you are willing to completely dilute the meaning of const in ways that Walter has explicitly expressed will not be done in the past. As I mentioned, he's okay

Re: Persistent list

2015-11-15 Thread Andrei Alexandrescu via Digitalmars-d
On 11/14/2015 06:48 PM, Timon Gehr wrote: On 11/15/2015 12:20 AM, Andrei Alexandrescu wrote: On 11/14/15 5:49 PM, Timon Gehr wrote: It's supposed to guarantee that the given reference is not used to transitively mutate the object. The casts violate this. I think that semantics needs to

Re: Persistent list

2015-11-15 Thread Dicebot via Digitalmars-d
On Saturday, 14 November 2015 at 21:02:46 UTC, Observer wrote: On Saturday, 14 November 2015 at 16:27:17 UTC, Dicebot wrote: All trouble comes from trying to use physical immutable as logical one while still pretending it gives physical guarantees. Even if existing immutability is not widely

Re: Persistent list

2015-11-15 Thread Ola Fosheim Grøstad via Digitalmars-d
On Sunday, 15 November 2015 at 18:36:20 UTC, Jonathan M Davis wrote: was originally defined to be const". And in general, _very_ few objects are likely to be constructed as const. It is common in constructors. So, in general, in C++, you can cast away const and mutate as much as you'd like.

Re: Calypso progress report (+ updated MingW64 build)

2015-11-15 Thread Elie Morisse via Digitalmars-d-announce
On Thursday, 22 October 2015 at 01:19:19 UTC, Andrei Alexandrescu wrote: Great news! What's the story on exceptions? Does Calypso allow D code to catch exceptions thrown from C++ code? -- Andrei Small update: the LDC 0.16.1 merge was done and it's now possible to catch about any C++ exception

Re: Persistent list

2015-11-15 Thread Timon Gehr via Digitalmars-d
On 11/15/2015 06:38 PM, Andrei Alexandrescu wrote: On 11/15/2015 10:09 AM, Jonathan M Davis wrote: const in D guarantees that the object will not be mutated via that reference regardless of what that reference refers to. We need to change that if we want things like composable containers that

Re: Persistent list

2015-11-15 Thread Timon Gehr via Digitalmars-d
On 11/15/2015 01:57 PM, Andrei Alexandrescu wrote: On 11/14/2015 06:48 PM, Timon Gehr wrote: On 11/15/2015 12:20 AM, Andrei Alexandrescu wrote: On 11/14/15 5:49 PM, Timon Gehr wrote: It's supposed to guarantee that the given reference is not used to transitively mutate the object. The casts

Re: Persistent list

2015-11-15 Thread Dicebot via Digitalmars-d
On Sunday, 15 November 2015 at 19:44:27 UTC, Timon Gehr wrote: On 11/15/2015 06:38 PM, Andrei Alexandrescu wrote: On 11/15/2015 10:09 AM, Jonathan M Davis wrote: const in D guarantees that the object will not be mutated via that reference regardless of what that reference refers to. We need

Re: Persistent list

2015-11-15 Thread Andrei Alexandrescu via Digitalmars-d
On 11/15/2015 02:47 PM, Dicebot wrote: On Sunday, 15 November 2015 at 19:44:27 UTC, Timon Gehr wrote: On 11/15/2015 06:38 PM, Andrei Alexandrescu wrote: On 11/15/2015 10:09 AM, Jonathan M Davis wrote: const in D guarantees that the object will not be mutated via that reference regardless of

Re: Reviewing syntax highlight support in cgdb

2015-11-15 Thread Jacob Carlborg via Digitalmars-d
On 2015-11-15 18:41, Iain Buclaw via Digitalmars-d wrote: Not particularly bothered about having a special highlight for espace sequences, but nice suggestion all the same. I Only mentioned these as I noticed you had "\n" and "\r" in the above linked file. But perhaps that was for another

Re: Persistent list

2015-11-15 Thread Andrei Alexandrescu via Digitalmars-d
On 11/15/2015 01:50 PM, Jonathan M Davis wrote: On Sunday, 15 November 2015 at 18:09:15 UTC, Andrei Alexandrescu wrote: On 11/15/2015 01:00 PM, Jonathan M Davis wrote: Basically, we have to decide between having physical const with the guarantees that it provides We have that - it's

Re: Here's looking at you, kid

2015-11-15 Thread Warwick via Digitalmars-d
On Sunday, 15 November 2015 at 14:27:50 UTC, Jonathan M Davis wrote: On Sunday, 15 November 2015 at 13:50:36 UTC, Warwick wrote: Who is that a reference for? I mean what user needs that information in that format? Sure if your actually writing a D compiler yourself that is probably

My is the order of parameters reversed for functions that are dynamically loaded from shared C libraries?

2015-11-15 Thread David Nies via Digitalmars-d-learn
Apparantly, the order in which parameters are passed to a dynamically loaded C function is reversed. See the following minimal example: %> cat dll.c #include "stdio.h" int dll2(const char* first, const char* second) { printf("dll2() - first: '%s', second: '%s'\n", first,

Re: Persistent list

2015-11-15 Thread Andrei Alexandrescu via Digitalmars-d
On 11/15/2015 01:00 PM, Jonathan M Davis wrote: Basically, we have to decide between having physical const with the guarantees that it provides We have that - it's immutable. -- Andrei

Re: My is the order of parameters reversed for functions that are dynamically loaded from shared C libraries?

2015-11-15 Thread Andrea Fontana via Digitalmars-d-learn
On Sunday, 15 November 2015 at 18:02:01 UTC, David Nies wrote: On Sunday, 15 November 2015 at 18:00:09 UTC, David Nadlinger wrote: On Sunday, 15 November 2015 at 17:54:27 UTC, David Nies wrote: How can I make sure the order is correct? Whenever you use a C function, it must be marked as,

Re: Persistent list

2015-11-15 Thread Dicebot via Digitalmars-d
On Sunday, 15 November 2015 at 17:42:24 UTC, Jonathan M Davis wrote: On Sunday, 15 November 2015 at 15:20:24 UTC, Dicebot wrote: On Sunday, 15 November 2015 at 15:09:25 UTC, Jonathan M Davis wrote: After the call to bar, the compiler can guarantee that the value of foo has not changed, because

Re: LDC, GDC, DMD different phobos versions

2015-11-15 Thread Jordi Sayol via Digitalmars-d
El 15/11/15 a les 16:28, Daniel Kozak via Digitalmars-d ha escrit: > Generaly many changes of phobos are backward compatible, so I can use old > version of phobos symbols... But there is only actual version of phobos > documentation, which makes this hard. OK I always can generate old version of

Re: Persistent list

2015-11-15 Thread Dicebot via Digitalmars-d
On Sunday, 15 November 2015 at 19:51:09 UTC, Andrei Alexandrescu wrote: Just to clarify - is that referring to the part "We need to change that if we want things like composable containers that work with const." or to the "I think it's a good thing to want" part? -- Andrei Second part. I

Re: Persistent list

2015-11-15 Thread Timon Gehr via Digitalmars-d
On 11/15/2015 08:57 PM, Andrei Alexandrescu wrote: On 11/15/2015 01:50 PM, Jonathan M Davis wrote: On Sunday, 15 November 2015 at 18:09:15 UTC, Andrei Alexandrescu wrote: On 11/15/2015 01:00 PM, Jonathan M Davis wrote: Basically, we have to decide between having physical const with the

Re: Persistent list

2015-11-15 Thread Dicebot via Digitalmars-d
On Friday, 13 November 2015 at 23:10:04 UTC, Andrei Alexandrescu wrote: I created a simple persistent list with reference counting and custom allocation at http://dpaste.dzfl.pl/0981640c2835. There is also another thing I wanted to mention on topic of persistent containers. Right now for me

Re: Persistent list

2015-11-15 Thread Andrei Alexandrescu via Digitalmars-d
On 11/15/2015 03:11 PM, Dicebot wrote: On Sunday, 15 November 2015 at 19:51:09 UTC, Andrei Alexandrescu wrote: Just to clarify - is that referring to the part "We need to change that if we want things like composable containers that work with const." or to the "I think it's a good thing to

Re: LDC, GDC, DMD different phobos versions

2015-11-15 Thread Daniel Kozák via Digitalmars-d
V Sun, 15 Nov 2015 19:53:53 +0100 Jordi Sayol via Digitalmars-d napsáno: > El 15/11/15 a les 16:28, Daniel Kozak via Digitalmars-d ha escrit: > > Generaly many changes of phobos are backward compatible, so I can > > use old version of phobos symbols... But there is

Re: Persistent list

2015-11-15 Thread Andrei Alexandrescu via Digitalmars-d
On 11/15/2015 03:23 PM, Dicebot wrote: On Friday, 13 November 2015 at 23:10:04 UTC, Andrei Alexandrescu wrote: I created a simple persistent list with reference counting and custom allocation at http://dpaste.dzfl.pl/0981640c2835. There is also another thing I wanted to mention on topic of

Re: Persistent list

2015-11-15 Thread Andrei Alexandrescu via Digitalmars-d
On 11/15/2015 03:17 PM, Timon Gehr wrote: On 11/15/2015 08:57 PM, Andrei Alexandrescu wrote: On 11/15/2015 01:50 PM, Jonathan M Davis wrote: On Sunday, 15 November 2015 at 18:09:15 UTC, Andrei Alexandrescu wrote: On 11/15/2015 01:00 PM, Jonathan M Davis wrote: Basically, we have to decide

Re: Reviewing syntax highlight support in cgdb

2015-11-15 Thread Iain Buclaw via Digitalmars-d
On 15 November 2015 at 20:54, Jacob Carlborg via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On 2015-11-15 18:41, Iain Buclaw via Digitalmars-d wrote: > > Not particularly bothered about having a special highlight for espace >> sequences, but nice suggestion all the same. >> > > I Only

Re: Persistent list

2015-11-15 Thread Andrei Alexandrescu via Digitalmars-d
On 11/15/2015 04:45 PM, Dicebot wrote: On Sunday, 15 November 2015 at 21:00:40 UTC, Andrei Alexandrescu wrote: On 11/15/2015 03:11 PM, Dicebot wrote: Second part. I don't see a case for const containers at all. Fully immutable functional style ones - sure, I have actually experimented

Re: Persistent list

2015-11-15 Thread Dicebot via Digitalmars-d
On Sunday, 15 November 2015 at 21:00:40 UTC, Andrei Alexandrescu wrote: On 11/15/2015 03:11 PM, Dicebot wrote: Second part. I don't see a case for const containers at all. Fully immutable functional style ones - sure, I have actually experimented implementing cache this way in

Re: Persistent list

2015-11-15 Thread Timon Gehr via Digitalmars-d
On 11/15/2015 10:06 PM, Andrei Alexandrescu wrote: ... I do agree that "pure const" may have other, stronger properties. But let's discuss "const" and what it can promise, or move over to a whole new topic of "pure const". ... "pure" is independent of "const" at the moment. So what you want

Wanted: Review manager for std.experimental.range.ndslice

2015-11-15 Thread Ilya Yaroshenko via Digitalmars-d
Hello, Review manager for N-dimensional ranges is wanted Docs (see PR for latest version): http://dtest.thecybershadow.net/artifact/website-7a646fdea76569e009844cdee5c93edab10980ca-cdcb694c40ec47acf88b0aa878e1623e/web/phobos-prerelease/std_experimental_range_ndslice.html PR:

[Issue 15220] [REG2.065] std.getopt parses -o=value as "=value"

2015-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15220 --- 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/d0244072b6e3f29d09b704bf522b1799afb0bbe1 win32.mak: Work

[Issue 2447] There's no disconnectall for std.signals

2015-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2447 Infiltrator changed: What|Removed |Added CC|

[Issue 15146] std.file.dirEntries("") only works on Windows

2015-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15146 --- 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/545bb55e769593b6fa0fede66a4440828534dbfc fix Issue 15146 -

Re: Atila's article on Reddit: "Rust impressions from a C++/D programmer, part 1"

2015-11-15 Thread The Old One via Digitalmars-d-announce
On Tuesday, 10 November 2015 at 16:00:06 UTC, Ali Çehreli wrote: https://www.reddit.com/r/programming/comments/3s9cfe/rust_impressions_from_a_cd_programmer_part_1/ Ali Atila wrote: I thought I’d like Rust more than I actually do at this point. I’m glad I’m taking the time to learn it, but

[Issue 15146] std.file.dirEntries("") only works on Windows

2015-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15146 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: Atila's article on Reddit: "Rust impressions from a C++/D programmer, part 1"

2015-11-15 Thread Adam D. Ruppe via Digitalmars-d-announce
On Monday, 16 November 2015 at 00:40:33 UTC, The Old One wrote: My point: until you can easily write D bare-metal code, without any runtime, and honestly without garbage collection, it just isn't a Real Systems Language. It really isn't hard. Yes, there's a learning curve to get started, but

[Issue 15330] std.file.copy outputs wrong error message when target directory doesn't exist

2015-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15330 Infiltrator changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 3725] Add units type to standard library

2015-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3725 Infiltrator changed: What|Removed |Added CC|

Re: Persistent list

2015-11-15 Thread Andrei Alexandrescu via Digitalmars-d
On 11/15/15 8:29 PM, Timon Gehr wrote: On 11/15/2015 10:06 PM, Andrei Alexandrescu wrote: ... I do agree that "pure const" may have other, stronger properties. But let's discuss "const" and what it can promise, or move over to a whole new topic of "pure const". ... "pure" is independent of

Re: Persistent list

2015-11-15 Thread Timon Gehr via Digitalmars-d
On 11/16/2015 03:25 AM, Andrei Alexandrescu wrote: In one particular case. import package.module : foo, bar, baz, fun; final class C{ int x; private this(int x){ this.x=x; } } void main(){ auto c = new C(2); foo(c); // void foo(const C c); bar(); // impure

[Issue 15341] New: segfault with std.signals slots

2015-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15341 Issue ID: 15341 Summary: segfault with std.signals slots Product: D Version: D2 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P1

Re: What does the -betterC switch in dmd do?

2015-11-15 Thread Meta via Digitalmars-d-learn
On Sunday, 15 November 2015 at 15:34:19 UTC, Jacob Carlborg wrote: I'm pretty sure that the only things that are excluded are module info and type info. It's still possible to use "new" and all the array features that requires support in the runtime (slicing, concatenation, appending and so

Re: Atila's article on Reddit: "Rust impressions from a C++/D programmer, part 1"

2015-11-15 Thread lobo via Digitalmars-d-announce
On Monday, 16 November 2015 at 00:50:50 UTC, Adam D. Ruppe wrote: On Monday, 16 November 2015 at 00:40:33 UTC, The Old One wrote: My point: until you can easily write D bare-metal code, without any runtime, and honestly without garbage collection, it just isn't a Real Systems Language. It

Re: Atila's article on Reddit: "Rust impressions from a C++/D programmer, part 1"

2015-11-15 Thread rsw0x via Digitalmars-d-announce
On Monday, 16 November 2015 at 00:40:33 UTC, The Old One wrote: My point: until you can easily write D bare-metal code, without any runtime, and honestly without garbage collection, it just isn't a Real Systems Language. I'm honestly tired of reading this as if "bare metal rust" has all the

All functions COMDAT on OSX

2015-11-15 Thread bitwise via Digitalmars-d
https://issues.dlang.org/show_bug.cgi?id=15342 DMD emits all functions as COMDAT on OSX. I'm guessing this was originally a workaround of some kind...does anybody know the story? Thanks, Bit

[Issue 15342] DMD outputs all functions as COMDAT on OSX

2015-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15342 bitwise changed: What|Removed |Added CC||l...@luismarques.eu

[Issue 15342] New: DMD outputs all functions as COMDAT on OSX

2015-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15342 Issue ID: 15342 Summary: DMD outputs all functions as COMDAT on OSX Product: D Version: D2 Hardware: All OS: Mac OS X Status: NEW Severity: major

[Issue 11199] OS X DMD outputs functions to S section, erroneously prevents duplicate symbol error

2015-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11199 bitwise changed: What|Removed |Added Status|NEW |RESOLVED

Re: [Poll] On Linux, what should we commonly use as sub-directory name for D?

2015-11-15 Thread Marco Leise via Digitalmars-d
Am Wed, 11 Nov 2015 17:24:18 + schrieb Chris Piker : > On Tuesday, 12 November 2013 at 19:50:32 UTC, Marco Leise wrote: > > I've seen people use both 'd' and 'dlang' now, so I created a > > poll. Everyone assembling Linux packages is then free use the > > results to create a

Re: Atila's article on Reddit: "Rust impressions from a C++/D programmer, part 1"

2015-11-15 Thread Joakim via Digitalmars-d-announce
On Monday, 16 November 2015 at 00:40:33 UTC, The Old One wrote: With the World turning to IOT, and most startups having an embedded system as at least a part of their offering, even old languages should take this seriously. Not everybody actually fathoms the size of this tsunami, or the

Re: Persistent list

2015-11-15 Thread Jonathan M Davis via Digitalmars-d
On Sunday, 15 November 2015 at 19:57:12 UTC, Andrei Alexandrescu wrote: On 11/15/2015 01:50 PM, Jonathan M Davis wrote: On Sunday, 15 November 2015 at 18:09:15 UTC, Andrei Alexandrescu wrote: On 11/15/2015 01:00 PM, Jonathan M Davis wrote: Basically, we have to decide between having physical

Re: Persistent list

2015-11-15 Thread Jonathan M Davis via Digitalmars-d
On Sunday, 15 November 2015 at 19:09:16 UTC, Andrei Alexandrescu wrote: So one important question is what style we use for Phobos and endorse as idiomatic. My sense after working on this for a while is - forget inout. Qualifiers are rather complex, and of them inout is the most. So I'd rather

Re: Persistent list

2015-11-15 Thread Jonathan M Davis via Digitalmars-d
On Sunday, 15 November 2015 at 21:45:08 UTC, Dicebot wrote: On Sunday, 15 November 2015 at 21:00:40 UTC, Andrei Alexandrescu wrote: Passing arguments to functions that aren't supposed to change the containers. -- Andrei For that you don't need to mutate neither allocator nor RC (unless that

Re: [Poll] On Linux, what should we commonly use as sub-directory name for D?

2015-11-15 Thread Marco Leise via Digitalmars-d
Am Thu, 12 Nov 2015 10:26:54 + schrieb Marc Schütz : > I'm interested in this topic, too. Has there been a conclusion as > to distributions should install includes and libraries of > different compilers (and versions), which sonames to use, etc? The shared library topic

Re: on structs by reference

2015-11-15 Thread Ali Çehreli via Digitalmars-d-learn
On 11/14/2015 07:53 AM, Alex wrote: > 3. The only point I stumble on is, that the main feature in my program > is, that the underlying array, to which my slices refer to never > changes. So, I'm going to have more and more slices, which are going to > be smaller and smaller and each points to

Re: Persistent list

2015-11-15 Thread rsw0x via Digitalmars-d
On Monday, 16 November 2015 at 06:24:05 UTC, Jonathan M Davis wrote: On Sunday, 15 November 2015 at 21:45:08 UTC, Dicebot wrote: [...] Except that what if the container is passed to something that keeps it around? The ref-count would need to at least be incremented when passing it, and if

Any D IDE on Mac OSX with debugging support?

2015-11-15 Thread Vadim Lopatin via Digitalmars-d-learn
Hello, Is there any IDE which allows debugging D apps on OSX? I'm trying Mono-D, but getting error "Debugger operation failed A syntax error in expression, near 'sizeof(void*)'" GDB is installed using homebrew. Probably, something is wrong with my gdb. When I'm trying to start debugging

Re: [Poll] On Linux, what should we commonly use as sub-directory name for D?

2015-11-15 Thread Iain Buclaw via Digitalmars-d
On 16 Nov 2015 7:35 am, "Marco Leise via Digitalmars-d" < digitalmars-d@puremagic.com> wrote: > > Am Wed, 11 Nov 2015 17:24:18 + > schrieb Chris Piker : > > > On Tuesday, 12 November 2013 at 19:50:32 UTC, Marco Leise wrote: > > > I've seen people use both 'd' and 'dlang' now,

Re: Any D IDE on Mac OSX with debugging support?

2015-11-15 Thread Rikki Cattermole via Digitalmars-d-learn
On 16/11/15 7:45 PM, Vadim Lopatin wrote: Hello, Is there any IDE which allows debugging D apps on OSX? I'm trying Mono-D, but getting error "Debugger operation failed A syntax error in expression, near 'sizeof(void*)'" GDB is installed using homebrew. Probably, something is wrong with my

Re: [Poll] On Linux, what should we commonly use as sub-directory name for D?

2015-11-15 Thread Iain Buclaw via Digitalmars-d
On 16 Nov 2015 8:15 am, "Marco Leise via Digitalmars-d" < digitalmars-d@puremagic.com> wrote: > > Am Thu, 12 Nov 2015 10:26:54 + > schrieb Marc Schütz : > > > I'm interested in this topic, too. Has there been a conclusion as > > to distributions should install includes and

Re: Here's looking at you, kid

2015-11-15 Thread Chris Wright via Digitalmars-d
On Sunday, 15 November 2015 at 13:50:36 UTC, Warwick wrote: On Sunday, 15 November 2015 at 11:46:54 UTC, Saurabh Das wrote: On Friday, 13 November 2015 at 22:34:18 UTC, Andrei Alexandrescu wrote: Hi everyone, Recently there's been an uptick of site visits on dlang.org and also dmd downloads

Re: Persistent list

2015-11-15 Thread Andrei Alexandrescu via Digitalmars-d
On 11/15/2015 10:09 AM, Jonathan M Davis wrote: const in D guarantees that the object will not be mutated via that reference regardless of what that reference refers to. We need to change that if we want things like composable containers that work with const. And I think it's a good thing to

Re: Reviewing syntax highlight support in cgdb

2015-11-15 Thread Iain Buclaw via Digitalmars-d
On 15 November 2015 at 17:02, Jacob Carlborg via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On 2015-11-14 11:44, Iain Buclaw wrote: > >> Hi, >> >> I'm currently making changes to cgdb, and would like to have someone >> give a quick view over the lexer rules. >> >>

Re: Persistent list

2015-11-15 Thread Ola Fosheim Grøstad via Digitalmars-d
On Sunday, 15 November 2015 at 15:14:38 UTC, Jonathan M Davis wrote: mutating is undefined behavior, arguing that if it weren't, it would be like C++'s const and that C++'s const is pretty much useless, because it doesn't provide actual guarantees. Hm, I think C++ const requires that the

  1   2   >