Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-31 Thread Kagamin via Digitalmars-d-announce
On Friday, 30 May 2014 at 04:21:18 UTC, Jesse Phillips wrote: I've got two posts complete[1]. Since C++ and D are exactly the same for the majority of the code I'm only showing D and talk of C++'s choice. While the rules governing D's behavior are fairly simple I feel that I've expanded on the

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-31 Thread Jesse Phillips via Digitalmars-d-announce
On Saturday, 31 May 2014 at 07:32:22 UTC, Kagamin wrote: What do you mean D does not provide a decltype? typeof(cx) my_cx2 = cx; I'll blame this on my poor knowledge of C++, at this time typeof in C++ does not appear to compile, in the way I'm trying to use it. I thought using typeof in C++

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-31 Thread John Colvin via Digitalmars-d-announce
On Saturday, 31 May 2014 at 17:49:18 UTC, Jesse Phillips wrote: On Saturday, 31 May 2014 at 07:32:22 UTC, Kagamin wrote: What do you mean D does not provide a decltype? typeof(cx) my_cx2 = cx; I'll blame this on my poor knowledge of C++, at this time typeof in C++ does not appear to

Arch Linux package for dtest on AUR

2014-05-31 Thread Atila Neves via Digitalmars-d-announce
I don't know how many people use unit-threaded (https://github.com/atilaneves/unit-threaded) for their tests, and of those how many use Arch Linux, but for anyone else there for who that applies, I added a dtest (https://github.com/atilaneves/dtest) package to the AUR:

Re: New DCD and D-Scanner betas

2014-05-31 Thread Suliman via Digitalmars-d-announce
Sublime integration update http://dynamic.dlang.ru/Files/2014/Sublime-D-integration-plugin-linux-31-05-2014.zip (only for 64 bit system) Screenshot http://dynamic.dlang.ru/Files/2014/87800e29-2dca-49c4-ae79-9f44a2dfe913.png

Re: DCD 0.3.0-beta1 and DScanner 0.1.0-beta1

2014-05-31 Thread Suliman via Digitalmars-d-announce
sorry, I will repost it's to actual thread.

Re: DCD 0.3.0-beta1 and DScanner 0.1.0-beta1

2014-05-31 Thread Suliman via Digitalmars-d-announce
Sublime integration update http://dynamic.dlang.ru/Files/2014/Sublime-D-integration-plugin-linux-31-05-2014.zip Screenshot http://dynamic.dlang.ru/Files/2014/87800e29-2dca-49c4-ae79-9f44a2dfe913.png

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-31 Thread Timon Gehr via Digitalmars-d-announce
On 05/30/2014 02:37 PM, Steven Schveighoffer wrote: in which case static if(cond) { immutable: } int x; should not create x as immutable if cond is true. The current behavior is not consistent with attribute either. Ugh, that is really bad. It shouldn't do that. Is that intentional?

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-31 Thread Walter Bright via Digitalmars-d-announce
On 5/30/2014 5:37 AM, Steven Schveighoffer wrote: On Thu, 29 May 2014 21:15:21 -0400, deadalnix deadal...@gmail.com wrote: On Thursday, 29 May 2014 at 19:06:15 UTC, Steven Schveighoffer wrote: Static if is certainly NOT an attribute, it doesn't make any sense. Well... it sorta does. static

Re: Performance

2014-05-31 Thread Russel Winder via Digitalmars-d
On Sat, 2014-05-31 at 07:32 +0200, dennis luehring via Digitalmars-d wrote: faulty benchmark Indeed. -do not benchmark format -use a dummy-var - just add(overflow is not a problem) your plus() results to it and return that in your main - preventing dead code optimization in any way

Re: Performance

2014-05-31 Thread Russel Winder via Digitalmars-d
On Fri, 2014-05-30 at 19:58 +, bearophile via Digitalmars-d wrote: Russel Winder: A priori I would believe there a problem with these numbers: my experience of CPU-bound D code is that it is generally as fast as C++. The C++ code I've shown above if compiled with -Ofast seems

Re: More useful fixed-size array literals

2014-05-31 Thread Benjamin Thaut via Digitalmars-d
Am 31.05.2014 00:19, schrieb bearophile: Code similar to this is not uncommon. Currently it's refused: immutable data = [1, 5, 3, 1, 5, 1, 5]; void main() @nogc { import std.algorithm: count; assert(data.count([1, 5]) == 3); } test.d(4,23): Error: array literal in @nogc function

Re: More useful fixed-size array literals

