[Issue 15606] core.exception.rangeerror@pipedmd(285) range violation

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

[Issue 15506] VS2015 crash while debugging

2017-01-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15506 Rainer Schuetze changed: What|Removed |Added CC||r.sagita...@gmx.de

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

2017-01-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15099 --- Comment #5 from Rainer Schuetze --- This should work when building the library using a VC project. Implementing this for Visual D projects would mean patching VC *.target files, not sure if it is worth it... --

[Issue 14558] Attempts to link with DMD when using MSVC LDC under VisualD

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

[Issue 13915] Mago doesn't handle C code very well

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

[Issue 13888] VisualD project settings use the same property grid as C/C++ projects?

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

[Issue 12565] IDE cannot launch Mago debugger starting from v0.3.38-beta3

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

Re: auto ref escaping local variable

2017-01-23 Thread Stefan Koch via Digitalmars-d
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 ref T t, auto ref T s) { return t; } auto ref f1(T)(auto

Re: CTFE Status

2017-01-23 Thread Stefan Koch via Digitalmars-d
The blacklisted functions are now down to only two. Those are the bitswap function in druntime. Because the interpreter does handle all values as 64bit internally it tends to miscompile code that uses xor on 32bit values. And the second one is the "to" template from std.conv; Because of the

[Issue 17114] DMD 2.073.0 Error: undefined identifier '_arrayExpComSliceAndass_k' in module 'app'

2017-01-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17114 Paul Crane changed: What|Removed |Added Status|NEW |RESOLVED

Re: Safely moving structs in D

2017-01-23 Thread bitwise via Digitalmars-d-learn
On Monday, 23 January 2017 at 23:04:45 UTC, Ali Çehreli wrote: On 01/23/2017 02:58 PM, bitwise wrote: I'm confused about what the rules would be here. It would make sense to call the postblit if present, but std.Array currently does not:

Re: CTFE Status

2017-01-23 Thread Stefan Koch via Digitalmars-d
On Monday, 23 January 2017 at 22:09:27 UTC, David Nadlinger wrote: On Monday, 23 January 2017 at 17:42:00 UTC, Stefan Koch wrote: interpret3.d passes!!! The only remaining issues that cause miscompiled code are UTF(8/16/32) encoding and decoding issues. Is that without bailing out? — 

Re: auto ref escaping local variable

2017-01-23 Thread Robert burner Schadek via Digitalmars-d
Nice idea, but didn't work either. Just got more errors. And my eyes hurt now.

[Issue 11320] std.math.fmod, round, trunc are not yet pure

2017-01-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11320 Ryan changed: What|Removed |Added CC|

Re: auto ref escaping local variable

2017-01-23 Thread Manu via Digitalmars-d
On 24 January 2017 at 10:52, Robert burner Schadek via Digitalmars-d < digitalmars-d@puremagic.com> 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 ref T t, auto ref T s) { >

auto ref escaping local variable

2017-01-23 Thread Robert burner Schadek via Digitalmars-d
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 ref T t, auto ref T s) { return t; } auto ref f1(T)(auto ref T t, auto ref T s) { return f2(t, s); } unittest { int

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

2017-01-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17117 Issue ID: 17117 Summary: auto ref "escaping reference to local variable" Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement

Re: General performance tips

2017-01-23 Thread kinke via Digitalmars-d-learn
On Monday, 23 January 2017 at 12:13:30 UTC, albert-j wrote: There's not much object creation going on there, mostly loops over arrays, so I assume GC is not an issue. When passing arrays around, beware that static arrays are value types in D and are copied unless passed by reference.

Re: Output range and writeln style functions

2017-01-23 Thread Jon Degenhardt via Digitalmars-d-learn
On Monday, 23 January 2017 at 22:20:59 UTC, Ali Çehreli wrote: On 01/23/2017 12:48 PM, Jon Degenhardt wrote: [snip] > So, what I'm really wondering is if there is built-in way to get closer to: outputStream.writefln(...); If it's about formatted output then perhaps formattedWrite?

Re: Writing a JFlex lexer for D - have an issue with cycles

2017-01-23 Thread Profile Anaysis via Digitalmars-d
On Monday, 23 January 2017 at 01:46:58 UTC, FatalCatharsis wrote: On Monday, 23 January 2017 at 00:46:30 UTC, Profile Anaysis wrote: The real issue is ambiguity. Any time you have a cycle you must be able to get out of it and so your rules must be organized so that one always checks to see if

Re: Safely moving structs in D

2017-01-23 Thread Ali Çehreli via Digitalmars-d-learn
On 01/23/2017 02:58 PM, bitwise wrote: I'm confused about what the rules would be here. It would make sense to call the postblit if present, but std.Array currently does not: https://github.com/dlang/phobos/blob/04cca5c85ddf2be25381fc63c3e941498b17541b/std/container/array.d#L884 Post-blit is

Re: Safely moving structs in D

2017-01-23 Thread sarn via Digitalmars-d-learn
On Monday, 23 January 2017 at 22:26:58 UTC, bitwise 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 instance gets moved in

Re: Safely moving structs in D

2017-01-23 Thread bitwise via Digitalmars-d-learn
I'm confused about what the rules would be here. It would make sense to call the postblit if present, but std.Array currently does not: https://github.com/dlang/phobos/blob/04cca5c85ddf2be25381fc63c3e941498b17541b/std/container/array.d#L884

[Issue 5467] library-based typedef

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

Re: General performance tips

2017-01-23 Thread sarn via Digitalmars-d-learn
On Monday, 23 January 2017 at 12:13:30 UTC, albert-j wrote: Well it is actually ODE solver from Numerical recipes (originally in C++) that I am trying to do in D. Code translation seems very straightforward. Maybe there's someone around who has done that already? There's not much object

Re: High-level wrapper for GNU MP (GMP)

2017-01-23 Thread Nordlöw via Digitalmars-d-announce
On Monday, 23 January 2017 at 22:37:50 UTC, Nordlöw wrote: See README.md for more details. Moved todo-list to TODO.md and cleaned up README.md at https://github.com/nordlow/gmp-d

High-level wrapper for GNU MP (GMP)

2017-01-23 Thread Nordlöw via Digitalmars-d-announce
Version 0.0.1 is out http://code.dlang.org/packages/gmp-d Only mpz_t is currently wrapped (in MpZ). See README.md for more details.

Safely moving structs in D

2017-01-23 Thread bitwise via Digitalmars-d-learn
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 instance gets moved in memory, the pointer will point back to where it came from,

[Issue 10666] Appender does not work with a RefCounted type

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

Re: Output range and writeln style functions

2017-01-23 Thread Ali Çehreli via Digitalmars-d-learn
On 01/23/2017 12:48 PM, Jon Degenhardt wrote: On Monday, 23 January 2017 at 08:03:14 UTC, Ali Çehreli wrote: On 01/22/2017 01:54 PM, Jon Degenhardt wrote: I've been increasingly using output ranges in my code (the "component programming" model described in several articles on the D site). It

Re: LDC talk @ FOSDEM'17

2017-01-23 Thread David Nadlinger via Digitalmars-d-announce
On Monday, 23 January 2017 at 19:56:33 UTC, Johan Engelen wrote: Great! :-) Keep me in the loop when preparing your slides! ;-) Glad to help out in any way as well. I might also make it to FOSDEM myself this year, but that's not quite sure yet. — David

