Re: Promotion rules ... why no float?

2016-09-06 Thread Daniel Kozak via Digitalmars-d
Dne 6.9.2016 v 22:51 deadalnix via Digitalmars-d napsal(a): On Tuesday, 6 September 2016 at 07:52:47 UTC, Daniel Kozak wrote: No, it is really important rule. If there will be automatic promotion to float for auto it will hurt performance in cases when you want int and it will break things.

Re: workspace-d 2.7.2 & code-d 0.10.14

2016-09-06 Thread Manu via Digitalmars-d-announce
On 7 September 2016 at 13:29, WebFreak001 via Digitalmars-d-announce wrote: > On Wednesday, 7 September 2016 at 02:04:21 UTC, Manu wrote: >> >> Awesome work, thanks again! >> Suggest getting the deb hosted in d-apt along with the other tools >> already there,

Re: Template constraints for reference/value types?

2016-09-06 Thread Jon Degenhardt via Digitalmars-d-learn
On Wednesday, 7 September 2016 at 00:40:27 UTC, Jonathan M Davis wrote: On Tuesday, September 06, 2016 21:16:05 Jon Degenhardt via Digitalmars-d-learn wrote: On Tuesday, 6 September 2016 at 21:00:53 UTC, Lodovico Giaretta wrote: > On Tuesday, 6 September 2016 at 20:46:54 UTC, Jon Degenhardt >

Re: associative arrays: how to insert key and return pointer in 1 step to avoid searching twice

2016-09-06 Thread Jon Degenhardt via Digitalmars-d
On Tuesday, 6 September 2016 at 04:32:52 UTC, Daniel Kozak wrote: Dne 6.9.2016 v 06:14 mogu via Digitalmars-d napsal(a): On Tuesday, 6 September 2016 at 01:17:00 UTC, Timothee Cour wrote: is there a way to do this efficiently with associative arrays: aa[key]=value; auto ptr=key in aa;

Re: workspace-d 2.7.2 & code-d 0.10.14

2016-09-06 Thread WebFreak001 via Digitalmars-d-announce
On Wednesday, 7 September 2016 at 02:04:21 UTC, Manu wrote: Awesome work, thanks again! Suggest getting the deb hosted in d-apt along with the other tools already there, and set them as dependencies? would probably be nice, but I have no idea how package maintaining for apt really works. I

Re: [GSoC] Precise GC

2016-09-06 Thread Dsby via Digitalmars-d-announce
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 getting merged. [...] In Mac 32 bit. the test is not pass.

Re: Taking pipeline processing to the next level

2016-09-06 Thread Manu via Digitalmars-d
On 7 September 2016 at 12:00, finalpatch via Digitalmars-d wrote: > On Wednesday, 7 September 2016 at 01:38:47 UTC, Manu wrote: >> >> On 7 September 2016 at 11:04, finalpatch via Digitalmars-d >> wrote: >>> >>> >>> It shouldn't be hard to

Re: Taking pipeline processing to the next level

2016-09-06 Thread finalpatch via Digitalmars-d
On Wednesday, 7 September 2016 at 01:38:47 UTC, Manu wrote: On 7 September 2016 at 11:04, finalpatch via Digitalmars-d wrote: It shouldn't be hard to have the framework look at the buffer size and choose the scalar version when number of elements are small, it

Re: workspace-d 2.7.2 & code-d 0.10.14

2016-09-06 Thread Manu via Digitalmars-d-announce
Awesome work, thanks again! Suggest getting the deb hosted in d-apt along with the other tools already there, and set them as dependencies? On 7 September 2016 at 07:05, WebFreak001 via Digitalmars-d-announce wrote: > I just pushed a new release of

Re: Taking pipeline processing to the next level

2016-09-06 Thread Manu via Digitalmars-d
On 7 September 2016 at 11:04, finalpatch via Digitalmars-d wrote: > > It shouldn't be hard to have the framework look at the buffer size and > choose the scalar version when number of elements are small, it wasn't done > that way simply because we didn't need it. No,

Re: Taking pipeline processing to the next level

2016-09-06 Thread finalpatch via Digitalmars-d
On Wednesday, 7 September 2016 at 00:21:23 UTC, Manu wrote: The end of a scan line is special cased . If I need 12 pixels for the last iteration but there are only 8 left, an instance of Kernel::InputVector is allocated on stack, 8 remaining pixels are memcpy into it then send to the kernel.

Re: Template constraints for reference/value types?

