Re: A safer File.readln

2017-01-24 Thread TheGag96 via Digitalmars-d
On Monday, 23 January 2017 at 13:18:57 UTC, Andrei Alexandrescu wrote: On 1/23/17 5:44 AM, Shachar Shemesh wrote: If, instead of increasing its size by 100%, we increase it by a smaller percentage of its previous size, we still maintain the amortized O(1) cost (with a multiplier that might be

Re: A mini D book: Markdown or LaTeX?

2017-01-24 Thread rikki cattermole via Digitalmars-d
On 25/01/2017 3:27 AM, aberba wrote: Which one works well? I'm more concerned about syntax highlighting and line numbering (in some cases). Support for custom fonts. I've used leanpub for my two books, it is now $100 per book (one time). Leanpub uses Markdown as input format and produces pdf,

Re: bdb2d and openSUSE

2017-01-24 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, January 25, 2017 00:39:40 unDEFER via Digitalmars-d wrote: > Hello! Trying to build my project for Open SuSE and my project > bdb2d unexpectedly brings error: > > Linking... > ../../.dub/packages/bdb2d-5.3.28/bdb2d/.dub/build/library-debug-linux.posi >

Re: auto ref escaping local variable

2017-01-24 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, January 24, 2017 11:16:21 Ali Çehreli via Digitalmars-d wrote: > On 01/24/2017 02:03 AM, Jonathan M Davis via Digitalmars-d wrote: > > On Tuesday, January 24, 2017 00:47:31 Ali Çehreli via Digitalmars-d > Obviously, I know all of that and they are pretty complicated for new >

Re: A mini D book: Markdown or LaTeX?

2017-01-24 Thread Chris Wright via Digitalmars-d
On Tue, 24 Jan 2017 14:27:15 +, aberba wrote: > Which one works well? I'm more concerned about syntax highlighting and > line numbering (in some cases). Support for custom fonts. Markdown produces HTML. You can use any tool that works with HTML to modify its output. If you intend to

Re: test.d(22): Error: cannot append type test.Path to type test.Path

2017-01-24 Thread Chris Wright via Digitalmars-d
On Tue, 24 Jan 2017 23:39:40 +, Profile Anaysis wrote: > test.d(22): Error: cannot append type test.Path to type test.Path > > This is due to the changing some code that was appending. Obviously we > can't append a type to itself. You *can* append a type to itself: struct Path {

[Issue 17117] erroneous "escaping reference to local variable"

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17117 Walter Bright changed: What|Removed |Added Keywords||safe

Re: GSoC 2017 Ideas!

2017-01-24 Thread rikki cattermole via Digitalmars-d
On 25/01/2017 12:17 PM, CRAIG DILLABAUGH wrote: I wanted to ask if anyone knows if there is a way to add links to PDF documents to the Wiki. I want to post some successful past proposals, but the Wiki only seems to want to let me upload a small number of formats, with PDF not being one of them.

Re: Release D 2.073.0

2017-01-24 Thread deadalnix via Digitalmars-d-announce
On Sunday, 22 January 2017 at 17:55:03 UTC, Martin Nowak wrote: Glad to announce D 2.073.0. This release comes with a few phobos additions, new -mcpu=avx and -mscrt switch, and several bugfixes. http://dlang.org/download.html http://dlang.org/changelog/2.073.0.html -Martin <3

bdb2d and openSUSE

2017-01-24 Thread unDEFER via Digitalmars-d
Hello! Trying to build my project for Open SuSE and my project bdb2d unexpectedly brings error: Linking... ../../.dub/packages/bdb2d-5.3.28/bdb2d/.dub/build/library-debug-linux.posix-x86_64-dmd_2071-9E956773380BE684D56F8F1619A72458/libdb.a(db_126_1b8.o): In function

[Issue 17120] error messages from wrong overload

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17120 John Colvin changed: What|Removed |Added Keywords||rejects-valid

[Issue 17120] New: error messages from wrong overload

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17120 Issue ID: 17120 Summary: error messages from wrong overload Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: critical Priority: P1

Re: alias and UFCS

2017-01-24 Thread ixid via Digitalmars-d-learn
On Tuesday, 24 January 2017 at 20:51:49 UTC, Stefan Koch wrote: On Tuesday, 24 January 2017 at 16:41:12 UTC, ixid wrote: On Tuesday, 24 January 2017 at 16:27:50 UTC, ixid wrote: On Tuesday, 24 January 2017 at 15:57:48 UTC, Las wrote: On Tuesday, 24 January 2017 at 13:11:41 UTC, ixid wrote:

Can compiler profile itself?

2017-01-24 Thread Profile Anaysis via Digitalmars-d-learn
I am trying to compile some code and it takes around 6 seconds. Even if I change one line in one module, it takes the same time. There are about 20 different d modules. I used to get around 1-2 second compile times several months ago on different projects. I did upgrade a few things and it

test.d(22): Error: cannot append type test.Path to type test.Path

2017-01-24 Thread Profile Anaysis via Digitalmars-d
test.d(22): Error: cannot append type test.Path to type test.Path This is due to the changing some code that was appending. Obviously we can't append a type to itself. Would be nice if the error message was more clear like: Type test.Path is not an array. Cannot append to itself.

Re: GSoC 2017 Ideas!

2017-01-24 Thread CRAIG DILLABAUGH via Digitalmars-d
I wanted to ask if anyone knows if there is a way to add links to PDF documents to the Wiki. I want to post some successful past proposals, but the Wiki only seems to want to let me upload a small number of formats, with PDF not being one of them.

Re: Is it possible to "cache" results of compile-time executions between compiles?

2017-01-24 Thread TheFlyingFiddle via Digitalmars-d-learn
On Tuesday, 24 January 2017 at 21:41:12 UTC, Profile Anaysis wrote: On Tuesday, 24 January 2017 at 21:36:50 UTC, Profile Anaysis wrote: ... Maybe with all this talk of the new CTFE engine being developed, a similar mechanism can be used optionally? This could help with debugging also. In

Re: Learning resources

2017-01-24 Thread bachmeier via Digitalmars-d-learn
On Tuesday, 24 January 2017 at 20:15:38 UTC, Dlearner wrote: Hey all! I'm learning programming through D and having a really good time (much better than with C++ or Python). I'm aiming to make little games with it as a hobby so I've learned some OpenGL stuff. But, I feel like I'm learning

Re: Is it possible to "cache" results of compile-time executions between compiles?

2017-01-24 Thread TheFlyingFiddle via Digitalmars-d-learn
On Tuesday, 24 January 2017 at 21:36:50 UTC, Profile Anaysis wrote: On Tuesday, 24 January 2017 at 16:49:03 UTC, TheFlyingFiddle wrote: On Tuesday, 24 January 2017 at 16:41:13 UTC, TheFlyingFiddle wrote: Everything turned out s much better than expected :) Added bonus is that mixin output

