Re: I close BIP27. I won't be pursuing BIPs anymore

2016-10-16 Thread Walter Bright via Digitalmars-d
On 10/16/2016 3:17 PM, deadalnix wrote: Long story short, it si clearly a waste of time. Qualifying the process would be an understatement. Some specifically DIP27 has been written in Feb 2913, following various discussion at that time. I pushed it at the time. I moved it to the new git DIP

Re: Speed of synchronized

2016-10-16 Thread Daniel Kozak via Digitalmars-d-learn
Dne 16.10.2016 v 10:41 Christian Köstlin via Digitalmars-d-learn napsal(a): My question now is, why is each mutex based thread safe variant so slow compared to a similar java program? The only hint could be something like:

Re: [OT] Re: UDA and trait for non-GC managed pointers

2016-10-16 Thread Nick Sabalausky via Digitalmars-d
On 10/15/2016 02:50 PM, Basile B. wrote: I've given up with the idea of proposing my stuff in phobos. About memory there would also have be: - allocators-based factory (https://github.com/dlang/phobos/pull/4062) - @nogc dispose (https://github.com/dlang/phobos/pull/4351) But each time the PR

Re: Advanced const propagation for structs

2016-10-16 Thread Dicebot via Digitalmars-d
On 10/17/2016 12:57 AM, Timon Gehr wrote: > On 16.10.2016 14:18, Dicebot wrote: >> This issue has been discussed before in context of custom containers and >> AFAIK so far no one was able to come up with even theoretical concept of >> how it can be possibly addressed. > > Actually, I did propose

Re: [GSoC] Precise GC

2016-10-16 Thread Dsby via Digitalmars-d-announce
On Friday, 14 October 2016 at 03:26:31 UTC, FrankLike wrote: On Friday, 2 September 2016 at 03:25:33 UTC, Jeremy DeHaan wrote: Hi everyone, I know I'm super late to the party for this, and sorry for that. While my work on the precise GC didn't go as planned, it is closer than it was to be

Re: I close BIP27. I won't be pursuing BIPs anymore

2016-10-16 Thread deadalnix via Digitalmars-d
On Monday, 17 October 2016 at 02:08:44 UTC, Dicebot wrote: Listen, I understand you are not interested in spending loads of time on boring polishing of formalities. We all do this in our spare time so that is to be expected. I spent fuck 4;5 years on that thing. Don't come at me saying I'm

[Issue 16619] New: Visual D: link dependency file does not exist - always prompted to rebuild

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16619 Issue ID: 16619 Summary: Visual D: link dependency file does not exist - always prompted to rebuild Product: D Version: D2 Hardware: x86_64 OS: Windows

Re: I close BIP27. I won't be pursuing BIPs anymore

2016-10-16 Thread Dicebot via Digitalmars-d
Listen, I understand you are not interested in spending loads of time on boring polishing of formalities. We all do this in our spare time so that is to be expected. But what you say here only shows that process is working as intended - and that it is not suitable for you. Quote from readme:

Re: Render SVG To Display And Update Periodically

2016-10-16 Thread rikki cattermole via Digitalmars-d-learn
On 17/10/2016 2:20 PM, Jason C. Wells wrote: I have in mind a project to render instruments (speed, pressure, position) to a screen using SVG. I am able to produce the SVG easily enough. What I am looking for is a library/canvas/toolkit that I can use in D inside of a loop and update the

Re: Is this should work?

2016-10-16 Thread Ali Çehreli via Digitalmars-d-learn
On 10/16/2016 03:22 PM, markov wrote: void test(string line){ ... }; void main(){ string[] list; foreach (line; list) new Thread({test(line);}).start(); ... } It works in an unexpected way: In D, all those threads would close over the same 'line' loop variable, which happens to

Render SVG To Display And Update Periodically

2016-10-16 Thread Jason C. Wells via Digitalmars-d-learn
I have in mind a project to render instruments (speed, pressure, position) to a screen using SVG. I am able to produce the SVG easily enough. What I am looking for is a library/canvas/toolkit that I can use in D inside of a loop and update the instrument readouts. This whole project is a

Re: Tuple enhancement