2014-05-31 Thread Namespace via Digitalmars-d
I remember Kenji is not fond of this []s syntax, for reasons I don't remember. Do you think there are other better/different solutions? Bye, bearophile Read it on my closed Pull Request: https://github.com/D-Programming-Language/dmd/pull/2952 Another attempt was also closed:

Re: 1st Call for Ideas for Google Summer of Code 2015

2014-05-31 Thread Rikki Cattermole via Digitalmars-d
On 31/05/2014 5:34 a.m., Craig Dillabaugh wrote: I had a couple of things I wanted to post about the D Google Summer of Code submission for 2015. 1. After Andrei had asked for someone interested in taking over the D GSOC submission for 2015, I, along with a few others of you volunteered to

Re: The GC and performance, but not what you expect

2014-05-31 Thread Kagamin via Digitalmars-d
The design of TCMalloc seems to be compatible with Boehm GC, so D GC can probably use same ideas.

Re: More useful fixed-size array literals

2014-05-31 Thread bearophile via Digitalmars-d
Benjamin Thaut: give scope a meaning for function arguments other then lambdas E.g: size_t count(scope int[] heystack, scope int[] needle); Now the compiler can allocate the literal [1, 5] on the stack without any special syntax because it knows that the array literal will not be escaped.

Re: More useful fixed-size array literals

2014-05-31 Thread bearophile via Digitalmars-d
int foo(scope int[] items) @nogc { return foo.sum; } That was: return items.sum; Bye, bearophile

Re: More useful fixed-size array literals

2014-05-31 Thread Benjamin Thaut via Digitalmars-d
Am 31.05.2014 11:08, schrieb bearophile: int foo(scope int[] items) @nogc { return foo.sum; } That was: return items.sum; Bye, bearophile Well obviously the std.algorithm sum would also be annoted with scope. Because it doesn't escape it either. I don't see the problem here. And in

Re: 1st Call for Ideas for Google Summer of Code 2015

2014-05-31 Thread Tobias Pankrath via Digitalmars-d
On Saturday, 31 May 2014 at 02:44:00 UTC, Craig Dillabaugh wrote: On Friday, 30 May 2014 at 19:49:31 UTC, Tobias Pankrath wrote: I know this is very early, but I work slowly :o) * Something like boost::log * Something like boost::program_options * An parser generator on par with antlr4 *

Re: More useful fixed-size array literals

2014-05-31 Thread bearophile via Digitalmars-d
Benjamin Thaut: Well obviously the std.algorithm sum would also be annoted with scope. Because it doesn't escape it either. I don't see the problem here. And in case you really want to escape it, you need to .dup it. A additional advantage of my solution is, that the compiler can prove it

Array bound checks removal increasing importance

2014-05-31 Thread bearophile via Digitalmars-d
My opinions about D array bound checks are slowly changing. I still think -boundscheck=off is useful and good to have. But now I am giving increasing importance to compiler logic that optimizes away bound checks safely. People more and more want a safe system language, more and more persons

Re: Array bound checks removal increasing importance

2014-05-31 Thread Rikki Cattermole via Digitalmars-d
On 31/05/2014 10:56 p.m., bearophile wrote: My opinions about D array bound checks are slowly changing. I still think -boundscheck=off is useful and good to have. But now I am giving increasing importance to compiler logic that optimizes away bound checks safely. People more and more want a safe

Re: Array bound checks removal increasing importance

2014-05-31 Thread Dmitry Olshansky via Digitalmars-d
31-May-2014 14:56, bearophile пишет: My opinions about D array bound checks are slowly changing. I still think -boundscheck=off is useful and good to have. But now I am giving increasing importance to compiler logic that optimizes away bound checks safely. Cool, I hope it means you are getting

Re: Performance

2014-05-31 Thread dennis luehring via Digitalmars-d
Am 31.05.2014 08:36, schrieb Russel Winder via Digitalmars-d: As well as the average (mean), you must provide standard deviation and degrees of freedom so that a proper error analysis and t-tests are feasible. average means average of benchmarked times and the dummy values are only for

Re: Performance

2014-05-31 Thread dennis luehring via Digitalmars-d
Am 31.05.2014 13:25, schrieb dennis luehring: Am 31.05.2014 08:36, schrieb Russel Winder via Digitalmars-d: As well as the average (mean), you must provide standard deviation and degrees of freedom so that a proper error analysis and t-tests are feasible. average means average of benchmarked

Re: Array bound checks removal increasing importance