Re: Is it possible to "cache" results of compile-time executions between compiles?

2017-01-24 Thread Profile Anaysis via Digitalmars-d-learn
On Tuesday, 24 January 2017 at 21:36:50 UTC, Profile Anaysis wrote: ... Maybe with all this talk of the new CTFE engine being developed, a similar mechanism can be used optionally? This could help with debugging also. In debug mode, the cfte mixin's are written to disk with hash, if they

Re: Is it possible to "cache" results of compile-time executions between compiles?

2017-01-24 Thread Profile Anaysis via Digitalmars-d-learn
On Tuesday, 24 January 2017 at 16:49:03 UTC, TheFlyingFiddle wrote: On Tuesday, 24 January 2017 at 16:41:13 UTC, TheFlyingFiddle wrote: Everything turned out s much better than expected :) Added bonus is that mixin output can be viewed in the generated files :D Could you post your

[Issue 17119] New: Broken URL for compiler switch -dip1000

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17119 Issue ID: 17119 Summary: Broken URL for compiler switch -dip1000 Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal

Re: Learning resources

2017-01-24 Thread Dlearner via Digitalmars-d-learn
On Tuesday, 24 January 2017 at 21:14:08 UTC, pineapple wrote: On Tuesday, 24 January 2017 at 20:15:38 UTC, Dlearner wrote: Hey all! I'm learning programming through D and having a really good time (much better than with C++ or Python). I'm aiming to make little games with it as a hobby so

Re: Possible bug in skipOver() from std/algorithm/searching.d

2017-01-24 Thread Bauss via Digitalmars-d
On Sunday, 22 January 2017 at 11:20:18 UTC, Danny Arends wrote: On Sunday, 22 January 2017 at 10:30:14 UTC, Stefan Koch wrote: On Sunday, 22 January 2017 at 10:01:09 UTC, Danny Arends wrote: On Sunday, 22 January 2017 at 09:55:49 UTC, Danny Arends wrote: Hey all, I encountered some