2016-10-16 Thread Kapps via Digitalmars-d
On Sunday, 16 October 2016 at 18:51:06 UTC, Sebastiaan Koppe wrote: On Sunday, 16 October 2016 at 13:58:51 UTC, Andrei Alexandrescu wrote: I was thinking it would be handy if tuples had a way to access a field by name at runtime. E.g.: Tuple!(int, "a", double, "b") t; string x = condition ?

Re: Battle-plan for CTFE

2016-10-16 Thread Uplink_Coder via Digitalmars-d-announce
On Sunday, 16 October 2016 at 13:51:55 UTC, Uplink_Coder wrote: On Sunday, 16 October 2016 at 10:58:57 UTC, Dmitry Olshansky wrote: That LLVM thing is surely nice to have but I highly doubt it will be allowed as dependency for DMD. --- Dmitry Olshansky LLVM is purely optional. A pure D

Re: I close BIP27. I won't be pursuing BIPs anymore

2016-10-16 Thread Nick Sabalausky via Digitalmars-d
On Sunday, 16 October 2016 at 22:17:15 UTC, deadalnix wrote: Long story short, it si clearly a waste of time. Qualifying the process would be an understatement. Some specifically DIP27 has been written in Feb 2913, following various discussion at that time. I pushed it at the time. I moved

Re: Tuple enhancement

2016-10-16 Thread Temtaime via Digitalmars-d
On Sunday, 16 October 2016 at 20:11:01 UTC, Chris Wright wrote: On Sun, 16 Oct 2016 18:51:06 +, Sebastiaan Koppe wrote: On Sunday, 16 October 2016 at 13:58:51 UTC, Andrei Alexandrescu wrote: I was thinking it would be handy if tuples had a way to access a field by name at runtime. E.g.:

Re: Tuple enhancement

2016-10-16 Thread sarn via Digitalmars-d
On Sunday, 16 October 2016 at 13:58:51 UTC, Andrei Alexandrescu wrote: I was thinking it would be handy if tuples had a way to access a field by name at runtime. E.g.: Tuple!(int, "a", double, "b") t; string x = condition ? "a" : "b"; double v = t.get!string(x, 3.14); The get method takes the

Re: Cannot link with libphobos2.a with GCC 6.2 on Ubuntu 16.10

2016-10-16 Thread Nordlöw via Digitalmars-d-learn
On Sunday, 16 October 2016 at 22:00:48 UTC, Nordlöw wrote: Which flag(s) in `src/posix.mak` did you change? Does make -f posix.mak MODEL_FLAG=-fPIC work? I'm sitting on a 16.04 system right now (which I don't dare to upgrade until this is fixed) so I'm just guessing.

Is this should work?

2016-10-16 Thread markov via Digitalmars-d-learn
void test(string line){ ... }; void main(){ string[] list; foreach (line; list) new Thread({test(line);}).start(); ... }

I close BIP27. I won't be pursuing BIPs anymore

2016-10-16 Thread deadalnix via Digitalmars-d
Long story short, it si clearly a waste of time. Qualifying the process would be an understatement. Some specifically DIP27 has been written in Feb 2913, following various discussion at that time. I pushed it at the time. I moved it to the new git DIP repository. Got mostly irrelevant

Re: Advanced const propagation for structs

2016-10-16 Thread Timon Gehr via Digitalmars-d
On 16.10.2016 14:18, Dicebot wrote: This issue has been discussed before in context of custom containers and AFAIK so far no one was able to come up with even theoretical concept of how it can be possibly addressed. Actually, I did propose a solution before. Just allow annotations on template

Re: Cannot link with libphobos2.a with GCC 6.2 on Ubuntu 16.10

2016-10-16 Thread Nordlöw via Digitalmars-d-learn
On Sunday, 16 October 2016 at 20:01:21 UTC, tcak wrote: Hmm. As the error message says, I compiled the program by adding "-fPIC", it really has stopped giving error messages. That came to me weird. Which flag(s) in `src/posix.mak` did you change?

[Issue 5901] std.random.normal(), std.random.fastNormal()

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5901 greenify changed: What|Removed |Added CC||greeen...@gmail.com

Re: Examples Wanted: Usages of "body" as a Symbol Name

