Re: Flame bait: D vs. Rust vs. Go Benchmarking

2013-07-24 Thread dennis luehring
Am 24.07.2013 06:16, schrieb CJS: This isn't a constructive link, but this benchmark of D vs. Rust vs. Go just hit the reddit/programming front page. Spoiler: D came out pretty well, but for some reason ldc gave significantly better results than gdc. It's unclear why since the author didn't rele

Re: Flame bait: D vs. Rust vs. Go Benchmarking

2013-07-24 Thread Peter Alexander
This comment is worrying: "Can you try D version without std.random, and use srand and rand from std.c.stdlib? I think it should be almost same speed as C version ;-)" "Wow! Just tried that, and this brings the running time of the DMD-compiled version to 0.770s from 1.290, the GDC-compiled

Re: Flame bait: D vs. Rust vs. Go Benchmarking

2013-07-24 Thread Iain Buclaw
On 24 July 2013 07:20, Andrei Alexandrescu wrote: > On 7/23/13 9:23 PM, Walter Bright wrote: >>> >>> reddit link: >>> >>> http://www.reddit.com/r/programming/comments/1ixnf6/benchmarking_roguelike_level_generation_go_rust/ >> >> >> Please post your comment here to Reddit! > > > Did. I tried to pro

Re: Flame bait: D vs. Rust vs. Go Benchmarking

2013-07-24 Thread dennis luehring
Am 24.07.2013 09:20, schrieb Peter Alexander: This comment is worrying: "Can you try D version without std.random, and use srand and rand from std.c.stdlib? I think it should be almost same speed as C version ;-)" "Wow! Just tried that, and this brings the running time of the DMD-compiled versi

Re: Flame bait: D vs. Rust vs. Go Benchmarking

2013-07-24 Thread dennis luehring
Am 24.07.2013 09:39, schrieb dennis luehring: for an pure code-generation test he should implement the stdc random in pure D, go, Haskell whatever and get rid of the printf stuff - that would give better results he could use this glibc like but simplified implementation of random as a base for

Re: Flame bait: D vs. Rust vs. Go Benchmarking

2013-07-24 Thread Joseph Rushton Wakeling
On Wednesday, 24 July 2013 at 07:20:16 UTC, Peter Alexander wrote: This comment is worrying: "Can you try D version without std.random, and use srand and rand from std.c.stdlib? I think it should be almost same speed as C version ;-)" "Wow! Just tried that, and this brings the running time o

Re: Compile-time optimization

2013-07-24 Thread JS
On Wednesday, 24 July 2013 at 01:07:15 UTC, H. S. Teoh wrote: On Wed, Jul 24, 2013 at 01:35:23AM +0200, JS wrote: [...] My three points out of the post is: 1. D needs some way to make doing this stuff easier. 2. It needs to be done! ;) 3. Goto 1. I didn't realize D could even potentially do it

Re: Flame bait: D vs. Rust vs. Go Benchmarking

2013-07-24 Thread monarch_dodra
On Wednesday, 24 July 2013 at 07:20:16 UTC, Peter Alexander wrote: This comment is worrying: "Can you try D version without std.random, and use srand and rand from std.c.stdlib? I think it should be almost same speed as C version ;-)" "Wow! Just tried that, and this brings the running time o

Re: Flame bait: D vs. Rust vs. Go Benchmarking

2013-07-24 Thread Joseph Rushton Wakeling
On Wednesday, 24 July 2013 at 09:43:12 UTC, monarch_dodra wrote: Designing a new "std.random2" or "std.rand" should be high on our todo list. That, and I think "std.random" should go the way of "std.xml": A big fat warning telling users it is doomed for replacement, and, perhaps, a brief explan

Re: Compile-time optimization

2013-07-24 Thread monarch_dodra
On Tuesday, 23 July 2013 at 17:41:01 UTC, Ali Çehreli wrote: On 07/23/2013 09:21 AM, JS wrote: > string join(T...)(T t)// Note join has a variadic parameter > { > ctfe { Are you aware of version(ctfe)? Hum... really? I don't think that exists. Either that, or I'm using it wrong. Cou