Re: Learning resources

2017-01-24 Thread pineapple via Digitalmars-d-learn
On Tuesday, 24 January 2017 at 20:15:38 UTC, Dlearner wrote: Hey all! I'm learning programming through D and having a really good time (much better than with C++ or Python). I'm aiming to make little games with it as a hobby so I've learned some OpenGL stuff. But, I feel like I'm learning

Re: A mini D book: Markdown or LaTeX?

2017-01-24 Thread Antonio Corbi via Digitalmars-d
On Tuesday, 24 January 2017 at 14:27:15 UTC, aberba wrote: Which one works well? I'm more concerned about syntax highlighting and line numbering (in some cases). Support for custom fonts. If you are an emacs user, probably you have heard about org-mode (http://orgmode.org/). With its new

Re: alias and UFCS

2017-01-24 Thread Stefan Koch via Digitalmars-d-learn
On Tuesday, 24 January 2017 at 16:41:12 UTC, ixid wrote: On Tuesday, 24 January 2017 at 16:27:50 UTC, ixid wrote: On Tuesday, 24 January 2017 at 15:57:48 UTC, Las wrote: On Tuesday, 24 January 2017 at 13:11:41 UTC, ixid wrote: [...] Submit a bug report then. I will if it turns out the

Learning resources

2017-01-24 Thread Dlearner via Digitalmars-d-learn
Hey all! I'm learning programming through D and having a really good time (much better than with C++ or Python). I'm aiming to make little games with it as a hobby so I've learned some OpenGL stuff. But, I feel like I'm learning more library code rather than D concepts and idioms, especially

Swift's plan for world domination

2017-01-24 Thread Joakim via Digitalmars-d
Just finished listening to an interesting podcast with Chris Lattner, creator of Swift, about what went into the language, including mentioning D as one of its many influences, saying he wants it everywhere from linux servers to systems programming, and explaining their choice of ARC over GC.

Re: @safe containers with std.experimental.allocator

2017-01-24 Thread bitwise via Digitalmars-d
On Sunday, 22 January 2017 at 13:21:41 UTC, Andrei Alexandrescu wrote: On 1/21/17 10:07 PM, bitwise wrote: On Saturday, 21 January 2017 at 23:24:52 UTC, Andrei Alexandrescu wrote: Andrei Anyways, design opinions aside, I would be satisfied if an aligned allocator were included in

Re: A mini D book: Markdown or LaTeX?

2017-01-24 Thread qznc via Digitalmars-d
On Tuesday, 24 January 2017 at 14:27:15 UTC, aberba wrote: Which one works well? I'm more concerned about syntax highlighting and line numbering (in some cases). Support for custom fonts. I used Sphinx here: https://qznc.github.io/d-tut/ The syntax "ReStructured Text" is more ugly than

Object function cannot change member when called from callback?

2017-01-24 Thread David Zhang via Digitalmars-d-learn
So I have a window (Windows), and my wndProc is basically the same as the one on the windows guides. However, even though WM_CLOSE gets passed (and I can use if(msg == WM_CLOSE)), I can't seem to set my shouldClose flag. I've confirmed that I still get the event within my processMessage

Re: auto ref escaping local variable

2017-01-24 Thread Ali Çehreli via Digitalmars-d
On 01/24/2017 02:03 AM, Jonathan M Davis via Digitalmars-d wrote: > On Tuesday, January 24, 2017 00:47:31 Ali Çehreli via Digitalmars-d wrote: >> The problem with auto ref is that in the case of rvalues, what you have >> is a local variable, which makes it almost given that when it's 'auto >>

[Issue 17117] erroneous "escaping reference to local variable"

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17117 Daniel Nielsen changed: What|Removed |Added CC||gox...@gmail.com ---

Re: CTFE Status

2017-01-24 Thread Stefan Koch via Digitalmars-d
On Tuesday, 24 January 2017 at 09:52:13 UTC, Stefan Koch wrote: NEW CTFE IS GREEN ON 64 BIT! GREEN! I just fixed a regression found by compiling vibe.d. We are now even greener!

Re: CTFE Status

