Re: Truly @nogc Exceptions?

2018-09-19 Thread Steven Schveighoffer via Digitalmars-d
On 9/19/18 7:53 PM, Seb wrote: On Wednesday, 19 September 2018 at 21:28:56 UTC, Steven Schveighoffer wrote: On 9/19/18 5:16 PM, Steven Schveighoffer wrote: One further thing: I didn't make the sink version of message @nogc, but in actuality, it could be. We recently introduced support for

[Issue 15512] extern(C++, ns) should consider taking a string

2018-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15512 Walter Bright changed: What|Removed |Added CC||bugzi...@digitalmars.com --- Comment #2

Re: Truly @nogc Exceptions?

2018-09-19 Thread Seb via Digitalmars-d
On Wednesday, 19 September 2018 at 21:28:56 UTC, Steven Schveighoffer wrote: On 9/19/18 5:16 PM, Steven Schveighoffer wrote: One further thing: I didn't make the sink version of message @nogc, but in actuality, it could be. We recently introduced support for output ranges in the formatting

Re: Tuple DIP

2018-09-19 Thread 12345swordy via Digitalmars-d
On Tuesday, 3 July 2018 at 16:11:05 UTC, 12345swordy wrote: On Thursday, 28 June 2018 at 13:24:11 UTC, Timon Gehr wrote: On 26.06.2018 11:55, Francesco Mecca wrote: On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote: As promised [1], I have started setting up a DIP to improve tuple

Truly @nogc Exceptions?

2018-09-19 Thread Steven Schveighoffer via Digitalmars-d
Given dip1008, we now can throw exceptions inside @nogc code! This is really cool, and helps make code that uses exceptions or errors @nogc. Except... The mechanism to report what actually went wrong for an exception is a string passed to the exception during *construction*. Given that you

Re: Tuple DIP

2018-09-19 Thread Timon Gehr via Digitalmars-d
On 19.09.2018 23:14, 12345swordy wrote: On Tuesday, 3 July 2018 at 16:11:05 UTC, 12345swordy wrote: On Thursday, 28 June 2018 at 13:24:11 UTC, Timon Gehr wrote: On 26.06.2018 11:55, Francesco Mecca wrote: On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote: As promised [1], I have

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

2018-09-19 Thread Walter Bright via Digitalmars-d
On 9/18/2018 5:22 PM, Manu wrote: Thank you Walter for coming to the party! I suppose I should explain this. 1. The PR uses a different syntax, i.e. strings instead of identifiers. This implies it is not creating a scope, and doesn't interfere with the scoping of the existing syntax. The

Re: Truly @nogc Exceptions?

2018-09-19 Thread Steven Schveighoffer via Digitalmars-d
On 9/19/18 5:16 PM, Steven Schveighoffer wrote: One further thing: I didn't make the sink version of message @nogc, but in actuality, it could be. Notice how it allocates using the stack. Even if we needed some indeterminate amount of memory, it would be simple to use C malloc/free, or alloca.

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

2018-09-19 Thread Manu via Digitalmars-d
On Wed, 19 Sep 2018 at 13:15, Walter Bright via Digitalmars-d wrote: > > On 9/18/2018 5:22 PM, Manu wrote: > > Thank you Walter for coming to the party! > > I suppose I should explain this. > > 1. The PR uses a different syntax, i.e. strings instead of identifiers. This > implies it is not

Re: fearless v0.0.1 - shared made easy (and @safe)

2018-09-19 Thread Steven Schveighoffer via Digitalmars-d-announce
On 9/19/18 6:44 AM, Atila Neves wrote: On Tuesday, 18 September 2018 at 17:34:10 UTC, 12345swordy wrote: On Tuesday, 18 September 2018 at 17:20:26 UTC, Atila Neves wrote: The `shared` keyword currently means one of two things: 1. You can use core.atomic with it 2. It's some struct and you

Visual Studio Code, Code-D and Microsoft's Visual C++ Debugger (cppvsdbg)

2018-09-19 Thread Void-995 via Digitalmars-d
Good time of day, everyone Recently I've got myself into D Language again, but got a problem with debugging on Windows, obviously. While Visual D with Mago provides pretty comfortable workflow, I highly appreciate what Code D did with it's more closer and tight integrating with DScanner and

Re: Visual Studio Code, Code-D and Microsoft's Visual C++ Debugger (cppvsdbg)

2018-09-19 Thread Void-995 via Digitalmars-d
On Wednesday, 19 September 2018 at 14:29:27 UTC, Vladimir Panteleev wrote: On Wednesday, 19 September 2018 at 14:22:13 UTC, Void-995 wrote: [...] Cool! What if that will be added as DMD command line option DMD used to have the switch -gc, which meant to emit debug information but pretend