2016-09-06 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, September 06, 2016 21:16:05 Jon Degenhardt via Digitalmars-d-learn wrote: > On Tuesday, 6 September 2016 at 21:00:53 UTC, Lodovico Giaretta > > wrote: > > On Tuesday, 6 September 2016 at 20:46:54 UTC, Jon Degenhardt > > > > wrote: > >> Is there a way to constrain template arguments to

Re: Taking pipeline processing to the next level

2016-09-06 Thread Manu via Digitalmars-d
On 7 September 2016 at 07:11, finalpatch via Digitalmars-d wrote: > On Tuesday, 6 September 2016 at 14:47:21 UTC, Manu wrote: > >>> with a main loop that reads the source buffer in *12* pixels step, call >>> MySimpleKernel 3 times, then call AnotherKernel 4 times. >>

Re: Taking pipeline processing to the next level

2016-09-06 Thread Manu via Digitalmars-d
On 7 September 2016 at 01:54, Wyatt via Digitalmars-d wrote: > On Monday, 5 September 2016 at 05:08:53 UTC, Manu wrote: >> >> >> A central premise of performance-oriented programming which I've >> employed my entire career, is "where there is one, there is probably >>

Re: Template constraints for reference/value types?

2016-09-06 Thread Jon Degenhardt via Digitalmars-d-learn
On Tuesday, 6 September 2016 at 21:00:53 UTC, Lodovico Giaretta wrote: On Tuesday, 6 September 2016 at 20:46:54 UTC, Jon Degenhardt wrote: Is there a way to constrain template arguments to reference or value types? I'd like to do something like: T foo(T)(T x) if (isReferenceType!T) { ...

Re: Taking pipeline processing to the next level

2016-09-06 Thread finalpatch via Digitalmars-d
On Tuesday, 6 September 2016 at 14:47:21 UTC, Manu wrote: with a main loop that reads the source buffer in *12* pixels step, call MySimpleKernel 3 times, then call AnotherKernel 4 times. It's interesting thoughts. What did you do when buffers weren't multiple of the kernels? The end of a

workspace-d 2.7.2 & code-d 0.10.14

2016-09-06 Thread WebFreak001 via Digitalmars-d-announce
I just pushed a new release of workspace-d (bridge between DCD, DScanner, dfmt and dub with some utility stuff) and code-d (my vscode D extension using workspace-d). The latest update features several smaller additions such as better auto completion for DlangUI Markup Language and more

Re: Template constraints for reference/value types?

2016-09-06 Thread Lodovico Giaretta via Digitalmars-d-learn
On Tuesday, 6 September 2016 at 20:46:54 UTC, Jon Degenhardt wrote: Is there a way to constrain template arguments to reference or value types? I'd like to do something like: T foo(T)(T x) if (isReferenceType!T) { ... } --Jon You can use `if(is(T : class) || is(T : interface))`. If you

Re: Promotion rules ... why no float?

2016-09-06 Thread deadalnix via Digitalmars-d
On Tuesday, 6 September 2016 at 07:52:47 UTC, Daniel Kozak wrote: No, it is really important rule. If there will be automatic promotion to float for auto it will hurt performance in cases when you want int and it will break things. The performance have nothing to do with it. In fact float

Template constraints for reference/value types?

2016-09-06 Thread Jon Degenhardt via Digitalmars-d-learn
Is there a way to constrain template arguments to reference or value types? I'd like to do something like: T foo(T)(T x) if (isReferenceType!T) { ... } --Jon

Re: Valid to assign to field of struct in union?

2016-09-06 Thread Johan Engelen via Digitalmars-d
On Tuesday, 6 September 2016 at 17:58:44 UTC, Timon Gehr wrote: I don't think so (although your case could be made to work easily enough). This seems to be accepts-invalid. What do you think of the original example [1] in the bug report that uses `mixin Proxy!i;` ? [1]

[Issue 16464] opCast doco is insufficient

2016-09-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16464 --- Comment #5 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dlang.org https://github.com/dlang/dlang.org/commit/9fdba00fb38984e76ebe4c26f392d03692917b72 Fix issue 16464. Define more clearly opCast usage

Re: Unicode function name? ∩

2016-09-06 Thread Illuminati via Digitalmars-d-learn
On Tuesday, 6 September 2016 at 19:58:11 UTC, Jesper Tholstrup wrote: On Tuesday, 6 September 2016 at 18:46:52 UTC, Illuminati wrote: [...] You are somewhat of topic here. [...] A lot of code is written by non-mathematicians and has to be maintained by non-mathematicians. Mathematicians

Re: Unicode function name? ∩

