Re: concurrency call to arms

2018-09-14 Thread John Belmonte via Digitalmars-d
On Tuesday, 28 August 2018 at 20:05:32 UTC, Russel Winder wrote: But that is the point, this is Python specific, and yet the motivating example is a misunderstanding of how Go is used. This inconsistency seriously undermines the general argument. I don't believe I misunderstand how Go is used.

Re: Mobile is the new PC and AArch64 is the new x64

2018-09-14 Thread Joakim via Digitalmars-d
On Friday, 14 September 2018 at 16:53:16 UTC, Iain Buclaw wrote: On 14 September 2018 at 09:51, Joakim via Digitalmars-d wrote: On Wednesday, 12 September 2018 at 22:41:31 UTC, Iain Buclaw wrote: On 12 September 2018 at 10:09, Joakim via Digitalmars-d wrote: I think their model of having

Re: extern(C++, ns) is wrong

2018-09-14 Thread Neia Neutuladh via Digitalmars-d
On Saturday, 15 September 2018 at 00:07:44 UTC, Danni Coy wrote: So extern(C++,"ns") replaces the existing syntax It would be in addition, at least at first. The current syntax might be deprecated. and then improve D's general ability to hand functioning hijacking other functions would be t

Re: phobo's std.file is completely broke!

2018-09-14 Thread Neia Neutuladh via Digitalmars-d
On Friday, 14 September 2018 at 19:42:39 UTC, Josphe Brigmo wrote: It's a bug, but how the hell can I reproduce examples when it depends on the file system? Something like this (though I don't know much about Windows, so this might be wrong): auto path = getcwd; auto dir = `0123456789abcdef`

Re: extern(C++, ns) is wrong

2018-09-14 Thread Danni Coy via Digitalmars-d
On Fri, Sep 14, 2018, 06:01 Jonathan M Davis via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On Thursday, September 13, 2018 5:45:56 AM MDT Danni Coy via Digitalmars-d > wrote: > > On Thu, Sep 13, 2018 at 5:14 PM Jonathan M Davis via Digitalmars-d < > > > > digitalmars-d@puremagic.com> w

Re: Canadian companies using D?

2018-09-14 Thread Ryan Barker via Digitalmars-d
On Wednesday, 12 September 2018 at 12:02:21 UTC, Gerald wrote: On Wednesday, 12 September 2018 at 01:14:58 UTC, Ryan Barker wrote: I wonder if you guys are aware of any Canadian companies using D, I want to do some research about what they're using D for and eventually follow some of them. I wa

Re: extern(C++, ns) is wrong

2018-09-14 Thread Danni Coy via Digitalmars-d
On Fri, Sep 14, 2018, 08:47 Manu via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On Thu, 13 Sep 2018 at 04:46, Danni Coy via Digitalmars-d > wrote: > > > > On Thu, Sep 13, 2018 at 5:14 PM Jonathan M Davis via Digitalmars-d < > digitalmars-d@puremagic.com> wrote: > >> > >> The entire poi

int/longRe: DIP 1015--removal of integer & character literal conversion to bool--Final Review

2018-09-14 Thread Nicholas Wilson via Digitalmars-d
On Friday, 14 September 2018 at 13:41:40 UTC, Mike Parker wrote: DIP 1015, "Deprecation and removal of implicit conversion from integer and character literals to bool", is now ready for Final Review. This is a last chance for community feedback before the DIP is handed off to Walter and Andrei

Re: dmd as a library for scripting/JIT?

2018-09-14 Thread Stefan Koch via Digitalmars-d
On Friday, 14 September 2018 at 16:02:36 UTC, dennis luehring wrote: i've got user defined flow charts in my C++ application that calling C/C++ Code - could be possible to embedd dmd as a library, generate D code out of my flow charts and execute the "compiled" code directly without doing file

Re: phobo's std.file is completely broke!

2018-09-14 Thread Josphe Brigmo via Digitalmars-d
https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#maxpath But because MAX_PATH is an enum, it can't be redefined without recompiling phobos, which means it will break later on... It does say that this is not a problem with unicode... but...

Re: extern(C++, ns) is wrong

2018-09-14 Thread Jonathan M Davis via Digitalmars-d
On Friday, September 14, 2018 10:56:45 AM MDT Manu via Digitalmars-d wrote: > On Fri, 14 Sep 2018 at 07:55, 12345swordy via Digitalmars-d > > wrote: > > On Friday, 14 September 2018 at 13:10:07 UTC, Atila Neves wrote: > > > On Friday, 14 September 2018 at 09:56:52 UTC, Zot wrote: > > >> [...] > >

Re: phobo's std.file is completely broke!