2014-05-31 Thread bearophile via Digitalmars-d
Rikki Cattermole: The first two foreach statements assignment statements should be compile errors. I'm actually a little bit surprised that we don't already test for this. But I spose that would actually be quite hard. I don't know how hard it is. One purpose of this post is to ask how

Re: D Users Survey: Primary OS?

2014-05-31 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 31 May 2014 at 05:29:00 UTC, AsmMan wrote: Did you mean you use dmd compiler 32-bit itself or are you just using a 64-bit one with -m32 flag? the 32 bit compiler itself

Re: Array bound checks removal increasing importance

2014-05-31 Thread Rikki Cattermole via Digitalmars-d
On 1/06/2014 12:04 a.m., bearophile wrote: Rikki Cattermole: The first two foreach statements assignment statements should be compile errors. I'm actually a little bit surprised that we don't already test for this. But I spose that would actually be quite hard. I don't know how hard it is.

Re: Array bound checks removal increasing importance

2014-05-31 Thread Wanderer via Digitalmars-d
void main() { int[5] data; foreach (const i; 0 .. 10) data[i] = 0; foreach (immutable i; 0 .. 10) data[i] = 0; int[10] big; foreach (const i, x; big) data[i] = x; } I'm not sure if bound checks should be removed here. Before removal, this code gives

Refinement types in OCaML

2014-05-31 Thread bearophile via Digitalmars-d
https://github.com/tomprimozic/type-systems/tree/master/refined_types The implementation of a refined type-checker is actually very straightforward and turned out to be much simpler than I expected. Essentially, program expressions and contracts on function parameters and return types are

Re: Array bound checks removal increasing importance

2014-05-31 Thread bearophile via Digitalmars-d
Wanderer: void main() { int[5] data; foreach (const i; 0 .. 10) data[i] = 0; foreach (immutable i; 0 .. 10) data[i] = 0; int[10] big; foreach (const i, x; big) data[i] = x; } I'm not sure if bound checks should be removed here. Before removal, this code

Re: D Users Survey: Primary OS?

2014-05-31 Thread Dave Wilson via Digitalmars-d
On Thursday, 29 May 2014 at 18:24:57 UTC, Tom Browder via Digitalmars-d wrote: Has anyone done a survey of the primary OS of D users? I (a D newbie) use Debian Linux (64-bit), but I get the feeling that many (if not most) users are on some version of Windows. Thanks. Best regards, -Tom

SurveyMonkey for D users OS - Results

2014-05-31 Thread Abdulhaq via Digitalmars-d
There's been 100 votes and the results are: Linux 64 bits: 53 Linux 32 bits: 4 Windows 64 bits:27 Windows 32 bits: 3 Mac: 7 Other: 6: ArchLinux Android Centos 6 MAC OSX, LINUX 64, Windows 64, FreeBSD 64

Re: New pointer type for GC

2014-05-31 Thread Manu via Digitalmars-d
On 29 May 2014 03:35, via Digitalmars-d digitalmars-d@puremagic.com wrote: On Wednesday, 28 May 2014 at 17:27:20 UTC, Dicebot wrote: Adding GC pointer type does not enable anything that you can't do write now for high-level applications and does not help at all low-level applications. It is

Re: SurveyMonkey for D users OS - Results

2014-05-31 Thread Abdulhaq via Digitalmars-d
On Saturday, 31 May 2014 at 13:37:26 UTC, Abdulhaq wrote: There's been 100 votes and the results are: Linux 64 bits: 53 Linux 32 bits: 4 Windows 64 bits:27 Windows 32 bits: 3 Mac: 7 Other: 6: ArchLinux Android Centos 6

Re: SurveyMonkey for D users OS - Results

2014-05-31 Thread Rikki Cattermole via Digitalmars-d
On 1/06/2014 1:45 a.m., Abdulhaq wrote: On Saturday, 31 May 2014 at 13:37:26 UTC, Abdulhaq wrote: There's been 100 votes and the results are: Linux 64 bits: 53 Linux 32 bits: 4 Windows 64 bits:27 Windows 32 bits: 3 Mac: 7 Other: 6:

Re: Performance

2014-05-31 Thread Andrei Alexandrescu via Digitalmars-d
On 5/30/14, 10:32 PM, dennis luehring wrote: -do not benchmark anything without millions of loops - use the average as the result Use the minimum unless networking is involved. -- Andrei

Re: SurveyMonkey for D users OS - Results