Re: Visual Studio Code, Code-D and Microsoft's Visual C++ Debugger (cppvsdbg)

2018-09-19 Thread Void-995 via Digitalmars-d
On Wednesday, 19 September 2018 at 14:37:32 UTC, Void-995 wrote: On Wednesday, 19 September 2018 at 14:29:27 UTC, Vladimir Panteleev wrote: [...] Unfortunately you can't make Natvis to understand D symbols as it's purely for C++. You can make C# extension for Visual Studio to do pretty much

Re: LLVM 7.0.0 no mention of D anymore

2018-09-19 Thread Petar via Digitalmars-d-announce
On Wednesday, 19 September 2018 at 13:58:00 UTC, Joakim wrote: On Wednesday, 19 September 2018 at 13:10:07 UTC, Daniel Kozak wrote: http://releases.llvm.org/7.0.0/docs/ReleaseNotes.html#external-open-source-projects-using-llvm-7 no mention of D anymore :(

[Issue 17729] dmd says cast expression is "not an lvalue", but it can be used as one in other contexts

2018-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17729 er.kr...@gmail.com changed: What|Removed |Added CC||er.kr...@gmail.com --- Comment #1 from

[Issue 17716] wrong result of IsExpression when not in static assert

2018-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17716 er.kr...@gmail.com changed: What|Removed |Added CC||er.kr...@gmail.com --- Comment #2 from

Re: fearless v0.0.1 - shared made easy (and @safe)

2018-09-19 Thread H. S. Teoh via Digitalmars-d-announce
On Wed, Sep 19, 2018 at 10:58:04AM +, thedeemon via Digitalmars-d-announce wrote: > On Tuesday, 18 September 2018 at 17:20:26 UTC, Atila Neves wrote: > > I was envious of std::sync::Mutex from Rust and thought: can I use > > DIP1000 to make this work in D and be @safe? Turns out, yes. > >

Re: LLVM 7.0.0 no mention of D anymore

2018-09-19 Thread Joakim via Digitalmars-d-announce
On Wednesday, 19 September 2018 at 13:10:07 UTC, Daniel Kozak wrote: http://releases.llvm.org/7.0.0/docs/ReleaseNotes.html#external-open-source-projects-using-llvm-7 no mention of D anymore :( http://releases.llvm.org/6.0.0/docs/ReleaseNotes.html#external-open-source-projects-using-llvm-6

Re: Visual Studio Code, Code-D and Microsoft's Visual C++ Debugger (cppvsdbg)

2018-09-19 Thread Vladimir Panteleev via Digitalmars-d
On Wednesday, 19 September 2018 at 14:22:13 UTC, Void-995 wrote: [...] Cool! What if that will be added as DMD command line option DMD used to have the switch -gc, which meant to emit debug information but pretend to be C as much as possible. It was removed as it wasn't considered

[Issue 17729] dmd says cast expression is "not an lvalue", but it can be used as one in other contexts

2018-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17729 --- Comment #2 from ag0aep6g --- (In reply to er.krali from comment #1) > I also can't understand why the workaround works at all, the result of > dereferencing a pointer should surely be a rvalue? > > Is that also a bug? Dereferencing a pointer

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

2018-09-19 Thread Vladimir Panteleev via Digitalmars-d
On Thursday, 20 September 2018 at 03:23:36 UTC, Nick Sabalausky (Abscissa) wrote: (Not on a Win box at the moment.) I added the output of my test program to the gist: https://gist.github.com/CyberShadow/049cf06f4ec31b205dde4b0e3c12a986#file-output-txt assert( dir.toAbsolutePath.length >

Re: This is why I don't use D.

2018-09-19 Thread Neia Neutuladh via Digitalmars-d
On Monday, 10 September 2018 at 01:27:20 UTC, Neia Neutuladh wrote: Not on dlang.org anywhere, but I built a crude version of this. Results are available at http://ikeran.org/report/. A quick status update: Per-package reports and build badges are now a thing.

Re: Small @nogc experience report

2018-09-19 Thread Shachar Shemesh via Digitalmars-d
On 19/09/18 22:53, Walter Bright wrote: On 9/19/2018 10:13 AM, Shachar Shemesh wrote:    assert(condition, string); // string is useless without actual info about what went wrong.    assert(condition, format(string, arg, arg)); // No good - format is not @nogc Another method:   debug    

Simple parallel foreach and summation/reduction

