Re: D doesn't read the first character of a file (reads everything but the first chararacter) with either read() or readText()

2017-07-18 Thread Sebastien Alaiwan via Digitalmars-d-learn
On Tuesday, 18 July 2017 at 02:21:59 UTC, Enjoys Math wrote: DMD32 D Compiler v2.074.1 import std.file; void main() { string bigInput = readText("input.txt"); } The file is 7 MB of ascii text, don't know if that matters... Should I upgrade versions? Could you please share the first

[Issue 13211] Expand macros in comments within code sections

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13211 Vladimir Panteleev changed: What|Removed |Added Keywords||ddoc

[Issue 12383] dlang.org operator overloading text with DDoc macro.

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12383 Vladimir Panteleev changed: What|Removed |Added See Also|

Re: Is it possible to generate a pool of random D or D inline assembler programs, run them safely?

2017-07-18 Thread Sebastien Alaiwan via Digitalmars-d-learn
On Tuesday, 18 July 2017 at 17:35:17 UTC, Enjoys Math wrote: Without them crashing the app running them? Say by wrapping with try / catch? and, most probably a timeout, as you're certainly going to run into infinite loops. Reason is so I don't have to make my own VM. Why not reuse an

[Issue 12648] Array operation return type

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12648 Vladimir Panteleev changed: What|Removed |Added Hardware|x86 |All

[Issue 2347] opIs is missing

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2347 Vladimir Panteleev changed: What|Removed |Added Status|NEW

[Issue 7464] Better Error Message When Using S.tupleof within S

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7464 Vladimir Panteleev changed: What|Removed |Added See Also|

[Issue 7190] Tuple length incorrect

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7190 Vladimir Panteleev changed: What|Removed |Added See Also|

[Issue 10540] variable used before set for empty static arrays, with -inline -O

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10540 Vladimir Panteleev changed: What|Removed |Added See Also|

[Issue 7953] DMD Error: variable r used before set when compiling with -O

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7953 Vladimir Panteleev changed: What|Removed |Added See Also|

[Issue 12212] Static array assignment makes slice implicitly

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12212 Vladimir Panteleev changed: What|Removed |Added See Also|

[Issue 10540] variable used before set for empty static arrays, with -inline -O

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10540 Vladimir Panteleev changed: What|Removed |Added Status|NEW

[Issue 15537] Private function is not accessible from other module when compiling with -debug flag

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15537 Vladimir Panteleev changed: What|Removed |Added Status|NEW

[Issue 15537] Private function is not accessible from other module when compiling with -debug flag

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15537 Vladimir Panteleev changed: What|Removed |Added Component|dmd

Re: proposed @noreturn attribute

2017-07-18 Thread Walter Bright via Digitalmars-d
On 7/18/2017 7:14 PM, Nicholas Wilson wrote: It describe the behaviour of the function: I think it is neither necessary nor a good idea to express it as a type. assert(0) is already accepted as a valid return statement of any type. I can't continue this without being repetitive, so we'll just

[Issue 697] No const folding on asm db,dw, etc

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=697 --- Comment #9 from Vladimir Panteleev --- OK, I got the Mercurial server running again, and uploaded a copy of the repository to GitHub. The files are here: https://github.com/CyberShadow/dstress/tree/master/run/a

Re: proposed @noreturn attribute

2017-07-18 Thread Nicholas Wilson via Digitalmars-d
On Wednesday, 19 July 2017 at 01:52:30 UTC, Walter Bright wrote: I know how noreturn attributes work - I implemented them decades ago in DMC and DMC++. They are supported by the DMD optimizer and back end. But they are a hack to the type system, and I suggest an unnecessary one. It

Re: proposed @noreturn attribute

2017-07-18 Thread Walter Bright via Digitalmars-d
On 7/18/2017 5:54 PM, Nicholas Wilson wrote: There is just something fundamentally wrong with: @noreturn int foo(); I would understand it to mean that if it were to return, foo would return an int but it is undefined behaviour for foo to dynamically return. That's the C++ behavior. I know

[Issue 17663] header generation (-H) is broken with public override of private default

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17663 Vladimir Panteleev changed: What|Removed |Added Severity|enhancement

[Issue 697] No const folding on asm db,dw, etc

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=697 --- Comment #8 from Vladimir Panteleev --- Stewart, "someone" is not enough. For a bug report to be useful, anyone should be able to reproduce the issue. There is very little value in keeping open a bug report where