2017-01-24 Thread Stefan Koch via Digitalmars-d
On Tuesday, 24 January 2017 at 15:48:19 UTC, Nordlöw wrote: On Tuesday, 24 January 2017 at 15:33:37 UTC, Stefan Koch wrote: The lookup time is one issue but not the most important, The instanciation of a template is a non-trivial operation within the compiler. Type-deduction ast rewriting

Re: Why is [0] @safer than array.ptr?

2017-01-24 Thread Dukc via Digitalmars-d-learn
On Tuesday, 24 January 2017 at 12:01:35 UTC, Jonathan M Davis wrote: So, while it makes sense to say that .ptr can't be used in @safe code, it really doesn't make sense to suggest [0] as an alternative. That may well be. But I believe everything that can provably be @safe are made so even

Re: Is it possible to "cache" results of compile-time executions between compiles?

2017-01-24 Thread TheFlyingFiddle via Digitalmars-d-learn
On Tuesday, 24 January 2017 at 16:41:13 UTC, TheFlyingFiddle wrote: Everything turned out s much better than expected :) Added bonus is that mixin output can be viewed in the generated files :D

Re: Is it possible to "cache" results of compile-time executions between compiles?

2017-01-24 Thread TheFlyingFiddle via Digitalmars-d-learn
On Tuesday, 24 January 2017 at 12:19:33 UTC, ketmar wrote: On Tuesday, 24 January 2017 at 12:14:05 UTC, TheFlyingFiddle wrote: unittest { enum s = import("myfile"); } Is there something similar to this for outputting files at compile-time? no. this is by design, so it won't be fixed.

Re: alias and UFCS

2017-01-24 Thread ixid via Digitalmars-d-learn
On Tuesday, 24 January 2017 at 16:27:50 UTC, ixid wrote: On Tuesday, 24 January 2017 at 15:57:48 UTC, Las wrote: On Tuesday, 24 January 2017 at 13:11:41 UTC, ixid wrote: This code: T tFunc(alias F, T)(T n) { n.F; return n; } Produces this error: Error: no property 'F' for

Re: A mini D book: Markdown or LaTeX?

2017-01-24 Thread bachmeier via Digitalmars-d
On Tuesday, 24 January 2017 at 15:02:26 UTC, Russel Winder wrote: I wouldn't use Markdown for such a project. Is there a reason? Many people might choose Asciidoctor. When I looked at asciidoc, it looked like markdown with extensions.

Re: alias and UFCS

2017-01-24 Thread ixid via Digitalmars-d-learn
On Tuesday, 24 January 2017 at 15:57:48 UTC, Las wrote: On Tuesday, 24 January 2017 at 13:11:41 UTC, ixid wrote: This code: T tFunc(alias F, T)(T n) { n.F; return n; } Produces this error: Error: no property 'F' for type 'int[]' (or whatever type I use). The alias rules

Re: alias and UFCS

2017-01-24 Thread Anonymouse via Digitalmars-d-learn
On Tuesday, 24 January 2017 at 13:11:41 UTC, ixid wrote: This code: T tFunc(alias F, T)(T n) { n.F; return n; } Produces this error: Error: no property 'F' for type 'int[]' (or whatever type I use). I believe UFCS is supposed to only work with top-level functions. I don't

Re: alias and UFCS

2017-01-24 Thread Las via Digitalmars-d-learn
On Tuesday, 24 January 2017 at 13:11:41 UTC, ixid wrote: This code: T tFunc(alias F, T)(T n) { n.F; return n; } Produces this error: Error: no property 'F' for type 'int[]' (or whatever type I use). The alias rules for functions seem to be incompatible with UFCS, F(n)

Re: CTFE Status

2017-01-24 Thread Nordlöw via Digitalmars-d
On Tuesday, 24 January 2017 at 15:33:37 UTC, Stefan Koch wrote: The lookup time is one issue but not the most important, The instanciation of a template is a non-trivial operation within the compiler. Type-deduction ast rewriting expression expansion all of that takes time and a huge chunk at

Re: D for scripting?

2017-01-24 Thread Andrei Alexandrescu via Digitalmars-d
On 01/24/2017 10:07 AM, Russel Winder via Digitalmars-d wrote: Are all files under the Boost licence? Affirmative.

Re: CTFE Status

2017-01-24 Thread Stefan Koch via Digitalmars-d
On Tuesday, 24 January 2017 at 15:16:29 UTC, Nordlöw wrote: On Tuesday, 24 January 2017 at 14:16:10 UTC, Stefan Koch wrote: There will be NO permanence improvement for pegged. For the 7th time. It is bogged down by templates, ctfe is not the problem there. Sorry for that. Got it. What's the