2018-09-19 Thread Chris Katko via Digitalmars-d-learn
All I want to do is loop from 0 to [constant] with a for or foreach, and have it split up across however many cores I have. ulong sum; foreach(i; [0 to 1 trillion]) { //flip some dice using float die_value = uniform(0F,12F); if(die_value > [constant]) sum++;

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

2018-09-19 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 09/19/2018 11:23 PM, Nick Sabalausky (Abscissa) wrote: rmdir(path); Obviously meant "rmdir(dir);" here. Editing mishap.

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

2018-09-19 Thread Vladimir Panteleev via Digitalmars-d
On Thursday, 20 September 2018 at 03:25:05 UTC, Nick Sabalausky (Abscissa) wrote: On 09/19/2018 11:23 PM, Nick Sabalausky (Abscissa) wrote: rmdir(path); Obviously meant "rmdir(dir);" here. Editing mishap. and MAX_PATH instead of MAX_LENGTH, and absolutePath instead of toAbsolutePath, and

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

2018-09-19 Thread Vladimir Panteleev via Digitalmars-d
On Thursday, 20 September 2018 at 03:23:36 UTC, Nick Sabalausky (Abscissa) wrote: I'm not sure I'm quite following you. Is this what you mean?: string dir = ...; // Such that... assert( dir.isRelativePath ); assert( dir.length < MAX_LENGTH-12 ); assert( dir.toAbsolutePath.length > MAX_LENGTH-12

Re: How to use math functions in dcompute?

2018-09-19 Thread Sobaya via Digitalmars-d-learn
On Wednesday, 19 September 2018 at 00:22:44 UTC, Nicholas Wilson wrote: On Wednesday, 19 September 2018 at 00:11:13 UTC, Nicholas Wilson wrote: On Tuesday, 18 September 2018 at 06:25:33 UTC, Sobaya wrote: On Tuesday, 18 September 2018 at 01:39:51 UTC, Nicholas Wilson wrote: On Tuesday, 18

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

2018-09-19 Thread Ecstatic Coder via Digitalmars-d
On Thursday, 20 September 2018 at 03:15:20 UTC, Vladimir Panteleev wrote: On Wednesday, 19 September 2018 at 06:11:22 UTC, Vladimir Panteleev wrote: One point of view is that the expected behavior is that the functions succeed. Another point of view is that Phobos should not allow programs to

Re: Simple parallel foreach and summation/reduction

2018-09-19 Thread Neia Neutuladh via Digitalmars-d-learn
On Thursday, 20 September 2018 at 05:34:42 UTC, Chris Katko wrote: All I want to do is loop from 0 to [constant] with a for or foreach, and have it split up across however many cores I have. You're looking at std.parallelism.TaskPool, especially the amap and reduce functions. Should do pretty

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

2018-09-19 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 09/19/2018 02:33 AM, Jonathan Marler wrote: What drives me mad is when you have library writers who try to "protect" you from the underlying system by translating everything you do into what they "think" you're trying to do. What drives me mad is when allegedly cross-platform tools

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

2018-09-19 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 09/19/2018 01:49 PM, Neia Neutuladh wrote: On Wednesday, 19 September 2018 at 08:54:42 UTC, Vladimir Panteleev wrote: BTW, something follows from the above: write(`C:\` ~ (short path) ~  `con`) will fail but: write(`C:\` ~ (long path) ~ `con`) will succeed. This is just one issue I've

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

2018-09-19 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 09/19/2018 07:04 AM, Vladimir Panteleev wrote: On Wednesday, 19 September 2018 at 05:49:41 UTC, Nick Sabalausky (Abscissa) wrote: 2. Detect and reject any non-\\?\ path longer than MAX_PATH-12 bytes[5]. This is not a good criteria: relative paths whose pointing to objects whose absolute

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

2018-09-19 Thread Laurent Tréguier via Digitalmars-d
On Wednesday, 19 September 2018 at 18:14:47 UTC, Dave Jones wrote: Only if the new product meets all the use cases of the old product. Again this is what you dont understand. Why did the iPhone, and after that the smartphone industry as a whole, completely crush the classic cell phones when

Re: Small @nogc experience report

2018-09-19 Thread Per Nordlöw via Digitalmars-d
On Friday, 7 September 2018 at 17:01:09 UTC, Meta wrote: So it seems that it's never worked. Looking at the implementation, it uses a std.container.BinaryHeap, so it'd require a small rewrite to work with @nogc. AFAICT, extending std.container with support for specifying you own @nogc

LLVM 7.0.0 no mention of D anymore

2018-09-19 Thread Daniel Kozak via Digitalmars-d-announce
http://releases.llvm.org/7.0.0/docs/ReleaseNotes.html#external-open-source-projects-using-llvm-7 no mention of D anymore :( http://releases.llvm.org/6.0.0/docs/ReleaseNotes.html#external-open-source-projects-using-llvm-6

Re: LLVM 7.0.0 no mention of D anymore

2018-09-19 Thread rikki cattermole via Digitalmars-d-announce
On 20/09/2018 1:10 AM, Daniel Kozak wrote: http://releases.llvm.org/7.0.0/docs/ReleaseNotes.html#external-open-source-projects-using-llvm-7 no mention of D anymore :( http://releases.llvm.org/6.0.0/docs/ReleaseNotes.html#external-open-source-projects-using-llvm-6

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

2018-09-19 Thread Kagamin via Digitalmars-d
On Wednesday, 19 September 2018 at 10:29:11 UTC, Vladimir Panteleev wrote: - GetFullPathName is documented as also having the MAX_PATH limit, but the framework seems to use it for normalization BEFORE prepending the prefix.

Re: BetterC + Windows + setjmp longjmp

2018-09-19 Thread SrMordred via Digitalmars-d-learn
On Wednesday, 19 September 2018 at 11:12:41 UTC, Diederik de Groot wrote: On Wednesday, 19 September 2018 at 11:06:23 UTC, Diederik de Groot wrote: On Tuesday, 18 September 2018 at 19:45:18 UTC, SrMordred wrote: Only the exact size of the jmp_buf is important (not the details about the

Re: Pass 'this' as reference

2018-09-19 Thread Jan via Digitalmars-d-learn
On Saturday, 15 September 2018 at 20:13:51 UTC, Jonathan M Davis wrote: On Saturday, September 15, 2018 11:44:05 AM MDT Jan via Digitalmars-d-learn wrote: [...] No. variables are _always_ lvalues. An lvalue is an object which is addressable and which can therefore be assigned a value

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

2018-09-19 Thread Vladimir Panteleev via Digitalmars-d
On Wednesday, 19 September 2018 at 08:13:31 UTC, Ecstatic Coder wrote: On Wednesday, 19 September 2018 at 05:32:47 UTC, Vladimir Panteleev wrote: On Wednesday, 19 September 2018 at 05:24:24 UTC, Ecstatic Coder wrote: None would ever be, considering you obviously have decided to ignore such a

What's going on with the DMD nightlies releases ?

2018-09-19 Thread Basile B. via Digitalmars-d
The downloads of nightlies is broken since at least 2 weeks now. What's going on ?

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

2018-09-19 Thread Steven Schveighoffer via Digitalmars-d
On 9/18/18 9:49 PM, Jonathan M Davis wrote: On Tuesday, September 18, 2018 6:22:55 PM MDT Manu via Digitalmars-d wrote: https://github.com/dlang/dmd/pull/8667 O_O Thank you Walter for coming to the party! Oh, wow. I sure wasn't expecting that. I thought that he'd made it pretty clear that a

Re: LLVM 7.0.0 no mention of D anymore

2018-09-19 Thread 12345swordy via Digitalmars-d-announce
On Wednesday, 19 September 2018 at 13:10:07 UTC, Daniel Kozak wrote: http://releases.llvm.org/7.0.0/docs/ReleaseNotes.html#external-open-source-projects-using-llvm-7 no mention of D anymore :( http://releases.llvm.org/6.0.0/docs/ReleaseNotes.html#external-open-source-projects-using-llvm-6

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

2018-09-19 Thread Kagamin via Digitalmars-d
On Wednesday, 19 September 2018 at 09:58:00 UTC, Vladimir Panteleev wrote: On my Windows VM, I get: C:\(long path here): The filename or extension is too long. (error 206) This seems like a completely reasonable error message to me, so I think we're good there already. It can be a long

[Issue 17716] wrong result of IsExpression when not in static assert

2018-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17716 --- Comment #3 from ag0aep6g --- (In reply to er.krali from comment #2) > Furthermore, it doesn't work with ref parameters either: [...] You made the same comment on issue 17729, and it makes more sense there. I guess you posted it here by

Re: Small @nogc experience report

2018-09-19 Thread Shachar Shemesh via Digitalmars-d
I've got plenty to say, but here is the long and the short of it: Use Mecca. On 07/09/18 19:44, Peter Alexander wrote: 3. It was really frustrating that I had to make the compiler happy before I was able to run anything again. Due to point #1 I had to move code around to restructure things and

[Issue 17716] wrong result of IsExpression when not in static assert

2018-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17716 --- Comment #4 from er.kr...@gmail.com --- (In reply to ag0aep6g from comment #3) > > You made the same comment on issue 17729, and it makes more sense there. I > guess you posted it here by accident? Yes I did, I didn't notice that bugzilla had

[Issue 17729] dmd says cast expression is "not an lvalue", but it can be used as one in other contexts

2018-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17729 --- Comment #3 from er.kr...@gmail.com --- (In reply to ag0aep6g from comment #2) > Dereferencing a pointer gives an lvalue. If it gave an rvalue, pointers > would be pretty useless. You couldn't assign through them. > > If you disagree or have more

Re: Small @nogc experience report

2018-09-19 Thread Shachar Shemesh via Digitalmars-d
On 08/09/18 11:07, Peter Alexander wrote: I'd love to know if anyone is making good use of @nogc in a larger code base and is happy with it. Weka.io? No, sorry. Actually, yes. Well, sortof. The main Weka codebase hardly uses any annotations of any kind. Not @nogc nor others. This is in the

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

2018-09-19 Thread Neia Neutuladh via Digitalmars-d
On Wednesday, 19 September 2018 at 08:54:42 UTC, Vladimir Panteleev wrote: BTW, something follows from the above: write(`C:\` ~ (short path) ~ `con`) will fail but: write(`C:\` ~ (long path) ~ `con`) will succeed. This is just one issue I've noticed... there's probably more lurking.

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

2018-09-19 Thread Dave Jones via Digitalmars-d
On Tuesday, 18 September 2018 at 07:53:31 UTC, Joakim wrote: On Monday, 17 September 2018 at 22:27:41 UTC, Neia Neutuladh wrote: You are making your arguments to fit your desires. I can't make head nor tails of this claim, you have a talent for vague non sequiturs. My arguments are based

Re: Small @nogc experience report

2018-09-19 Thread Steven Schveighoffer via Digitalmars-d
On 9/19/18 1:13 PM, Shachar Shemesh wrote: There is a catch, though. Writing Mecca with @nogc required re-implementing quite a bit of druntime. Mecca uses its own exception allocations (mkEx, just saw it's not yet documented, it's under mecca.lib.exception). The same module also has

Re: Manual delegates

2018-09-19 Thread Jacob Carlborg via Digitalmars-d-learn
On 2018-09-16 16:12, Guillaume Piolat wrote: Anyone has any information about the ABI of delegates? In particular how to call them with a particular "this"/frame pointer? You can explicitly set the context pointer of a delegate using the ".ptr" property: class Foo { void bar() { } }

[Issue 19253] extern(C++, "

2018-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19253 Manu changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Issue 19253] New: extern(C++, "

2018-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19253 Issue ID: 19253 Summary: extern(C++, " Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: enhancement Priority: P1

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

2018-09-19 Thread Vladimir Panteleev via Digitalmars-d
On Wednesday, 19 September 2018 at 06:11:22 UTC, Vladimir Panteleev wrote: One point of view is that the expected behavior is that the functions succeed. Another point of view is that Phobos should not allow programs to create files and directories with invalid paths. Consider, e.g. that a

Re: This is why I don't use D.

2018-09-19 Thread Basile B. via Digitalmars-d
On Thursday, 20 September 2018 at 04:16:41 UTC, Neia Neutuladh wrote: And source code is available at https://git.ikeran.org/dhasenan/dubautotester Please don't judge me. Nice work.

dub auto-tester

2018-09-19 Thread Joakim via Digitalmars-d
On Thursday, 20 September 2018 at 04:16:41 UTC, Neia Neutuladh wrote: On Thursday, 20 September 2018 at 02:51:52 UTC, Neia Neutuladh wrote: On Monday, 10 September 2018 at 01:27:20 UTC, Neia Neutuladh wrote: Not on dlang.org anywhere, but I built a crude version of this. Results are available

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

2018-09-19 Thread sslaembedded via Digitalmars-d
On Tuesday, 11 September 2018 at 06:42:26 UTC, Chris wrote: On Monday, 10 September 2018 at 19:28:01 UTC, aberba wrote: On Monday, 10 September 2018 at 16:09:41 UTC, rjframe wrote: That's exactly whats happening in Africa. The continent is leapfrogging from nothing to a smart phone thanks

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

2018-09-19 Thread Ecstatic Coder via Digitalmars-d
On Thursday, 20 September 2018 at 02:48:06 UTC, Nick Sabalausky (Abscissa) wrote: On 09/19/2018 02:33 AM, Jonathan Marler wrote: What drives me mad is when you have library writers who try to "protect" you from the underlying system by translating everything you do into what they "think"

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

2018-09-19 Thread Neia Neutuladh via Digitalmars-d
On Thursday, 20 September 2018 at 03:15:20 UTC, Vladimir Panteleev wrote: When the OS itself fails to properly deal with such files, I don't think D has any business in *facilitating* their creation by default. Dear lord Windows is terrible. Can we just deprecate it?

Re: This is why I don't use D.

2018-09-19 Thread Neia Neutuladh via Digitalmars-d
On Thursday, 20 September 2018 at 02:51:52 UTC, Neia Neutuladh wrote: On Monday, 10 September 2018 at 01:27:20 UTC, Neia Neutuladh wrote: Not on dlang.org anywhere, but I built a crude version of this. Results are available at http://ikeran.org/report/. A quick status update: And source

Re: dub auto-tester

2018-09-19 Thread Neia Neutuladh via Digitalmars-d
On Thursday, 20 September 2018 at 04:41:21 UTC, Joakim wrote: Nice, what will it take to get this integrated with the official dub website? I need to: * add JSON output to the auto-tester * get the dub registry to scrape the data (or, optionally, push the data to the registry, but that opens

Re: Is it possible to translate this API's C headers?

2018-09-19 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, September 18, 2018 7:39:40 AM MDT Atila Neves via Digitalmars-d- learn wrote: > On Monday, 17 September 2018 at 19:13:06 UTC, Jonathan M Davis > > wrote: > > On Monday, September 17, 2018 7:43:21 AM MDT Kagamin via > > > > Digitalmars-d-learn wrote: > >> try dpp

Re: Small @nogc experience report

2018-09-19 Thread Shachar Shemesh via Digitalmars-d
On 19/09/18 21:35, Steven Schveighoffer wrote: On 9/19/18 1:13 PM, Shachar Shemesh wrote: There is a catch, though. Writing Mecca with @nogc required re-implementing quite a bit of druntime. Mecca uses its own exception allocations (mkEx, just saw it's not yet documented, it's under

[Issue 19252] New: Templated format with variable width allocates 2GB of RAM per call.

2018-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19252 Issue ID: 19252 Summary: Templated format with variable width allocates 2GB of RAM per call. Product: D Version: D2 Hardware: All OS: All Status: NEW

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

2018-09-19 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, September 19, 2018 7:26:07 AM MDT Steven Schveighoffer via Digitalmars-d wrote: > On 9/18/18 9:49 PM, Jonathan M Davis wrote: > > On Tuesday, September 18, 2018 6:22:55 PM MDT Manu via Digitalmars-d wrote: > >> https://github.com/dlang/dmd/pull/8667 > >> > >> O_O > >> > >> Thank

[Issue 19252] Templated format with variable width allocates 2GB of RAM per call.

2018-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19252 FeepingCreature changed: What|Removed |Added Severity|major |regression --

Re: Small @nogc experience report

2018-09-19 Thread Walter Bright via Digitalmars-d
On 9/7/2018 10:35 AM, Eugene Wissner wrote: fill() uses enforce() which allocates and throws. The addition of -dip1008 stopped using the gc for throwing exceptions, but it's opt-in at the moment.

Re: Small @nogc experience report

2018-09-19 Thread Walter Bright via Digitalmars-d
On 9/19/2018 10:13 AM, Shachar Shemesh wrote:   assert(condition, string); // string is useless without actual info about what went wrong.   assert(condition, format(string, arg, arg)); // No good - format is not @nogc Another method: debug assert(condition, format(string, arg,

Re: Small @nogc experience report

2018-09-19 Thread Walter Bright via Digitalmars-d
On 9/19/2018 11:35 AM, Steven Schveighoffer wrote: I'm running into this coincidentally right now, when trying to debug a PR. I found I'm getting a range error deep inside a phobos function. But because Phobos is trying to be pure @nogc nothrow @safe, I can do almost nothing to display what is

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

2018-09-19 Thread Ecstatic Coder via Digitalmars-d
On Wednesday, 19 September 2018 at 05:32:47 UTC, Vladimir Panteleev wrote: On Wednesday, 19 September 2018 at 05:24:24 UTC, Ecstatic Coder wrote: None would ever be, considering you obviously have decided to ignore such a simple solution to the 260 character limit... Add "ad hominem" to your

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

2018-09-19 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 09/19/2018 02:26 AM, Vladimir Panteleev wrote: On Wednesday, 19 September 2018 at 05:49:41 UTC, Nick Sabalausky (Abscissa) wrote: [...] Someone mentioned in this thread that .NET runtime does do the long-path workaround automatically. One thing we could do is copy EXACTLY what C# is

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

2018-09-19 Thread Ecstatic Coder via Digitalmars-d
They are certainly going to be less expensive that actual filesystem operations that hit the physical disk, but it will still be an unwanted overhead in 99.9% of cases. In any case, the overhead is only one issue. Seriously, checking the file path string *length* is above 260 characters to

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

2018-09-19 Thread Vladimir Panteleev via Digitalmars-d
On Wednesday, 19 September 2018 at 08:37:17 UTC, Nick Sabalausky (Abscissa) wrote: What's the other issue(s)? Essentially they boil down to "it is impossible to prove the algorithm is correct" (for both detecting when the path fix is needed, and fixing the path). Forcing the path

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

2018-09-19 Thread Vladimir Panteleev via Digitalmars-d
On Wednesday, 19 September 2018 at 08:18:38 UTC, Nick Sabalausky (Abscissa) wrote: Someone mentioned in this thread that .NET runtime does do the long-path workaround automatically. One thing we could do is copy EXACTLY what C# is doing. This is a complete textbook example of the "appeal to

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

2018-09-19 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 09/19/2018 02:55 AM, Vladimir Panteleev wrote: On Wednesday, 19 September 2018 at 06:34:33 UTC, Nick Sabalausky (Abscissa) wrote: - Does it actually, necessarily perform those additional OS calls? We need to expand relative paths to absolute ones, for which we need to fetch the current

Re: One awesome GC feature we will use in Mir!

2018-09-19 Thread Petar via Digitalmars-d
On Tuesday, 18 September 2018 at 23:01:46 UTC, Per Nordlöw wrote: On Tuesday, 18 September 2018 at 14:23:44 UTC, 9il wrote: I just remember that D's GC has NO_SCAN [1] attribute! I thought D libraries like Mir and Lubeck only had to care about when to call GC.addRange after allocations that

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

2018-09-19 Thread Vladimir Panteleev via Digitalmars-d
On Wednesday, 19 September 2018 at 08:36:35 UTC, Vladimir Panteleev wrote: If you're referring to NUL, COM1, COM2, etc, then this is completely orthogonal. Yes. How so? It is the same issue: paths with certain properties are valid on all platforms except on Windows. Phobos errors out when

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

2018-09-19 Thread Vladimir Panteleev via Digitalmars-d
On Wednesday, 19 September 2018 at 08:46:13 UTC, Vladimir Panteleev wrote: On Wednesday, 19 September 2018 at 08:36:35 UTC, Vladimir Panteleev wrote: If you're referring to NUL, COM1, COM2, etc, then this is completely orthogonal. Yes. How so? It is the same issue: paths with certain

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

2018-09-19 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 09/19/2018 04:41 AM, Vladimir Panteleev wrote: On Wednesday, 19 September 2018 at 08:37:17 UTC, Nick Sabalausky (Abscissa) wrote: What's the other issue(s)? Essentially they boil down to "it is impossible to prove the algorithm is correct" (for both detecting when the path fix is needed,

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

2018-09-19 Thread Vladimir Panteleev via Digitalmars-d
On Wednesday, 19 September 2018 at 09:16:30 UTC, Nick Sabalausky (Abscissa) wrote: Essentially they boil down to "it is impossible to prove the algorithm is correct" (for both detecting when the path fix is needed, and fixing the path). If you're referring to the inability to

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

2018-09-19 Thread Kagamin via Digitalmars-d
On Wednesday, 19 September 2018 at 06:26:21 UTC, Vladimir Panteleev wrote: Someone mentioned in this thread that .NET runtime does do the long-path workaround automatically. AFAIK, CoreFX does, but .net doesn't. .net did its own path normalization and length check, which can be turned off

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

2018-09-19 Thread Vladimir Panteleev via Digitalmars-d
On Wednesday, 19 September 2018 at 08:18:38 UTC, Nick Sabalausky (Abscissa) wrote: Instead, what it really means is that our APIs should be designed to *REJECT* long paths with an appropriately meaningful error message On my Windows VM, I get: C:\(long path here): The filename or extension

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

2018-09-19 Thread Paolo Invernizzi via Digitalmars-d
On Wednesday, 19 September 2018 at 06:05:38 UTC, Vladimir Panteleev wrote: Operating on paths longer than MAX_PATH is not a typical situation. https://forum.rejectedsoftware.com/groups/rejectedsoftware.dub/thread/1499/ The worst situation was node.js on Windows, anyway...

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

2018-09-19 Thread Jonathan Marler via Digitalmars-d
On Wednesday, 19 September 2018 at 06:11:22 UTC, Vladimir Panteleev wrote: On Wednesday, 19 September 2018 at 06:05:38 UTC, Vladimir Panteleev wrote: [...] One more thing: There is the argument that the expected behavior of Phobos functions creating filesystems objects with long paths is to

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

2018-09-19 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 09/19/2018 12:04 AM, Vladimir Panteleev wrote: On Wednesday, 19 September 2018 at 01:50:54 UTC, Nick Sabalausky (Abscissa) wrote: And at least for me, moving from Windows to Linux would have been a LOT harder if it weren't for the OS abstractions that are already in Phobos. It's one thing

[Issue 15609] Populate vtable in debuginfo

2018-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15609 Manu changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: fearless v0.0.1 - shared made easy (and @safe)

2018-09-19 Thread Claude via Digitalmars-d-announce
On Tuesday, 18 September 2018 at 17:20:26 UTC, Atila Neves wrote: I was envious of std::sync::Mutex from Rust and thought: can I use DIP1000 to make this work in D and be @safe? Turns out, yes. Beautiful! The only current downside, is the fact the application using that library has to be

[Issue 19194] version for `-mscrtlib` specification

2018-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19194 --- Comment #5 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/0563a79dc81366236cbda77eada43ea98761310d Fixes Issue 19194 - version for `-mscrtlib` specification Add

[Issue 19194] version for `-mscrtlib` specification

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

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

2018-09-19 Thread Vladimir Panteleev via Digitalmars-d
On Wednesday, 19 September 2018 at 06:34:33 UTC, Nick Sabalausky (Abscissa) wrote: - Does it actually, necessarily perform those additional OS calls? We need to expand relative paths to absolute ones, for which we need to fetch the current directory. - Is it really? Is what really what?

Re: GCC: Submission of D Front End, next round

2018-09-19 Thread M.M. via Digitalmars-d-announce
On Tuesday, 18 September 2018 at 20:00:21 UTC, Eugene Wissner wrote: Just reposting here two links Johannes left in the Slack: https://gcc.gnu.org/ml/gcc-patches/2018-09/msg00931.html [...] This is great news! I am looking forward to it. I admire all the work and the persistence.

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

2018-09-19 Thread rikki cattermole via Digitalmars-d
On 19/09/2018 1:49 PM, Jonathan M Davis wrote: On Tuesday, September 18, 2018 6:22:55 PM MDT Manu via Digitalmars-d wrote: On Mon, 17 Sep 2018 at 06:00, Atila Neves via Digitalmars-d wrote: On Sunday, 16 September 2018 at 17:46:26 UTC, Steven Schveighoffer wrote: On 9/14/18 6:41 PM, Neia

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

2018-09-19 Thread Vladimir Panteleev via Digitalmars-d
On Wednesday, 19 September 2018 at 05:49:41 UTC, Nick Sabalausky (Abscissa) wrote: This actually leads to an interesting point. Let's change gears for a moment to "API Design Theory"... Suppose you implement API function X which takes Y as an argument. Question: Should X accept values (or

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

2018-09-19 Thread Vladimir Panteleev via Digitalmars-d
On Wednesday, 19 September 2018 at 06:05:38 UTC, Vladimir Panteleev wrote: [...] One more thing: There is the argument that the expected behavior of Phobos functions creating filesystems objects with long paths is to succeed and create those files. However, this results in filesystem

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

2018-09-19 Thread Vladimir Panteleev via Digitalmars-d
On Wednesday, 19 September 2018 at 05:49:41 UTC, Nick Sabalausky (Abscissa) wrote: [...] Someone mentioned in this thread that .NET runtime does do the long-path workaround automatically. One thing we could do is copy EXACTLY what C# is doing. The rationale being that: - .NET is made by

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

2018-09-19 Thread Vladimir Panteleev via Digitalmars-d
On Wednesday, 19 September 2018 at 06:16:21 UTC, Paolo Invernizzi wrote: On Wednesday, 19 September 2018 at 06:05:38 UTC, Vladimir Panteleev wrote: Operating on paths longer than MAX_PATH is not a typical situation. https://forum.rejectedsoftware.com/groups/rejectedsoftware.dub/thread/1499/

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

2018-09-19 Thread Vladimir Panteleev via Digitalmars-d
On Wednesday, 19 September 2018 at 09:58:30 UTC, Kagamin wrote: On Wednesday, 19 September 2018 at 06:26:21 UTC, Vladimir Panteleev wrote: Someone mentioned in this thread that .NET runtime does do the long-path workaround automatically. AFAIK, CoreFX does, but .net doesn't. .net did its own

  1   2   >