Re: CTFE Status

2017-01-23 Thread David Nadlinger via Digitalmars-d
On Monday, 23 January 2017 at 17:42:00 UTC, Stefan Koch wrote: interpret3.d passes!!! The only remaining issues that cause miscompiled code are UTF(8/16/32) encoding and decoding issues. Is that without bailing out? — David

[Issue 8812] functionAttributes doesn't returns const/immutable/shraed/inout attributs

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

Re: CTFE Status

2017-01-23 Thread Daniel Kozák via Digitalmars-d
V Mon, 23 Jan 2017 17:42:00 + Stefan Koch via Digitalmars-d napsáno: > interpret3.d passes!!! > > The only remaining issues that cause miscompiled code are > UTF(8/16/32) encoding and decoding issues. WOW

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

2017-01-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17116 b2.t...@gmx.com changed: What|Removed |Added Status|NEW |ASSIGNED Severity|minor

Re: Output range and writeln style functions

2017-01-23 Thread Jon Degenhardt via Digitalmars-d-learn
On Monday, 23 January 2017 at 08:03:14 UTC, Ali Çehreli wrote: On 01/22/2017 01:54 PM, Jon Degenhardt wrote: I've been increasingly using output ranges in my code (the "component programming" model described in several articles on the D site). It works very well, except that it would often be