2014-05-31 Thread Abdulhaq via Digitalmars-d
On Saturday, 31 May 2014 at 13:52:46 UTC, Rikki Cattermole wrote: On 1/06/2014 1:45 a.m., Abdulhaq wrote: On Saturday, 31 May 2014 at 13:37:26 UTC, Abdulhaq wrote: There's been 100 votes and the results are: Linux 64 bits: 53 Linux 32 bits: 4 Windows 64 bits:27 Windows 32 bits:

Re: 1st Call for Ideas for Google Summer of Code 2015

2014-05-31 Thread Andrei Alexandrescu via Digitalmars-d
On 5/31/14, 1:30 AM, Rikki Cattermole wrote: As I said with this years one. I'll most likely be available as a mentor. I'll be able to definitely help with anything involving web development. You're welcome to cc me in / chat via gmail. Thanks! Craig, you may want to put together a permanent

Re: Performance

2014-05-31 Thread Andrei Alexandrescu via Digitalmars-d
On 5/30/14, 11:36 PM, Russel Winder via Digitalmars-d wrote: As well as the average (mean), you must provide standard deviation and degrees of freedom so that a proper error analysis and t-tests are feasible. Or put it another way: even if you quote a mean with knowing how many in the sample and

Re: Performance

2014-05-31 Thread Russel Winder via Digitalmars-d
On Sat, 2014-05-31 at 07:02 -0700, Andrei Alexandrescu via Digitalmars-d wrote: On 5/30/14, 11:36 PM, Russel Winder via Digitalmars-d wrote: As well as the average (mean), you must provide standard deviation and degrees of freedom so that a proper error analysis and t-tests are feasible. Or

Re: SurveyMonkey for D users OS - Results

2014-05-31 Thread Andrei Alexandrescu via Digitalmars-d
On 5/31/14, 6:45 AM, Abdulhaq wrote: See the graph at https://www.surveymonkey.com/results/SM-5GGGJV5/ 100 voters - no decimals in percentages :o). -- Andrei

Re: Performance

2014-05-31 Thread John Colvin via Digitalmars-d
On Saturday, 31 May 2014 at 14:01:52 UTC, Andrei Alexandrescu wrote: On 5/30/14, 11:36 PM, Russel Winder via Digitalmars-d wrote: As well as the average (mean), you must provide standard deviation and degrees of freedom so that a proper error analysis and t-tests are feasible. Or put it

Re: D Users Survey: Primary OS?

2014-05-31 Thread Anh Nhan via Digitalmars-d
Windows 8.1 Update, x64. Using dmd 32-bit though, can't be bothered to install MSVC.

Re: Performance

2014-05-31 Thread Andrei Alexandrescu via Digitalmars-d
On 5/31/14, 7:10 AM, Russel Winder via Digitalmars-d wrote: On Sat, 2014-05-31 at 07:02 -0700, Andrei Alexandrescu via Digitalmars-d wrote: On 5/30/14, 11:36 PM, Russel Winder via Digitalmars-d wrote: As well as the average (mean), you must provide standard deviation and degrees of freedom so

Re: Performance

2014-05-31 Thread Thomas via Digitalmars-d
On Saturday, 31 May 2014 at 05:12:54 UTC, Marco Leise wrote: Run this with: -O3 -frelease -fno-assert -fno-bounds-check -march=native This way GCC and LLVM will recognize that you alternately add p0 and p1 to the sum and partially unroll the loop, thereby removing the condition. It takes

Re: D Users Survey: Primary OS?

2014-05-31 Thread AsmMan via Digitalmars-d
On Saturday, 31 May 2014 at 12:15:57 UTC, Adam D. Ruppe wrote: On Saturday, 31 May 2014 at 05:29:00 UTC, AsmMan wrote: Did you mean you use dmd compiler 32-bit itself or are you just using a 64-bit one with -m32 flag? the 32 bit compiler itself I was having problems like some functions like

Re: 1st Call for Ideas for Google Summer of Code 2015

2014-05-31 Thread Craig Dillabaugh via Digitalmars-d
On Saturday, 31 May 2014 at 08:30:17 UTC, Rikki Cattermole wrote: On 31/05/2014 5:34 a.m., Craig Dillabaugh wrote: I had a couple of things I wanted to post about the D Google Summer of Code submission for 2015. 1. After Andrei had asked for someone interested in taking over the D GSOC

Re: 1st Call for Ideas for Google Summer of Code 2015

2014-05-31 Thread Craig Dillabaugh via Digitalmars-d
On Saturday, 31 May 2014 at 08:30:17 UTC, Rikki Cattermole wrote: On 31/05/2014 5:34 a.m., Craig Dillabaugh wrote: I had a couple of things I wanted to post about the D Google Summer of Code submission for 2015. 1. After Andrei had asked for someone interested in taking over the D GSOC