2018-09-14 Thread Josphe Brigmo via Digitalmars-d
On Friday, 14 September 2018 at 19:17:58 UTC, bachmeier wrote: On Friday, 14 September 2018 at 19:06:14 UTC, Josphe Brigmo wrote: For very long file names it is broke and every command fails. These paths are not all that long but over 256 limit. (For windows) Please file a bug report with rep

Re: phobo's std.file is completely broke!

2018-09-14 Thread Andre Pany via Digitalmars-d
On Friday, 14 September 2018 at 19:06:14 UTC, Josphe Brigmo wrote: For very long file names it is broke and every command fails. These paths are not all that long but over 256 limit. (For windows) The problem this causes can be disastrous. If some check fails and runs code that isn't mean to

Re: phobo's std.file is completely broke!

2018-09-14 Thread bachmeier via Digitalmars-d
On Friday, 14 September 2018 at 19:06:14 UTC, Josphe Brigmo wrote: For very long file names it is broke and every command fails. These paths are not all that long but over 256 limit. (For windows) Please file a bug report with reproducible examples if you believe it's a bug.

Re: Proposal: __not(keyword)

2018-09-14 Thread Jonathan M Davis via Digitalmars-d
On Friday, September 14, 2018 12:44:11 PM MDT Neia Neutuladh via Digitalmars-d wrote: > On Friday, 14 September 2018 at 18:13:49 UTC, Eugene Wissner > > wrote: > > Makes the code unreadable. You have to count all attributes in > > the file, then negate them. Nobody should write like this and > > t

phobo's std.file is completely broke!

2018-09-14 Thread Josphe Brigmo via Digitalmars-d
For very long file names it is broke and every command fails. These paths are not all that long but over 256 limit. (For windows) The problem this causes can be disastrous. If some check fails and runs code that isn't mean to run if the file exists, it could destroy data. I replaced many o

Re: Proposal: __not(keyword)

2018-09-14 Thread Neia Neutuladh via Digitalmars-d
On Friday, 14 September 2018 at 18:13:49 UTC, Eugene Wissner wrote: Makes the code unreadable. You have to count all attributes in the file, then negate them. Nobody should write like this and therefore it is good, that there isn't something like __not. For @nogc, pure and so forth there were

Re: Proposal: __not(keyword)

2018-09-14 Thread Eugene Wissner via Digitalmars-d
On Friday, 14 September 2018 at 18:06:55 UTC, Adam D. Ruppe wrote: Here's the simple idea: __not(anything) just turns off whatever `anything` does in the compiler. __not(final) void foo() {} // turns off the final flag (if it is set) __not(@nogc) void foo() {} // turns off the @nogc flag (if i

Re: Proposal: __not(keyword)

2018-09-14 Thread Neia Neutuladh via Digitalmars-d
On Friday, 14 September 2018 at 18:06:55 UTC, Adam D. Ruppe wrote: Here's the simple idea: __not(anything) just turns off whatever `anything` does in the compiler. From your lips to G*d's ears.

Proposal: __not(keyword)

2018-09-14 Thread Adam D. Ruppe via Digitalmars-d
Here's the simple idea: __not(anything) just turns off whatever `anything` does in the compiler. __not(final) void foo() {} // turns off the final flag (if it is set) __not(@nogc) void foo() {} // turns off the @nogc flag (if it is set) __not(const)(int) a; // not const All it does is inver

Re: dmd as a library for scripting/JIT?

2018-09-14 Thread Neia Neutuladh via Digitalmars-d
On Friday, 14 September 2018 at 16:02:36 UTC, dennis luehring wrote: i've got user defined flow charts in my C++ application that calling C/C++ Code - could be possible to embedd dmd as a library, generate D code out of my flow charts and execute the "compiled" code directly without doing file

Re: extern(C++, ns) is wrong

2018-09-14 Thread Manu via Digitalmars-d
On Fri, 14 Sep 2018 at 07:55, 12345swordy via Digitalmars-d wrote: > > On Friday, 14 September 2018 at 13:10:07 UTC, Atila Neves wrote: > > On Friday, 14 September 2018 at 09:56:52 UTC, Zot wrote: > >> [...] > > > > I'm also completely in favour of what Manu is saying. The > > current situation wo

Re: Why the hell do exceptions give error in the library rather than the user code?

2018-09-14 Thread Neia Neutuladh via Digitalmars-d
On Friday, 14 September 2018 at 16:43:04 UTC, Josphe Brigmo wrote: It is because you are throwing inside your code. When the throw is from the library, it gives something like this: std.exception.ErrnoException@std/stdio.d(430): Cannot open file `/doesntexist' in mode `w' (Permission denied)

Re: Mobile is the new PC and AArch64 is the new x64