Re: CTFE Status

2017-01-24 Thread Nordlöw via Digitalmars-d
On Tuesday, 24 January 2017 at 14:16:10 UTC, Stefan Koch wrote: There will be NO permanence improvement for pegged. For the 7th time. It is bogged down by templates, ctfe is not the problem there. Sorry for that. Got it. What's the essence of this suboptimal performance when using

[Issue 17116] std.typecons.ReplaceType is not able to process const delegate

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17116 github-bugzi...@puremagic.com changed: What|Removed |Added Status|ASSIGNED|RESOLVED

[Issue 17116] std.typecons.ReplaceType is not able to process const delegate

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17116 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/181db425c9f19b0fa20f0c2c6cd9287922a640ae fix issue 17116 - std.typecons.ReplaceType is not able

Re: A mini D book: Markdown or LaTeX?

2017-01-24 Thread Russel Winder via Digitalmars-d
On Tue, 2017-01-24 at 14:27 +, aberba via Digitalmars-d wrote: > Which one works well? I'm more concerned about syntax  > highlighting and line numbering (in some cases). Support for  > custom fonts. I wouldn't use Markdown for such a project. Personally I would probably use XeLaTeX. Many

Re: A mini D book: Markdown or LaTeX?

2017-01-24 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, January 24, 2017 14:27:15 aberba via Digitalmars-d wrote: > Which one works well? I'm more concerned about syntax > highlighting and line numbering (in some cases). Support for > custom fonts. You could always use ddoc and then convert that to latex or html or markdown or whatever,

Re: D for scripting?

2017-01-24 Thread Russel Winder via Digitalmars-d
On Sun, 2017-01-22 at 13:53 +, Dicebot via Digitalmars-d wrote: > On Sunday, 22 January 2017 at 12:45:26 UTC, Russel Winder wrote: > > The "problem" here is the role of the D Tools repository. Is it  > > solely for DMD, or is it supposed to be something that can be  > > packaged independent of

Re: D for scripting?

2017-01-24 Thread Russel Winder via Digitalmars-d
On Sun, 2017-01-22 at 13:50 +, Dicebot via Digitalmars-d wrote: > On Sunday, 22 January 2017 at 13:24:48 UTC, Andrei Alexandrescu  > wrote: > > It's also the simplest to solve. Should be Boost. Please create  > > a PR copying the Boost license (from e.g. Phobos itself) to the  > > tools repo.

Re: A mini D book: Markdown or LaTeX?

2017-01-24 Thread bachmeier via Digitalmars-d
On Tuesday, 24 January 2017 at 14:27:15 UTC, aberba wrote: Which one works well? I'm more concerned about syntax highlighting and line numbering (in some cases). Support for custom fonts. Unless you have a strong preference for LaTeX syntax, (Pandoc) markdown is the better choice. You can

A mini D book: Markdown or LaTeX?

2017-01-24 Thread aberba via Digitalmars-d
Which one works well? I'm more concerned about syntax highlighting and line numbering (in some cases). Support for custom fonts.

Re: CTFE Status

2017-01-24 Thread Stefan Koch via Digitalmars-d
On Tuesday, 24 January 2017 at 12:43:28 UTC, Nordlöw wrote: On Tuesday, 24 January 2017 at 11:01:46 UTC, Stefan Koch wrote: Green means it passes all tests on auto-tester. Wonderful! Time to try out Pegged with newCTFE, then! There will be NO permanence improvement for pegged. For the 7th

[Issue 17117] erroneous "escaping reference to local variable"

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17117 Andrei Alexandrescu changed: What|Removed |Added CC||and...@erdani.com

Re: CTFE Status

2017-01-24 Thread Claude via Digitalmars-d
On Tuesday, 24 January 2017 at 11:01:46 UTC, Stefan Koch wrote: Green means it passes all tests on auto-tester. Yes, I understood. I was playing with the idea of eco-friendliness as well... :)

Re: CTFE Status

2017-01-24 Thread Nordlöw via Digitalmars-d
On Tuesday, 24 January 2017 at 11:01:46 UTC, Stefan Koch wrote: Green means it passes all tests on auto-tester. Wonderful! Time to try out Pegged with newCTFE, then!