Re: proposed @noreturn attribute

2017-07-18 Thread Nicholas Wilson via Digitalmars-d
On Tuesday, 18 July 2017 at 22:03:27 UTC, Walter Bright wrote: The issue here (for me) is to have a type system that matches type systems used in type theory. D already has strong abilities to do type calculus. Instead of inventing our own whackadoodle scheme, one hack at a time, why not match

Re: proposed @noreturn attribute

2017-07-18 Thread via Digitalmars-d
On Tuesday, 18 July 2017 at 22:03:27 UTC, Walter Bright wrote: On 7/17/2017 4:26 PM, H. S. Teoh via Digitalmars-d wrote: But the point is that so much time and effort is being spent on discussing and designing a feature that you have admitted yourself to be "rarely used". As a disinterested

Re: newCTFE Status July 2017

2017-07-18 Thread Seb via Digitalmars-d
On Tuesday, 18 July 2017 at 19:23:56 UTC, Stefan Koch wrote: On Tuesday, 18 July 2017 at 19:11:37 UTC, H. S. Teoh wrote: Shouldn't there be a way to reduce the test case so that you don't have to look through 300 temporaries? Yes. However, there is not automated way to reduce it. So to

Re: Is it possible to generate a pool of random D or D inline assembler programs, run them safely?

2017-07-18 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 18 July 2017 at 17:35:17 UTC, Enjoys Math wrote: Without them crashing the app running them? Say by wrapping with try / catch? Run them in a separate process, so it can die independently.

Re: New library: open multi-methods

2017-07-18 Thread Jean-Louis Leroy via Digitalmars-d-announce
On Tuesday, 18 July 2017 at 22:41:13 UTC, Ali Çehreli wrote: On 07/16/2017 10:24 AM, Jean-Louis Leroy wrote: Hello, TL;DR: see here https://github.com/jll63/methods.d/blob/master/README.md Added D to the Wikipedia entry, which can be expanded. :)

Re: New library: open multi-methods

2017-07-18 Thread Ali Çehreli via Digitalmars-d-announce
On 07/16/2017 10:24 AM, Jean-Louis Leroy wrote: Hello, TL;DR: see here https://github.com/jll63/methods.d/blob/master/README.md Added D to the Wikipedia entry, which can be expanded. :) https://en.wikipedia.org/wiki/Multiple_dispatch Ali

Re: proposed @noreturn attribute

2017-07-18 Thread Timon Gehr via Digitalmars-d
On 18.07.2017 23:35, Moritz Maxeiner wrote: Could you explain why `return foo();` is even legal for a `void foo() {}`? Because the ad-hoc decision to make void a type that is not really a type leads to unnecessary friction, and this exceptional rule removes the friction in one common

[Issue 16079] memoize should cache objects too

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16079 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/9e58ecab2aa6eb2d800d1e7e0635f7eee1a774aa Fix issue 16079 - memoize should work with arrays and

Re: proposed @noreturn attribute