2018-09-14 Thread Iain Buclaw via Digitalmars-d
On 14 September 2018 at 09:51, Joakim via Digitalmars-d wrote: > On Wednesday, 12 September 2018 at 22:41:31 UTC, Iain Buclaw wrote: >> >> On 12 September 2018 at 10:09, Joakim via Digitalmars-d >> wrote: >>> >>> I think their model of having an open ISA with proprietary extensions >>> will inevi

Re: Why the hell do exceptions give error in the library rather than the user code?

2018-09-14 Thread Josphe Brigmo via Digitalmars-d
On Friday, 14 September 2018 at 15:52:20 UTC, Neia Neutuladh wrote: On Friday, 14 September 2018 at 14:34:36 UTC, Josphe Brigmo wrote: std.file.FileException@C:\D\dmd2\windows\bin\..\..\src\phobos\std\file.d(3153): It is very annoying when the only error info I have is pointing to code in a li

Re: Why the hell do exceptions give error in the library rather than the user code?

2018-09-14 Thread Josphe Brigmo via Digitalmars-d
On Friday, 14 September 2018 at 15:40:46 UTC, Jonathan Marler wrote: On Friday, 14 September 2018 at 14:34:36 UTC, Josphe Brigmo wrote: std.file.FileException@C:\D\dmd2\windows\bin\..\..\src\phobos\std\file.d(3153): It is very annoying when the only error info I have is pointing to code in a l

dmd as a library for scripting/JIT?

2018-09-14 Thread dennis luehring via Digitalmars-d
i've got user defined flow charts in my C++ application that calling C/C++ Code - could be possible to embedd dmd as a library, generate D code out of my flow charts and execute the "compiled" code directly without doing file io or dmd.exe runs to create dlls that i hot reload?

Re: Why the hell do exceptions give error in the library rather than the user code?

2018-09-14 Thread Neia Neutuladh via Digitalmars-d
On Friday, 14 September 2018 at 14:34:36 UTC, Josphe Brigmo wrote: std.file.FileException@C:\D\dmd2\windows\bin\..\..\src\phobos\std\file.d(3153): It is very annoying when the only error info I have is pointing to code in a library which tells me absolutely nothing about where the error occurs

Re: Why the hell do exceptions give error in the library rather than the user code?

2018-09-14 Thread Jonathan Marler via Digitalmars-d
On Friday, 14 September 2018 at 14:34:36 UTC, Josphe Brigmo wrote: std.file.FileException@C:\D\dmd2\windows\bin\..\..\src\phobos\std\file.d(3153): It is very annoying when the only error info I have is pointing to code in a library which tells me absolutely nothing about where the error occurs

Re: extern(C++, ns) is wrong

2018-09-14 Thread 12345swordy via Digitalmars-d
On Friday, 14 September 2018 at 13:10:07 UTC, Atila Neves wrote: On Friday, 14 September 2018 at 09:56:52 UTC, Zot wrote: [...] I'm also completely in favour of what Manu is saying. The current situation works for no one. I very much doubt that any D programmer exists that wants what extern(

Why the hell do exceptions give error in the library rather than the user code?

2018-09-14 Thread Josphe Brigmo via Digitalmars-d
std.file.FileException@C:\D\dmd2\windows\bin\..\..\src\phobos\std\file.d(3153): It is very annoying when the only error info I have is pointing to code in a library which tells me absolutely nothing about where the error occurs in the in the user code(which is what matters). Surely the call

DIP 1015--removal of integer & character literal conversion to bool--Final Review

2018-09-14 Thread Mike Parker via Digitalmars-d
DIP 1015, "Deprecation and removal of implicit conversion from integer and character literals to bool", is now ready for Final Review. This is a last chance for community feedback before the DIP is handed off to Walter and Andrei for the Formal Assessment. Please read the procedures document fo

Re: extern(C++, ns) is wrong

2018-09-14 Thread Atila Neves via Digitalmars-d
On Friday, 14 September 2018 at 09:56:52 UTC, Zot wrote: On Thursday, 13 September 2018 at 23:30:33 UTC, Jonathan M Davis wrote: On Thursday, September 13, 2018 4:43:47 PM MDT Manu via Digitalmars-d wrote: [...] I'm not disagreeing, but I'm not the person who needs to be convinced. Either wa

Re: Proposal to make "shared" (more) useful

2018-09-14 Thread Kagamin via Digitalmars-d
On Friday, 14 September 2018 at 12:00:19 UTC, Arafel wrote: Since I think this is commonly agreed, I was only trying to suggest a possible way to improve it (see my other messages in the thread), that's it. Well, indeed synchronized classes are already treated a little special, e.g. they don'

Re: Proposal to make "shared" (more) useful