Re: Is it possible to "cache" results of compile-time executions between compiles?

2017-01-24 Thread TheFlyingFiddle via Digitalmars-d-learn
On Tuesday, 24 January 2017 at 12:19:33 UTC, ketmar wrote: On Tuesday, 24 January 2017 at 12:14:05 UTC, TheFlyingFiddle wrote: unittest { enum s = import("myfile"); } Is there something similar to this for outputting files at compile-time? no. this is by design, so it won't be fixed.

Re: Is it possible to "cache" results of compile-time executions between compiles?

2017-01-24 Thread ketmar via Digitalmars-d-learn
On Tuesday, 24 January 2017 at 12:14:05 UTC, TheFlyingFiddle wrote: unittest { enum s = import("myfile"); } Is there something similar to this for outputting files at compile-time? no. this is by design, so it won't be fixed. sorry. you may use build script that will create the code

Re: Is it possible to "cache" results of compile-time executions between compiles?

2017-01-24 Thread TheFlyingFiddle via Digitalmars-d-learn
On Tuesday, 24 January 2017 at 11:19:58 UTC, TheFlyingFiddle wrote: Does D have any facilities that could make this possible? It seems that there is a feature I was unaware of/forgot called Import Expressions. unittest { enum s = import("myfile"); } Is there something similar to this

[Issue 12125] Win64 phobos has hard references to LIBCMT

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12125 --- Comment #9 from github-bugzi...@puremagic.com --- Commit pushed to newCTFE at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/0dc5d1dd68c2bcffb9a501f2e37ff28be3abd87e Merge pull request #1691 from rainers/nodefaultlib

[Issue 17072] [REG 2.073.0-b1] missing symbols with -inline

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17072 --- Comment #6 from github-bugzi...@puremagic.com --- Commits pushed to newCTFE at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/575e6d130d10410e3845a9df1ee2f7e13e84cd9a fix Issue 17072 - [REG 2.073.0-b1] missing symbols with

Re: Why is [0] @safer than array.ptr?

2017-01-24 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, January 24, 2017 11:50:16 Rene Zwanenburg via Digitalmars-d- learn wrote: > On Tuesday, 24 January 2017 at 11:38:16 UTC, Jonathan M Davis > > wrote: > > Likely because it does bounds checking, so you at least know > > that it's not null. But I don't see why that would really > >

[Issue 17066] [REG2.073a] std.regex captures got immutable

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17066 --- Comment #4 from github-bugzi...@puremagic.com --- Commits pushed to newCTFE at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/4d19d0ad3aab77a9a4a9b2dedaccbacfdeb4e45e Fix issue 17066

[Issue 16323] std.utf.decodeBack

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16323 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to newCTFE at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/944e7da50b80d916a2e0edd5b4f8d886de8b45b5 Fix issue #16323 - implement utf.encodeBack function

[Issue 16824] std.experimental.allocator.dispose leaks memory for arrays of more than 1 dimension

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16824 --- Comment #11 from github-bugzi...@puremagic.com --- Commits pushed to newCTFE at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/935d4ada9aeaaf5f105b75b84ca6ef72a053d962 Issue 16824 - std.experimental.allocator.dispose

[Issue 16278] [REG2.067] undefined reference when class template is instantiated only in 'is' expression

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16278 --- Comment #4 from github-bugzi...@puremagic.com --- Commits pushed to newCTFE at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/bdf0df926f90b9243932e2ff76f79de644224b26 Fix issue #16278 - Do not emit TypeInfo for speculative

[Issue 16736] Retrieving cUrl time values is quite cumbersome

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16736 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to newCTFE at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/1d6076760b1fe13a2b12c25a6361f99f087676d3 Fix Issue 16736 - fixed broken links

[Issue 16564] KRRegion.empty sometimes returns Ternary.no

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16564 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to newCTFE at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/8a69b104513d5f95e31be65b04a6502f559a95c0 fix issue 16564

[Issue 16697] Extend IsExpression to accept __vector as a TypeSpecialization

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16697 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to newCTFE at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/f298a8ca60fab15ac5a552f2818daf9724f2e0df Fix issue 16697 - Accept __vector as type specialization in

[Issue 17102] std.write.file generates a segmentation fault when the file name is a string with a default value

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17102 --- Comment #10 from github-bugzi...@puremagic.com --- Commits pushed to newCTFE at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/e80d3b5745e7875980f6c69a2c09cccb647fa9a6 Fix Issue 17102: std.write.file generates a