2016-10-16 Thread Chris Wright via Digitalmars-d
On Wed, 05 Oct 2016 02:11:14 +, Meta wrote: > I'm currently writing up a DIP to propose removing `body` as a keyword > to allow it to be used for variable names, functions, etc. I'm looking > for examples and contexts where `body` would normally be used as a > variable, function name, alias,

Re: Tuple enhancement

2016-10-16 Thread Chris Wright via Digitalmars-d
On Sun, 16 Oct 2016 18:51:06 +, Sebastiaan Koppe wrote: > On Sunday, 16 October 2016 at 13:58:51 UTC, Andrei Alexandrescu wrote: >> I was thinking it would be handy if tuples had a way to access a field >> by name at runtime. E.g.: >> >> Tuple!(int, "a", double, "b") t; >> string x =

[Issue 16484] regression(2.064) Overloaded empty funcs trigger AssertError: "Called `get' on null Nullable"

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16484 --- Comment #7 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/daf387f065d4914cc868deb584ee8b6fb53774a5 add comment in reponse to Issue 16484

[Issue 16484] regression(2.064) Overloaded empty funcs trigger AssertError: "Called `get' on null Nullable"

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16484 Martin Nowak changed: What|Removed |Added CC||c...@dawg.eu --- Comment #6

Re: Battle-plan for CTFE

2016-10-16 Thread Dmitry Olshansky via Digitalmars-d-announce
On 10/16/16 2:27 AM, Uplink_Coder wrote: On Wednesday, 5 October 2016 at 08:34:06 UTC, Rory McGuire wrote: No worries, I've been watching this space for over a decade. I really believe you are working on one of the most important parts of IT for the next decade. I am planning/making a library

[Issue 16617] New: toHash can not be a template method

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16617 Issue ID: 16617 Summary: toHash can not be a template method Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority:

[Issue 16609] std.experimental.ndslice.slice issues warnings when building Phobos

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16609 Илья Ярошенко changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 16616] Advanced const propagation for structs

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16616 --- Comment #1 from Илья Ярошенко --- Fixing this issue will allow also significantly reduce template bloat for generic code. --

[Issue 16419] issue with ndslice.slice toHash

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16419 Илья Ярошенко changed: What|Removed |Added CC|

[Issue 16419] issue with ndslice.slice toHash

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16419 Илья Ярошенко changed: What|Removed |Added Hardware|x86 |All --

Re: [Semi OT] - "Garbage In, Garbage Out: Arguing about Undefined Behavior..."

2016-10-16 Thread Guillaume Chatelet via Digitalmars-d
On Saturday, 15 October 2016 at 00:11:35 UTC, deadalnix wrote: On Thursday, 13 October 2016 at 15:19:17 UTC, Guillaume Chatelet wrote: Pretty cool talk by Chandler Carruth on undefined behavior. It reminds me of a bunch of conversations than happened on this mailing list. I bet Walter will

Re: Reducing the cost of autodecoding

2016-10-16 Thread Patrick Schluter via Digitalmars-d
On Sunday, 16 October 2016 at 08:43:23 UTC, Uplink_Coder wrote: On Sunday, 16 October 2016 at 07:59:16 UTC, Patrick Schluter wrote: This looks quite slow. We already have a correct version in utf.decodeImpl. The goal here was to find a small and fast alternative. I know but it has to be

Re: Building DMD with DMD or LDC

2016-10-16 Thread Johan Engelen via Digitalmars-d-learn
On Saturday, 15 October 2016 at 07:39:31 UTC, ketmar wrote: On Friday, 14 October 2016 at 15:13:58 UTC, Jonathan M Davis wrote: On Thursday, October 13, 2016 19:07:44 Nordlöw via Digitalmars-d-learn wrote: Is there a large speed difference in compilation time depending on whether the DMD used

[Issue 16609] std.experimental.ndslice.slice issues warnings when building Phobos

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16609 --- Comment #1 from Walter Bright --- https://github.com/dlang/phobos/blame/master/std/experimental/ndslice/slice.d#L1926 --

[Issue 15862] Functions that return types with mutable indirections should be weakly pure, not strongly pure

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15862 ZombineDev changed: What|Removed |Added CC|