Re: CTFE Status

2017-01-23 Thread Dmitry Olshansky via Digitalmars-d
On 1/23/17 6:42 PM, Stefan Koch wrote: interpret3.d passes!!! Now that's something! The only remaining issues that cause miscompiled code are UTF(8/16/32) encoding and decoding issues. --- Dmitry Olshansky

Re: CTFE Status

2017-01-23 Thread Nordlöw via Digitalmars-d
On Monday, 23 January 2017 at 17:42:00 UTC, Stefan Koch wrote: interpret3.d passes!!! The only remaining issues that cause miscompiled code are UTF(8/16/32) encoding and decoding issues. Wow! Getting close know!

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

2017-01-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17116 Issue ID: 17116 Summary: std.typecons.ReplaceType is not able to process const delegate Product: D Version: D2 Hardware: All OS: All Status: NEW

Re: LDC talk @ FOSDEM'17

2017-01-23 Thread Johan Engelen via Digitalmars-d-announce
On Saturday, 21 January 2017 at 12:37:26 UTC, Kai Nacke wrote: Hi everybody! Last year turned out to be difficult for D development for me. I try to come back this year. Great! :-) Keep me in the loop when preparing your slides! ;-) cheers, Johan

[Issue 14964] __traits(isAlias, foo)

2017-01-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14964 b2.t...@gmx.com changed: What|Removed |Added CC||b2.t...@gmx.com --- Comment #5 from

Re: Gui in D: I miss this project

2017-01-23 Thread Nick Sabalausky via Digitalmars-d
On 01/16/2017 02:39 AM, Jacob Carlborg wrote: On 2017-01-09 22:41, aberba wrote: This seemed to be an effort (among others) to bring GUI cross platform to standard D but some language/compiler/Phobos/Deimos/manpower issues were the drag. https://github.com/Devisualization We now have

Re: module std.stream is deprecated - Will be removed by phobos version 2.070

2017-01-23 Thread jmh530 via Digitalmars-d
On Monday, 23 January 2017 at 17:39:00 UTC, ixid wrote: Speaking of killing things with fire (OT) - what's happening with the comma operator? I want delicious tuples like Go. They were deprecated in 2.072.0. http://dlang.org/changelog/2.072.0.html#deprecated_commaexp

Re: module std.stream is deprecated - Will be removed by phobos version 2.070

2017-01-23 Thread Suliman via Digitalmars-d
On Monday, 23 January 2017 at 17:39:00 UTC, ixid wrote: On Friday, 11 September 2015 at 21:16:06 UTC, Brian Schott wrote: On Friday, 11 September 2015 at 20:29:56 UTC, Vladimir Panteleev wrote: Apparently it was decided at DConf 2015 to remove std.stream and friends from Phobos. Kill it with

Re: Multiple return type or callback function

2017-01-23 Thread Basile B. via Digitalmars-d-learn
On Monday, 23 January 2017 at 15:15:35 UTC, aberba wrote: I'm creating a function to authenticate user login. I want to determine login failure (Boolean) and error message (will be sent to frontend) but D does have multiple return type [...] Yes, MRV can be done with a tuple auto foo() {

Re: CTFE Status

2017-01-23 Thread Stefan Koch via Digitalmars-d
interpret3.d passes!!! The only remaining issues that cause miscompiled code are UTF(8/16/32) encoding and decoding issues.

Re: module std.stream is deprecated - Will be removed by phobos version 2.070

2017-01-23 Thread ixid via Digitalmars-d
On Friday, 11 September 2015 at 21:16:06 UTC, Brian Schott wrote: On Friday, 11 September 2015 at 20:29:56 UTC, Vladimir Panteleev wrote: Apparently it was decided at DConf 2015 to remove std.stream and friends from Phobos. Kill it with fire. Speaking of killing things with fire (OT) -

Re: module std.stream is deprecated - Will be removed by phobos version 2.070