2017-07-18 Thread Moritz Maxeiner via Digitalmars-d
On Tuesday, 18 July 2017 at 21:45:27 UTC, Adam D. Ruppe wrote: On Tuesday, 18 July 2017 at 21:35:21 UTC, Moritz Maxeiner wrote: Could you explain why `return foo();` is even legal for a `void foo() {}`? Suppose you are writing a template function that forwards: auto forward(alias fun,

Re: New library: open multi-methods

2017-07-18 Thread Jean-Louis Leroy via Digitalmars-d-announce
On Tuesday, 18 July 2017 at 21:20:04 UTC, jmh530 wrote: On Tuesday, 18 July 2017 at 21:16:11 UTC, jmh530 wrote: I may not have been clear enough. My ideal solution wouldn't make any changes to that densematrix.d file, just the interface. So I don't have any issue with the matrix modules

Re: An Issue I Wish To Raise Awareness On

2017-07-18 Thread Marco Leise via Digitalmars-d
Am Tue, 18 Jul 2017 18:10:58 + schrieb Atila Neves : > Now I've read your post properly: there is only one destructor. > With the fix I mentioned, just don't defined the `shared` > version, there's no need to. Postblit is still a problem, however. > > Atila The issue

Re: proposed @noreturn attribute

2017-07-18 Thread Walter Bright via Digitalmars-d
On 7/17/2017 4:26 PM, H. S. Teoh via Digitalmars-d wrote: But the point is that so much time and effort is being spent on discussing and designing a feature that you have admitted yourself to be "rarely used". As a disinterested bystander I find it somewhat amusing (and sad) to see so much

Re: proposed @noreturn attribute

2017-07-18 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 18 July 2017 at 21:35:21 UTC, Moritz Maxeiner wrote: Could you explain why `return foo();` is even legal for a `void foo() {}`? Suppose you are writing a template function that forwards: auto forward(alias fun, T...)(T args) { return fun(args); } It just saves you from having

Re: proposed @noreturn attribute

2017-07-18 Thread Moritz Maxeiner via Digitalmars-d
On Tuesday, 18 July 2017 at 20:49:56 UTC, Timon Gehr wrote: On 18.07.2017 20:46, Yuxuan Shui wrote: On Tuesday, 18 July 2017 at 15:26:59 UTC, Timon Gehr wrote: On 18.07.2017 14:19, Stefan Koch wrote: [...] D has a C-inspired first-order type system, so it is not necessarily crucial to have

Re: Appending static arrays

2017-07-18 Thread Jack Applegame via Digitalmars-d-learn
On Tuesday, 18 July 2017 at 12:39:01 UTC, Stefan Koch wrote: whhhahhh template bloat Yes, and also very slow. :)

Re: Mixin function names

2017-07-18 Thread Moinak Bhattacharrya via Digitalmars-d
On Tuesday, 18 July 2017 at 21:29:05 UTC, Timon Gehr wrote: On 18.07.2017 23:28, Moinak Bhattacharrya wrote: On Tuesday, 18 July 2017 at 21:22:47 UTC, Timon Gehr wrote: On 18.07.2017 22:57, Moinak Bhattacharrya wrote: Is it possible to mixin function names? IE something like this: template

[Issue 15933] GDC support for core.cpuid

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15933 Marco Leise changed: What|Removed |Added Status|NEW |RESOLVED

Re: Mixin function names