[Issue 16582] [REG2.072.0-b1] ParamterDefaultValueTuple fails to compile for scope paramters

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16582 --- Comment #3 from Sönke Ludwig --- But still a regression in 2.072.0, even if #5972 gets merged for 2.073.0. --

Re: Reducing the cost of autodecoding

2016-10-16 Thread NoBrainer via Digitalmars-d
On Sunday, 16 October 2016 at 08:43:23 UTC, Uplink_Coder wrote: This looks quite slow. We already have a correct version in utf.decodeImpl. The goal here was to find a small and fast alternative. A: What's 2 + 2? B: 3 A: That's wrong. B: But incredibly fast.

Re: UDA and trait for non-GC managed pointers

2016-10-16 Thread Nordlöw via Digitalmars-d
On Sunday, 16 October 2016 at 04:14:42 UTC, Chris Wright wrote: On Sat, 15 Oct 2016 16:22:35 +, Nordlöw wrote: Is there a way to check if a pointer is supposed to point to non-GC allocated memory? You can check if it *does* point to GC-allocated memory if you use GC internals -- the

Re: Reducing the cost of autodecoding

2016-10-16 Thread Uplink_Coder via Digitalmars-d
On Sunday, 16 October 2016 at 07:59:16 UTC, Patrick Schluter wrote: Here my version. It's probably not the shortest (100 ligns of assembly with LDC) but it is correct and has following properties: - Performance proportional to the encoding length - Detects Invalid byte sequences - Detects

Speed of synchronized

2016-10-16 Thread Christian Köstlin via Digitalmars-d-learn
Hi, for an exercise I had to implement a thread safe counter. This is what I came up with: ---SNIP--- import std.stdio; import core.thread; import std.conv; import std.datetime; static import core.atomic; import core.sync.mutex; int NR_OF_THREADS = 100; int NR_OF_INCREMENTS = 1; interface

Advanced const propagation for structs

2016-10-16 Thread Ilya Yaroshenko via Digitalmars-d
Hi, Extern precompiled Mir GLAS requires additional API changes. Reduced example: ```d struct S(T) { size_t len; T ptr; } auto foo(S!(const(double)*) sl) { } S!(double*) a; const S!(double*) b; foo(a); // fails foo(b); // fails ``` https://issues.dlang.org/show_bug.cgi?id=16616

[Issue 16616] New: Advanced const propagation for structs

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16616 Issue ID: 16616 Summary: Advanced const propagation for structs Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

Re: Reducing the cost of autodecoding

2016-10-16 Thread Patrick Schluter via Digitalmars-d
Here my version. It's probably not the shortest (100 ligns of assembly with LDC) but it is correct and has following properties: - Performance proportional to the encoding length - Detects Invalid byte sequences - Detects Overlong encodings - Detects Invalid code points I put the exception to

Re: Reducing the cost of autodecoding