[Issue 17087] [REG2.072] Wrong generated with cfloat and creal when casting from int

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17087 --- Comment #6 from github-bugzi...@puremagic.com --- Commits pushed to newCTFE at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/7cf3c764da8b85f9d7054b0895384f3a86ce2684 fix Issue 17087 - [REG2.072] Wrong generated with cfloat and

Re: Why is [0] @safer than array.ptr?

2017-01-24 Thread Rene Zwanenburg via Digitalmars-d-learn
On Tuesday, 24 January 2017 at 11:38:16 UTC, Jonathan M Davis wrote: Likely because it does bounds checking, so you at least know that it's not null. But I don't see why that would really improve much considering that the odds are that you're really going to be accessing far more than just the

Re: Why is [0] @safer than array.ptr?

2017-01-24 Thread Atila Neves via Digitalmars-d-learn
On Tuesday, 24 January 2017 at 11:32:47 UTC, TheFlyingFiddle wrote: On Tuesday, 24 January 2017 at 11:28:17 UTC, Atila Neves wrote: void main() { foo; } void foo() @safe { int[] array; auto ptr = array.ptr; } foo.d(7): Deprecation: array.ptr cannot be used in @safe code, use [0]

Re: Safely moving structs in D

2017-01-24 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, January 23, 2017 22:26:58 bitwise via Digitalmars-d-learn wrote: > Is it ok to memcpy/memmove a struct in D? > > Quote from here: > https://dlang.org/spec/garbage.html > > "Do not have pointers in a struct instance that point back to the > same instance. The trouble with this is if the

Re: Why is [0] @safer than array.ptr?

2017-01-24 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, January 24, 2017 11:28:17 Atila Neves via Digitalmars-d-learn wrote: > void main() { > foo; > } > > void foo() @safe { > int[] array; > auto ptr = array.ptr; > } > > > foo.d(7): Deprecation: array.ptr cannot be used in @safe code, > use [0] instead > > > [0] is

Re: Why is [0] @safer than array.ptr?

2017-01-24 Thread TheFlyingFiddle via Digitalmars-d-learn
On Tuesday, 24 January 2017 at 11:28:17 UTC, Atila Neves wrote: void main() { foo; } void foo() @safe { int[] array; auto ptr = array.ptr; } foo.d(7): Deprecation: array.ptr cannot be used in @safe code, use [0] instead [0] is incredibly ugly and feels like an unnecessary

Re: Why is [0] @safer than array.ptr?

2017-01-24 Thread Stefan Koch via Digitalmars-d-learn
On Tuesday, 24 January 2017 at 11:28:17 UTC, Atila Neves wrote: void main() { foo; } void foo() @safe { int[] array; auto ptr = array.ptr; } foo.d(7): Deprecation: array.ptr cannot be used in @safe code, use [0] instead [0] is incredibly ugly and feels like an unnecessary

Why is [0] @safer than array.ptr?

2017-01-24 Thread Atila Neves via Digitalmars-d-learn
void main() { foo; } void foo() @safe { int[] array; auto ptr = array.ptr; } foo.d(7): Deprecation: array.ptr cannot be used in @safe code, use [0] instead [0] is incredibly ugly and feels like an unnecessary hack, and I'm wondering why it's @safe. Atila

Is it possible to "cache" results of compile-time executions between compiles?