2016-09-06 Thread Jesper Tholstrup via Digitalmars-d-learn
On Tuesday, 6 September 2016 at 18:46:52 UTC, Illuminati wrote: Symbols are inherently meaningless so you are not making sense. Clever is what got humans out the jungle, I think it is a good thing. No need to denigrate it when you benefit from people being clever. Of course, you could argue

Re: @property Incorrectly Implemented?

2016-09-06 Thread Steven Schveighoffer via Digitalmars-d
On 9/6/16 3:18 PM, John wrote: Currently it seems that @property isn't implemented correctly. For some reason when you try to get the pointer of a property it returns a delegate for some reason. This just seems plain wrong, the whole purpose of a property is for a function to behave as if it

Re: @property Incorrectly Implemented?

2016-09-06 Thread Lodovico Giaretta via Digitalmars-d
On Tuesday, 6 September 2016 at 19:18:11 UTC, John wrote: Currently it seems that @property isn't implemented correctly. For some reason when you try to get the pointer of a property it returns a delegate for some reason. This just seems plain wrong, the whole purpose of a property is for a

Re: @property Incorrectly Implemented?

2016-09-06 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, September 06, 2016 19:18:11 John via Digitalmars-d wrote: > Currently it seems that @property isn't implemented correctly. > For some reason when you try to get the pointer of a property it > returns a delegate for some reason. This just seems plain wrong, > the whole purpose of a

Re: @property Incorrectly Implemented?

2016-09-06 Thread ag0aep6g via Digitalmars-d
On 09/06/2016 09:18 PM, John wrote: &(t.j = 10) // shouldn't this return "ref int delegate(int)" ? `` should and does. With `= 10`, it's definitely a call, just like `()`. It would be nice to get this behavior fixed, so that it doesn't become set in stone. Unfortunately, it already

Re: Usability of D for Visually Impaired Users

2016-09-06 Thread ag0aep6g via Digitalmars-d
On 09/06/2016 08:47 PM, Sai wrote: 1. The "Jump to" section at the top lists all the items available in that module nicely, but the layout could be improved if it were listed as a bunch of columns instead of one giant list with flow layout. That's a solid idea. Unfortunately, variance in name

@property Incorrectly Implemented?

2016-09-06 Thread John via Digitalmars-d
Currently it seems that @property isn't implemented correctly. For some reason when you try to get the pointer of a property it returns a delegate for some reason. This just seems plain wrong, the whole purpose of a property is for a function to behave as if it weren't a function. There's

Re: Usability of D for Visually Impaired Users

2016-09-06 Thread Sai via Digitalmars-d
I have few suggestions, especially for people like me with migraine, it could be a bit easy eyes and overall less stressful. 1. The "Jump to" section at the top lists all the items available in that module nicely, but the layout could be improved if it were listed as a bunch of columns

Re: Unicode function name? ∩

2016-09-06 Thread Illuminati via Digitalmars-d-learn
On Tuesday, 6 September 2016 at 13:41:22 UTC, Jesper Tholstrup wrote: On Tuesday, 6 September 2016 at 02:22:50 UTC, Illuminati wrote: It's concise and has a very specific meaning. Well, only if we can agree on what the symbols mean. I'm not sure that every symbol is concise and specific

Re: Valid to assign to field of struct in union?