2016-10-16 Thread Patrick Schluter via Digitalmars-d
On Saturday, 15 October 2016 at 21:21:22 UTC, Stefan Koch wrote: On Saturday, 15 October 2016 at 19:42:03 UTC, Uplink_Coder wrote: On Saturday, 15 October 2016 at 19:07:50 UTC, Patrick Schluter wrote: At least with that lookup table below, you can detect isolated continuation bytes (192 and

Re: UDA and trait for non-GC managed pointers

2016-10-16 Thread Chris Wright via Digitalmars-d
On Sat, 15 Oct 2016 16:22:35 +, Nordlöw wrote: > Is there a way to check if a pointer is supposed to point to non-GC > allocated memory? You can check if it *does* point to GC-allocated memory if you use GC internals -- the Pool struct is what you want to look at, and the lookup methods

Re: New encryption block...

2016-10-16 Thread Era Scarecrow via Digitalmars-d
On Wednesday, 12 October 2016 at 10:34:52 UTC, Era Scarecrow wrote: Anyways, 16bit replacement, extending to 64bit via reordering, and 8 unique xor's between stages. Once I get the 576 block finished (1 for salt) I'll probably publish my ugly code for consideration and to be torn apart for

[Issue 8728] Allow optional message for @disable

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8728 Andrei Alexandrescu changed: What|Removed |Added Keywords||bootcamp

Re: Battle-plan for CTFE

2016-10-16 Thread Uplink_Coder via Digitalmars-d-announce
On Wednesday, 5 October 2016 at 08:34:06 UTC, Rory McGuire wrote: No worries, I've been watching this space for over a decade. I really believe you are working on one of the most important parts of IT for the next decade. I am planning/making a library that uses CTFE extensively and feel

[Issue 15641] [REG2.067] std.typecons.Proxy doesn't work when destructor is not nothrow

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15641 Martin Krejcirik changed: What|Removed |Added Summary|std.typecons.Proxy doesn't |[REG2.067]

[Issue 8728] Allow optional message for @disable

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8728 John Colvin changed: What|Removed |Added CC|

Re: Reducing the cost of autodecoding

2016-10-16 Thread Stefan Koch via Digitalmars-d
On Saturday, 15 October 2016 at 19:42:03 UTC, Uplink_Coder wrote: On Saturday, 15 October 2016 at 19:07:50 UTC, Patrick Schluter wrote: At least with that lookup table below, you can detect isolated continuation bytes (192 and 193) and invalid codes (above 244). __gshared static immutable

Re: Meta issue:

2016-10-16 Thread Brad Roberts via Digitalmars-d
On 10/14/2016 3:56 PM, Andrei Alexandrescu via Digitalmars-d wrote: So I just added https://issues.dlang.org/show_bug.cgi?id=16614, which is a meta documentation issue for bootcamp. I'd appreciate it if any of you folks kept in mind to add separate issues (and make this one depend on them)

[Issue 16582] [REG2.072.0-b1] ParamterDefaultValueTuple fails to compile for scope paramters

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16582 Walter Bright changed: What|Removed |Added CC|

[Issue 8507] (Regression 2.060) rdmd hangs and mutex failures

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8507 Andrei Alexandrescu changed: What|Removed |Added Status|NEW |RESOLVED

Any Windows repro of this old rdmd issue?

2016-10-16 Thread Andrei Alexandrescu via Digitalmars-d
https://issues.dlang.org/show_bug.cgi?id=8507 Thanks! -- Andrei

[Issue 8166] retro() of splitter() too

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8166 Andrei Alexandrescu changed: What|Removed |Added Keywords||bootcamp

Re: UDA and trait for non-GC managed pointers

2016-10-16 Thread Basile B. via Digitalmars-d
On Saturday, 15 October 2016 at 19:36:19 UTC, Nordlöw wrote: On Saturday, 15 October 2016 at 17:48:13 UTC, Basile B. wrote: I agree. We are several people to do it already. I've started to during last spring (see https://forum.dlang.org/post/ficbsdfokvbvslatm...@forum.dlang.org). So far I use

Re: core.intrinsics

2016-10-16 Thread Uplink_Coder via Digitalmars-d
On Saturday, 15 October 2016 at 10:17:09 UTC, Matthias Bentrup wrote: You could turn "hints" that can possibly create invalid code automatically into assertions in non-release builds. Or let the user add an assertion and use the "turn assert() into assume()" idea for release builds. I

Re: Cannot link with libphobos2.a with GCC 6.2 on Ubuntu 16.10

2016-10-16 Thread tcak via Digitalmars-d-learn
On Sunday, 16 October 2016 at 17:42:44 UTC, tcak wrote: On Thursday, 13 October 2016 at 17:02:32 UTC, Nordlöw wrote: [...] I have upgraded my Ubuntu to 16.10 yesterday as well, and I am getting following error: /usr/bin/ld: obj/Debug/program.o: relocation R_X86_64_32 against symbol

[Issue 16249] std.signals: disconnect() is unsafe during emit()

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16249 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/92eb63547953af2e6514a0fa6c9e109f70643b1b fix issue 16249 - std.signals: disconnect() is unsafe

[Issue 16249] std.signals: disconnect() is unsafe during emit()

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16249 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 8622] Allow labeled breaks to work on *any* block

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8622 --- Comment #6 from Nick Treleaven --- An alternate syntax which supports `break` without a label is to extend switch: switch { auto x = foo(); if (x == bar) break; auto y = x.baz(); if (!y) break; y.writeln; } Here the

Re: Tuple enhancement

