Re: [OT] ...

2016-06-23 Thread H. S. Teoh via Digitalmars-d
On Fri, Jun 24, 2016 at 02:40:15AM +0200, Timon Gehr via Digitalmars-d wrote: > 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: > > > > > >

Re: Please rid me of this goto

2016-06-23 Thread H. S. Teoh via Digitalmars-d
On Fri, Jun 24, 2016 at 05:22:11AM +0200, Timon Gehr via Digitalmars-d wrote: [...] > (BTW: It would be fine with me if 0.0^^0.0 was NaN -- that's a > completely different case than the one at hand: pow on integers.) That's even worse. So 0^0=1 if 0 is regarded as an integer, and 0^0=NaN if 0 is r

Re: inout and opApply

2016-06-23 Thread Shachar Shemesh via Digitalmars-d
On 24/06/16 01:22, Steven Schveighoffer wrote: Considering the possible use cases for something like this, I think we are better off having this limitation than not being able to use opApply with inout. -Steve I am not sure I followed the discussion correctly. If I did, however, it seems to

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 wor

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 t

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 visito

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 +, de

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 2016

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: https://github.com/dlang/phobos/pull/44

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 co

[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 an

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 essential

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 a

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 on

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 pa

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 into

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 cardinal

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 limits/continuatio

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 c

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: 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 implementation

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 b

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 I

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: 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 li

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. Stepano

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 targe

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 elim

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 wher

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 woul

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 visito

[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? http://www.askamathematician.com/2010/12/q-what-does-00-zero-raised-to-the-zeroth-power-

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 (ht

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 i

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 majority

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, b

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: 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 co

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? http://www.askamathematician.com/2010/12/q-what-does-00-zero-raised-to-the-zeroth-power-equal-why-do-mathematicians-and-high-school-teachers-disagr

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. T

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: https://dpaste.dzfl.pl/e53acb41

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 parsin

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

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 straight!

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 c

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 ma

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 cl

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

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 [kozzi@s

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 get

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 th

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 definit

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: https:

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: https://dpaste.dzfl.pl/e53acb418

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, /usr

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 > e

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 dyn

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

Re: Phobo's migration

2016-06-23 Thread Joerg Joergonson via Digitalmars-d
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 definitely does not (they use D1 currently, and th

Please rid me of this goto

2016-06-23 Thread Andrei Alexandrescu via Digitalmars-d
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: https://dpaste.dzfl.pl/e53acb41885a The cost is the use of one goto. Can the

Re: Phobo's migration

2016-06-23 Thread Icecream Bob via Digitalmars-d
On Wednesday, 22 June 2016 at 18:25:51 UTC, jmh530 wrote: On Wednesday, 22 June 2016 at 17:55:11 UTC, Joerg Joergonson wrote: Have you every used .NET considerably? You're comparing D to something created and maintained by one of the largest software companies in the world... Sounds like a

Re: Phobo's migration

2016-06-23 Thread David Nadlinger via Digitalmars-d
On Thursday, 23 June 2016 at 12:57:47 UTC, Steven Schveighoffer wrote: […] I believe Weka.io does not [use Phobos] either. Weka actually uses Phobos quite liberally – `fgrep -rI "import std." weka` yields several thousand results (I'm sure Liran will be happy to share more details). It's just

Re: Phobo's migration

2016-06-23 Thread Dicebot via Digitalmars-d
On 06/23/2016 04:04 PM, H. S. Teoh via Digitalmars-d wrote: >> Sociomantic definitely does not (they use D1 currently, and their D2 >> port probably uses a port of their library as well), and I believe >> Weka.io does not either. > > AFAIK, the reason Sociomantic doesn't use Phobos is because thei

named args

2016-06-23 Thread ArturG via Digitalmars-d
http://melpon.org/wandbox/permlink/u8lpOZ9owC7QXfa3 hi, that code is based on ideas and code from this[1] thread. some examples: // named and in order args!(fun, a=>6, b=>65, s=>"test", f=>1.4); // named and out of order args!(fun, b=>65, f=>1.4, s=>"test", a=>6); // unnamed and in

Re: Examples of dub use needed

2016-06-23 Thread Mike Parker via Digitalmars-d
On Thursday, 23 June 2016 at 15:03:20 UTC, jmh530 wrote: You had recommended looking through json/sdl files from existing projects to learn how to use dub properly. If someone took this advice for learning D, it would be to look at source code in random projects to try to understand the lang

Re: Examples of dub use needed

2016-06-23 Thread jmh530 via Digitalmars-d
On Thursday, 23 June 2016 at 01:43:32 UTC, Mike Parker wrote: On Wednesday, 22 June 2016 at 19:20:30 UTC, jmh530 wrote: I will touch dub, but I still felt like shouting "well then why doesn't the next edition of Learning D just tell people to look at some D source code and figure it out" whe

Re: Phobo's migration

2016-06-23 Thread jmh530 via Digitalmars-d
On Thursday, 23 June 2016 at 08:52:06 UTC, Ola Fosheim Grøstad wrote: Honest question: have you ever looked into Kaizen and lean management https://en.wikipedia.org/wiki/Kaizen? Because stopping everything in Phobos and waiting for "breakthroughs" is a dead on arrival plan. A continuous impro

Re: Phobo's migration

2016-06-23 Thread Jack Stouffer via Digitalmars-d
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 definitely does not (they use D1 currently, and their D2 port probably uses a port of their library as well), and

Re: Is dmd fast?

2016-06-23 Thread ketmar via Digitalmars-d
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 dynamic version. either i didn't understood you right, or...

Re: Is dmd fast?

2016-06-23 Thread ketmar via Digitalmars-d
On Thursday, 23 June 2016 at 14:28:08 UTC, Andrei Alexandrescu wrote: The GNU gold linker should be the default on newer distributions. Is there a way to tell? Thanks! -- Andrei it's not something dmd should enforce: it is the system setting under user control. there may be many various reas

Re: Results of Rust Survey 2016

2016-06-23 Thread Kagamin via Digitalmars-d
On Thursday, 23 June 2016 at 11:25:46 UTC, qznc wrote: Now that Python has won over Ruby [0], it is the dominant scripting language. [0] https://www.google.com/trends/explore#q=python%20language%2C%20ruby%20language&cmpt=q&tz=Etc%2FGMT-2 Tried to add javascript to the chart, but got a strang

Re: Is dmd fast?

2016-06-23 Thread Andrei Alexandrescu via Digitalmars-d
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 make sure that you're using the GNU gold linker (`ld.gold`) by default (`l

Re: Examples of dub use needed

2016-06-23 Thread Mike Parker via Digitalmars-d
On Thursday, 23 June 2016 at 13:33:03 UTC, Wyatt wrote: Yes, this is a good idea. It took me most of a day of trying to wrestle my project into a dub-compatible state and I honestly ended up giving up because my old Makefile is shorter, faster, and much easier to understand. (IIRC, the last s

Re: Examples of dub use needed

2016-06-23 Thread Mike Parker via Digitalmars-d
On Thursday, 23 June 2016 at 13:31:37 UTC, Guido wrote: But I have to say that more detailed descriptions of commands is not what I had in mind. What are the best coding practices and why? I obviously haven't started using dub yet, so I won't be able to judge whether a code example is mere

Re: Examples of dub use needed

2016-06-23 Thread Wyatt via Digitalmars-d
On Thursday, 23 June 2016 at 07:46:41 UTC, Mike Parker wrote: My intention with the text is to provide a detailed description of every dub command and configuration directive, along with examples of how to use them in both JSON and SDLang formats. Yes, this is a good idea. It took me most of

Re: Examples of dub use needed

2016-06-23 Thread Guido 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 wor

Re: Is dmd fast?

2016-06-23 Thread Daniel Kozak via Digitalmars-d
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 dynamic version. Dne 22.6.2016 v 21:33 ketmar via Digitalmars-d napsal(a): On Wednesday, 22 June 2016 at 19:25:13 UTC, Jack

Re: Phobo's migration

2016-06-23 Thread H. S. Teoh via Digitalmars-d
On Thu, Jun 23, 2016 at 08:57:47AM -0400, Steven Schveighoffer via Digitalmars-d wrote: > On 6/23/16 8:31 AM, Jack Stouffer wrote: [...] > > Phobos is "obviously" production ready as it's being used in > > production at many companies https://dlang.org/orgs-using-d.html > > > > So companies are w

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

2016-06-23 Thread Steven Schveighoffer via Digitalmars-d
On 6/22/16 1:12 PM, Jack Stouffer wrote: On Wednesday, 22 June 2016 at 17:04:54 UTC, Meta wrote: Intentional or not, I don't see any downside to disallowing calling text with 0 args (aside from backwards-compatibility concerns). It doesn't even return anything useful, just null. Well, the idea

Re: inout and opApply

2016-06-23 Thread Steven Schveighoffer via Digitalmars-d
On 6/22/16 6:28 AM, Kagamin wrote: On Monday, 20 June 2016 at 15:09:22 UTC, Steven Schveighoffer wrote: int opApply(scope int delegate(ref inout T value) dg) inout The inout inside the delegate is wrapped just like the inout of the 'this' parameter. effectively, this becomes equivalent to sever

Re: inout and opApply

2016-06-23 Thread Steven Schveighoffer via Digitalmars-d
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, but can you explain maybe via an example what you

Re: Phobo's migration

2016-06-23 Thread Steven Schveighoffer via Digitalmars-d
On 6/23/16 8:31 AM, Jack Stouffer wrote: On Thursday, 23 June 2016 at 08:55:07 UTC, Ola Fosheim Grøstad wrote: The DMD developers refuse to use Phobos in the D compiler, so Phobos is obviously not production ready. Ridiculous. One data point does not make a trend. Phobos is "obviously" produc

Re: Phobo's migration

2016-06-23 Thread Jack Stouffer via Digitalmars-d
On Thursday, 23 June 2016 at 08:52:06 UTC, Ola Fosheim Grøstad wrote: This is not true. Please elaborate. There are many development methodologies and most of them are not suitable for designing programming languages, including all "lean" methodologies. D is a continually improving languag

Re: Phobo's migration

2016-06-23 Thread Jack Stouffer via Digitalmars-d
On Thursday, 23 June 2016 at 08:55:07 UTC, Ola Fosheim Grøstad wrote: The DMD developers refuse to use Phobos in the D compiler, so Phobos is obviously not production ready. Ridiculous. One data point does not make a trend. Phobos is "obviously" production ready as it's being used in producti

Re: Results of Rust Survey 2016

2016-06-23 Thread qznc via Digitalmars-d
On Thursday, 23 June 2016 at 09:18:47 UTC, sdds wrote: On Thursday, 23 June 2016 at 08:33:39 UTC, qznc wrote: For Rust, D is even mentioned. For the question "What programming languages are you most comfortable with?" 68 of 3085 people selected D. 1666 ppl selected Python. For the same Q in t

Re: Phobo's migration

2016-06-23 Thread Suliman via Digitalmars-d
I agree with the need for a D3 and a completely redesigned standard library though. But it will only happen as a fork, not from within the current team... http://volt-lang.org/ as variant

  1   2   >