Re: Compile-time optimization

2013-07-24 Thread monarch_dodra
On Wednesday, 24 July 2013 at 09:56:41 UTC, monarch_dodra wrote: version (poop) Goddamnit. There goes my credibility -_-' I was testing to see if I got a compile error with an inexistant version tag. Please replace that with "ctfe"

Re: Flame bait: D vs. Rust vs. Go Benchmarking

2013-07-24 Thread bearophile
Joseph Rushton Wakeling: It'd be interesting to see how the speeds go if Xorshift was used in place of Mersenne Twister, that should give a big speed boost while still having high statistical quality. There is a version with xorshift: http://codepad.org/ecw8aPFu Bye, bearophile

Re: working on the dlang.org website

2013-07-24 Thread Vladimir Panteleev
On Wednesday, 24 July 2013 at 06:44:25 UTC, Jacob Carlborg wrote: On 2013-07-24 01:57, Vladimir Panteleev wrote: Only committers see that notice. Contributors who do not have commit access do not see that notice. If you need a pull request author to update their pull request, you need to let t

Re: Flame bait: D vs. Rust vs. Go Benchmarking

2013-07-24 Thread John Colvin
On Wednesday, 24 July 2013 at 07:20:16 UTC, Peter Alexander wrote: This comment is worrying: "Can you try D version without std.random, and use srand and rand from std.c.stdlib? I think it should be almost same speed as C version ;-)" "Wow! Just tried that, and this brings the running time o

Re: Flame bait: D vs. Rust vs. Go Benchmarking

2013-07-24 Thread bearophile
John Colvin: There should be a note in std.random docs warning that it's slower but better than the c stdlib version. Compiling with LDC2 I have found Xorshift about as fast as C rand :-) So I suggested to make Xorshift the default one, but people rightly answered the standard one should b

Recommendation for a D build system

2013-07-24 Thread Luís.Marques
I have some old D code and I wanted to improve its build system: that code was using a .bat and shell script with dmd, manually listing all the .d files to be linked! Don't ask me why I didn't use at least a Makefile, I don't recall, this is quite old code. What would you currently recommend t

Re: Recommendation for a D build system

2013-07-24 Thread Dicebot
On Wednesday, 24 July 2013 at 12:24:26 UTC, Luís Marques wrote: I have some old D code and I wanted to improve its build system: that code was using a .bat and shell script with dmd, manually listing all the .d files to be linked! Don't ask me why I didn't use at least a Makefile, I don't recal

Re: Flame bait: D vs. Rust vs. Go Benchmarking