2016-09-06 Thread Timon Gehr via Digitalmars-d
On 06.09.2016 14:56, Johan Engelen wrote: Hi all, I have a question about the validity of this code: ``` void main() { struct A { int i; } struct S { union U { A first; A second; } U u; this(A val)

Re: CompileTime performance measurement

2016-09-06 Thread Stefan Koch via Digitalmars-d
On Tuesday, 6 September 2016 at 10:42:00 UTC, Martin Nowak wrote: On Sunday, 4 September 2016 at 00:04:16 UTC, Stefan Koch wrote: I recently implemented __ctfeWriteln. Nice, is it only for your interpreter or can we move https://trello.com/c/6nU0lbl2/24-ctfewrite to done? I think

Re: DIP1001: DoExpression

2016-09-06 Thread Timon Gehr via Digitalmars-d
On 06.09.2016 17:23, Steven Schveighoffer wrote: On 9/6/16 10:17 AM, Timon Gehr wrote: On 06.09.2016 16:12, Steven Schveighoffer wrote: I'm not sure I agree with the general principal of the DIP though. I've never liked comma expressions, and this seems like a waste of syntax. Won't tuples

Re: DIP1001: DoExpression

2016-09-06 Thread Steven Schveighoffer via Digitalmars-d
On 9/6/16 1:01 PM, Timon Gehr wrote: On 06.09.2016 17:23, Steven Schveighoffer wrote: On 9/6/16 10:17 AM, Timon Gehr wrote: On 06.09.2016 16:12, Steven Schveighoffer wrote: I'm not sure I agree with the general principal of the DIP though. I've never liked comma expressions, and this seems

Re: Taking pipeline processing to the next level

2016-09-06 Thread Wyatt via Digitalmars-d
On Monday, 5 September 2016 at 05:08:53 UTC, Manu wrote: A central premise of performance-oriented programming which I've employed my entire career, is "where there is one, there is probably many", and if you do something to one, you should do it to many. From a conceptual standpoint, this

Re: Promotion rules ... why no float?

2016-09-06 Thread Daniel Kozak via Digitalmars-d
Dne 6.9.2016 v 17:26 Steven Schveighoffer via Digitalmars-d napsal(a): On 9/6/16 11:00 AM, Sai wrote: Thanks for the replies. I tend to use a lot of float math (robotics and automation) so I almost always want float output in case of division. And once in a while I bump into this issue. I am

Re: Promotion rules ... why no float?

2016-09-06 Thread Andrea Fontana via Digitalmars-d
On Tuesday, 6 September 2016 at 15:00:48 UTC, Sai wrote: Thanks for the replies. I tend to use a lot of float math (robotics and automation) so I almost always want float output in case of division. And once in a while I bump into this issue. I am wondering what are the best ways to work

Re: Promotion rules ... why no float?

2016-09-06 Thread Steven Schveighoffer via Digitalmars-d
On 9/6/16 11:00 AM, Sai wrote: Thanks for the replies. I tend to use a lot of float math (robotics and automation) so I almost always want float output in case of division. And once in a while I bump into this issue. I am wondering what are the best ways to work around it. float c = a /

Re: Promotion rules ... why no float?

2016-09-06 Thread Daniel Kozak via Digitalmars-d
Dne 6.9.2016 v 17:00 Sai via Digitalmars-d napsal(a): Thanks for the replies. I tend to use a lot of float math (robotics and automation) so I almost always want float output in case of division. And once in a while I bump into this issue. I am wondering what are the best ways to work

Re: DIP1001: DoExpression

2016-09-06 Thread Steven Schveighoffer via Digitalmars-d
On 9/6/16 10:17 AM, Timon Gehr wrote: On 06.09.2016 16:12, Steven Schveighoffer wrote: I'm not sure I agree with the general principal of the DIP though. I've never liked comma expressions, and this seems like a waste of syntax. Won't tuples suffice here when they take over the syntax? e.g.

Re: [GSoC] Precise GC

2016-09-06 Thread jmh530 via Digitalmars-d-announce
On Saturday, 3 September 2016 at 12:22:25 UTC, thedeemon wrote: GC (and runtime in general) has no idea what code is safe and what code is system. GC works with data at run-time. All @safe-related stuff is about code (not data!) and happens at compile-time. They are completely orthogonal and

Re: Promotion rules ... why no float?

2016-09-06 Thread Sai via Digitalmars-d
Thanks for the replies. I tend to use a lot of float math (robotics and automation) so I almost always want float output in case of division. And once in a while I bump into this issue. I am wondering what are the best ways to work around it. float c = a / b; // a and b could be

[Issue 16469] Segmentation fault in bigAlloc with negative size

2016-09-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16469 --- Comment #3 from Lodovico Giaretta --- (In reply to Cédric Picard from comment #2) > Is it a duplicate? Judging only from gdb backtrace those are different > issues. I haven't checked in druntime though. As in the other

[Issue 16469] Segmentation fault in bigAlloc with negative size

2016-09-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16469 --- Comment #2 from Cédric Picard --- Is it a duplicate? Judging only from gdb backtrace those are different issues. I haven't checked in druntime though. --

Re: Templates problem

2016-09-06 Thread ketmar via Digitalmars-d-learn
On Tuesday, 6 September 2016 at 14:50:17 UTC, Lodovico Giaretta wrote: From a quick look, it looks like `results` is a `const(TickDuration[3])`, that is a fixed-length array. And fixed-length arrays aren't ranges. If you explicitly slice them, they become dynamic arrays, which are ranges. So

Re: Templates problem

2016-09-06 Thread Lodovico Giaretta via Digitalmars-d-learn
On Tuesday, 6 September 2016 at 14:38:54 UTC, Russel Winder wrote: The code fragment: const results = benchmark!(run_mean, run_mode, run_stdDev)(1); const times = map!((TickDuration t) { return (to!Duration(t)).total!"seconds"; })(results); seems entirely reasonable to me. However

Re: Struct default constructor - need some kind of solution for C++ interop

2016-09-06 Thread Ethan Watson via Digitalmars-d
On Tuesday, 6 September 2016 at 13:44:37 UTC, Ethan Watson wrote: Suggestions? Forgot to mention in OP that I had tried this( void* pArg = null ); to no avail: mutex.d(19): Deprecation: constructor mutex.Mutex.this all parameters have default arguments, but structs cannot have default

Re: Taking pipeline processing to the next level

2016-09-06 Thread Manu via Digitalmars-d
On 7 September 2016 at 00:26, finalpatch via Digitalmars-d wrote: > On Tuesday, 6 September 2016 at 14:21:01 UTC, finalpatch wrote: >> >> Then some template magic will figure out the LCM of the 2 kernels' pixel >> width is 3*4=12 and therefore they are fused together

Re: Taking pipeline processing to the next level

2016-09-06 Thread finalpatch via Digitalmars-d
On Tuesday, 6 September 2016 at 14:26:22 UTC, finalpatch wrote: On Tuesday, 6 September 2016 at 14:21:01 UTC, finalpatch wrote: Then some template magic will figure out the LCM of the 2 kernels' pixel width is 3*4=12 and therefore they are fused together into a composite kernel of pixel width

Templates problem

2016-09-06 Thread Russel Winder via Digitalmars-d-learn
The code fragment: const results = benchmark!(run_mean, run_mode, run_stdDev)(1); const times = map!((TickDuration t) { return (to!Duration(t)).total!"seconds"; })(results); seems entirely reasonable to me. However rdmd 20160627 begs to differ: run_checks.d(20): Error: template

Re: Struct default constructor - need some kind of solution for C++ interop

2016-09-06 Thread Ethan Watson via Digitalmars-d
On Tuesday, 6 September 2016 at 14:27:49 UTC, Lodovico Giaretta wrote: That's because it doesn't initialize (with static opCall) the fields of SomeOtherClass, right? I guess that could be solved once and for all with some template magic of the binding system. Correct for the first part. The

Re: Struct default constructor - need some kind of solution for C++ interop

2016-09-06 Thread Lodovico Giaretta via Digitalmars-d
On Tuesday, 6 September 2016 at 14:10:43 UTC, Ethan Watson wrote: @disable this() will hide the static opCall and the compiler will throw an error. Yes, I realized that. My bad. As @disable this is not actually defining a ctor, it should not be signaled as hiding the opCall. To me, this

Re: Taking pipeline processing to the next level

2016-09-06 Thread finalpatch via Digitalmars-d
On Tuesday, 6 September 2016 at 14:21:01 UTC, finalpatch wrote: Then some template magic will figure out the LCM of the 2 kernels' pixel width is 3*4=12 and therefore they are fused together into a composite kernel of pixel width 12. The above line compiles down into a single function

Re: Return type deduction

2016-09-06 Thread Steven Schveighoffer via Digitalmars-d
On 9/5/16 5:59 AM, Andrea Fontana wrote: I asked this some time (years?) ago. Time for a second try :) Consider this: --- T simple(T)() { return T.init; } void main() { int test = simple!int(); // it compiles int test2 = simple();// it doesn't auto test3 = simple!int();

Re: Taking pipeline processing to the next level

2016-09-06 Thread finalpatch via Digitalmars-d
On Tuesday, 6 September 2016 at 03:08:43 UTC, Manu wrote: I still stand by this, and I listed some reasons above. Auto-vectorisation is a nice opportunistic optimisation, but it can't be relied on. The key reason is that scalar arithmetic semantics are different than vector semantics, and

Re: DIP1001: DoExpression

2016-09-06 Thread Timon Gehr via Digitalmars-d
On 06.09.2016 16:12, Steven Schveighoffer wrote: I'm not sure I agree with the general principal of the DIP though. I've never liked comma expressions, and this seems like a waste of syntax. Won't tuples suffice here when they take over the syntax? e.g. (x, y, z)[$-1] (Does not work if x, y

Re: DIP1001: DoExpression

2016-09-06 Thread Steven Schveighoffer via Digitalmars-d
On 9/3/16 12:03 PM, Jonathan M Davis via Digitalmars-d wrote: On Saturday, September 03, 2016 14:42:34 Cauterite via Digitalmars-d wrote: On Saturday, 3 September 2016 at 14:25:49 UTC, rikki cattermole wrote: I propose a slight change: do(x, y, return z) Hmm, I suppose I should mention one

Re: Struct default constructor - need some kind of solution for C++ interop

2016-09-06 Thread Ethan Watson via Digitalmars-d
On Tuesday, 6 September 2016 at 13:57:27 UTC, Lodovico Giaretta wrote: Of course I don't know which level of usability you want to achieve, but I think that in this case your bind system, when binding a default ctor, could use @disable this() and define a factory method (do static opCall

Re: Struct default constructor - need some kind of solution for C++ interop

2016-09-06 Thread Lodovico Giaretta via Digitalmars-d
On Tuesday, 6 September 2016 at 13:57:27 UTC, Lodovico Giaretta wrote: On Tuesday, 6 September 2016 at 13:44:37 UTC, Ethan Watson wrote: [...] Suggestions? Of course I don't know which level of usability you want to achieve, but I think that in this case your bind system, when binding a

[Issue 16474] New: CTFE pow

2016-09-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16474 Issue ID: 16474 Summary: CTFE pow Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: blocker Priority: P1 Component: dmd

D Boston September Meetup

2016-09-06 Thread Steven Schveighoffer via Digitalmars-d-announce
Posted here: https://www.meetup.com/Boston-area-D-Programming-Language-Meetup/events/233871852/ In general, I'm still looking to see if we can host meetups in a private setting. Anyone who has info on any companies in or around Boston that would be willing to host, or might know of a place

Re: Struct default constructor - need some kind of solution for C++ interop

2016-09-06 Thread Lodovico Giaretta via Digitalmars-d
On Tuesday, 6 September 2016 at 13:44:37 UTC, Ethan Watson wrote: [...] Suggestions? Of course I don't know which level of usability you want to achieve, but I think that in this case your bind system, when binding a default ctor, could use @disable this() and define a factory method (do

Struct default constructor - need some kind of solution for C++ interop

2016-09-06 Thread Ethan Watson via Digitalmars-d
Alright, so now I've definitely come up across something with Binderoo that has no easy solution. For the sake of this example, I'm going to use the class I'm binary-matching with a C++ class and importing functionality with C++ function pointers to create a 100% functional match - our Mutex

Re: Unicode function name? ∩

2016-09-06 Thread Jesper Tholstrup via Digitalmars-d-learn
On Tuesday, 6 September 2016 at 02:22:50 UTC, Illuminati wrote: It's concise and has a very specific meaning. Well, only if we can agree on what the symbols mean. I'm not sure that every symbol is concise and specific across the fields of mathematics, statistics, and physics. The worst

[Issue 16473] operator overloading is broken

2016-09-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16473 Илья Ярошенко changed: What|Removed |Added Summary|operator overloading is |operator

[Issue 16473] New: operator overloading is brocken

2016-09-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16473 Issue ID: 16473 Summary: operator overloading is brocken Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: major Priority: P1

Re: Valid to assign to field of struct in union?

2016-09-06 Thread Johan Engelen via Digitalmars-d
On Tuesday, 6 September 2016 at 12:56:24 UTC, Johan Engelen wrote: The compiler allows it, but it leads to a bug with CTFE of this code: the assert fails. Before someone smart tries it, yes the code works with LDC, but wait... swap the order of `first` and `second` in the union, and BOOM!

Valid to assign to field of struct in union?

2016-09-06 Thread Johan Engelen via Digitalmars-d
Hi all, I have a question about the validity of this code: ``` void main() { struct A { int i; } struct S { union U { A first; A second; } U u; this(A val) { u.second = val;

Re: Taking pipeline processing to the next level

2016-09-06 Thread Jerry via Digitalmars-d
On Monday, 5 September 2016 at 05:08:53 UTC, Manu wrote: I mostly code like this now: data.map!(x => transform(x)).copy(output); So you basicly want to make the lazy computation eager and store the result? data.map!(x => transform(x)).array Will allocate a new array and fill it with the

[Issue 16471] [CTFE] Incorrect CTFE when assigning to union struct fields

2016-09-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16471 --- Comment #1 from Johan Engelen --- A simpler testcase: ``` void main() { struct A { int i; } struct S { union U { A first; A second; } U u;

[Issue 16469] Segmentation fault in bigAlloc with negative size

2016-09-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16469 Lodovico Giaretta changed: What|Removed |Added Status|NEW |RESOLVED

Re: Why is this?

2016-09-06 Thread Manu via Digitalmars-d
On 6 September 2016 at 21:28, Timon Gehr via Digitalmars-d wrote: > On 06.09.2016 08:07, Manu via Digitalmars-d wrote: >> >> I have weird thing: >> >> template E(F){ >> enum E { >> K = F(1) >> } >> } >> >> struct S(F = float, alias e_ = E!double.K) {}

[Issue 16472] New: template alias parameter bug

2016-09-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16472 Issue ID: 16472 Summary: template alias parameter bug Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1

[Issue 16470] Segfault with negative array length

2016-09-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16470 --- Comment #2 from Lodovico Giaretta --- *** Issue 16469 has been marked as a duplicate of this issue. *** --

[Issue 16467] templated function default argument take into account when not needed

2016-09-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16467 Jonathan M Davis changed: What|Removed |Added CC|

[Issue 16471] New: [CTFE] Incorrect CTFE when assigning to union struct fields

2016-09-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16471 Issue ID: 16471 Summary: [CTFE] Incorrect CTFE when assigning to union struct fields Product: D Version: D2 Hardware: All OS: All Status: NEW

Re: Why is this?

2016-09-06 Thread Timon Gehr via Digitalmars-d
On 06.09.2016 08:07, Manu via Digitalmars-d wrote: I have weird thing: template E(F){ enum E { K = F(1) } } struct S(F = float, alias e_ = E!double.K) {} S!float x; // Error: E!double.K is used as a type alias T = E!double.K; struct S2(F = float, alias e_ = T) {} S2!float y;

Re: CompileTime performance measurement

2016-09-06 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, September 06, 2016 10:46:11 Martin Nowak via Digitalmars-d wrote: > On Sunday, 4 September 2016 at 00:04:16 UTC, Stefan Koch wrote: > > Hi Guys. > > > > I recently implemented __ctfeWriteln. > > Based on that experience I have now implemented another pseudo > > function called

Re: C# 7 Features - Tuples

2016-09-06 Thread Nick Treleaven via Digitalmars-d
On Monday, 5 September 2016 at 15:50:31 UTC, Lodovico Giaretta wrote: On Monday, 5 September 2016 at 15:43:43 UTC, Nick Treleaven wrote: We can already (almost do that): import std.stdio, std.typecons; void unpack(T...)(Tuple!T tup, out

Re: D Meetup in Hamburg?

2016-09-06 Thread Dgame via Digitalmars-d
On Tuesday, 6 September 2016 at 09:42:12 UTC, Martin Tschierschke wrote: Hi All, anybody interested to meet in Hamburg, Germany? Time and location will be found! Regards mt. Yes, I would be interested.

Re: [OT] LLVM 3.9 released - you can try the release already with LDC!

2016-09-06 Thread eugene via Digitalmars-d-announce
On Tuesday, 6 September 2016 at 09:42:11 UTC, Lodovico Giaretta wrote: There are lot of projects using LLVM [1]. The fact that LDC if often cited in the release notes means that it's one of the best. This is free advertisement, as the LLVM release notes are read by PL people that may not

Re: dlang-vscode

2016-09-06 Thread Andrej Mitrovic via Digitalmars-d
On 9/6/16, John Colvin via Digitalmars-d wrote: > I've used it a bit. See also: VS code is pretty solid! I'm too used to Sublime to start using it now, but the fact it's open-source is a huge plus. Some of its addons are pretty great, for example you can run an

Re: CompileTime performance measurement

2016-09-06 Thread Martin Nowak via Digitalmars-d
On Sunday, 4 September 2016 at 00:04:16 UTC, Stefan Koch wrote: Hi Guys. I recently implemented __ctfeWriteln. Based on that experience I have now implemented another pseudo function called __ctfeTicksMs. That evaluates to a uint representing the number of milliseconds elapsed between the

Re: CompileTime performance measurement

2016-09-06 Thread Martin Nowak via Digitalmars-d
On Sunday, 4 September 2016 at 00:04:16 UTC, Stefan Koch wrote: I recently implemented __ctfeWriteln. Nice, is it only for your interpreter or can we move https://trello.com/c/6nU0lbl2/24-ctfewrite to done? I think __ctfeWrite would be a better primitive. And we could actually consider to

Re: CompileTime performance measurement

2016-09-06 Thread Martin Nowak via Digitalmars-d
On Sunday, 4 September 2016 at 00:08:14 UTC, David Nadlinger wrote: Please don't. This makes CTFE indeterministic. Well we already have __TIMESTAMP__, though I think it doesn't change during compilation.

Re: CompileTime performance measurement

2016-09-06 Thread Martin Tschierschke via Digitalmars-d
On Sunday, 4 September 2016 at 19:36:16 UTC, Stefan Koch wrote: On Sunday, 4 September 2016 at 12:38:05 UTC, Andrei Alexandrescu wrote: On 9/4/16 6:14 AM, Stefan Koch wrote: writeln and __ctfeWriteln are to be regarded as completely different things. __ctfeWriteln is a debugging tool only! It

Simplifying conversion and formatting code in Phobos

2016-09-06 Thread Andrei Alexandrescu via Digitalmars-d
We've learned a lot about good D idioms since std.conv was initiated. And of course it was always the case that writing libraries is quite different from writing code to be used within one sole application. Consider: * to!T(x) must work for virtually all types T and typeof(x) that are

Re: [OT] LLVM 3.9 released - you can try the release already with LDC!

2016-09-06 Thread Lodovico Giaretta via Digitalmars-d-announce
On Tuesday, 6 September 2016 at 09:21:06 UTC, eugene wrote: On Sunday, 4 September 2016 at 17:18:10 UTC, Kai Nacke wrote: This is the 9th time that LDC and D are mentioned in the LLVM release notes! lol, how does it help?))) There are lot of projects using LLVM [1]. The fact that LDC if

D Meetup in Hamburg?

2016-09-06 Thread Martin Tschierschke via Digitalmars-d
Hi All, anybody interested to meet in Hamburg, Germany? Time and location will be found! Regards mt.

Re: dlang-vscode

2016-09-06 Thread mogu via Digitalmars-d
On Tuesday, 6 September 2016 at 05:38:28 UTC, Manu wrote: On 6 September 2016 at 14:22, Daniel Kozak via Digitalmars-d wrote: Dne 6.9.2016 v 03:41 Manu via Digitalmars-d napsal(a): On 6 September 2016 at 09:51, John Colvin via Digitalmars-d

Re: Usability of D for Visually Impaired Users

2016-09-06 Thread Chris via Digitalmars-d
On Monday, 5 September 2016 at 20:59:46 UTC, Walter Bright wrote: On 9/5/2016 2:14 AM, Chris wrote: A blind user I worked with used D for a term paper and he could find his way around on dlang.org. So it seems to be pretty ok already. We should only be careful with new stuff like language

Re: [OT] LLVM 3.9 released - you can try the release already with LDC!

2016-09-06 Thread eugene via Digitalmars-d-announce
On Sunday, 4 September 2016 at 17:18:10 UTC, Kai Nacke wrote: This is the 9th time that LDC and D are mentioned in the LLVM release notes! lol, how does it help?)))