Re: 1st Call for Ideas for Google Summer of Code 2015

2014-05-31 Thread Craig Dillabaugh via Digitalmars-d
On Saturday, 31 May 2014 at 10:19:03 UTC, Tobias Pankrath wrote: On Saturday, 31 May 2014 at 02:44:00 UTC, Craig Dillabaugh wrote: On Friday, 30 May 2014 at 19:49:31 UTC, Tobias Pankrath wrote: I know this is very early, but I work slowly :o) * Something like boost::log * Something like

Re: 1st Call for Ideas for Google Summer of Code 2015

2014-05-31 Thread Craig Dillabaugh via Digitalmars-d
On Saturday, 31 May 2014 at 14:03:58 UTC, Andrei Alexandrescu wrote: On 5/31/14, 1:30 AM, Rikki Cattermole wrote: As I said with this years one. I'll most likely be available as a mentor. I'll be able to definitely help with anything involving web development. You're welcome to cc me in /

Re: Performance

2014-05-31 Thread Russel Winder via Digitalmars-d
On Sat, 2014-05-31 at 10:29 -0700, Andrei Alexandrescu via Digitalmars-d wrote: […] Well there's quantization noise which has uniform distribution. Then all other sources of noise are additive (no noise may make code run faster). So I speculate that the pdf is a half Gaussian mixed with a

Re: Some @nogc text conversion in Phobos?