2013-07-24 Thread bearophile
CJS: reddit link: As suggested by Walter I think all D compilers could add a switch like "-Of" that equals "-O -release -inline -noboundscheck". (It's better to not call it "-O3" because ldc2 has already a -O3 switch with different semantics.) Bye, bearophile

Re: working on the dlang.org website

2013-07-24 Thread Jacob Carlborg
On 2013-07-24 12:16, Vladimir Panteleev wrote: This does not apply to the dlang.org repo, which is not being tested. Right. It should though, then it can catch merge and compile errors. -- /Jacob Carlborg

Re: Recommendation for a D build system

2013-07-24 Thread Jacob Carlborg
On 2013-07-24 14:34, Dicebot wrote: If code amount is relatively small (and building does not involve calling any external tools), I'd stick with rdmd. `rdmd --build-only main.d` and let it figure out all imports. I use rdmd as well. I'm using two shell script, one to build the application a

Re: Flame bait: D vs. Rust vs. Go Benchmarking

2013-07-24 Thread Adam D. Ruppe
On Wednesday, 24 July 2013 at 12:46:26 UTC, bearophile wrote: As suggested by Walter I think all D compilers could add a switch like "-Of" that equals "-O -release -inline -noboundscheck". I'm not comfortable with the recommendations for -noboundscheck because I see the bounds check as a good

FAQs

2013-07-24 Thread Adam D. Ruppe
We should really have an easy to see FAQ on language usage on the homepage and on the D.learn web forum gateway, in the appearance of a sticky thread perhaps. There's a few of the same questions that come up a lot, like I've seen a question about the windows console three or four times in the

Re: FAQs

2013-07-24 Thread monarch_dodra
On Wednesday, 24 July 2013 at 15:18:20 UTC, Adam D. Ruppe wrote: We should really have an easy to see FAQ on language usage on the homepage and on the D.learn web forum gateway, in the appearance of a sticky thread perhaps. There's a few of the same questions that come up a lot, like I've see

Re: Compile-time optimization

2013-07-24 Thread JS
On Wednesday, 24 July 2013 at 09:58:02 UTC, monarch_dodra wrote: On Wednesday, 24 July 2013 at 09:56:41 UTC, monarch_dodra wrote: version (poop) Goddamnit. There goes my credibility -_-' I was testing to see if I got a compile error with an inexistant version tag. Please replace that with

Re: Flame bait: D vs. Rust vs. Go Benchmarking

2013-07-24 Thread deadalnix
On Wednesday, 24 July 2013 at 15:11:40 UTC, Adam D. Ruppe wrote: On Wednesday, 24 July 2013 at 12:46:26 UTC, bearophile wrote: As suggested by Walter I think all D compilers could add a switch like "-Of" that equals "-O -release -inline -noboundscheck". I'm not comfortable with the recommenda

Re: FAQs

2013-07-24 Thread Peter Alexander
On Wednesday, 24 July 2013 at 15:25:49 UTC, monarch_dodra wrote: Having a good FAQ is always a plus, but it's a fact of life that the same old questions will be asked ad infinitum on a programming message board. This is true, and I don't think there's anything that can be done about it. Eve

Re: Flame bait: D vs. Rust vs. Go Benchmarking

2013-07-24 Thread bearophile
Adam D. Ruppe: I'm not comfortable with the recommendations for -noboundscheck because I see the bounds check as a good thing and use it in all my real world code. Getting used to turning it off regularly kinda torpedoes the whole memory safety thing D offers. I understand. I think D should

Re: FAQs

2013-07-24 Thread user
I like D Wiki http://wiki.dlang.org, can't we create one there? http://wiki.dlang.org/FAQ seems to be uneditable, so I created http://wiki.dlang.org/D_FAQ I am not a programmer by profession, so not sure how to apply FAQ template, if there is one. But would love to contribute when possible.

Re: Compile-time optimization

2013-07-24 Thread Ali Çehreli
On 07/24/2013 02:56 AM, monarch_dodra wrote: > On Tuesday, 23 July 2013 at 17:41:01 UTC, Ali Çehreli wrote: >> Are you aware of version(ctfe)? > > Hum... really? I don't think that exists. You are right. I must be remembering old proposals about it. Ali

Re: persistent byLine

2013-07-24 Thread Nick Treleaven
On 23/07/2013 17:13, Nick Treleaven wrote: On 23/07/2013 00:28, Jonathan M Davis wrote: On Monday, July 22, 2013 13:08:05 Nick Treleaven wrote: I made a pull request to re-enable using byLine!(char, immutable char). (Note this compiled in the current release, but didn't work properly AFAICT. It

Re: Compile-time optimization

2013-07-24 Thread H. S. Teoh
On Wed, Jul 24, 2013 at 09:22:14AM -0700, Ali Çehreli wrote: > On 07/24/2013 02:56 AM, monarch_dodra wrote: > > > On Tuesday, 23 July 2013 at 17:41:01 UTC, Ali Çehreli wrote: > > >> Are you aware of version(ctfe)? > > > > Hum... really? I don't think that exists. > > You are right. I must be rem

Re: FAQs

2013-07-24 Thread evilrat
On Wednesday, 24 July 2013 at 16:02:05 UTC, user wrote: I like D Wiki http://wiki.dlang.org, can't we create one there? http://wiki.dlang.org/FAQ seems to be uneditable, so I created http://wiki.dlang.org/D_FAQ I am not a programmer by profession, so not sure how to apply FAQ template, if the

Re: FAQs

2013-07-24 Thread Adam D. Ruppe
On Wednesday, 24 July 2013 at 15:25:49 UTC, monarch_dodra wrote: it's a fact of life that the same old questions will be asked ad infinitum on a programming message board. I think there are some good entries in the wiki too. Yeah, though the faq is useful too for answering the questions when

Re: persistent byLine

2013-07-24 Thread Jakob Ovrum
On Monday, 22 July 2013 at 23:28:46 UTC, Jonathan M Davis wrote: splitter will do the job just fine as long as you don't care about /r/n - though we should arguably come up with a solution that works with /r/n (assuming that something in std.range or std.algorithm doesn't already do it, and I'

Re: FAQs

2013-07-24 Thread Mr. Anonymous
On Wednesday, 24 July 2013 at 15:18:20 UTC, Adam D. Ruppe wrote: We should really have an easy to see FAQ on language usage on the homepage and on the D.learn web forum gateway, in the appearance of a sticky thread perhaps. There's a few of the same questions that come up a lot, like I've see

Re: persistent byLine

2013-07-24 Thread Peter Alexander
On Wednesday, 24 July 2013 at 17:13:10 UTC, Jakob Ovrum wrote: auto newlinePattern = ctRegex!"[\r\n]+"; That will swallow empty lines.

Re: persistent byLine

2013-07-24 Thread Jakob Ovrum
On Wednesday, 24 July 2013 at 17:26:58 UTC, Peter Alexander wrote: On Wednesday, 24 July 2013 at 17:13:10 UTC, Jakob Ovrum wrote: auto newlinePattern = ctRegex!"[\r\n]+"; That will swallow empty lines. Yeah, it's just an example. The specific pattern obviously depends on the exact b

Re: Compile-time optimization

2013-07-24 Thread JS
T, I've looked over your code and understand what you are doing but I don't understand the expression is(typeof(func(args[0], args[1] you are checking if func(a,b)'s return type is a type?

Re: Compile-time optimization

2013-07-24 Thread monarch_dodra
On Wednesday, 24 July 2013 at 17:10:01 UTC, H. S. Teoh wrote: On Wed, Jul 24, 2013 at 09:22:14AM -0700, Ali Çehreli wrote: On 07/24/2013 02:56 AM, monarch_dodra wrote: > On Tuesday, 23 July 2013 at 17:41:01 UTC, Ali Çehreli wrote: >> Are you aware of version(ctfe)? > > Hum... really? I don't t

Re: Flame bait: D vs. Rust vs. Go Benchmarking

2013-07-24 Thread Iain Buclaw
On Jul 24, 2013 4:16 PM, "Adam D. Ruppe" wrote: > > On Wednesday, 24 July 2013 at 12:46:26 UTC, bearophile wrote: >> >> As suggested by Walter I think all D compilers could add a switch like "-Of" that equals "-O -release -inline -noboundscheck". > > > I'm not comfortable with the recommendations

Re: Compile-time optimization

2013-07-24 Thread JS
On Wednesday, 24 July 2013 at 18:12:37 UTC, JS wrote: T, Also, I've tried to wrap the template in a function and I can't get it to work: string join(T...)(string delim, T args) { return tupleStringReduce!(args); } it seems tupleStringReduce jus

Re: FAQs

2013-07-24 Thread Tofu Ninja
On Wednesday, 24 July 2013 at 17:09:09 UTC, evilrat wrote: On Wednesday, 24 July 2013 at 16:02:05 UTC, user wrote: I like D Wiki http://wiki.dlang.org, can't we create one there? http://wiki.dlang.org/FAQ seems to be uneditable, so I created http://wiki.dlang.org/D_FAQ I am not a programmer by

Re: Flame bait: D vs. Rust vs. Go Benchmarking

2013-07-24 Thread Joseph Rushton Wakeling
On Wednesday, 24 July 2013 at 11:32:17 UTC, bearophile wrote: Compiling with LDC2 I have found Xorshift about as fast as C rand :-) Excellent! I'm away from computer for a week so couldn't check myself. So I suggested to make Xorshift the default one, but people rightly answered the standar

Re: Recommendation for a D build system

2013-07-24 Thread Rob T
On Wednesday, 24 July 2013 at 12:24:26 UTC, Luís Marques wrote: I have some old D code and I wanted to improve its build system: that code was using a .bat and shell script with dmd, manually listing all the .d files to be linked! Don't ask me why I didn't use at least a Makefile, I don't recal

Re: Compile-time optimization

2013-07-24 Thread H. S. Teoh
On Wed, Jul 24, 2013 at 08:12:36PM +0200, JS wrote: > T, > > I've looked over your code and understand what you are doing but I > don't understand the expression > > is(typeof(func(args[0], args[1] > > you are checking if func(a,b)'s return type is a type? That's the usual idiom for ch

Re: Flame bait: D vs. Rust vs. Go Benchmarking

2013-07-24 Thread Andrei Alexandrescu
On 7/24/13 2:43 AM, monarch_dodra wrote: On Wednesday, 24 July 2013 at 07:20:16 UTC, Peter Alexander wrote: This comment is worrying: "Can you try D version without std.random, and use srand and rand from std.c.stdlib? I think it should be almost same speed as C version ;-)" "Wow! Just tried t

Re: FAQs

2013-07-24 Thread Walter Bright
On 7/24/2013 8:25 AM, monarch_dodra wrote: Having a good FAQ is always a plus, but it's a fact of life that the same old questions will be asked ad infinitum on a programming message board. The best way to deal with that is to put the answers in the FAQ, and then when the question comes up, re

Re: Flame bait: D vs. Rust vs. Go Benchmarking

2013-07-24 Thread H. S. Teoh
On Wed, Jul 24, 2013 at 12:54:19PM -0700, Andrei Alexandrescu wrote: > On 7/24/13 2:43 AM, monarch_dodra wrote: [...] > >The whole of std.random is nothing but problems and pitfalls, biting > >us and our users on a regular basis :/ > > What are the other problems aside from value semantics? [...]

Re: Flame bait: D vs. Rust vs. Go Benchmarking

2013-07-24 Thread Namespace
On Wednesday, 24 July 2013 at 20:05:42 UTC, H. S. Teoh wrote: On Wed, Jul 24, 2013 at 12:54:19PM -0700, Andrei Alexandrescu wrote: On 7/24/13 2:43 AM, monarch_dodra wrote: [...] >The whole of std.random is nothing but problems and pitfalls, >biting >us and our users on a regular basis :/ Wha

Re: Flame bait: D vs. Rust vs. Go Benchmarking

2013-07-24 Thread Joseph Rushton Wakeling
On Wednesday, 24 July 2013 at 19:54:19 UTC, Andrei Alexandrescu wrote: What are the other problems aside from value semantics? The serious problems mostly derive _from_ the value semantics. They include the annoying (if you forget to add "ref" when passing to a function, the source RNG won't

Re: Flame bait: D vs. Rust vs. Go Benchmarking

2013-07-24 Thread Joseph Rushton Wakeling
On Wednesday, 24 July 2013 at 20:46:00 UTC, Joseph Rushton Wakeling wrote: There are other issues there, but they are mainly implementation errors that can be fixed (I've fixed several of them recently and will carry on doing so). All the fundamental problems stem from the value semantics. I

Re: Flame bait: D vs. Rust vs. Go Benchmarking

2013-07-24 Thread John Colvin
On Wednesday, 24 July 2013 at 18:28:55 UTC, Iain Buclaw wrote: On Jul 24, 2013 4:16 PM, "Adam D. Ruppe" wrote: On Wednesday, 24 July 2013 at 12:46:26 UTC, bearophile wrote: As suggested by Walter I think all D compilers could add a switch like "-Of" that equals "-O -release -inline -noboun

Re: Flame bait: D vs. Rust vs. Go Benchmarking

2013-07-24 Thread Jonathan M Davis
On Thursday, July 25, 2013 01:29:04 John Colvin wrote: > And @safe is automatically inferred (on templates only still?) > when possible? I don't like where this is going... If you have code that you want to be explictly @system, then mark it with @system. That will override any attribute inferenc

Re: Flame bait: D vs. Rust vs. Go Benchmarking

2013-07-24 Thread Jonathan M Davis
On Wednesday, July 24, 2013 19:28:41 Iain Buclaw wrote: > Incase someone hasn't already pointed out. Bounds checking is *always* > done in @safe code. :) Not if you use -noboundscheck. The whole point of its existence is to disable bounds checking in @safe code. -release disables bounds checking

Re: persistent byLine

2013-07-24 Thread Jonathan M Davis
On Wednesday, July 24, 2013 17:45:53 Nick Treleaven wrote: > Also is there any info on std.io? I assume it's still worthwhile to > update std.stdio docs and fix issues? It is unknown when std.io will be ready for review, and the person working on it is quite busy. We certainly want to continue to

Unable to install latest DMD from D-Apt

2013-07-24 Thread Rene Zwanenburg
Hi, I'm mostly a windows developer, so my linux-fu is pretty non existent. I do however run some D applications on a Debian box which has been quite painless up until now. Today I tried to update DMD on the Debian box from 2.062 to 2.063.2. I removed dmd, switched to the D-Apt repository on

Re: persistent byLine

2013-07-24 Thread H. S. Teoh
On Wed, Jul 24, 2013 at 08:17:08PM -0400, Jonathan M Davis wrote: > On Wednesday, July 24, 2013 17:45:53 Nick Treleaven wrote: > > Also is there any info on std.io? I assume it's still worthwhile to > > update std.stdio docs and fix issues? > > It is unknown when std.io will be ready for review, a

Re: Unable to install latest DMD from D-Apt

2013-07-24 Thread H. S. Teoh
On Thu, Jul 25, 2013 at 03:51:48AM +0200, Rene Zwanenburg wrote: [...] > apt-get install dmd-bin > Reading package lists... Done > Building dependency tree > Reading state information... Done > Some packages could not be installed. This may mean that you have > requested an impossible situation or

Re: Unable to install latest DMD from D-Apt

2013-07-24 Thread Rene Zwanenburg
Thanks for the quick reply! I installed Squeeze a little less than a year ago. When I try to install multiarch support it fails, so you're probably right about it being outdated: apt-get install multiarch-support Reading package lists... Done Building dependency tree Reading state informat

Re: persistent byLine

2013-07-24 Thread Brad Anderson
On Thursday, 25 July 2013 at 01:57:45 UTC, H. S. Teoh wrote: On Wed, Jul 24, 2013 at 08:17:08PM -0400, Jonathan M Davis wrote: On Wednesday, July 24, 2013 17:45:53 Nick Treleaven wrote: > Also is there any info on std.io? I assume it's still > worthwhile to > update std.stdio docs and fix issu

Re: Unable to install latest DMD from D-Apt

2013-07-24 Thread H. S. Teoh
On Thu, Jul 25, 2013 at 04:15:39AM +0200, Rene Zwanenburg wrote: > Thanks for the quick reply! I installed Squeeze a little less than a > year ago. When I try to install multiarch support it fails, so > you're probably right about it being outdated: > > > apt-get install multiarch-support > R

DMD performance issues with deeply-recursive templates

2013-07-24 Thread H. S. Teoh
I just noticed this bug today: http://d.puremagic.com/issues/show_bug.cgi?id=10693 >From what I can tell from a cursory glance, it's caused by the implementation of cartesianProduct using too many template expansions (esp. in the variadic version of cartesianProduct), causing DMD to run v