Re: Quality of errors in DMD

2016-09-06 Thread Laeeth Isharc via Digitalmars-d
On Monday, 5 September 2016 at 15:55:16 UTC, Dominikus Dittes Scherkl wrote: On Sunday, 4 September 2016 at 20:14:37 UTC, Walter Bright wrote: On 9/4/2016 10:56 AM, David Nadlinger wrote: The bug report I need is the assert location, and a test case that causes it. Users do not need to supply

Re: ADL

2016-09-06 Thread Guillaume Boucher via Digitalmars-d
On Monday, 5 September 2016 at 23:50:33 UTC, Timon Gehr wrote: One hacky way is to provide a mixin template to create a wrapper type within each module that needs it, with std.typecons.Proxy. Proxy picks up UFCS functions in addition to member functions and turns them into member functions.

Re: Promotion rules ... why no float?

2016-09-06 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, September 06, 2016 07:26:37 Andrea Fontana via Digitalmars-d wrote: > On Tuesday, 6 September 2016 at 07:04:24 UTC, Sai wrote: > > Consider this: > > > > import std.stdio; > > void main() > > { > > > > byte a = 6, b = 7; > > auto c = a + b; > > auto d = a / b; > >

Re: Promotion rules ... why no float?

2016-09-06 Thread Daniel Kozak via Digitalmars-d
Dne 6.9.2016 v 09:04 Sai via Digitalmars-d napsal(a): Consider this: import std.stdio; void main() { byte a = 6, b = 7; auto c = a + b; auto d = a / b; writefln("%s, %s", typeof(c).stringof, c); writefln("%s, %s", typeof(d).stringof, d); } Output : int, 13 int, 0 I really

Re: dependency analysis for makefile construction

2016-09-06 Thread Basile B. via Digitalmars-d-learn
On Monday, 5 September 2016 at 18:49:25 UTC, Basile B. wrote: On Monday, 5 September 2016 at 18:22:08 UTC, ag0aep6g wrote: On 09/04/2016 12:07 AM, dan wrote: Are there any FOSS tools for doing dependency analysis of [...] [...] I'm not aware of a standalone tool that does something like

Re: Promotion rules ... why no float?

2016-09-06 Thread Andrea Fontana via Digitalmars-d
On Tuesday, 6 September 2016 at 07:04:24 UTC, Sai wrote: Consider this: import std.stdio; void main() { byte a = 6, b = 7; auto c = a + b; auto d = a / b; writefln("%s, %s", typeof(c).stringof, c); writefln("%s, %s", typeof(d).stringof, d); } Output :

  1   2   >