2014-05-31 Thread bearophile via Digitalmars-d
Dicebot: Benefits: no arbitrary message length limit, no string construction unless toString is actually called. A nothrow @nogc function like the bufferText I've suggested is also useful in situations like this (currently this can't compile): struct Foo { int[3] data; ref int

Re: Redesign of dlang.org

2014-05-31 Thread w0rp via Digitalmars-d
After watching Andrei's keynote where he was asking for help, and noticing that there wasn't any proof of someone working on this, I took charge. http://w0rp.com:8010/ That's the design in the form of a single page website running on my Linode. The source is available here.

Re: Redesign of dlang.org

2014-05-31 Thread Dylan Knutson via Digitalmars-d
Firstly, wow, the site looks beautiful. It has an air of professionality to it, but stays minimal and to the point. I think it'd be best if there was a code example above the fold though (e.g. how basically every programming language website does it nowadays), such as the word length snippet

Re: Redesign of dlang.org

2014-05-31 Thread w0rp via Digitalmars-d
On Saturday, 31 May 2014 at 20:01:50 UTC, Dylan Knutson wrote: Firstly, wow, the site looks beautiful. It has an air of professionality to it, but stays minimal and to the point. I think it'd be best if there was a code example above the fold though (e.g. how basically every programming

Re: Redesign of dlang.org

2014-05-31 Thread Meta via Digitalmars-d
The flat design looks nice, but I really dislike the choice of background colour. It's bland and clashes quite badly with the white of the menu and content box.

Re: Redesign of dlang.org

2014-05-31 Thread Meta via Digitalmars-d
On Saturday, 31 May 2014 at 20:38:05 UTC, Meta wrote: On Saturday, 31 May 2014 at 20:12:06 UTC, Meta wrote: The flat design looks nice, but I really dislike the choice of background colour. It's bland and clashes quite badly with the white of the menu and content box. For comparison, here's

Re: Redesign of dlang.org

2014-05-31 Thread Meta via Digitalmars-d
On Saturday, 31 May 2014 at 20:12:06 UTC, Meta wrote: The flat design looks nice, but I really dislike the choice of background colour. It's bland and clashes quite badly with the white of the menu and content box. For comparison, here's two images. One is the site with the background as the

Re: Redesign of dlang.org

2014-05-31 Thread w0rp via Digitalmars-d
On Saturday, 31 May 2014 at 20:38:41 UTC, Meta wrote: On Saturday, 31 May 2014 at 20:38:05 UTC, Meta wrote: On Saturday, 31 May 2014 at 20:12:06 UTC, Meta wrote: The flat design looks nice, but I really dislike the choice of background colour. It's bland and clashes quite badly with the white

Re: Redesign of dlang.org

2014-05-31 Thread w0rp via Digitalmars-d
On Saturday, 31 May 2014 at 20:52:56 UTC, Kapps wrote: One thing that's a bit broken is that Modern convenience. Modelling power. Native efficiency. wraps to put efficiency. on a different line. Perhaps the text should be made smaller there. Another thing that I'd like to see is a much more

Re: Redesign of dlang.org

2014-05-31 Thread Kapps via Digitalmars-d
On Saturday, 31 May 2014 at 19:49:22 UTC, w0rp wrote: After watching Andrei's keynote where he was asking for help, and noticing that there wasn't any proof of someone working on this, I took charge. http://w0rp.com:8010/ That's the design in the form of a single page website running on my

Re: Redesign of dlang.org

2014-05-31 Thread deadalnix via Digitalmars-d
On Saturday, 31 May 2014 at 19:49:22 UTC, w0rp wrote: After watching Andrei's keynote where he was asking for help, and noticing that there wasn't any proof of someone working on this, I took charge. http://w0rp.com:8010/ That's the design in the form of a single page website running on my

Re: Performance

2014-05-31 Thread Andrei Alexandrescu via Digitalmars-d
On 5/31/14, 11:49 AM, Russel Winder via Digitalmars-d wrote: On Sat, 2014-05-31 at 10:29 -0700, Andrei Alexandrescu via Digitalmars-d wrote: […] Well there's quantization noise which has uniform distribution. Then all other sources of noise are additive (no noise may make code run faster). So

Re: Performance

2014-05-31 Thread Andrei Alexandrescu via Digitalmars-d
On 5/31/14, 2:42 PM, Andrei Alexandrescu wrote: On 5/31/14, 11:49 AM, Russel Winder via Digitalmars-d wrote: On Sat, 2014-05-31 at 10:29 -0700, Andrei Alexandrescu via Digitalmars-d wrote: […] Well there's quantization noise which has uniform distribution. Then all other sources of noise are

Re: Redesign of dlang.org

2014-05-31 Thread Kiith-Sa via Digitalmars-d
On Saturday, 31 May 2014 at 19:49:22 UTC, w0rp wrote: After watching Andrei's keynote where he was asking for help, and noticing that there wasn't any proof of someone working on this, I took charge. http://w0rp.com:8010/ That's the design in the form of a single page website running on my

Re: Array bound checks removal increasing importance

2014-05-31 Thread Nordlöw
bound tests. This means that optimizing away bound checks is becoming more and more important in D. And D can't ignore this Expressions like x[0 .. $/n] and x[$/n .. $] are important in many divide and conquer (recursive) algorithms such as quick-sort and shall not need bounds check simply

Re: Array bound checks removal increasing importance

2014-05-31 Thread Walter Bright via Digitalmars-d
On 5/31/2014 4:06 PM, Nordlöw wrote: I've looked around in DMD for a suitable place to add checks for this but haven't found the spot where range-check is injected. Help anyone? There isn't a suitable place. To make it work, data flow analysis would have to be added to the front end. While

Re: Redesign of dlang.org

2014-05-31 Thread w0rp via Digitalmars-d
On Saturday, 31 May 2014 at 22:54:28 UTC, Kiith-Sa wrote: Looks better than what we have now. Doesn't look as good/to the point/'new' as e.g. http://www.rust-lang.org/ or https://www.dartlang.org/ , I suspect the main problem is content of the front page (wall of text, 'too much stuff'

Re: Array bound checks removal increasing importance

2014-05-31 Thread Walter Bright via Digitalmars-d
On 5/31/2014 5:02 PM, Nordlöw wrote: Could you elaborate a bit on what data flow optimizations mean? http://en.wikipedia.org/wiki/Data-flow_analysis What other kinds of optimizations will become possible? Escape analysis, for one. http://en.wikipedia.org/wiki/Escape_analysis Is this

Re: Performance

2014-05-31 Thread Narendra Modi via Digitalmars-d
On Saturday, 31 May 2014 at 13:59:40 UTC, Andrei Alexandrescu wrote: On 5/30/14, 10:32 PM, dennis luehring wrote: -do not benchmark anything without millions of loops - use the average as the result Use the minimum unless networking is involved. -- Andrei cache??

Re: Array bound checks removal increasing importance

2014-05-31 Thread Meta via Digitalmars-d
On Saturday, 31 May 2014 at 23:30:41 UTC, Walter Bright wrote: There isn't a suitable place. To make it work, data flow analysis would have to be added to the front end. While doable, this is not a simple addition. Eventually, we'll have to do it as a lot of things become possible better with

Re: Array bound checks removal increasing importance

2014-05-31 Thread Daniel Murphy via Digitalmars-d
Meta wrote in message news:pogogtdjyetukenny...@forum.dlang.org... I've always wondered if VRP can be leveraged in certain situations. I can't remember exactly how it's supposed to work, but very basically, isn't it just numeric variables (and expressions?) having an associated range that

Re: Redesign of dlang.org

2014-05-31 Thread Rikki Cattermole via Digitalmars-d
On 1/06/2014 7:49 a.m., w0rp wrote: After watching Andrei's keynote where he was asking for help, and noticing that there wasn't any proof of someone working on this, I took charge. http://w0rp.com:8010/ That's the design in the form of a single page website running on my Linode. The source is

Re: Performance

2014-05-31 Thread Marco Leise via Digitalmars-d
Am Sat, 31 May 2014 17:44:23 + schrieb Thomas t.leich...@arcor.de: Thank you for the help. Which OS is running on your notebook ? For I compiled your source code with your settings with the GCC compiler. The run took 3.1 nanoseconds per step. For the DMD compiler the run took

Re: 1st Call for Ideas for Google Summer of Code 2015

2014-05-31 Thread Russel Winder via Digitalmars-d
On Sat, 2014-05-31 at 02:43 +, Craig Dillabaugh via Digitalmars-d wrote: On Friday, 30 May 2014 at 19:49:31 UTC, Tobias Pankrath wrote: I know this is very early, but I work slowly :o) * Something like boost::log * Something like boost::program_options * An parser generator on par

