Re: Silicon Valley D Meetup June 23, 2016 - Jason White's Button and other topics

2016-06-23 Thread Ali Çehreli via Digitalmars-d-announce
On 06/23/2016 08:22 PM, Timothee Cour via Digitalmars-d-announce wrote: no sound :( We had too many problems today, some of which human errors. Ali

Re: Examples of dub use needed

2016-06-23 Thread WhatMeForget via Digitalmars-d
On Thursday, 23 June 2016 at 07:46:41 UTC, Mike Parker wrote: FWIW, this thread has inspired me to begin work on a project I've titled 'The DUB Handbook'. I've been meaning to write some tutorials about DUB (among other things) for learningd.org, but I think a detailed guide would be a more

Re: Please rid me of this goto

2016-06-23 Thread Timon Gehr via Digitalmars-d
On 24.06.2016 05:22, Timon Gehr wrote: ... break the laws of physics by arbitrarily defining something to be true when it is not. ... Utter nonsense. (Also note that the 'laws of physics' typically give rise to piecewise analytic functions, and if you only consider analytic functions, 0 ^ 0

Re: Please rid me of this goto

2016-06-23 Thread Timon Gehr via Digitalmars-d
On 24.06.2016 04:36, Smoke Adams wrote: You do realize that e^(-1/t)^t is a counter example? e^(-1/t) -> 0 as t -> 0 t -> 0 as t -> 0 That's not a counterexample to anything I said. ^ is discontinuous at (0,0) and indeed, you can force the limit to an arbitrary value by choosing

Re: Silicon Valley D Meetup June 23, 2016 - Jason White's Button and other topics

2016-06-23 Thread Timothee Cour via Digitalmars-d-announce
no sound :( On Thu, Jun 23, 2016 at 7:18 PM, Ali Çehreli < digitalmars-d-announce@puremagic.com> wrote: > Google Hangout: > > > > https://hangouts.google.com/hangouts/_/hoaevent/AP36tYciptM-tYpkf-Y0NXXs__5mWY5fBGv_x7TA25cYLo3TZPIe3w?hl=en=1 > > Ali > > > On 06/23/2016 01:45 PM, Ali Çehreli

Re: Get calling this, if exists

2016-06-23 Thread Meta via Digitalmars-d-learn
On Friday, 24 June 2016 at 03:10:51 UTC, Mike Parker wrote: Oh, perhaps I misunderstood your question. Do you meant this: class Foo() { void bar() { Log(); } // Pass reference to Foo instance } void doSomething() { Log(); } // Null reference If so, the answer is no. And I don't see how

Re: Get calling this, if exists

2016-06-23 Thread Mike Parker via Digitalmars-d-learn
On Friday, 24 June 2016 at 03:04:25 UTC, Mike Parker wrote: On Friday, 24 June 2016 at 02:57:28 UTC, "Smoke" Adams wrote: Is there a type of __THIS__ construct similar to __FILE__ and __LINE__? Something that returns the current this ptr if it exists, null otherwise. Log(string filename =

Re: Let's make the DLang Tour an awesome landing page for D newbies

2016-06-23 Thread Carl Vogel via Digitalmars-d
On Thursday, 23 June 2016 at 19:24:49 UTC, Seb wrote: Let me start with the good news: since the DLang Tour was launched by André last month, we had about 3K unique visitors and continuously have between 100-200 visitors per day. However here are the bad news: We loose about 40% of all

Re: Get calling this, if exists

2016-06-23 Thread Mike Parker via Digitalmars-d-learn
On Friday, 24 June 2016 at 02:57:28 UTC, "Smoke" Adams wrote: Is there a type of __THIS__ construct similar to __FILE__ and __LINE__? Something that returns the current this ptr if it exists, null otherwise. Log(string filename = __FILE__, Object obj = __THIS__)() { // inspect obj and do

Get calling this, if exists

2016-06-23 Thread Smoke Adams via Digitalmars-d-learn
Is there a type of __THIS__ construct similar to __FILE__ and __LINE__? Something that returns the current this ptr if it exists, null otherwise. Log(string filename = __FILE__, Object obj = __THIS__)() { // inspect obj and do stuff }

Re: Please rid me of this goto

2016-06-23 Thread Smoke Adams via Digitalmars-d
On Friday, 24 June 2016 at 01:49:27 UTC, Timon Gehr wrote: On 24.06.2016 02:14, H. S. Teoh via Digitalmars-d wrote: On Fri, Jun 24, 2016 at 01:58:01AM +0200, Timon Gehr via Digitalmars-d wrote: On 24.06.2016 01:18, H. S. Teoh via Digitalmars-d wrote: On Thu, Jun 23, 2016 at 11:14:08PM +,

Re: Silicon Valley D Meetup June 23, 2016 - Jason White's Button and other topics

2016-06-23 Thread Ali Çehreli via Digitalmars-d-announce
Google Hangout: https://hangouts.google.com/hangouts/_/hoaevent/AP36tYciptM-tYpkf-Y0NXXs__5mWY5fBGv_x7TA25cYLo3TZPIe3w?hl=en=1 Ali On 06/23/2016 01:45 PM, Ali Çehreli wrote: Sorry for short notice but we're meeting at 7pm California time:

Re: Please rid me of this goto

2016-06-23 Thread Timon Gehr via Digitalmars-d
On 24.06.2016 02:14, H. S. Teoh via Digitalmars-d wrote: On Fri, Jun 24, 2016 at 01:58:01AM +0200, Timon Gehr via Digitalmars-d wrote: On 24.06.2016 01:18, H. S. Teoh via Digitalmars-d wrote: On Thu, Jun 23, 2016 at 11:14:08PM +, deadalnix via Digitalmars-d wrote: On Thursday, 23 June

[Issue 12357] Untyped string variable fails silently. No compiler warning given.

2016-06-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12357 monkeywork...@hotmail.com changed: What|Removed |Added CC||monkeywork...@hotmail.com ---

Re: Proposed Enhancement: Deprecate std.conv.text With 0 Arguments

2016-06-23 Thread Meta via Digitalmars-d
Thank you for the input but considering that the deprecation message for this wasn't triggered a single time while compiling Phobos, I suspect that very few will be bothered by this special case. I have submitted a PMR, so we can all fight over it there:

Re: Please rid me of this goto

2016-06-23 Thread David Nadlinger via Digitalmars-d
On Friday, 24 June 2016 at 00:26:52 UTC, John Colvin wrote: My biggest bugbear is actually the opposite of what you are point out here: people doing careful benchmarking and asm-inspection of small code-fragments in isolation when in reality it is always going to be inlined and optimised in

[OT] ...

2016-06-23 Thread Timon Gehr via Digitalmars-d
On 24.06.2016 01:58, H. S. Teoh via Digitalmars-d wrote: On Fri, Jun 24, 2016 at 01:33:46AM +0200, Timon Gehr via Digitalmars-d wrote: On 24.06.2016 00:53, H. S. Teoh via Digitalmars-d wrote: Because 0^^0 = 1, and 1 is representable. E.g. n^^m counts the number of functions from an m-set to

Re: Release DUB 1.0.0

2016-06-23 Thread Meta via Digitalmars-d-announce
On Thursday, 23 June 2016 at 20:49:23 UTC, Basile B. wrote: Do "single-file packages" have a special name, ie official, e.g if I want to add a menu item for this ? - Compile and run single file DUB package - Compile and run monolithic DUB package - ? I also think to "runnable DUB module" or

Re: Please rid me of this goto

2016-06-23 Thread John Colvin via Digitalmars-d
On Thursday, 23 June 2016 at 23:34:54 UTC, David Nadlinger wrote: On Thursday, 23 June 2016 at 22:08:20 UTC, Seb wrote: [1] https://github.com/wilzbach/perf-d/blob/master/test_pow.d [2] https://github.com/wilzbach/perf-d/blob/master/test_powi.d This is a bad way to benchmark. You are

Re: Please rid me of this goto

2016-06-23 Thread H. S. Teoh via Digitalmars-d
On Fri, Jun 24, 2016 at 01:58:01AM +0200, Timon Gehr via Digitalmars-d wrote: > On 24.06.2016 01:18, H. S. Teoh via Digitalmars-d wrote: > > On Thu, Jun 23, 2016 at 11:14:08PM +, deadalnix via Digitalmars-d wrote: > > > On Thursday, 23 June 2016 at 22:53:59 UTC, H. S. Teoh wrote: > > > > This

Re: Please rid me of this goto

2016-06-23 Thread H. S. Teoh via Digitalmars-d
On Fri, Jun 24, 2016 at 01:33:46AM +0200, Timon Gehr via Digitalmars-d wrote: > On 24.06.2016 00:53, H. S. Teoh via Digitalmars-d wrote: > > > >Because 0^^0 = 1, and 1 is representable. > > > > > > > >E.g. n^^m counts the number of functions from an m-set to an n-set, > > > >and there is exactly

Re: Iup and nukclear interface in D.

2016-06-23 Thread Mike Parker via Digitalmars-d-announce
On Thursday, 23 June 2016 at 23:01:16 UTC, David Nadlinger wrote: On Thursday, 23 June 2016 at 08:14:42 UTC, Mike Parker wrote: * extern(C) functions should, at a minimum, be declared as @nogc and nothrow for client code using those attributes. Be careful, though, if the C library supports

Re: Please rid me of this goto

2016-06-23 Thread Timon Gehr via Digitalmars-d
On 24.06.2016 01:18, H. S. Teoh via Digitalmars-d wrote: On Thu, Jun 23, 2016 at 11:14:08PM +, deadalnix via Digitalmars-d wrote: On Thursday, 23 June 2016 at 22:53:59 UTC, H. S. Teoh wrote: This argument only works for discrete sets. If n and m are reals, you'd need a different argument.

Re: Proposed Enhancement: Deprecate std.conv.text With 0 Arguments

2016-06-23 Thread deadalnix via Digitalmars-d
On Thursday, 23 June 2016 at 23:16:23 UTC, Steven Schveighoffer wrote: This is a problem with optional (), not text. A valid point. But we aren't going to have this change. Spreading the shit doesn't make it smell good. test takes n parameters and return a string representation of these

Re: Phobo's migration

2016-06-23 Thread rikki cattermole via Digitalmars-d
I have plenty of work that needs being done as a dependency to a GUI toolkit. So what are you going to do to contribute? Money, time?

Re: Please rid me of this goto

2016-06-23 Thread David Nadlinger via Digitalmars-d
On Thursday, 23 June 2016 at 23:34:54 UTC, David Nadlinger wrote: I get the following results: (This is of course not intended to be a comprehensive analysis. For example, the codegen for the two functions is actually identical on GDC and LDC, the relative differences are due to measurement

Re: Please rid me of this goto

2016-06-23 Thread David Nadlinger via Digitalmars-d
On Thursday, 23 June 2016 at 22:08:20 UTC, Seb wrote: [1] https://github.com/wilzbach/perf-d/blob/master/test_pow.d [2] https://github.com/wilzbach/perf-d/blob/master/test_powi.d This is a bad way to benchmark. You are essentially testing the compiler's ability to propagate your constants

Re: Please rid me of this goto

2016-06-23 Thread Timon Gehr via Digitalmars-d
On 24.06.2016 00:53, H. S. Teoh via Digitalmars-d wrote: >Because 0^^0 = 1, and 1 is representable. > >E.g. n^^m counts the number of functions from an m-set to an n-set, >and there is exactly one function from {} to {}. This argument only works for discrete sets. No, it works for any

Re: Please rid me of this goto

2016-06-23 Thread H. S. Teoh via Digitalmars-d
On Thu, Jun 23, 2016 at 11:14:08PM +, deadalnix via Digitalmars-d wrote: > On Thursday, 23 June 2016 at 22:53:59 UTC, H. S. Teoh wrote: > > This argument only works for discrete sets. If n and m are reals, > > you'd need a different argument. > > > > For reals, you can use

Re: Proposed Enhancement: Deprecate std.conv.text With 0 Arguments

2016-06-23 Thread Steven Schveighoffer via Digitalmars-d
On 6/23/16 6:46 PM, deadalnix wrote: On Wednesday, 22 June 2016 at 15:39:11 UTC, Meta wrote: If it is called with 0 arguments it will return null. No it will return empty string. null is an empty string. And it does return null specifically. This behaviour has caused several bugs in my

Re: Please rid me of this goto

2016-06-23 Thread deadalnix via Digitalmars-d
On Thursday, 23 June 2016 at 22:53:59 UTC, H. S. Teoh wrote: This argument only works for discrete sets. If n and m are reals, you'd need a different argument. For reals, you can use limits/continuation as argument.

Re: Iup and nukclear interface in D.

2016-06-23 Thread David Nadlinger via Digitalmars-d-announce
On Thursday, 23 June 2016 at 08:14:42 UTC, Mike Parker wrote: * extern(C) functions should, at a minimum, be declared as @nogc and nothrow for client code using those attributes. Be careful, though, if the C library supports user-specified callbacks to be set for some functionality – unless

Re: Please rid me of this goto

2016-06-23 Thread H. S. Teoh via Digitalmars-d
On Thu, Jun 23, 2016 at 11:30:51PM +0200, Timon Gehr via Digitalmars-d wrote: > On 23.06.2016 23:04, Andrei Alexandrescu wrote: > > On 06/23/2016 02:59 PM, Timon Gehr wrote: > > > On 23.06.2016 19:22, Andrei Alexandrescu wrote: > > > > So I was looking for an efficient exponentiation

Re: Proposed Enhancement: Deprecate std.conv.text With 0 Arguments

2016-06-23 Thread deadalnix via Digitalmars-d
On Wednesday, 22 June 2016 at 15:39:11 UTC, Meta wrote: If it is called with 0 arguments it will return null. No it will return empty string. This behaviour has caused several bugs in my code because combined with optional parens and UFCS, it is easy to accidentally call text with 0 args

Re: Shorthand for defining numeric literals as size_t and ptrdiff_t

2016-06-23 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/23/16 6:22 PM, pineapple wrote: There are suffixes for numbers like 0L, 0u, 0f, 0d, etc. What about suffixes representing size_t and ptrdiff_t? Do they exist? If not, why? They do not exist, because the types themselves are not compiler-builtin, they are aliases to the appropriate

Shorthand for defining numeric literals as size_t and ptrdiff_t

2016-06-23 Thread pineapple via Digitalmars-d-learn
There are suffixes for numbers like 0L, 0u, 0f, 0d, etc. What about suffixes representing size_t and ptrdiff_t? Do they exist? If not, why?

Re: inout and opApply

2016-06-23 Thread Steven Schveighoffer via Digitalmars-d
On 6/23/16 3:20 PM, Timon Gehr wrote: On 23.06.2016 14:58, Steven Schveighoffer wrote: On 6/21/16 5:19 PM, Timon Gehr wrote: The problem here is that both variants make sense depending on context and there is no syntax to distinguish between them. This proposal interacts in a weird way with

[Issue 14162] Erratic inference of @safe for lambdas

2016-06-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14162 --- Comment #2 from Walter Bright --- Inference of safety for lambdas should always occur if not explicitly set, because the source is always available. --

[Issue 14162] Erratic inference of @safe for lambdas

2016-06-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14162 Walter Bright changed: What|Removed |Added Keywords||pull --- Comment

Re: Please rid me of this goto

2016-06-23 Thread deadalnix via Digitalmars-d
Can you post codegen for each ?

Re: Please rid me of this goto

2016-06-23 Thread Seb via Digitalmars-d
On Thursday, 23 June 2016 at 21:03:08 UTC, Andrei Alexandrescu wrote: On 06/23/2016 02:37 PM, Seb wrote: On Thursday, 23 June 2016 at 18:05:07 UTC, Andrei Alexandrescu wrote: On 06/23/2016 01:34 PM, H. S. Teoh via Digitalmars-d wrote: I don't understand why that goto is necessary. Eh, thank

Re: GTKD - addOnButtonPress faulty?

2016-06-23 Thread Mike Wey via Digitalmars-d-learn
On 06/23/2016 10:30 AM, TheDGuy wrote: Hi, sorry for my next thread but i did encounter a strange behaviour of the "Button.addOnButtnPress" - Event. Sometimes if i click very fast on the GTKD button, it reacts twice! I am working on a small game and i noticed that if i click slowly everything

Re: Let's make the DLang Tour an awesome landing page for D newbies

2016-06-23 Thread Ali Çehreli via Digitalmars-d
On 06/23/2016 12:24 PM, Seb wrote: > We already tried to improve things a bit (slicker design, D-man on the > front page), but we need your help to motivate future D-eists and > inspire them! Sorry to repeat myself: - The first navigation link says "Install D Locally". I wouldn't click that

Re: Please rid me of this goto

2016-06-23 Thread Timon Gehr via Digitalmars-d
On 23.06.2016 23:04, Andrei Alexandrescu wrote: On 06/23/2016 02:59 PM, Timon Gehr wrote: On 23.06.2016 19:22, Andrei Alexandrescu wrote: So I was looking for an efficient exponentiation implementation, and http://www.stepanovpapers.com/PAM.pdf has a nice discussion starting at page 54.

Re: Please rid me of this goto

2016-06-23 Thread deadalnix via Digitalmars-d
On Thursday, 23 June 2016 at 21:03:08 UTC, Andrei Alexandrescu wrote: However you should test how it performs against the LLVM intrinsics available in LDC, e.g.: llvm.intrinsincs.llvm_pow and llvm_powi (i = integer). Cool! Is that a CPU operation? Andrei It is going to depend on the

Re: Please rid me of this goto

2016-06-23 Thread Walter Bright via Digitalmars-d
On 6/23/2016 10:22 AM, Andrei Alexandrescu wrote: https://dpaste.dzfl.pl/e53acb41885a Paste bin links are ephemeral. The code from the link: /** */ int pow(int lhs, uint rhs, ref bool overflow) { return powImpl(lhs, rhs, overflow); } /// ditto long pow(long lhs, uint rhs, ref bool overflow) {

Re: Please rid me of this goto

2016-06-23 Thread Andrei Alexandrescu via Digitalmars-d
On 06/23/2016 02:59 PM, Timon Gehr wrote: On 23.06.2016 19:22, Andrei Alexandrescu wrote: So I was looking for an efficient exponentiation implementation, and http://www.stepanovpapers.com/PAM.pdf has a nice discussion starting at page 54. Stepanov's solution, however, duplicates code, so I

Re: Please rid me of this goto

2016-06-23 Thread Andrei Alexandrescu via Digitalmars-d
On 06/23/2016 02:37 PM, Seb wrote: On Thursday, 23 June 2016 at 18:05:07 UTC, Andrei Alexandrescu wrote: On 06/23/2016 01:34 PM, H. S. Teoh via Digitalmars-d wrote: I don't understand why that goto is necessary. Eh, thank you all who set me straight! I've been in my head for too long. So

Re: Release DUB 1.0.0

2016-06-23 Thread Basile B. via Digitalmars-d-announce
On Wednesday, 22 June 2016 at 10:18:01 UTC, Sönke Ludwig wrote: Am 21.06.2016 um 00:37 schrieb Basile B.: You should add a system to support example files, without dependency. For example in a static library, something that would indicate that the package in which the file resides is itself a

Silicon Valley D Meetup June 23, 2016 - Jason White's Button and other topics

2016-06-23 Thread Ali Çehreli via Digitalmars-d-announce
Sorry for short notice but we're meeting at 7pm California time: http://www.meetup.com/D-Lang-Silicon-Valley/events/231917495/ Among other topics, Jason White will introduce Button, his build system: http://forum.dlang.org/thread/uhozcvatvyztfuhiv...@forum.dlang.org Don't expect a proper

Re: Let's make the DLang Tour an awesome landing page for D newbies

2016-06-23 Thread Carl Vogel via Digitalmars-d
On Thursday, 23 June 2016 at 20:25:17 UTC, Carl Vogel wrote: The main one is no visible TOC. The only way to move around the tour is to go forward or backward one by one---making it hard to skip around, or understand what topics are coming up. A div on the side with all the section links

Re: Let's make the DLang Tour an awesome landing page for D newbies

2016-06-23 Thread Carl Vogel via Digitalmars-d
On Thursday, 23 June 2016 at 19:24:49 UTC, Seb wrote: Let me start with the good news: since the DLang Tour was launched by André last month, we had about 3K unique visitors and continuously have between 100-200 visitors per day. However here are the bad news: We loose about 40% of all

[OT] 0^^0

2016-06-23 Thread Timon Gehr via Digitalmars-d
On 23.06.2016 21:04, H. S. Teoh via Digitalmars-d wrote: On Thu, Jun 23, 2016 at 08:59:07PM +0200, Timon Gehr via Digitalmars-d wrote: [...] Unrelated comment: 0^^0 should not overflow. Says who?

GSoC 2016 - std.experimental.xml after a month

2016-06-23 Thread Lodovico Giaretta via Digitalmars-d
-- Brace yourself: a very long post is coming -- Hi, One month after the official GSoC start, I want to share with you what's in std.experimental.xml and what will hopefully be there. If you have any question/improvement or anything to say, just leave a comment here or an issue on GitHub

Re: Iup and nukclear interface in D.

2016-06-23 Thread Jordan Wilson via Digitalmars-d-announce
On Thursday, 23 June 2016 at 06:32:09 UTC, mogu wrote: http://code.dlang.org/packages/iupd http://code.dlang.org/packages/nukleard iupd removes all deprecated items in IUP, current version is IUP 3.18. nukleard may have some bugs in name mangling. Does a struct's field name like `null`, i

Re: Please rid me of this goto

2016-06-23 Thread deadalnix via Digitalmars-d
On Thursday, 23 June 2016 at 19:24:54 UTC, via Digitalmars-d wrote: On Thu, Jun 23, 2016 at 07:11:26PM +, deadalnix via Digitalmars-d wrote: | is bitwize or. || is binary or. & is bitwize and. && is binary and. ^ is bitwize xor. ^^ is... no, never mind. binary xor is != lol 3 != 5

Re: Phobo's migration

2016-06-23 Thread jmh530 via Digitalmars-d
On Thursday, 23 June 2016 at 19:05:34 UTC, Meta wrote: Lurk more and you'll see that Walter and Andrei *are* making those tough decisions. If he lurked more, he would notice that threads like this pop up every few months.

Let's make the DLang Tour an awesome landing page for D newbies

2016-06-23 Thread Seb via Digitalmars-d
Let me start with the good news: since the DLang Tour was launched by André last month, we had about 3K unique visitors and continuously have between 100-200 visitors per day. However here are the bad news: We loose about 40% of all visitors directly on the front page and we loose the

Re: inout and opApply

2016-06-23 Thread Timon Gehr via Digitalmars-d
On 23.06.2016 14:58, Steven Schveighoffer wrote: On 6/21/16 5:19 PM, Timon Gehr wrote: The problem here is that both variants make sense depending on context and there is no syntax to distinguish between them. This proposal interacts in a weird way with IFTI. I know you are probably right,

Re: Please rid me of this goto

2016-06-23 Thread via Digitalmars-d
On Thu, Jun 23, 2016 at 07:11:26PM +, deadalnix via Digitalmars-d wrote: > | is bitwize or. || is binary or. > & is bitwize and. && is binary and. > ^ is bitwize xor. ^^ is... no, never mind. binary xor is != lol

Re: Real implicitly converts to float?

2016-06-23 Thread Ali Çehreli via Digitalmars-d-learn
On 06/23/2016 06:57 AM, Steven Schveighoffer wrote: > On 6/23/16 5:37 AM, Jonathan M Davis via Digitalmars-d-learn wrote: >> On Thursday, June 23, 2016 04:55:09 Tofu Ninja via Digitalmars-d-learn >> wrote: > >>> Should I make a bug report? I am not sure it's a bug, seems >>> intentional. Maybe a

Re: Please rid me of this goto

2016-06-23 Thread deadalnix via Digitalmars-d
On Thursday, 23 June 2016 at 18:49:56 UTC, ketmar wrote: On Thursday, 23 June 2016 at 18:35:23 UTC, jmh530 wrote: You're thinking of pow in std.math. I don't see opBinary!("^^") anywhere in there. I only see ^^ in comments. the "^^" is very special, 'cause it is the one and only thing that

[Issue 16197] Constructors/postblits and destructors don't match up for array initialisation

2016-06-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16197 Max Samukha changed: What|Removed |Added CC||maxsamu...@gmail.com

Re: Please rid me of this goto

2016-06-23 Thread H. S. Teoh via Digitalmars-d
On Thu, Jun 23, 2016 at 08:59:07PM +0200, Timon Gehr via Digitalmars-d wrote: [...] > Unrelated comment: 0^^0 should not overflow. Says who?

Re: Phobo's migration

2016-06-23 Thread Meta via Digitalmars-d
On Thursday, 23 June 2016 at 17:24:23 UTC, Joerg Joergonson wrote: So, 10 companies are using phobos!! That's amazing, sure shows how great it is! I wonder if they use use import std.stdio; or actually USE phobos. Phobos clearly is hacked together shit... maybe not all, but at least some.

Re: Please rid me of this goto

2016-06-23 Thread Timon Gehr via Digitalmars-d
On 23.06.2016 19:22, Andrei Alexandrescu wrote: So I was looking for an efficient exponentiation implementation, and http://www.stepanovpapers.com/PAM.pdf has a nice discussion starting at page 54. Stepanov's solution, however, duplicates code, so I eliminated it:

Re: Phobo's migration

2016-06-23 Thread Jack Stouffer via Digitalmars-d
On Thursday, 23 June 2016 at 17:24:23 UTC, Joerg Joergonson wrote: So, 10 companies are using phobos!! That's amazing, sure shows how great it is! I wonder if they use use import std.stdio; or actually USE phobos. It's not a complete list and anyone with half a brain would be able to surmise

Re: Please rid me of this goto

2016-06-23 Thread ketmar via Digitalmars-d
On Thursday, 23 June 2016 at 18:35:23 UTC, jmh530 wrote: You're thinking of pow in std.math. I don't see opBinary!("^^") anywhere in there. I only see ^^ in comments. the "^^" is very special, 'cause it is the one and only thing that compiler recognizes as "function call" in expression

Re: Please rid me of this goto

2016-06-23 Thread H. S. Teoh via Digitalmars-d
On Thu, Jun 23, 2016 at 06:35:23PM +, jmh530 via Digitalmars-d wrote: > On Thursday, 23 June 2016 at 18:20:00 UTC, H. S. Teoh wrote: > > On Thu, Jun 23, 2016 at 02:05:07PM -0400, Andrei Alexandrescu via > > Digitalmars-d wrote: > > > On 06/23/2016 01:34 PM, H. S. Teoh via Digitalmars-d wrote:

Re: Please rid me of this goto

2016-06-23 Thread Seb via Digitalmars-d
On Thursday, 23 June 2016 at 18:05:07 UTC, Andrei Alexandrescu wrote: On 06/23/2016 01:34 PM, H. S. Teoh via Digitalmars-d wrote: I don't understand why that goto is necessary. Eh, thank you all who set me straight! I've been in my head for too long. So where is the current implementation of

[Issue 13572] etc.c.zlib must be nothrow

2016-06-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13572 --- Comment #16 from Ketmar Dark --- "can't be safe", of course ;-) --

Re: Please rid me of this goto

2016-06-23 Thread jmh530 via Digitalmars-d
On Thursday, 23 June 2016 at 18:20:00 UTC, H. S. Teoh wrote: On Thu, Jun 23, 2016 at 02:05:07PM -0400, Andrei Alexandrescu via Digitalmars-d wrote: On 06/23/2016 01:34 PM, H. S. Teoh via Digitalmars-d wrote: > I don't understand why that goto is necessary. Eh, thank you all who set me

[Issue 13572] etc.c.zlib must be nothrow

2016-06-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13572 --- Comment #15 from Ketmar Dark --- [i]>I think that's agreed upon.[/i] yep. and i recognized my mistake -- forgetting that zlib does memory allocation, which is can be @safe/@trusted by definition. --

Re: Is dmd fast?

2016-06-23 Thread Nordlöw via Digitalmars-d
On Thursday, 23 June 2016 at 14:28:08 UTC, Andrei Alexandrescu wrote: Is there a way to tell? Thanks! -- Andrei ld --version I presume.

Re: Please rid me of this goto

2016-06-23 Thread H. S. Teoh via Digitalmars-d
On Thu, Jun 23, 2016 at 02:05:07PM -0400, Andrei Alexandrescu via Digitalmars-d wrote: > On 06/23/2016 01:34 PM, H. S. Teoh via Digitalmars-d wrote: > > I don't understand why that goto is necessary. > > Eh, thank you all who set me straight! I've been in my head for too > long. So where is the

Re: Is dmd fast?

2016-06-23 Thread deadalnix via Digitalmars-d
On Thursday, 23 June 2016 at 14:28:08 UTC, Andrei Alexandrescu wrote: On 06/23/2016 03:14 AM, Nordlöw wrote: On Wednesday, 22 June 2016 at 19:20:42 UTC, deadalnix wrote: You methodology is flawed. You are essentially measuring link time against the standard lib. If you're sitting on Linux

Re: Is dmd fast?

2016-06-23 Thread Brad Anderson via Digitalmars-d
On Thursday, 23 June 2016 at 17:57:33 UTC, Andrei Alexandrescu wrote: On 06/23/2016 01:33 PM, David Nadlinger wrote: On Thursday, 23 June 2016 at 17:24:34 UTC, Andrei Alexandrescu wrote: On my Ubuntu, /usr/bin/ld -> x86_64-linux-gnu-ld. What does that mean? -- Andrei `ld --version` should

[Issue 16197] Constructors/postblits and destructors don't match up for array initialisation

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

Re: Please rid me of this goto

2016-06-23 Thread Stefan Koch via Digitalmars-d
On Thursday, 23 June 2016 at 18:05:07 UTC, Andrei Alexandrescu wrote: On 06/23/2016 01:34 PM, H. S. Teoh via Digitalmars-d wrote: I don't understand why that goto is necessary. Eh, thank you all who set me straight! I've been in my head for too long. So where is the current implementation of

Re: Phobo's migration

2016-06-23 Thread Radu via Digitalmars-d
On Thursday, 23 June 2016 at 17:24:23 UTC, Joerg Joergonson wrote: On Thursday, 23 June 2016 at 14:34:44 UTC, Jack Stouffer wrote: [...] So, 10 companies are using phobos!! That's amazing, sure shows how great it is! I wonder if they use use import std.stdio; or actually USE phobos. [...]

Re: Please rid me of this goto

2016-06-23 Thread Andrei Alexandrescu via Digitalmars-d
On 06/23/2016 01:34 PM, H. S. Teoh via Digitalmars-d wrote: I don't understand why that goto is necessary. Eh, thank you all who set me straight! I've been in my head for too long. So where is the current implementation of "^^"? If it's not as fast as this, we should replace it. -- Andrei

[Issue 13572] etc.c.zlib must be nothrow

2016-06-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13572 --- Comment #14 from ag0ae...@gmail.com --- (In reply to Ketmar Dark from comment #13) > assign to .ptr no. but you *can* call the @safe code from unsafe with > invalid pointer, what i was trying to show. I think that's agreed upon. In that case,

Re: Is dmd fast?

2016-06-23 Thread ketmar via Digitalmars-d
On Thursday, 23 June 2016 at 17:39:45 UTC, Daniel Kozak wrote: [kozzi@samuel ~]$ dmd -defaultlib=libphobos2.so a.d [kozzi@samuel ~]$ time for t in {1..1000}; do ./a; done > /dev/null real0m7.187s user0m4.470s sys0m0.943s [kozzi@samuel ~]$ dmd -defaultlib=libphobos2.a a.d

[Issue 16168] isCopyable trait for value types

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

[Issue 13572] etc.c.zlib must be nothrow

2016-06-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13572 --- Comment #13 from Ketmar Dark --- assign to .ptr no. but you *can* call the @safe code from unsafe with invalid pointer, what i was trying to show. essentially, @safe code can *end* *up* with invalid pointer, 'cause it

Re: Is dmd fast?

2016-06-23 Thread Andrei Alexandrescu via Digitalmars-d
On 06/23/2016 01:33 PM, David Nadlinger wrote: On Thursday, 23 June 2016 at 17:24:34 UTC, Andrei Alexandrescu wrote: On my Ubuntu, /usr/bin/ld -> x86_64-linux-gnu-ld. What does that mean? -- Andrei `ld --version` should clear that up. ;) GNU ld (GNU Binutils for Ubuntu) 2.26 So how do I

Re: Phobo's migration

2016-06-23 Thread dewitt via Digitalmars-d
On Thursday, 23 June 2016 at 17:48:40 UTC, Steven Schveighoffer wrote: On 6/23/16 1:24 PM, Joerg Joergonson wrote: On Thursday, 23 June 2016 at 14:34:44 UTC, Jack Stouffer wrote: On Thursday, 23 June 2016 at 12:57:47 UTC, Steven Schveighoffer wrote: [...] AFAIK the all of the companies on

bf-ctfe

2016-06-23 Thread Stefan Koch via Digitalmars-d-announce
Hi, I just wrote a brain-fuck trans-compiler that works at CTFE. It is at https://github.com/UplinkCoder/bf-ctfe I am using it to profile my CTFE-Engine. However it also nicely demonstrates the power of CTFE. I will be uploading a video describing how it and why it works shortly. Feel

[Issue 13572] etc.c.zlib must be nothrow

2016-06-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13572 ag0ae...@gmail.com changed: What|Removed |Added CC||ag0ae...@gmail.com --- Comment #12 from

[Issue 16193] opApply() doesn't heap allocate closure

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

Re: Phobo's migration

2016-06-23 Thread Steven Schveighoffer via Digitalmars-d
On 6/23/16 1:24 PM, Joerg Joergonson wrote: On Thursday, 23 June 2016 at 14:34:44 UTC, Jack Stouffer wrote: On Thursday, 23 June 2016 at 12:57:47 UTC, Steven Schveighoffer wrote: I don't mean this as disproof, but many companies are not using Phobos, even though they use D. Sociomantic

Re: Please rid me of this goto

2016-06-23 Thread deadalnix via Digitalmars-d
On Thursday, 23 June 2016 at 17:22:55 UTC, Andrei Alexandrescu wrote: So I was looking for an efficient exponentiation implementation, and http://www.stepanovpapers.com/PAM.pdf has a nice discussion starting at page 54. Stepanov's solution, however, duplicates code, so I eliminated it:

Re: Please rid me of this goto

2016-06-23 Thread Steven Schveighoffer via Digitalmars-d
On 6/23/16 1:22 PM, Andrei Alexandrescu wrote: So I was looking for an efficient exponentiation implementation, and http://www.stepanovpapers.com/PAM.pdf has a nice discussion starting at page 54. Stepanov's solution, however, duplicates code, so I eliminated it:

[Issue 16195] delete should be @system

2016-06-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16195 ZombineDev changed: What|Removed |Added Keywords||safe

Re: Please rid me of this goto

2016-06-23 Thread Kagamin via Digitalmars-d
// Loop invariant: r * (b ^^ e) is the actual result for (;;) { if (e % 2 != 0) { r = mul(r, b, overflow); if (e == 1) return r; } b = mul(b, b, overflow); e /= 2; } ?

Re: Is dmd fast?

2016-06-23 Thread Daniel Kozak via Digitalmars-d
Dne 23.6.2016 v 19:24 Andrei Alexandrescu via Digitalmars-d napsal(a): On 06/23/2016 10:36 AM, ketmar wrote: as of the linker itsef, on most systems /usr/bin/ld is just a symling to either ld.bfd or ld.gold. we can include some notion in DMD documentation regarding to that. On my Ubuntu,

Re: Please rid me of this goto

2016-06-23 Thread H. S. Teoh via Digitalmars-d
On Thu, Jun 23, 2016 at 01:22:55PM -0400, Andrei Alexandrescu via Digitalmars-d wrote: > So I was looking for an efficient exponentiation implementation, and > http://www.stepanovpapers.com/PAM.pdf has a nice discussion starting > at page 54. Stepanov's solution, however, duplicates code, so I >

Re: Is dmd fast?

2016-06-23 Thread Daniel Kozak via Digitalmars-d
Dne 23.6.2016 v 16:39 ketmar via Digitalmars-d napsal(a): On Thursday, 23 June 2016 at 13:32:35 UTC, Daniel Kozak wrote: Or on linux use ld.gold instead of ld.bfd. Using .so instead of .a has another problem with speed. Application link against static phobos lib is much faster than against

Re: Is dmd fast?

2016-06-23 Thread David Nadlinger via Digitalmars-d
On Thursday, 23 June 2016 at 17:24:34 UTC, Andrei Alexandrescu wrote: On my Ubuntu, /usr/bin/ld -> x86_64-linux-gnu-ld. What does that mean? -- Andrei `ld --version` should clear that up. ;) — David

Re: Is dmd fast?

2016-06-23 Thread Andrei Alexandrescu via Digitalmars-d
On 06/23/2016 10:36 AM, ketmar wrote: as of the linker itsef, on most systems /usr/bin/ld is just a symling to either ld.bfd or ld.gold. we can include some notion in DMD documentation regarding to that. On my Ubuntu, /usr/bin/ld -> x86_64-linux-gnu-ld. What does that mean? -- Andrei

  1   2   >