2017-01-23 Thread Patrick Schluter via Digitalmars-d
On Sunday, 1 May 2016 at 17:06:19 UTC, Seb wrote: On Sunday, 1 May 2016 at 14:31:10 UTC, Bauss wrote: On Friday, 11 September 2015 at 20:29:56 UTC, Vladimir Panteleev wrote: https://github.com/D-Programming-Language/phobos/pull/3631 Apparently it was decided at DConf 2015 to remove std.stream

Re: SmartRef: The Smart Pointer In D

2017-01-23 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Saturday, 14 January 2017 at 15:41:01 UTC, Dmitry Olshansky wrote: That is C++ smart_ptr has to be atomic, while its D counter part may safely be non-atomic because everything is TLS be default. I assume you mean std::shared_ptr. The reference counting semantics are atomic, but the I

Re: Multiple return type or callback function

2017-01-23 Thread pineapple via Digitalmars-d-learn
On Monday, 23 January 2017 at 15:15:35 UTC, aberba wrote: I'm creating a function to authenticate user login. I want to determine login failure (Boolean) and error message (will be sent to frontend) but D does have multiple return type (IMO could use struct but will make code dirty with too

Re: Gui in D: I miss this project

2017-01-23 Thread Ola Fosheim Grøstad via Digitalmars-d
On Thursday, 19 January 2017 at 07:39:10 UTC, Jacob Carlborg wrote: If I'm looking for a new type of application I'll dismiss those that don't look native very quickly. Unless I know beforehand that the application is very good, then I'll give it some more time. I think it has more to do

Re: Compile to C?

2017-01-23 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Monday, 23 January 2017 at 15:24:09 UTC, aberba wrote: Unless you will be limited by tge limitations of C. Vala programming language has that issue even though they utilize GObject What limitations? C/C++ programs go around "limitations" by using compiler extensions and runtime libraries.

Re: Compile to C?

2017-01-23 Thread aberba via Digitalmars-d-learn
On Monday, 23 January 2017 at 14:40:18 UTC, Ola Fosheim Grøstad wrote: On Saturday, 21 January 2017 at 19:30:31 UTC, Jack Stouffer wrote: On Saturday, 21 January 2017 at 18:38:22 UTC, Nestor wrote: Hi friends, Is there a way to "compile" d code to C, similar to what nim does? That would be

Multiple return type or callback function

2017-01-23 Thread aberba via Digitalmars-d-learn
I'm creating a function to authenticate user login. I want to determine login failure (Boolean) and error message (will be sent to frontend) but D does have multiple return type (IMO could use struct but will make code dirty with too much custom types). struct Result { bool success =

Re: Compile to C?

2017-01-23 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Monday, 23 January 2017 at 14:53:54 UTC, Bauss wrote: I'd guess the code generation you'd get from doing so with D would be absolute horrific to read, because you'll get rid of CTFE, templates, proper class structure, globals properly stored, since everything in D is TLS and C doesn't then

Re: Compile to C?

2017-01-23 Thread Bauss via Digitalmars-d-learn
On Saturday, 21 January 2017 at 18:38:22 UTC, Nestor wrote: Hi friends, Is there a way to "compile" d code to C, similar to what nim does? That would be cool for greater portability. Nim is able to, because Nim doesn't really compile. The Nim compiler just translates Nim code to C code

Re: Compile to C?

2017-01-23 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Saturday, 21 January 2017 at 19:30:31 UTC, Jack Stouffer wrote: On Saturday, 21 January 2017 at 18:38:22 UTC, Nestor wrote: Hi friends, Is there a way to "compile" d code to C, similar to what nim does? That would be cool for greater portability. No, and this is actually a terrible

[Issue 9290] Ability to modify immutable struct members in static array assignment

2017-01-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9290 Martin Krejcirik changed: What|Removed |Added CC||m...@krej.cz --

Re: A safer File.readln

2017-01-23 Thread Shachar Shemesh via Digitalmars-d
On 23/01/17 15:18, 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 a little higher, but see

Re: Confirming and uninstantiated struct

2017-01-23 Thread Mike Parker via Digitalmars-d-learn
On Monday, 23 January 2017 at 13:57:23 UTC, aberba wrote: if (stu is Student.init) //will confirm when i get to my pc That works, as does this: if(stu == Student.init)

Re: A safer File.readln