Re: Redesign of dlang.org

2014-05-31 Thread Russel Winder via Digitalmars-d
On Sat, 2014-05-31 at 19:49 +, w0rp via Digitalmars-d wrote: After watching Andrei's keynote where he was asking for help, and noticing that there wasn't any proof of someone working on this, I took charge. http://w0rp.com:8010/ I have to admit my initial reaction on seeing this was:

Re: Redesign of dlang.org

2014-05-31 Thread Russel Winder via Digitalmars-d
On Sat, 2014-05-31 at 20:40 +, w0rp via Digitalmars-d wrote: On Saturday, 31 May 2014 at 20:38:41 UTC, Meta wrote: On Saturday, 31 May 2014 at 20:38:05 UTC, Meta wrote: On Saturday, 31 May 2014 at 20:12:06 UTC, Meta wrote: The flat design looks nice, but I really dislike the choice

Re: Building 32bit program with MSVC?

2014-05-31 Thread Kagamin via Digitalmars-d-learn
They may use different debugging formats, but just linking should be possible, especially with import libraries.

Re: Different random shuffles generated when compiled with gdc than with dmd

2014-05-31 Thread Russel Winder via Digitalmars-d-learn
On Fri, 2014-05-30 at 16:44 +, Andrew Brown via Digitalmars-d-learn wrote: GDC version 4.8.2,i guess that's my problem. This is what happens when you let Ubuntu look after your packages. Debian Sid has GCC 4.9 packages, but that may not help? -- Russel.

Re: Different random shuffles generated when compiled with gdc than with dmd

2014-05-31 Thread Dicebot via Digitalmars-d-learn
On Saturday, 31 May 2014 at 06:54:13 UTC, Russel Winder via Digitalmars-d-learn wrote: On Fri, 2014-05-30 at 16:44 +, Andrew Brown via Digitalmars-d-learn wrote: GDC version 4.8.2,i guess that's my problem. This is what happens when you let Ubuntu look after your packages. Debian Sid

Kernel in D

2014-05-31 Thread Mineko via Digitalmars-d-learn
So, I've gotten interested in kernel programming in D.. And as much as I like C/C++, I wanna try innovating, I'm aware that phobos/gc and any OS-specific issues are going to be a problem, but I'm willing to implement them into the kernel itself. So, I guess what I'm asking is this: What

Re: Building 32bit program with MSVC?

2014-05-31 Thread Jonathan M Davis via Digitalmars-d-learn
On Sat, 31 May 2014 06:38:46 + Kagamin via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: They may use different debugging formats, but just linking should be possible, especially with import libraries. _Dynamic_ linking is possible. Static linking is not. - Jonathan M Davis

Re: Hiding types

2014-05-31 Thread Philippe Sigaud via Digitalmars-d-learn
On Sat, May 31, 2014 at 6:39 AM, Dicebot via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: private in D does not provide any strong guarantees, it only controls direct access to the symbol. You effectively want some sort of strict internal linkage attribute which does not exist

Re: Building 32bit program with MSVC?

2014-05-31 Thread Kagamin via Digitalmars-d-learn
By dynamic linking do you mean LoadLibrary or linking with import library?

Re: Hiding types