2018-09-14 Thread Arafel via Digitalmars-d
On 09/14/2018 01:37 PM, Kagamin wrote: On Friday, 14 September 2018 at 11:13:00 UTC, Arafel wrote: As I recently discovered, "__gshared" means "static", so not so easy to use for class instance members. In fact, that's exactly what I'd like to have. __gshared is for global storage. If you don

Re: Proposal to make "shared" (more) useful

2018-09-14 Thread Kagamin via Digitalmars-d
On Friday, 14 September 2018 at 11:13:00 UTC, Arafel wrote: As I recently discovered, "__gshared" means "static", so not so easy to use for class instance members. In fact, that's exactly what I'd like to have. __gshared is for global storage. If you don't use global storage, you can simply n

Re: Proposal to make "shared" (more) useful

2018-09-14 Thread Arafel via Digitalmars-d
If you prefer C-style multithreading, D supports it with __gshared. As I recently discovered, "__gshared" means "static", so not so easy to use for class instance members. In fact, that's exactly what I'd like to have.

Re: extern(C++, ns) is wrong

2018-09-14 Thread Zot via Digitalmars-d
On Thursday, 13 September 2018 at 23:30:33 UTC, Jonathan M Davis wrote: On Thursday, September 13, 2018 4:43:47 PM MDT Manu via Digitalmars-d wrote: [...] I'm not disagreeing, but I'm not the person who needs to be convinced. Either way, a DIP needs to be produced which [...] As someone w

Re: Proposal to make "shared" (more) useful

2018-09-14 Thread Kagamin via Digitalmars-d
On Friday, 14 September 2018 at 09:36:44 UTC, Arafel wrote: 1) It's not transparent, not even remotely clear how to get this working. 2) It should be if shared is to be used. If shared is to be disowned / left as it is, then there needs to be an alternative to casting voodoo because right now d

Re: Proposal to make "shared" (more) useful

2018-09-14 Thread Arafel via Digitalmars-d
You can do     private Unshared!(S*) s;     this(){ s = new S(1); } Yeah, there are workarounds, also some other minor issues. For example, I wanted to use it with a pointer type, and then take the pointer of that (don't ask me: C library), and I had to find a workaround for this as well.

Re: Mobile is the new PC and AArch64 is the new x64

2018-09-14 Thread Dave Jones via Digitalmars-d
On Thursday, 13 September 2018 at 22:56:31 UTC, Joakim wrote: On Thursday, 13 September 2018 at 22:41:08 UTC, Nick Sabalausky (Abscissa) wrote: On 09/10/2018 11:13 PM, tide wrote: On Monday, 10 September 2018 at 13:43:46 UTC, Joakim wrote: That's why PC sales keep dropping while mobile sales ar

Re: Proposal to make "shared" (more) useful

2018-09-14 Thread Kagamin via Digitalmars-d
On Friday, 14 September 2018 at 08:18:25 UTC, Arafel wrote: shared synchronized class A { private Unshared!S s; // Should this even be possible? What about the @disable this?? // I would expect at least one, if not both of the following, to work //private Unshared!S s2 = S(1); //p

Re: Proposal to make "shared" (more) useful

2018-09-14 Thread Arafel via Digitalmars-d
On 09/14/2018 09:32 AM, Kagamin wrote: struct Unshared(T) {     private T value;     this(T v) shared { opAssign(v); }     T get() shared { return *cast(T*)&value; }     alias get this;     void opAssign(T v) shared { *cast(T*)&value=v; } } shared synchronized class A {     private Unshare

Re: Mobile is the new PC and AArch64 is the new x64

2018-09-14 Thread Joakim via Digitalmars-d
On Wednesday, 12 September 2018 at 22:41:31 UTC, Iain Buclaw wrote: On 12 September 2018 at 10:09, Joakim via Digitalmars-d wrote: I think their model of having an open ISA with proprietary extensions will inevitably win out for hardware, just as a similar model has basically won already for s

Re: Proposal to make "shared" (more) useful

2018-09-14 Thread Kagamin via Digitalmars-d
struct Unshared(T) { private T value; this(T v) shared { opAssign(v); } T get() shared { return *cast(T*)&value; } alias get this; void opAssign(T v) shared { *cast(T*)&value=v; } } shared synchronized class A { private Unshared!(int[]) a; private Unshared!SysTime t;

Re: Proposal to make "shared" (more) useful

2018-09-14 Thread Arafel via Digitalmars-d
On 09/13/2018 09:49 PM, Jonathan M Davis wrote: Have you read the concurrency chapter in The D Programming Language by Andrei? It sounds like you're trying to describe something vere similar to the synchronized classes from TDPL (which have never been fully implemented in the language). They wou