2017-01-23 Thread Shachar Shemesh via Digitalmars-d
On 23/01/17 15:18, 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 a little higher, but see

Re: Confirming and uninstantiated struct

2017-01-23 Thread rikki cattermole via Digitalmars-d-learn
Structs are a value type and will always have a type that won't be null. If you want it to be nullable you will have to use pointers or classes (there is also Nullable in std.typecons but it won't work with is null). s/have a type that won't be null/have a value that won't be null/ My bad.

Re: Confirming and uninstantiated struct

2017-01-23 Thread rikki cattermole via Digitalmars-d-learn
On 24/01/2017 2:57 AM, aberba wrote: How do I verify this struct has no value Student getStudent() { ... Student s; if(condition) s = Student; return s; } auto stu = getStudent(); //which will work and is best? if (stu is null) //doesn't wrk. if (stu is Student.init) //will

Confirming and uninstantiated struct

2017-01-23 Thread aberba via Digitalmars-d-learn
How do I verify this struct has no value Student getStudent() { ... Student s; if(condition) s = Student; return s; } auto stu = getStudent(); //which will work and is best? if (stu is null) //doesn't wrk. if (stu is Student.init) //will confirm when i get to my pc Or how

[Issue 17115] New: [404 Not Found] std.concurrencybase

2017-01-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17115 Issue ID: 17115 Summary: [404 Not Found] std.concurrencybase Product: D Version: D2 Hardware: x86_64 URL: http://dlang.org/ OS: Linux Status: NEW

Re: Lets talk about fibers

2017-01-23 Thread Ola Fosheim Grøstad via Digitalmars-d
On Sunday, 8 January 2017 at 09:18:19 UTC, Suliman wrote: Simply picking a worker thread + worker fiber when task is assigned and sticking to it until finished should work good enough. It is also important to note though that "fiber" is not the same as "task". Former is execution context

Re: A safer File.readln

2017-01-23 Thread Andrei Alexandrescu via Digitalmars-d
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 a little higher, but see the trade off). On the other hand, we can now

Re: General performance tips

2017-01-23 Thread albert-j via Digitalmars-d-learn
Without seeing the source there is nothing we can do. Usually performant d-code looks quite diffrent from java code. For example to avoid the gc :) Well it is actually ODE solver from Numerical recipes (originally in C++) that I am trying to do in D. Code translation seems very

Re: A safer File.readln

2017-01-23 Thread Markus Laker via Digitalmars-d
On Monday, 23 January 2017 at 11:30:35 UTC, Shachar Shemesh wrote: It is possible to tweak the numbers based on the overall use. For example, add 100% for arrays smaller than 1MB, 50% for 1MB - 100MB, and 20% for arrays above 100MB big. This would eliminate the performance degradation for

Re: A safer File.readln

2017-01-23 Thread Shachar Shemesh via Digitalmars-d
One more thing. It is possible to tweak the numbers based on the overall use. For example, add 100% for arrays smaller than 1MB, 50% for 1MB - 100MB, and 20% for arrays above 100MB big. This would eliminate the performance degradation for almost all users. Shachar On 23/01/17 12:44,

Re: A safer File.readln

2017-01-23 Thread Shachar Shemesh via Digitalmars-d
On 23/01/17 13:05, Markus Laker wrote: On Monday, 23 January 2017 at 10:44:50 UTC, Shachar Shemesh wrote: Of course, if, instead of 50% we increase by less (say, 20%), we could reuse previously used memory even sooner. Yes, you're right, of course: expansion of strings and other arrays is a

Re: General performance tips

2017-01-23 Thread Stefan Koch via Digitalmars-d-learn
On Monday, 23 January 2017 at 11:11:21 UTC, albert-j wrote: I have translated some simulation code from Java into D (a few classes, mostly manipulation of double arrays in small methods). D version runs 10-30% slower than Java (ldc2, dub release build). Profiling did not show any obvious

General performance tips

2017-01-23 Thread albert-j via Digitalmars-d-learn
I have translated some simulation code from Java into D (a few classes, mostly manipulation of double arrays in small methods). D version runs 10-30% slower than Java (ldc2, dub release build). Profiling did not show any obvious bottlenecks. I am wondering whether I missed something, or such

[Issue 14964] __traits(isAlias, foo)