2014-05-31 Thread Philippe Sigaud via Digitalmars-d-learn
What do you mean? Like this? Hidden* foo() { return new Hidden();} Yes, this way you can control all aspects of the construction and use. You wouldn't need to make it private even, just don't lay out the struct in the normal import: struct Hidden; I think you would need to use a .di

Re: Kernel in D

2014-05-31 Thread Kagamin via Digitalmars-d-learn
http://www.xomb.org/ ?

Re: Kernel in D

2014-05-31 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 31 May 2014 at 07:28:32 UTC, Mineko wrote: Any ideas? :P Buy my book, chapter 11 talks about it a little to get you started :P http://www.packtpub.com/discover-advantages-of-programming-in-d-cookbook/book The summary of my approach there is: 1) Use a regular linux compiler

Re: Kernel in D

2014-05-31 Thread ed via Digitalmars-d-learn
On Saturday, 31 May 2014 at 07:28:32 UTC, Mineko wrote: So, I've gotten interested in kernel programming in D.. And as much as I like C/C++, I wanna try innovating, I'm aware that phobos/gc and any OS-specific issues are going to be a problem, but I'm willing to implement them into the kernel

Re: enums

2014-05-31 Thread Andrej Mitrovic via Digitalmars-d-learn
This has been asked so many times, is this info not on the website? We should have an article on the site explaining this in depth. OT: Sorry for top-quoting and over-quoting. On Friday, May 30, 2014, monarch_dodra via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On Friday, 30

Forward reference to nested function not allowed?

2014-05-31 Thread DLearner via Digitalmars-d-learn
Hi, import std.stdio; void main() { writefln(Entered); sub1(); sub1(); sub1(); writefln(Returning); void sub1() { static int i2 = 6; i2 = i2 + 1; writefln(%s,i2); }; } does not compile, but import std.stdio; void main() { void sub1() {

Re: Forward reference to nested function not allowed?

2014-05-31 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 31 May 2014 at 16:18:35 UTC, DLearner wrote: Is this intended? Yes, nested functions access local variables and thus follow the same order of declaration rules as they do; you can't use a local variable before it is declared so same with a nested function.

Indicating incompatible modules

2014-05-31 Thread Joseph Rushton Wakeling via Digitalmars-d-learn
Hello all, Is there a straightforward way to indicate that two modules should not be used together in the same program? Preferably one that does not require editing both of the modules? The application I have in mind is when one is making available an experimental module which is planned

dmd segfaults

2014-05-31 Thread matovitch via Digitalmars-d-learn
Hi ! Does anybody knows why dmd segfaults on this code ? Should I report this as a bug ? import std.stdio; enum LiftingGender { PREDICT, UPDATE, } struct Test(float[][] coeffs, int[] offsets, LiftingGender gender) { immutable float[][] coeffs = coeffs;

Re: dmd segfaults

2014-05-31 Thread bearophile via Digitalmars-d-learn
matovitch: Does anybody knows why dmd segfaults on this code ? Should I report this as a bug ? Please report this minimized case to Bugzilla: struct Foo(int[] arr) { const int[] arr = arr; } void main() { Foo!([0]) foo; } The error it gives before the crash: test.d(2,17):

Re: dmd segfaults

2014-05-31 Thread matovitch via Digitalmars-d-learn
On Saturday, 31 May 2014 at 17:01:23 UTC, bearophile wrote: matovitch: Does anybody knows why dmd segfaults on this code ? Should I report this as a bug ? Please report this minimized case to Bugzilla: struct Foo(int[] arr) { const int[] arr = arr; } void main() { Foo!([0]) foo; }

Re: dmd segfaults

2014-05-31 Thread matovitch via Digitalmars-d-learn
In fact it segfauls on any template parameter if it has the same name as the immutable member (at least it's coherent). Something as simple as : struct Foo(int i) { immutable int i = i; } void main() { Foo!5 foo; writeln(foo); } I am suprised that nobody tried this before. BTW I

Re: dmd segfaults

2014-05-31 Thread matovitch via Digitalmars-d-learn
I remembered my psswd don't take my last sentence into account (i will filed this).

Re: dmd segfaults

2014-05-31 Thread via Digitalmars-d-learn
On Saturday, 31 May 2014 at 17:22:41 UTC, matovitch wrote: In fact it segfauls on any template parameter if it has the same name as the immutable member (at least it's coherent). Something as simple as : struct Foo(int i) { immutable int i = i; } void main() { Foo!5 foo;

Re: dmd segfaults

2014-05-31 Thread matovitch via Digitalmars-d-learn
I updated the issue. Strangely if done in the main everything is fine : Error: undefined identifier i

  1   2   >