2017-01-24 Thread TheFlyingFiddle via Digitalmars-d-learn
Context: I am currently writing a small library that compiles sql strings at compile-time and generates query objects. Something like this: unittest { mixin Sql!(q{ select feed.url, feed.title from users join user_feeds as feed on users.id = feed.user

[Issue 16631] Program crash when a version activates a method defined in a static library

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16631 b2.t...@gmx.com changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|---

Re: CTFE Status

2017-01-24 Thread Stefan Koch via Digitalmars-d
On Tuesday, 24 January 2017 at 10:34:58 UTC, Claude wrote: On Tuesday, 24 January 2017 at 09:52:13 UTC, Stefan Koch wrote: NEW CTFE IS GREEN ON 64 BIT! GREEN! I felt first a bit surprised about that "green" thing, but somehow if the new-ctfe engine consumes less CPU, it means it consumes

Re: CTFE Status

2017-01-24 Thread Claude via Digitalmars-d
On Tuesday, 24 January 2017 at 09:52:13 UTC, Stefan Koch wrote: NEW CTFE IS GREEN ON 64 BIT! GREEN! I felt first a bit surprised about that "green" thing, but somehow if the new-ctfe engine consumes less CPU, it means it consumes less power, and therefore less carbone dioxyde is released

[Issue 17117] erroneous "escaping reference to local variable"

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17117 John Colvin changed: What|Removed |Added Summary|auto ref "escaping |erroneous

[Issue 17117] auto ref "escaping reference to local variable"

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17117 John Colvin changed: What|Removed |Added CC|

[Issue 17118] New: [REG 2.074a] iasm64.d in test suite with with -g reveals a regression

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17118 Issue ID: 17118 Summary: [REG 2.074a] iasm64.d in test suite with with -g reveals a regression Product: D Version: D2 Hardware: x86_64 OS: Linux

Re: auto ref escaping local variable

2017-01-24 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, January 24, 2017 00:47:31 Ali Çehreli via Digitalmars-d wrote: > On 01/24/2017 12:12 AM, Patrick Schluter wrote: > > On Tuesday, 24 January 2017 at 06:51:40 UTC, Stefan Koch wrote: > >> On Tuesday, 24 January 2017 at 00:52:34 UTC, Robert burner Schadek > > wrote: > >>> I have this

Re: CTFE Status

2017-01-24 Thread Stefan Koch via Digitalmars-d
On Tuesday, 24 January 2017 at 09:27:52 UTC, John Colvin wrote: On Tuesday, 24 January 2017 at 06:35:56 UTC, Stefan Koch wrote: And the second one is the "to" template from std.conv; Because of the aforementioned UTF issues. NOTE: that the blacklist is by nature transitive meaning a function

Re: auto ref escaping local variable

2017-01-24 Thread Nordlöw via Digitalmars-d
On Tuesday, 24 January 2017 at 08:49:17 UTC, Ali Çehreli wrote: On 01/24/2017 12:47 AM, Ali Çehreli wrote: > Lvalues are passed by reference and rvalues are copied. I keep making that mistake! Despite the by-copy syntax, rvalues are moved. Ali Further note that you can use conditional

Re: CTFE Status

2017-01-24 Thread John Colvin via Digitalmars-d
On Tuesday, 24 January 2017 at 06:35:56 UTC, Stefan Koch wrote: And the second one is the "to" template from std.conv; Because of the aforementioned UTF issues. NOTE: that the blacklist is by nature transitive meaning a function that calls a blacklisted function will also not be interpreted

[Issue 15099] C++ projects depend on D projects?

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15099 --- Comment #6 from Manu --- Probably not, we should aim for feature parity and deprecate the old projects... --

[Issue 15506] VS2015 crash while debugging

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15506 --- Comment #3 from Manu --- I am disconnected from the code that caused the bug now :( --

Re: auto ref escaping local variable

2017-01-24 Thread Ali Çehreli via Digitalmars-d
On 01/24/2017 12:47 AM, Ali Çehreli wrote: > Lvalues are passed by reference and rvalues are copied. I keep making that mistake! Despite the by-copy syntax, rvalues are moved. Ali

Re: auto ref escaping local variable

2017-01-24 Thread Ali Çehreli via Digitalmars-d
On 01/24/2017 12:12 AM, Patrick Schluter wrote: > On Tuesday, 24 January 2017 at 06:51:40 UTC, Stefan Koch wrote: >> On Tuesday, 24 January 2017 at 00:52:34 UTC, Robert burner Schadek wrote: >>> I have this program that used to compile with 72 but with 73 dmd is >>> complaining that >>> "Error:

Re: auto ref escaping local variable

2017-01-24 Thread Patrick Schluter via Digitalmars-d
On Tuesday, 24 January 2017 at 06:51:40 UTC, Stefan Koch wrote: On Tuesday, 24 January 2017 at 00:52:34 UTC, Robert burner Schadek wrote: I have this program that used to compile with 72 but with 73 dmd is complaining that "Error: escaping reference to local variable t" auto ref f2(T)(auto

[Issue 15739] Can't inspect contents of a struct in an AA of structs

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15739 Rainer Schuetze changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 16063] DLL projects seem to ignore DllMain, won't link

2017-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16063 Rainer Schuetze changed: What|Removed |Added Status|NEW |RESOLVED

  1   2   >