2017-01-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14964 --- Comment #4 from Mike Parker --- (In reply to Mike Parker from comment #3) > Not at all. allMembers returns FuncPtr and funcPtr as distinct symbols. What > I'm looking for is a generic way to know that one is an alias

[Issue 14964] __traits(isAlias, foo)

2017-01-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14964 --- Comment #3 from Mike Parker --- Not at all. allMembers returns FuncPtr and funcPtr as distinct symbols. What I'm looking for is a generic way to know that one is an alias declaration and the other is not. --

Re: A safer File.readln

2017-01-23 Thread Markus Laker via Digitalmars-d
On Monday, 23 January 2017 at 10:44:50 UTC, Shachar Shemesh wrote: Of course, if, instead of 50% we increase by less (say, 20%), we could reuse previously used memory even sooner. Yes, you're right, of course: expansion of strings and other arrays is a classic time-versus-space trade-off.

Re: Need a std::numeric_limits::lowest() equivalent

2017-01-23 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Saturday, 21 January 2017 at 15:55:35 UTC, Xavier Bigand wrote: I don't see any other use case than for initialized maths struct to an invalid state, and because it is generally in template that working with integers and floats it is easier to have same properties (when it have the same

Re: CTFE Status

2017-01-23 Thread Stefan Koch via Digitalmars-d
On Monday, 23 January 2017 at 09:06:49 UTC, Nordlöw wrote: Good job. There are more good news uint fn() { uint x = 7; modx(); return x; } void modx(uint* x) { *x = 12; } static assert(fn() == 12); This code does now compile with newCTFE :)

Re: A safer File.readln

2017-01-23 Thread Shachar Shemesh via Digitalmars-d
On 23/01/17 11:15, Markus Laker wrote: A 2GiB disk file caused tinycat.d to use over 4GiB of memory. When extending arrays, a common approach is to double the size every time you run out of space. This guarantees an amortized O(1) cost of append. Unfortunately, this also guarantees that

[Issue 14964] __traits(isAlias, foo)

2017-01-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14964 Mathias Lang changed: What|Removed |Added CC|

Re: A safer File.readln

2017-01-23 Thread Markus Laker via Digitalmars-d
On Monday, 23 January 2017 at 01:55:59 UTC, Andrei Alexandrescu wrote: I recall reported size for special files is zero. We special case std.file.read for those. -- Andrei Special files are a bit of a distraction, in any case, because it's easy to create a large disk file full of zeroes:

Re: CTFE Status

2017-01-23 Thread Nordlöw via Digitalmars-d
On Monday, 23 January 2017 at 07:57:35 UTC, Stefan Koch wrote: It was very hard to find this. Good job.

Re: Iup4D 1.0 alpha

2017-01-23 Thread Andrea Fontana via Digitalmars-d-announce
On Friday, 20 January 2017 at 15:23:51 UTC, Heromyth wrote: Iup4D is a D binding library for IUP with OOP style. Its API is similar to WinForms. This software is licensed under the Boost Software License, Version 1.0. It's still under active development and is only tested on Windows X86.

[Issue 11703] Typedef properties should not be of the original type

2017-01-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11703 b2.t...@gmx.com changed: What|Removed |Added CC||b2.t...@gmx.com

[Issue 17114] New: DMD 2.073.0 Error: undefined identifier '_arrayExpComSliceAndass_k' in module 'app'

2017-01-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17114 Issue ID: 17114 Summary: DMD 2.073.0 Error: undefined identifier '_arrayExpComSliceAndass_k' in module 'app' Product: D Version: D2 Hardware: x86_64 OS: Linux

Re: Output range and writeln style functions

2017-01-23 Thread Ali Çehreli via Digitalmars-d-learn
On 01/22/2017 01:54 PM, Jon Degenhardt wrote: I've been increasingly using output ranges in my code (the "component programming" model described in several articles on the D site). It works very well, except that it would often be more convenient to use writeln style functions rather than 'put'.

Re: CTFE Status

2017-01-23 Thread Stefan Koch via Digitalmars-d
I just fixed a bug related to the unsupported floating point. ~master phobos compiles again and runs the unit-tests. I will probably have to spent the rest of the month with fixing bugs that function-call support has uncovered. Since now newCTFE sees much more code before bailing out. I have