2016-10-16 Thread Sebastiaan Koppe via Digitalmars-d
On Sunday, 16 October 2016 at 13:58:51 UTC, Andrei Alexandrescu wrote: I was thinking it would be handy if tuples had a way to access a field by name at runtime. E.g.: Tuple!(int, "a", double, "b") t; string x = condition ? "a" : "b"; double v = t.get!string(x, 3.14); That would mean that

Re: Reducing the cost of autodecoding

2016-10-16 Thread Patrick Schluter via Digitalmars-d
On Sunday, 16 October 2016 at 10:05:37 UTC, Patrick Schluter wrote: Next step will be to loop for length 2,3,4, with or without your table. Ok now the looped version which doesn't need the lookup table. This one assembles in 72 lines of assembly (25 lines only for the exception code).

[Issue 16614] [META] Each artifact in the standard library should have a meaningful example

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16614 greenify changed: What|Removed |Added CC||greeen...@gmail.com ---

Re: Speed of synchronized

2016-10-16 Thread tcak via Digitalmars-d-learn
On Sunday, 16 October 2016 at 08:41:26 UTC, Christian Köstlin wrote: Hi, for an exercise I had to implement a thread safe counter. This is what I came up with: [...] Could you try that: class ThreadSafe3Counter: Counter{ private long counter; private core.sync.mutex.Mutex mtx;

Re: Cannot link with libphobos2.a with GCC 6.2 on Ubuntu 16.10

2016-10-16 Thread tcak via Digitalmars-d-learn
On Thursday, 13 October 2016 at 17:02:32 UTC, Nordlöw wrote: I just upgraded my Ubuntu to 16.10 and now my rebuilding of dmd from git master fails as /usr/bin/ld: idgen.o: relocation R_X86_64_32 against symbol `__dmd_personality_v0' can not be used when making a shared object; recompile with

[Issue 16618] Segmentation fault: 11

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16618 Ketmar Dark changed: What|Removed |Added CC|

Re: Advanced const propagation for structs

2016-10-16 Thread Ilya Yaroshenko via Digitalmars-d
On Sunday, 16 October 2016 at 13:17:09 UTC, Nicholas Wilson wrote: On Sunday, 16 October 2016 at 08:36:17 UTC, Ilya Yaroshenko wrote: Hi, Extern precompiled Mir GLAS requires additional API changes. Reduced example: ```d struct S(T) { size_t len; T ptr; } auto foo(S!(const(double)*) sl)

[Issue 16616] Advanced const propagation for structs

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16616 Илья Ярошенко changed: What|Removed |Added Status|NEW |RESOLVED

Re: Tuple enhancement

2016-10-16 Thread Andrei Alexandrescu via Digitalmars-d
On 10/16/2016 11:07 AM, Dmitry Olshansky wrote: On 10/16/16 3:58 PM, Andrei Alexandrescu wrote: I was thinking it would be handy if tuples had a way to access a field by name at runtime. E.g.: Tuple!(int, "a", double, "b") t; string x = condition ? "a" : "b"; double v = t.get!string(x, 3.14);

[Issue 16618] Segmentation fault: 11

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16618 ag0ae...@gmail.com changed: What|Removed |Added Keywords||ice CC|

Re: Why are homepage examples too complicated?

2016-10-16 Thread Nick Treleaven via Digitalmars-d
On Sunday, 16 October 2016 at 16:07:19 UTC, Nick Treleaven wrote: // Chain functions together to round a string parsed as a real number alias roundString = pipe!(to!real, std.math.round, to!string); In fact if we're just printing the rounded numbers, we can drop to!string and inline

Re: Why are homepage examples too complicated?

2016-10-16 Thread Nick Treleaven via Digitalmars-d
On Thursday, 13 October 2016 at 19:06:26 UTC, Karabuta wrote: // Replace anything that looks like a real // number with the rounded equivalent. stdin .byLine .map!(l => l.replaceAll!(c => c.hit.round) (reFloatingPoint))

Re: Tuple enhancement

2016-10-16 Thread Dmitry Olshansky via Digitalmars-d
On 10/16/16 3:58 PM, Andrei Alexandrescu wrote: I was thinking it would be handy if tuples had a way to access a field by name at runtime. E.g.: Tuple!(int, "a", double, "b") t; string x = condition ? "a" : "b"; double v = t.get!string(x, 3.14); I swear I've seen a pull request merged that

[Issue 13051] Cannot use function literal inside struct initializer

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13051 Ralph Alexander Bariz changed: What|Removed |Added CC|

[Issue 16618] Segmentation fault: 11

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16618 --- Comment #1 from changlon --- for v2.072.0-b2 ```sh struct embed(T) { T embed_instance ; @property payload() { return embed_instance ; } } class Bufferz { alias owner this ;

Tuple enhancement

2016-10-16 Thread Andrei Alexandrescu via Digitalmars-d
I was thinking it would be handy if tuples had a way to access a field by name at runtime. E.g.: Tuple!(int, "a", double, "b") t; string x = condition ? "a" : "b"; double v = t.get!string(x, 3.14); The get method takes the field name and the type of the presumed field, and it returns the

Re: Battle-plan for CTFE

2016-10-16 Thread Uplink_Coder via Digitalmars-d-announce
On Sunday, 16 October 2016 at 10:58:57 UTC, Dmitry Olshansky wrote: That LLVM thing is surely nice to have but I highly doubt it will be allowed as dependency for DMD. --- Dmitry Olshansky LLVM is purely optional. A pure D interpreter exists. LLVM optimises most ctfe btw and returns

[Issue 16618] New: Segmentation fault: 11

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16618 Issue ID: 16618 Summary: Segmentation fault: 11 Product: D Version: D2 Hardware: x86 OS: All Status: NEW Severity: regression Priority: P1

Re: Advanced const propagation for structs

2016-10-16 Thread Nicholas Wilson via Digitalmars-d
On Sunday, 16 October 2016 at 08:36:17 UTC, Ilya Yaroshenko wrote: Hi, Extern precompiled Mir GLAS requires additional API changes. Reduced example: ```d struct S(T) { size_t len; T ptr; } auto foo(S!(const(double)*) sl) { } S!(double*) a; const S!(double*) b; foo(a); // fails foo(b);

Re: Reducing the cost of autodecoding

2016-10-16 Thread Patrick Schluter via Digitalmars-d
On Sunday, 16 October 2016 at 10:05:37 UTC, Patrick Schluter wrote: On Sunday, 16 October 2016 at 08:43:23 UTC, Uplink_Coder wrote: On Sunday, 16 October 2016 at 07:59:16 UTC, Patrick Schluter wrote: This looks quite slow. We already have a correct version in utf.decodeImpl. The goal here

Re: [Semi OT] - "Garbage In, Garbage Out: Arguing about Undefined Behavior..."

2016-10-16 Thread John Colvin via Digitalmars-d
On Saturday, 15 October 2016 at 00:11:35 UTC, deadalnix wrote: His argument about indices was also weak as it tells more about the need to use size_t rather than 32 bits indices when doing indices computation. Yeah I found that part of the talk interesting but overall unconvincing. Just

[Issue 16582] [REG2.072.0-b1] ParamterDefaultValueTuple fails to compile for scope paramters

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16582 Martin Nowak changed: What|Removed |Added Keywords||pull --- Comment #4 from

Re: Advanced const propagation for structs

2016-10-16 Thread Dicebot via Digitalmars-d
On 10/16/2016 11:36 AM, Ilya Yaroshenko wrote: > Hi, > > Extern precompiled Mir GLAS requires additional API changes. > Reduced example: > > ```d > struct S(T) > { > size_t len; > T ptr; > } > > auto foo(S!(const(double)*) sl) > { > } > > S!(double*) a; > const S!(double*) b; > > foo(a);

Re: Why are homepage examples too complicated?

2016-10-16 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 14 October 2016 at 21:18:45 UTC, Karabuta wrote: The "!" is more trouble than good (IMO for the majority). @Adam Roupe did a talk at previous DConf which he testifies to this. Couldn't be me, I don't think I ever talked about it... and I'm actually pro-!. It is a perfectly fine

[Issue 8507] (Regression 2.060) rdmd hangs and mutex failures

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8507 --- Comment #4 from Martin Krejcirik --- Works for me on Windows (dmd 2.070.1) --

[Issue 8209] Installer installs D into /usr/bin, would prefer /usr/local/bin, on Mac OS X

2016-10-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8209 --- Comment #3 from Andrei Alexandrescu --- nice, thanks for updating the database --

Re: Reducing the cost of autodecoding

2016-10-16 Thread Uplink_Coder via Digitalmars-d
On Saturday, 15 October 2016 at 19:07:50 UTC, Patrick Schluter wrote: At least with that lookup table below, you can detect isolated continuation bytes (192 and 193) and invalid codes (above 244). __gshared static immutable ubyte[] charWidthTab = [ 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2,

Re: UDA and trait for non-GC managed pointers

2016-10-16 Thread Nordlöw via Digitalmars-d
On Saturday, 15 October 2016 at 17:48:13 UTC, Basile B. wrote: I agree. We are several people to do it already. I've started to during last spring (see https://forum.dlang.org/post/ficbsdfokvbvslatm...@forum.dlang.org). So far I use "@NoGc" and "@TellGcRange" added. Why does the template

Re: Reducing the cost of autodecoding

2016-10-16 Thread safety0ff via Digitalmars-d
On Saturday, 15 October 2016 at 19:00:12 UTC, Patrick Schluter wrote: Just a question. Do encoding errors not have to be detected or is validity of the string guaranteed? AFAIK they have to be detected, otherwise it would be a regression.

Re: Reducing the cost of autodecoding

2016-10-16 Thread Patrick Schluter via Digitalmars-d
On Saturday, 15 October 2016 at 19:07:50 UTC, Patrick Schluter wrote: At least with that lookup table below, you can detect isolated continuation bytes (192 and 193) and invalid codes (above 244). 192 and 193 can never appear in a UTF-8 text, they are overlongs not continuation bytes.

Re: Reducing the cost of autodecoding

2016-10-16 Thread Patrick Schluter via Digitalmars-d
At least with that lookup table below, you can detect isolated continuation bytes (192 and 193) and invalid codes (above 244). __gshared static immutable ubyte[] charWidthTab = [ 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,

Re: code-d 0.12.0 - The user friendly release (code-d for noobs)

2016-10-16 Thread WebFreak001 via Digitalmars-d-announce
On Saturday, 15 October 2016 at 18:54:32 UTC, bitwise wrote: On Sunday, 9 October 2016 at 15:42:51 UTC, WebFreak001 wrote: On Sunday, 9 October 2016 at 15:41:17 UTC, Dmitry wrote: On Sunday, 9 October 2016 at 10:19:06 UTC, Wild wrote: After all Atom and Vscode are open source clones of

Re: Reducing the cost of autodecoding

2016-10-16 Thread Patrick Schluter via Digitalmars-d
On Saturday, 15 October 2016 at 18:40:11 UTC, Uplink_Coder wrote: It can also be written like this producing smaller code. But it the cost of slower decoding. dchar myFront(ref char[] str) pure { dchar c = cast(dchar) str.ptr[0]; if (c & 128) { if (c & 64) {

Re: code-d 0.12.0 - The user friendly release (code-d for noobs)

2016-10-16 Thread bitwise via Digitalmars-d-announce
On Sunday, 9 October 2016 at 15:42:51 UTC, WebFreak001 wrote: On Sunday, 9 October 2016 at 15:41:17 UTC, Dmitry wrote: On Sunday, 9 October 2016 at 10:19:06 UTC, Wild wrote: After all Atom and Vscode are open source clones of Sublime. Sublime is fast, unlike Atom and VSCode. Yeah I noticed

[OT] Re: UDA and trait for non-GC managed pointers

2016-10-16 Thread Basile B. via Digitalmars-d
On Saturday, 15 October 2016 at 18:03:54 UTC, Nordlöw wrote: On Saturday, 15 October 2016 at 17:48:13 UTC, Basile B. wrote: To be honest I find this system way more useful that the function attribute @nogc. My trait is here (https://github.com/BBasile/iz/blob/master/import/iz/memory.d#L145)

Re: Reducing the cost of autodecoding

2016-10-16 Thread Uplink_Coder via Digitalmars-d
It can also be written like this producing smaller code. But it the cost of slower decoding. dchar myFront(ref char[] str) pure { dchar c = cast(dchar) str.ptr[0]; if (c & 128) { if (c & 64) { int idx = 0; int l = charWidthTab.ptr[c - 192];

  1   2   >