2017-07-18 Thread Timon Gehr via Digitalmars-d
On 18.07.2017 23:28, Moinak Bhattacharrya wrote: On Tuesday, 18 July 2017 at 21:22:47 UTC, Timon Gehr wrote: On 18.07.2017 22:57, Moinak Bhattacharrya wrote: Is it possible to mixin function names? IE something like this: template strFunc(string s){ int mixin(s)(int a){ return

Re: Mixin function names

2017-07-18 Thread Moinak Bhattacharrya via Digitalmars-d
On Tuesday, 18 July 2017 at 21:22:47 UTC, Timon Gehr wrote: On 18.07.2017 22:57, Moinak Bhattacharrya wrote: Is it possible to mixin function names? IE something like this: template strFunc(string s){ int mixin(s)(int a){ return a+1; } } ... No. If not, is something like

Re: Adding flags to dub build

2017-07-18 Thread Moritz Maxeiner via Digitalmars-d-learn
On Tuesday, 18 July 2017 at 20:12:13 UTC, Jean-Louis Leroy wrote: On Tuesday, 18 July 2017 at 20:00:48 UTC, Guillaume Piolat wrote: On Tuesday, 18 July 2017 at 19:49:35 UTC, Jean-Louis Leroy wrote: Hi, I want to add a few flags while building with dub. I tried:

Re: New library: open multi-methods

2017-07-18 Thread jmh530 via Digitalmars-d-announce
On Tuesday, 18 July 2017 at 21:16:11 UTC, jmh530 wrote: I may not have been clear enough. My ideal solution wouldn't make any changes to that densematrix.d file, just the interface. So I don't have any issue with the matrix modules doing the math and the app doing the printing. Well, I

Re: Mixin function names

2017-07-18 Thread Timon Gehr via Digitalmars-d
On 18.07.2017 22:57, Moinak Bhattacharrya wrote: Is it possible to mixin function names? IE something like this: template strFunc(string s){ int mixin(s)(int a){ return a+1; } } ... No. If not, is something like this being looked at? The suggestion has been made, but

Re: New library: open multi-methods

2017-07-18 Thread jmh530 via Digitalmars-d-announce
On Tuesday, 18 July 2017 at 19:22:38 UTC, Jean-Louis Leroy wrote: Look at https://github.com/jll63/methods.d/blob/master/examples/matrix/source/matrix.d and https://github.com/jll63/methods.d/blob/master/examples/matrix/source/densematrix.d They know nothing about printing. They don't want to.

Re: Mixin function names

2017-07-18 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 18 July 2017 at 20:57:51 UTC, Moinak Bhattacharrya wrote: Is it possible to mixin function names? IE something like this: Only if you mixin the entire function. But what I like to do is to write the function with some internal name, then do `mixin("alias "~ new_name ~ " =

[Issue 17663] New: header generation (-H) is broken with public override of private default

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17663 Issue ID: 17663 Summary: header generation (-H) is broken with public override of private default Product: D Version: D2 Hardware: All URL: http://dlang.org/

Re: Building DMD on OpenBSD

2017-07-18 Thread Anonymous via Digitalmars-d
On Tuesday, 18 July 2017 at 05:11:30 UTC, Kai Nacke wrote: In master there is already some OpenBSD support. Some time ago I worked on druntime support but I still need to finish this. Mostly there is nothing magic here - just translating the header files. The only non-obvious work is required

Re: Mixin function names

2017-07-18 Thread Moinak Bhattacharrya via Digitalmars-d
On Tuesday, 18 July 2017 at 20:57:51 UTC, Moinak Bhattacharrya wrote: Is it possible to mixin function names? IE something like this: template strFunc(string s){ int mixin(s)(int a){ return a+1; } } If not, is something like this being looked at? Or, just

Mixin function names

2017-07-18 Thread Moinak Bhattacharrya via Digitalmars-d
Is it possible to mixin function names? IE something like this: template strFunc(string s){ int mixin(s)(int a){ return a+1; } } If not, is something like this being looked at?

Re: Adding flags to dub build

2017-07-18 Thread Jean-Louis Leroy via Digitalmars-d-learn
On Tuesday, 18 July 2017 at 20:12:13 UTC, Jean-Louis Leroy wrote: On Tuesday, 18 July 2017 at 20:00:48 UTC, Guillaume Piolat wrote: On Tuesday, 18 July 2017 at 19:49:35 UTC, Jean-Louis Leroy wrote: Hi, I want to add a few flags while building with dub. I tried:

Re: proposed @noreturn attribute

2017-07-18 Thread Timon Gehr via Digitalmars-d
On 18.07.2017 20:46, Yuxuan Shui wrote: On Tuesday, 18 July 2017 at 15:26:59 UTC, Timon Gehr wrote: On 18.07.2017 14:19, Stefan Koch wrote: [...] D has a C-inspired first-order type system, so it is not necessarily crucial to have it in D. (The reason I got involved in this thread is that

[Issue 697] No const folding on asm db,dw, etc

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=697 --- Comment #7 from Stewart Gordon --- (In reply to Vladimir Panteleev from comment #6) > The original test case as presented in the issue description now works, as > per comment 3, so I'm going to close this. > > (In reply to Don

Re: Adding flags to dub build

2017-07-18 Thread Jean-Louis Leroy via Digitalmars-d-learn
On Tuesday, 18 July 2017 at 20:00:48 UTC, Guillaume Piolat wrote: On Tuesday, 18 July 2017 at 19:49:35 UTC, Jean-Louis Leroy wrote: Hi, I want to add a few flags while building with dub. I tried: DFLAGS='-d-version=explain' dub test ... ...but DFLAGS does not seem to be honored. In fact

Re: New library: open multi-methods

2017-07-18 Thread Ali Çehreli via Digitalmars-d-announce
On 07/18/2017 12:22 PM, Jean-Louis Leroy wrote: > Look at > https://github.com/jll63/methods.d/blob/master/examples/matrix/source/matrix.d > and > https://github.com/jll63/methods.d/blob/master/examples/matrix/source/densematrix.d > They know nothing about printing. They don't want to. The

Re: Adding flags to dub build

2017-07-18 Thread Guillaume Piolat via Digitalmars-d-learn
On Tuesday, 18 July 2017 at 19:49:35 UTC, Jean-Louis Leroy wrote: Hi, I want to add a few flags while building with dub. I tried: DFLAGS='-d-version=explain' dub test ... ...but DFLAGS does not seem to be honored. In fact I wouldn't mind adding a builtType to my dub.sdl (but then will it

Re: DMD library available as DUB package

2017-07-18 Thread NotSpooky via Digitalmars-d-announce
On Tuesday, 18 July 2017 at 12:07:27 UTC, Jacob Carlborg wrote: During the dconf hackathon I set out to create a DUB package for DMD to be used as a library. This has finally been merged [1] and is available here [2]. It contains the lexer and the parser. A minimal example: #!/usr/bin/env

Adding flags to dub build

2017-07-18 Thread Jean-Louis Leroy via Digitalmars-d-learn
Hi, I want to add a few flags while building with dub. I tried: DFLAGS='-d-version=explain' dub test ... ...but DFLAGS does not seem to be honored. In fact I wouldn't mind adding a builtType to my dub.sdl (but then will it be inherited by the subpackages) but I don't see how to specify

Re: New library: open multi-methods

2017-07-18 Thread Jean-Louis Leroy via Digitalmars-d-announce
On Tuesday, 18 July 2017 at 18:03:30 UTC, jmh530 wrote: On Tuesday, 18 July 2017 at 16:57:30 UTC, Ali Çehreli wrote: Perhaps they are all needed but I'm thinking about the need for forward declaration, the need for the underscore prefix, etc. He might be able to at least get rid of the

Re: newCTFE Status July 2017

2017-07-18 Thread Stefan Koch via Digitalmars-d
On Tuesday, 18 July 2017 at 19:11:37 UTC, H. S. Teoh wrote: Shouldn't there be a way to reduce the test case so that you don't have to look through 300 temporaries? Yes. However, there is not automated way to reduce it. So to find the source-code which actually leads to the mis-compiled

Re: An Issue I Wish To Raise Awareness On

2017-07-18 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, July 18, 2017 18:06:56 Atila Neves via Digitalmars-d wrote: > On Tuesday, 18 July 2017 at 15:03:07 UTC, Kagamin wrote: > > On Tuesday, 18 July 2017 at 11:47:37 UTC, Petar Kirov > > > > [ZombineDev] wrote: > >> I think Atila was talking about this one: > >> struct A > >> { > >> > >>

Re: newCTFE Status July 2017

2017-07-18 Thread H. S. Teoh via Digitalmars-d
On Tue, Jul 18, 2017 at 07:08:49PM +, Stefan Koch via Digitalmars-d wrote: [...] > The bad news: > It miscompiles it. > > The generated code is bogus :) > > Fixing this could take a while. > Because even with my improved debugging tools it's still over 3k of > instructions to look through. >

Re: static foreach is now in github master

2017-07-18 Thread Martin Tschierschke via Digitalmars-d-announce
On Tuesday, 18 July 2017 at 10:02:10 UTC, Seb wrote: On Monday, 17 July 2017 at 21:27:40 UTC, Martin Nowak wrote: On Monday, 17 July 2017 at 18:14:35 UTC, Andrei Alexandrescu wrote: For those who want to play with our new static foreach feature and are willing to take the steps to building

Re: newCTFE Status July 2017

2017-07-18 Thread Stefan Koch via Digitalmars-d
On Thursday, 13 July 2017 at 12:45:19 UTC, Stefan Koch wrote: [ ... ] Hi Guys, I have good news and bad news. The good news: newCTFE just compiled my own version of std.bitmanip.bitfields dubbed fastFields. which can be seen here:

Re: New library: open multi-methods

2017-07-18 Thread Jean-Louis Leroy via Digitalmars-d-announce
On Tuesday, 18 July 2017 at 18:21:21 UTC, Ali Çehreli wrote: That reminds me: Would the following be possible and better? // From void main() { updateMethods(); // ... } // To mixin(constructMethods()); void main() { // ... } constructMethods() could return the following string: string

Re: proposed @noreturn attribute

2017-07-18 Thread Yuxuan Shui via Digitalmars-d
On Tuesday, 18 July 2017 at 15:26:59 UTC, Timon Gehr wrote: On 18.07.2017 14:19, Stefan Koch wrote: [...] D has a C-inspired first-order type system, so it is not necessarily crucial to have it in D. (The reason I got involved in this thread is that it was proposed to add Bottom as a type

Re: New library: open multi-methods

2017-07-18 Thread Jean-Louis Leroy via Digitalmars-d-announce
On Tuesday, 18 July 2017 at 16:57:30 UTC, Ali Çehreli wrote: > As for performance, I have a first result: > https://github.com/jll63/methods.d/blob/master/benchmarks/source/benchmarks.d#L122 > but I still have to implement the "first argument optimization". I am > working on it. I could use

Re: New library: open multi-methods

2017-07-18 Thread Ali Çehreli via Digitalmars-d-announce
On 07/18/2017 11:03 AM, jmh530 wrote: > the mixin(registerMethods); could then be adjusted so that void > print(virtual!Matrix m); is mixed in automatically because we now know > how to construct it. That reminds me: Would the following be possible and better? // From void main() {

Re: proposed @noreturn attribute

2017-07-18 Thread Atila Neves via Digitalmars-d
On Monday, 17 July 2017 at 18:54:37 UTC, H. S. Teoh wrote: On Mon, Jul 17, 2017 at 02:10:27PM -0400, Andrei Alexandrescu via Digitalmars-d wrote: [...] [...] IMO, the observations "used rarely" and "attention-seeking notation" are better satisfied by an attribute named @noreturn than some

Re: An Issue I Wish To Raise Awareness On

2017-07-18 Thread Atila Neves via Digitalmars-d
On Monday, 17 July 2017 at 19:30:53 UTC, Jack Stouffer wrote: On Monday, 17 July 2017 at 17:41:58 UTC, Atila Neves wrote: On Monday, 17 July 2017 at 14:26:19 UTC, Jack Stouffer wrote: TL;DR: Issue 17658 [1] makes using shared very annoying/practically impossible. [...] I fixed this

Re: An Issue I Wish To Raise Awareness On

2017-07-18 Thread Atila Neves via Digitalmars-d
On Tuesday, 18 July 2017 at 15:03:07 UTC, Kagamin wrote: On Tuesday, 18 July 2017 at 11:47:37 UTC, Petar Kirov [ZombineDev] wrote: I think Atila was talking about this one: struct A { ~this() {} } void main() { auto a = A(); shared b = A(); } This is strange. There's

Re: New library: open multi-methods

2017-07-18 Thread jmh530 via Digitalmars-d-announce
On Tuesday, 18 July 2017 at 16:57:30 UTC, Ali Çehreli wrote: Perhaps they are all needed but I'm thinking about the need for forward declaration, the need for the underscore prefix, etc. He might be able to at least get rid of the forward declaration (not sure on the underscore). The

Is it possible to generate a pool of random D or D inline assembler programs, run them safely?

2017-07-18 Thread Enjoys Math via Digitalmars-d-learn
Without them crashing the app running them? Say by wrapping with try / catch? You can assume that I've limited the opcode addresses to the program and/or the data section which I'll try to put right next to the code. Reason is so I don't have to make my own VM. I want to mutate computable

[Issue 16412] instance variable shadowing with inheritance

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16412 feklushkin.de...@gmail.com changed: What|Removed |Added CC||feklushkin.de...@gmail.com --

[Issue 16160] selective imports in aggregation shadow @property functions

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16160 feklushkin.de...@gmail.com changed: What|Removed |Added CC||feklushkin.de...@gmail.com --

Re: How do I cast to from byte[] <-> double for making a small assembler language VM to work?

2017-07-18 Thread Enjoys Math via Digitalmars-d-learn
Thanks for the replies. I will look at 3-address opcodes and consider unions. *Wonders if it matters that Program is a struct with opSlice / opSliceAssign overloaded*.

Re: regex(q"<[^]>")

2017-07-18 Thread Temtaime via Digitalmars-d
On Tuesday, 18 July 2017 at 16:34:39 UTC, unDEFER wrote: On Tuesday, 18 July 2017 at 08:56:12 UTC, Anton Fediushin wrote: Not a bug, but I think that `regex()` should fail with a nice exception, not silently fail. Yes, exception, not assert. The forum is not a bugtracker

Re: New library: open multi-methods

2017-07-18 Thread Ali Çehreli via Digitalmars-d-announce
On 07/18/2017 12:06 AM, Jean-Louis Leroy wrote: > Yes I will probably write something. You mean on the D Blog? Not necessarily but why not. :) > As for performance, I have a first result: > https://github.com/jll63/methods.d/blob/master/benchmarks/source/benchmarks.d#L122 > but I still have

Re: An Issue I Wish To Raise Awareness On

2017-07-18 Thread Atila Neves via Digitalmars-d
On Tuesday, 18 July 2017 at 11:47:37 UTC, Petar Kirov [ZombineDev] wrote: On Monday, 17 July 2017 at 19:30:53 UTC, Jack Stouffer wrote: [...] I think Atila was talking about this one: struct A { ~this() {} } void main() { auto a = A(); shared b = A(); }

Re: Can't get expected strings

2017-07-18 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, July 18, 2017 13:49:11 helxi via Digitalmars-d-learn wrote: > import std.stdio, std.datetime, std.conv, std.algorithm; > > void main() > { > immutable DEADLINE = DateTime(2017, 7, 16, 23, 59, > 59).to!SysTime; > immutable NOW = Clock.currTime; > immutable INTERVAL =

Re: regex(q"<[^]>")

2017-07-18 Thread unDEFER via Digitalmars-d
On Tuesday, 18 July 2017 at 08:56:12 UTC, Anton Fediushin wrote: Not a bug, but I think that `regex()` should fail with a nice exception, not silently fail. Yes, exception, not assert.

Re: replacement for squeeze and removechars.

2017-07-18 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, July 18, 2017 15:55:00 Seb via Digitalmars-d-learn wrote: > On Tuesday, 18 July 2017 at 15:41:44 UTC, Meta wrote: > > As Seb somewhat undiplomatically put, there are replacements > > listed in the changelog. > > Sorry - it wasn't intended to be an offense or aggressive. I >

Re: How do I cast to from byte[] <-> double for making a small assembler language VM to work?

2017-07-18 Thread H. S. Teoh via Digitalmars-d-learn
Maybe use a union? union U { double d; byte[double.sizeof] bytes; } U u; u.bytes = ...; double d = u.d; ... // do something with d // or: U u; u.d = 3.14159; byte[] b = u.bytes[];

Re: replacement for squeeze and removechars.

2017-07-18 Thread Antonio Corbi via Digitalmars-d-learn
On Tuesday, 18 July 2017 at 15:55:00 UTC, Seb wrote: On Tuesday, 18 July 2017 at 15:41:44 UTC, Meta wrote: As Seb somewhat undiplomatically put, there are replacements listed in the changelog. Sorry - it wasn't intended to be an offense or aggressive. I consider(ed) RTFM as common internet

Re: replacement for squeeze and removechars.

2017-07-18 Thread Seb via Digitalmars-d-learn
On Tuesday, 18 July 2017 at 15:41:44 UTC, Meta wrote: As Seb somewhat undiplomatically put, there are replacements listed in the changelog. Sorry - it wasn't intended to be an offense or aggressive. I consider(ed) RTFM as common internet slang.

Re: replacement for squeeze and removechars.

2017-07-18 Thread Antonio Corbi via Digitalmars-d-learn
On Tuesday, 18 July 2017 at 15:41:44 UTC, Meta wrote: On Tuesday, 18 July 2017 at 15:28:06 UTC, Antonio Corbi wrote: Hi all, I'm trying dmd-2.075.0-rc1 in one of my projects where I use `squeeze` and `removechars`. Both of them are flagged as obsolete and in the docs we are suggested to use

Re: static foreach is now in github master

2017-07-18 Thread Seb via Digitalmars-d-announce
On Tuesday, 18 July 2017 at 10:06:33 UTC, Vladimir Panteleev wrote: On Tuesday, 18 July 2017 at 10:02:10 UTC, Seb wrote: And thanks to dmd-nightly, also on run.dlang.io:

Re: replacement for squeeze and removechars.

2017-07-18 Thread Meta via Digitalmars-d-learn
On Tuesday, 18 July 2017 at 15:28:06 UTC, Antonio Corbi wrote: Hi all, I'm trying dmd-2.075.0-rc1 in one of my projects where I use `squeeze` and `removechars`. Both of them are flagged as obsolete and in the docs we are suggested to use functions from std.regex and/or std.algorithm. Does

Re: replacement for squeeze and removechars.

2017-07-18 Thread Seb via Digitalmars-d-learn
On Tuesday, 18 July 2017 at 15:28:06 UTC, Antonio Corbi wrote: Hi all, I'm trying dmd-2.075.0-rc1 in one of my projects where I use `squeeze` and `removechars`. Both of them are flagged as obsolete and in the docs we are suggested to use functions from std.regex and/or std.algorithm. Does

Re: proposed @noreturn attribute

2017-07-18 Thread Timon Gehr via Digitalmars-d
On 18.07.2017 14:19, Stefan Koch wrote: On Tuesday, 18 July 2017 at 12:15:06 UTC, Timon Gehr wrote: On 18.07.2017 12:17, John Colvin wrote: Better to just not define it. That's not an option. Bottom is a subtype of all types. It cannot remove members, even static ones. Timon, how

replacement for squeeze and removechars.

2017-07-18 Thread Antonio Corbi via Digitalmars-d-learn
Hi all, I'm trying dmd-2.075.0-rc1 in one of my projects where I use `squeeze` and `removechars`. Both of them are flagged as obsolete and in the docs we are suggested to use functions from std.regex and/or std.algorithm. Does any one kow a one-liner from std.regex or std.algorithm that

Re: Idiomatic way of writing nested loops?

2017-07-18 Thread Russel Winder via Digitalmars-d-learn
On Tue, 2017-07-18 at 08:41 +, Anton Fediushin via Digitalmars-d-learn wrote: > On Tuesday, 18 July 2017 at 03:36:04 UTC, Nicholas Wilson wrote: > > With regards to parallel, only use it on the outermost loop. > > Assuming you have more items in the outermost loop than you do > > threads

Re: Idiomatic way of writing nested loops?

2017-07-18 Thread Russel Winder via Digitalmars-d-learn
On Tue, 2017-07-18 at 03:36 +, Nicholas Wilson via Digitalmars-d-learn wrote: > On Monday, 17 July 2017 at 11:07:35 UTC, Anton Fediushin wrote: > > […] > > > > Also, I have a question about running this in parallel: if I > > want to use nested loops with `parallel` from > >

Re: An Issue I Wish To Raise Awareness On

2017-07-18 Thread Kagamin via Digitalmars-d
On Tuesday, 18 July 2017 at 11:47:37 UTC, Petar Kirov [ZombineDev] wrote: I think Atila was talking about this one: struct A { ~this() {} } void main() { auto a = A(); shared b = A(); } This is strange. There's nothing that suggests that struct A and its destructor is

Re: Slides share: DMesos - Not only a re-implementation of Mesos

2017-07-18 Thread 鲜卑拓跋枫 via Digitalmars-d
On Sunday, 16 July 2017 at 03:45:09 UTC, Dsby wrote: On Saturday, 15 July 2017 at 15:57:18 UTC, 鲜卑拓跋枫 wrote: On Friday, 14 July 2017 at 05:07:11 UTC, Dsby wrote: On Monday, 10 July 2017 at 17:29:01 UTC, 鲜卑拓跋枫 wrote: [...] 我也希望能用D做出来。 我们也在研究过raft, akka这些技术。

Re: Get complete function declaration

2017-07-18 Thread SrMordred via Digitalmars-d-learn
On Tuesday, 18 July 2017 at 13:53:11 UTC, Ivan Kazmenko wrote: On Tuesday, 18 July 2017 at 13:35:49 UTC, SrMordred wrote: There is a way to get the full function(or any other structure) declaration with traits? Or I will have to mount it with std.traits functions? eg. void add(int x, int

[Issue 12389] Operating system C functions should be marked as 'nothrow'

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12389 Vladimir Panteleev changed: What|Removed |Added Status|NEW

[Issue 13039] combinations

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13039 Vladimir Panteleev changed: What|Removed |Added Keywords|

[Issue 697] No const folding on asm db,dw, etc

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=697 Vladimir Panteleev changed: What|Removed |Added Status|REOPENED

Re: DMD library available as DUB package

2017-07-18 Thread Meta via Digitalmars-d-announce
On Tuesday, 18 July 2017 at 12:07:27 UTC, Jacob Carlborg wrote: During the dconf hackathon I set out to create a DUB package for DMD to be used as a library. This has finally been merged [1] and is available here [2]. It contains the lexer and the parser. A minimal example: #!/usr/bin/env

[Issue 9641] Wrong module init order when a thread is created in a module ctor

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9641 --- Comment #2 from Vladimir Panteleev --- (In reply to Martin Nowak from comment #1) > I think the fix would need a mutex which blocks all created threads until > all shared module constructors are finished. This

[Issue 17604] Reject mutable fields initialized with reference types to data segment

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17604 Vladimir Panteleev changed: What|Removed |Added See Also|

  1   2   >