Re: Dpaste - online compiler and collaboration tool dedicated to D Programming Language.

2012-07-05 Thread bearophile
nazriel: I would like to share with you, Beta version of http://dpaste.dzfl.pl/ I have tried that page some more. Two screen grabs: http://derp.co.uk/35b8d 1) In the first part of the image the background colors are disabled. For such situations I suggest to make the green and red boxes with

Re: Dpaste - online compiler and collaboration tool dedicated to D Programming Language.

2012-07-05 Thread Iain Buclaw
On 5 July 2012 14:47, bearophile bearophileh...@lycos.com wrote: nazriel: I would like to share with you, Beta version of http://dpaste.dzfl.pl/ I have tried that page some more. Two screen grabs: http://derp.co.uk/35b8d 1) In the first part of the image the background colors are

Re: Dpaste - online compiler and collaboration tool dedicated to D Programming Language.

2012-07-05 Thread nazriel
On Thursday, 5 July 2012 at 13:47:42 UTC, bearophile wrote: nazriel: I would like to share with you, Beta version of http://dpaste.dzfl.pl/ I have tried that page some more. Two screen grabs: http://derp.co.uk/35b8d 1) In the first part of the image the background colors are disabled. For

Re: Dpaste - online compiler and collaboration tool dedicated to D Programming Language.

2012-07-05 Thread bearophile
nazriel: Thank you bearophile for your testings! Thank you for the very elegant D paste site. I'm good at hitting ways to _not_ be able to use software and sites :o) Sometimes even people like Mister Beam are useful. In that site sometimes I'd like an way to compile with -d or -debug or

Re: dfmt - D source code formatter

2012-07-05 Thread Walter Bright
On 7/4/2012 10:22 PM, Jonathan M Davis wrote: On Wednesday, July 04, 2012 21:46:29 Walter Bright wrote: It would be nice to have a D source code formatter. But it needs a champion. Who's up for it? Doesn't that need a lexer and parser for D first (which I'd _love_ to do but just haven't had

Re: Proposal: takeFront and takeBack

2012-07-05 Thread Ed McCardell
On 07/05/2012 01:26 AM, Jonathan M Davis wrote: I wonder how the results look on gdc when using the improved popFront, given how surprising they were with consumeFront. Improved popFront, gdc as before (-frelease -finline-functions -fweb -O3): ascii 22.69%: old [2 secs, 449 ms, 248 μs, and 7

Re: dfmt - D source code formatter

2012-07-05 Thread Paulo Pinto
On Thursday, 5 July 2012 at 06:27:55 UTC, Walter Bright wrote: On 7/4/2012 10:22 PM, Jonathan M Davis wrote: On Wednesday, July 04, 2012 21:46:29 Walter Bright wrote: It would be nice to have a D source code formatter. But it needs a champion. Who's up for it? Doesn't that need a lexer and

Re: D in the cloud with cassandra ?

2012-07-05 Thread Knud Soerensen
Hi guys. Thank for the comments. Nice to know that someone have had the D-Cassandra combo working. Knud

Re: Proposal: takeFront and takeBack

2012-07-05 Thread Dmitry Olshansky
On 04-Jul-12 19:17, Andrei Alexandrescu wrote: On 7/4/12 8:33 AM, deadalnix wrote: Le 04/07/2012 13:04, Roman D. Boiko a écrit : On Wednesday, 4 July 2012 at 10:54:41 UTC, deadalnix wrote: I do agree with that. However, the current proposal have the same drawback but on the code that use the

Re: dfmt - D source code formatter

2012-07-05 Thread Jens Mueller
Walter Bright wrote: It would be nice to have a D source code formatter. But it needs a champion. Who's up for it? I'm using uncrustify (http://uncrustify.sourceforge.net/). It does most of the time what I want. Jens

Re: D SFML2 derelict

2012-07-05 Thread Trass3r
compiled with: dmd hello.d rdmd hello.d

Re: A delegate problem, create delegation in loop

2012-07-05 Thread bearophile
lijie: import std.stdio; void main() { void delegate()[] functions; foreach (i; 0 .. 5) { functions ~= { printf(%d\n, i); }; } foreach (func; functions) { func(); } } import std.stdio; void main() { void delegate()[] functions;

Re: More Front End Vector Support

2012-07-05 Thread Iain Buclaw
On 4 July 2012 22:43, Walter Bright newshou...@digitalmars.com wrote: On 7/4/2012 7:19 AM, Iain Buclaw wrote: Morning, I've noticed that 256bit vector support has been added to the D frontend during the development stages of 2.060 whilst was looking around in druntime core.

Re: A delegate problem, create delegation in loop

2012-07-05 Thread Denis Shelomovskij
05.07.2012 9:54, lijie пишет: Hi, My test code: import std.stdio; void main() { void delegate()[] functions; foreach (i; 0 .. 5) { functions ~= { printf(%d\n, i); }; } foreach (func; functions) {

Re: Proposal: takeFront and takeBack

2012-07-05 Thread Roman D. Boiko
On Wednesday, 4 July 2012 at 22:02:28 UTC, deadalnix wrote: Le 04/07/2012 21:45, Jonathan M Davis a écrit : On Wednesday, July 04, 2012 12:19:15 Jonathan M Davis wrote: But at present, I'm seeing a performance improvement of approximately 70 - 80% in iterating over strings with consumeFront

Re: Proposal: takeFront and takeBack

2012-07-05 Thread Christophe Travert
If you really don't need the value, you could devise a justPop method that does not return (by the way, overloading by return type would be an amazing feature here). The idea is not we should return a value everytime we pop, but we should pop when we return a value. -- Christophe

Re: Proposal: takeFront and takeBack

2012-07-05 Thread Roman D. Boiko
On Thursday, 5 July 2012 at 08:34:29 UTC, Roman D. Boiko wrote: I make no conclusions, because have not run any benchmarks to estimate how complex the code should be to take those 30 ms. Such benchmarks would be valuable for discussion. That has been written before I saw all benchmarks, so my

Re: dfmt - D source code formatter

2012-07-05 Thread Paulo Pinto
On Thursday, 5 July 2012 at 06:27:55 UTC, Walter Bright wrote: On 7/4/2012 10:22 PM, Jonathan M Davis wrote: On Wednesday, July 04, 2012 21:46:29 Walter Bright wrote: It would be nice to have a D source code formatter. But it needs a champion. Who's up for it? Doesn't that need a lexer and

Re: dfmt - D source code formatter

2012-07-05 Thread Jonathan M Davis
On Thursday, July 05, 2012 11:11:28 Paulo Pinto wrote: This are the type of projects that would benefit from having the compiler available as library. It will be eventually, but someone (or several someones) will have to take the time to do it. Once I find the time, I intend to port the lexer

Re: Proposal: takeFront and takeBack

2012-07-05 Thread monarch_dodra
On Wednesday, 4 July 2012 at 22:08:18 UTC, Jonathan M Davis wrote: C++'s iterators definitely do _not_ return an element when you increment them. - Jonathan M Davis Just a thought, but C++'s input iterator very often do increment when being _dereferenced_, and then they make the _increment_

Re: dfmt - D source code formatter

2012-07-05 Thread maarten van damme
2012/7/5 Jens Mueller jens.k.muel...@gmx.de: Walter Bright wrote: It would be nice to have a D source code formatter. But it needs a champion. Who's up for it? I'm using uncrustify (http://uncrustify.sourceforge.net/). It does most of the time what I want. Jens I'm using uncrustify too

Re: Proposal: takeFront and takeBack

2012-07-05 Thread Christophe Travert
monarch_dodra , dans le message (digitalmars.D:171175), a écrit : For those few algorithms that work on bidirRange, we'd need a garantee that they don't ever front/back the same item twice. We *could* achieve this by defining a bidirectionalInputRange class of range. filter does that. If

Re: dfmt - D source code formatter

2012-07-05 Thread Jens Mueller
maarten van damme wrote: 2012/7/5 Jens Mueller jens.k.muel...@gmx.de: Walter Bright wrote: It would be nice to have a D source code formatter. But it needs a champion. Who's up for it? I'm using uncrustify (http://uncrustify.sourceforge.net/). It does most of the time what I want.

Re: dfmt - D source code formatter

2012-07-05 Thread Jacob Carlborg
On 2012-07-05 06:46, Walter Bright wrote: It would be nice to have a D source code formatter. But it needs a champion. Who's up for it? It's a great idea but as others have said, I see no point in creating this until we have a D compiler available as a library. -- /Jacob Carlborg

Re: Proposal: takeFront and takeBack

2012-07-05 Thread deadalnix
Le 05/07/2012 01:06, Jonathan M Davis a écrit : Another option would be to create a wrapper range for strings to be used when they already have to be wrapped in another range. Functions which want to make string processing more efficient can already specialize on strings (and often do), so they

Let's stop parser Hell

2012-07-05 Thread Denis Shelomovskij
There are more and more projects requiring parsing D code (IDE plugins, DCT and dfmt now). We definitely need a _standard_ fast D parser (suitable as tokenizer). We already have a good one at least in Visual D. Maybe dmd's parser is faster. If so, it can be (easily?) rewritten in D. We also

Re: Let's stop parser Hell

2012-07-05 Thread Roman D. Boiko
On Thursday, 5 July 2012 at 12:11:33 UTC, Denis Shelomovskij wrote: There are more and more projects requiring parsing D code (IDE plugins, DCT and dfmt now). We definitely need a _standard_ fast D parser (suitable as tokenizer). We already have a good one at least in Visual D. Maybe dmd's

Re: Let's stop parser Hell

2012-07-05 Thread Roman D. Boiko
Forgot to add DDMD, which also has been forked and redesigned recently by someone (thus two more different compiler frontends). But overall I doubt that any project could become standard very soon.

Re: Let's stop parser Hell

2012-07-05 Thread Dmitry Olshansky
On 05-Jul-12 16:11, Denis Shelomovskij wrote: There are more and more projects requiring parsing D code (IDE plugins, DCT and dfmt now). We definitely need a _standard_ fast D parser (suitable as tokenizer). Then do it. It's all about having something so obviously good, fast and flexible

Re: Proposal: takeFront and takeBack

2012-07-05 Thread Andrei Alexandrescu
On 7/5/12 1:26 AM, Jonathan M Davis wrote: In any case, I guess that this shows that what we can get with popFront is so close to what consumeFront or StringCache would do that we might as well not bother with them, which is a _big_ surpise to me. It does pay to benchmark code though. Good

Re: Let's stop parser Hell

2012-07-05 Thread Denis Shelomovskij
05.07.2012 16:30, Roman D. Boiko пишет: Forgot to add DDMD, which also has been forked and redesigned recently by someone (thus two more different compiler frontends). But overall I doubt that any project could become standard very soon. Why? Even were they all almost equal we can select any

Re: Let's stop parser Hell

2012-07-05 Thread Roman D. Boiko
On Thursday, 5 July 2012 at 12:32:19 UTC, Dmitry Olshansky wrote: Then do it. It's all about having something so obviously good, fast and flexible that other stuff can be considered only as toys. I might do one, but I'd rather just help other folks make it faster ;) Would you help to make

Re: Let's stop parser Hell

2012-07-05 Thread Dmitry Olshansky
On 05-Jul-12 17:04, Roman D. Boiko wrote: On Thursday, 5 July 2012 at 12:32:19 UTC, Dmitry Olshansky wrote: Then do it. It's all about having something so obviously good, fast and flexible that other stuff can be considered only as toys. I might do one, but I'd rather just help other folks

Re: Let's stop parser Hell

2012-07-05 Thread Roman D. Boiko
On Thursday, 5 July 2012 at 12:53:02 UTC, Denis Shelomovskij wrote: 05.07.2012 16:30, Roman D. Boiko пишет: Forgot to add DDMD, which also has been forked and redesigned recently by someone (thus two more different compiler frontends). But overall I doubt that any project could become

Re: Let's stop parser Hell

2012-07-05 Thread Roman D. Boiko
On Thursday, 5 July 2012 at 13:05:41 UTC, Dmitry Olshansky wrote: On 05-Jul-12 17:04, Roman D. Boiko wrote: Well why not. But first I'll need to deliver some stuff on my GSOC project. I bet that after you finish with GSOC optimizing Pegged will not be less relevant than it is now :) And as

Re: Let's stop parser Hell

2012-07-05 Thread Andrei Alexandrescu
On 7/5/12 9:05 AM, Dmitry Olshansky wrote: On 05-Jul-12 17:04, Roman D. Boiko wrote: On Thursday, 5 July 2012 at 12:32:19 UTC, Dmitry Olshansky wrote: Then do it. It's all about having something so obviously good, fast and flexible that other stuff can be considered only as toys. I might do

Re: Let's stop parser Hell

2012-07-05 Thread Caligo
Is the actual grammar available somewhere? The online language reference is all we got I guess? DMD doesn't seem to be using yacc/bison either. On Thu, Jul 5, 2012 at 7:11 AM, Denis Shelomovskij verylonglogin@gmail.com wrote: There are more and more projects requiring parsing D code (IDE

Re: Let's stop parser Hell

2012-07-05 Thread Jacob Carlborg
On 2012-07-05 15:08, Roman D. Boiko wrote: Anyway I propose to enumerate major use cases first. Haven't we already done that a couple of times. -- /Jacob Carlborg

Re: Let's stop parser Hell

2012-07-05 Thread Roman D. Boiko
On Thursday, 5 July 2012 at 15:40:53 UTC, Jacob Carlborg wrote: On 2012-07-05 15:08, Roman D. Boiko wrote: Anyway I propose to enumerate major use cases first. Haven't we already done that a couple of times. Well, we did something like that for DCT... but I doubt that it would fit general

Re: Let's stop parser Hell

2012-07-05 Thread Roman D. Boiko
On Thursday, 5 July 2012 at 15:42:22 UTC, Caligo wrote: Is the actual grammar available somewhere? The online language reference is all we got I guess? DMD doesn't seem to be using yacc/bison either. In PEG format, yes (not necessarily correct):

Re: Let's stop parser Hell

2012-07-05 Thread Jacob Carlborg
On 2012-07-05 18:04, Roman D. Boiko wrote: Well, we did something like that for DCT... but I doubt that it would fit general needs. Why wouldn't it. If we had, why haven't they been analyzed, classified, discussed, etc.? Or have they? I don't know. Here is what I wrote for DCT: * IDE

Re: Let's stop parser Hell

2012-07-05 Thread Dmitry Olshansky
On 05-Jul-12 18:29, Andrei Alexandrescu wrote: On 7/5/12 9:05 AM, Dmitry Olshansky wrote: On 05-Jul-12 17:04, Roman D. Boiko wrote: On Thursday, 5 July 2012 at 12:32:19 UTC, Dmitry Olshansky wrote: Then do it. It's all about having something so obviously good, fast and flexible that other

Re: Let's stop parser Hell

2012-07-05 Thread Jonathan M Davis
On Thursday, July 05, 2012 18:04:11 Roman D. Boiko wrote: On Thursday, 5 July 2012 at 15:40:53 UTC, Jacob Carlborg wrote: On 2012-07-05 15:08, Roman D. Boiko wrote: Anyway I propose to enumerate major use cases first. Haven't we already done that a couple of times. Well, we did

Editable and runnable code sample on dlang.org by Damian Ziemba (nazriel)

2012-07-05 Thread Andrei Alexandrescu
Check this out: on http://dlang.org you can actually click in the code example and edit it, then click Run and pronto, you see the output! Damian is actively working on the UI as I'm writing this. Feel free to chime in with feedback! Andrei

Re: Proposal: takeFront and takeBack

2012-07-05 Thread Ed McCardell
On 07/05/2012 02:35 AM, Ed McCardell wrote: When gdc finishes building on my 64-bit box I can run timings on that, There also seems to be a speed improvement for consumeFront on 64-bit gdc, with both standard and Andrei's improved popFront: standard popfront: ascii 35.95%: old [3 secs,

Re: Let's stop parser Hell

2012-07-05 Thread Roman D. Boiko
On Thursday, 5 July 2012 at 16:14:27 UTC, Jacob Carlborg wrote: Original post: http://www.digitalmars.com/d/archives/digitalmars/D/DCT_use_cases_-_draft_168106.html#N168141 OK, fairly complete. Let it be the starting point. Why not put it on some wiki, then add some more, discuss, vote,

Re: dfmt - D source code formatter

2012-07-05 Thread Jacob Carlborg
On 2012-07-05 06:46, Walter Bright wrote: It would be nice to have a D source code formatter. But it needs a champion. Who's up for it? I just tried ddmd-clean and it already does some form of source code formatting. It will format the following file:

Re: Editable and runnable code sample on dlang.org by Damian Ziemba (nazriel)

2012-07-05 Thread Jacob Carlborg
On 2012-07-05 18:26, Andrei Alexandrescu wrote: Check this out: on http://dlang.org you can actually click in the code example and edit it, then click Run and pronto, you see the output! Damian is actively working on the UI as I'm writing this. Feel free to chime in with feedback! Andrei

Re: Let's stop parser Hell

2012-07-05 Thread Jacob Carlborg
On 2012-07-05 18:32, Roman D. Boiko wrote: My vote would be for Pegged, I guess. Aren't you voting on your own project :) -- /Jacob Carlborg

Re: Let's stop parser Hell

2012-07-05 Thread Roman D. Boiko
On Thursday, 5 July 2012 at 16:28:57 UTC, Jonathan M Davis wrote: It's all too common for someone to suggest that we should do something or implement something without ever attempting to do it themselves, and in general, stuff around here gets done because someone really wants it done, takes

Re: Let's stop parser Hell

2012-07-05 Thread Roman D. Boiko
On Thursday, 5 July 2012 at 16:38:27 UTC, Jacob Carlborg wrote: On 2012-07-05 18:32, Roman D. Boiko wrote: My vote would be for Pegged, I guess. Aren't you voting on your own project :) Well, I'm going to base parsing on Pegged, after tweaking it to my needs.

Re: Editable and runnable code sample on dlang.org by Damian Ziemba (nazriel)

2012-07-05 Thread H. S. Teoh
On Thu, Jul 05, 2012 at 12:26:01PM -0400, Andrei Alexandrescu wrote: Check this out: on http://dlang.org you can actually click in the code example and edit it, then click Run and pronto, you see the output! Damian is actively working on the UI as I'm writing this. Feel free to chime in with

Re: Editable and runnable code sample on dlang.org by Damian Ziemba (nazriel)

2012-07-05 Thread Iain Buclaw
On 5 July 2012 17:51, H. S. Teoh hst...@quickfur.ath.cx wrote: On Thu, Jul 05, 2012 at 12:26:01PM -0400, Andrei Alexandrescu wrote: Check this out: on http://dlang.org you can actually click in the code example and edit it, then click Run and pronto, you see the output! Damian is actively

Re: Editable and runnable code sample on dlang.org by Damian Ziemba (nazriel)

2012-07-05 Thread Justin Whear
On Thu, 05 Jul 2012 09:51:50 -0700, H. S. Teoh wrote: On Thu, Jul 05, 2012 at 12:26:01PM -0400, Andrei Alexandrescu wrote: Check this out: on http://dlang.org you can actually click in the code example and edit it, then click Run and pronto, you see the output! Damian is actively working on

Re: Editable and runnable code sample on dlang.org by Damian Ziemba (nazriel)

2012-07-05 Thread André
Great tool! Just a small layout bug: On Firefox 3.6.4 (on Mac) the [your code here] tags is misplaced after clicking the Run button. It then overlaps the appearing output box. Cheers, André On Thursday, 5 July 2012 at 16:59:33 UTC, Iain Buclaw wrote: On 5 July 2012 17:51, H. S. Teoh

Re: dfmt - D source code formatter

2012-07-05 Thread Brian Schott
On Thursday, 5 July 2012 at 04:47:29 UTC, Walter Bright wrote: It would be nice to have a D source code formatter. But it needs a champion. Who's up for it? I'm already working on adding formatting to my general-purpose D tool. https://github.com/Hackerpilot/Dscanner

Re: Editable and runnable code sample on dlang.org by Damian Ziemba (nazriel)

2012-07-05 Thread Paulo Pinto
On Thursday, 5 July 2012 at 16:26:02 UTC, Andrei Alexandrescu wrote: Check this out: on http://dlang.org you can actually click in the code example and edit it, then click Run and pronto, you see the output! Damian is actively working on the UI as I'm writing this. Feel free to chime in with

Re: Editable and runnable code sample on dlang.org by Damian Ziemba (nazriel)

2012-07-05 Thread Dmitry Olshansky
On 05-Jul-12 20:26, Andrei Alexandrescu wrote: Check this out: on http://dlang.org you can actually click in the code example and edit it, then click Run and pronto, you see the output! Damian is actively working on the UI as I'm writing this. Feel free to chime in with feedback! Wonderful!

Re: Let's stop parser Hell

2012-07-05 Thread Denis Shelomovskij
05.07.2012 20:14, Jacob Carlborg пишет: On 2012-07-05 18:04, Roman D. Boiko wrote: Well, we did something like that for DCT... but I doubt that it would fit general needs. Why wouldn't it. If we had, why haven't they been analyzed, classified, discussed, etc.? Or have they? I don't know.

Re: Let's stop parser Hell

2012-07-05 Thread Denis Shelomovskij
05.07.2012 20:28, Jonathan M Davis пишет: It's all too common for someone to suggest that we should do something or implement something without ever attempting to do it themselves, and in general, stuff around here gets done because someone really wants it done, takes the time to do it, and sees

Re: Let's stop parser Hell

2012-07-05 Thread Philippe Sigaud
On 2012-07-05 18:32, Roman D. Boiko wrote: My vote would be for Pegged, I guess. As much as I'm flattered by that, my current impression is Pegged is very far from being performant. As a proof-of-concept that, in D, it's possible to parse a string and create a parse tree at compile-time and

Re: Let's stop parser Hell

2012-07-05 Thread Jonathan M Davis
On Thursday, July 05, 2012 22:23:00 Denis Shelomovskij wrote: 05.07.2012 20:28, Jonathan M Davis пишет: It's all too common for someone to suggest that we should do something or implement something without ever attempting to do it themselves, and in general, stuff around here gets done

Re: Let's stop parser Hell

2012-07-05 Thread Andrei Alexandrescu
On 7/5/12 12:39 PM, Roman D. Boiko wrote: On Thursday, 5 July 2012 at 16:28:57 UTC, Jonathan M Davis wrote: It's all too common for someone to suggest that we should do something or implement something without ever attempting to do it themselves, and in general, stuff around here gets done

Re: Let's stop parser Hell

2012-07-05 Thread Andrei Alexandrescu
On 7/5/12 2:16 PM, Philippe Sigaud wrote: As much as I'm flattered by that, my current impression is Pegged is very far from being performant. As a proof-of-concept that, in D, it's possible to parse a string and create a parse tree at compile-time and then generate code from this, it's also

Re: Let's stop parser Hell

2012-07-05 Thread Roman D. Boiko
On Thursday, 5 July 2012 at 18:17:06 UTC, Philippe Sigaud wrote: On 2012-07-05 18:32, Roman D. Boiko wrote: My vote would be for Pegged, I guess. As much as I'm flattered by that, my current impression is Pegged is very far from being performant. As a proof-of-concept that, in D, it's

Re: Let's stop parser Hell

2012-07-05 Thread Roman D. Boiko
On Thursday, 5 July 2012 at 18:28:21 UTC, Andrei Alexandrescu wrote: On 7/5/12 2:16 PM, Philippe Sigaud wrote: So Pegged or any other generator should *not* get the community focus right now. Pegged should be the focus. +10 (can I vote ten times?) My plan would be as follow: 1- assemble

Re: Let's stop parser Hell

2012-07-05 Thread Dmitry Olshansky
On 05-Jul-12 22:23, Denis Shelomovskij wrote: 05.07.2012 20:28, Jonathan M Davis пишет: It's all too common for someone to suggest that we should do something or implement something without ever attempting to do it themselves, and in general, stuff around here gets done because someone really

Re: Let's stop parser Hell

2012-07-05 Thread Dmitry Olshansky
On 05-Jul-12 22:22, Andrei Alexandrescu wrote: On 7/5/12 12:39 PM, Roman D. Boiko wrote: On Thursday, 5 July 2012 at 16:28:57 UTC, Jonathan M Davis wrote: It's all too common for someone to suggest that we should do something or implement something without ever attempting to do it themselves,

Re: Let's stop parser Hell

2012-07-05 Thread Roman D. Boiko
On Thursday, 5 July 2012 at 18:33:50 UTC, Dmitry Olshansky wrote: Count me as interested. CTFE needs more correctness speed though. So to put it blantly - no it's not possible right NOW. BUT it doesn't prevent us from planing and doing a proof of concept. Pegged seems a good starting point

Re: Let's stop parser Hell

2012-07-05 Thread Andrei Alexandrescu
On 7/5/12 2:38 PM, Roman D. Boiko wrote: On Thursday, 5 July 2012 at 18:33:50 UTC, Dmitry Olshansky wrote: Count me as interested. CTFE needs more correctness speed though. So to put it blantly - no it's not possible right NOW. BUT it doesn't prevent us from planing and doing a proof of

Re: Let's stop parser Hell

2012-07-05 Thread Andrei Alexandrescu
On 7/5/12 2:33 PM, Dmitry Olshansky wrote: On 05-Jul-12 22:22, Andrei Alexandrescu wrote: I'd really want to create a task force on this, it is of strategic importance to D. In Walter's own words, no new feature is going to push us forward since we're not really using the great goodies we've

Re: Editable and runnable code sample on dlang.org by Damian Ziemba (nazriel)

2012-07-05 Thread Peter Alexander
Nice. Should probably remove the references to local files when compilation fails. Not very user friendly to see: /home/jail/compileme369.d(14): expression expected, not '}' Would probably suffice just to switch the filename with something less distracting.

Re: dfmt - D source code formatter

2012-07-05 Thread Walter Bright
On 7/4/2012 9:46 PM, Walter Bright wrote: It would be nice to have a D source code formatter. But it needs a champion. Who's up for it? I think that formatting the code is actually rather easy - the hard part will be dealing with the comments in a reasonable way.

Re: Editable and runnable code sample on dlang.org by Damian Ziemba (nazriel)

2012-07-05 Thread maarten van damme
2012/7/5 André nos...@spambog.com: Great tool! Just a small layout bug: On Firefox 3.6.4 (on Mac) the [your code here] tags is misplaced after clicking the Run button. It then overlaps the appearing output box. Cheers, André same bug with chrome

Re: Let's stop parser Hell

2012-07-05 Thread Philippe Sigaud
On Thu, Jul 5, 2012 at 8:28 PM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: I'll be glad to buy for you any book you might feel you need for this. Again, there are few things more important for D right now than exploiting its unmatched-by-competition features to great ends. I

Re: Let's stop parser Hell

2012-07-05 Thread Jacob Carlborg
On 2012-07-05 20:22, Andrei Alexandrescu wrote: I also am actively opposed to a project of just translating D's front-end to D and dropping it into Phobos because it would smother (a) work on generic parser generators, and (b) strong, dependable formalization of D's syntax. I don't see why you

Re: Let's stop parser Hell

2012-07-05 Thread Tobias Pankrath
On Thursday, 5 July 2012 at 18:17:06 UTC, Philippe Sigaud wrote: As a parser proper, Pegged is awful :-) Nothing I'm ashamed of, as I learn by coding. Hey, I just received the Dragon Book (International Edition), If you are interested in parsing, than I wouldn't recommend the dragon book,

Re: Let's stop parser Hell

2012-07-05 Thread Roman D. Boiko
On Thursday, 5 July 2012 at 19:54:39 UTC, Philippe Sigaud wrote: On Thu, Jul 5, 2012 at 8:28 PM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: I'll be glad to buy for you any book you might feel you need for this. Again, there are few things more important for D right now than

Re: Let's stop parser Hell

2012-07-05 Thread Roman D. Boiko
isKeyword_Dummy (baseline): 2738 [microsec] total, 50 [ns / lookup]. This one calculates a sum of all identifier code units. Included for comparison. isKeyword_Dictionary: 4247 [microsec] total, 242 [ns / lookup]. Check whether an identifier is a keyword using AA (dictionary) lookup.

Re: Let's stop parser Hell

2012-07-05 Thread Philippe Sigaud
On Thu, Jul 5, 2012 at 10:00 PM, Tobias Pankrath tob...@pankrath.net wrote: On Thursday, 5 July 2012 at 18:17:06 UTC, Philippe Sigaud wrote: As a parser proper, Pegged is awful :-) Nothing I'm ashamed of, as I learn by coding. Hey, I just received the Dragon Book (International Edition), If

Re: Let's stop parser Hell

2012-07-05 Thread Philippe Sigaud
On Thu, Jul 5, 2012 at 10:02 PM, Roman D. Boiko r...@d-coding.com wrote (on children) I have four, from 1 to 7 years old... Wouldn't call them a problem, though :))) Better not telling my wife. She's making noises about having a fourth.

Re: Let's stop parser Hell

2012-07-05 Thread Dmitry Olshansky
On 06-Jul-12 00:16, Roman D. Boiko wrote: isKeyword_Dummy (baseline): 2738 [microsec] total, 50 [ns / lookup]. This one calculates a sum of all identifier code units. Included for comparison. isKeyword_Dictionary: 4247 [microsec] total, 242 [ns / lookup]. Check whether an identifier is a

Re: Let's stop parser Hell

2012-07-05 Thread Andrei Alexandrescu
On 7/5/12 3:54 PM, Philippe Sigaud wrote: (Hesitating between 'The Art of the Metaobject Protocol' and 'Compilers, Techniques and Tools', right now) Former sux latter rox. Andrei

Re: Let's stop parser Hell

2012-07-05 Thread Roman D. Boiko
On Thursday, 5 July 2012 at 20:28:32 UTC, Philippe Sigaud wrote: Hmm 72 € by Springer, 55 € on Amazon. Something is not right. Paperback vs perfect bound maybe? http://www.komkon.org/~sher/books/parsing_techniques_2008.pdf Not sure that it is legal, but definitely free.

Re: dfmt - D source code formatter

2012-07-05 Thread Brian Schott
On Thursday, 5 July 2012 at 19:22:56 UTC, Walter Bright wrote: I think that formatting the code is actually rather easy - the hard part will be dealing with the comments in a reasonable way. Eclipse has had a LOT of time and energy put into it, and it still makes my javadoc uglier than it was

Re: Editable and runnable code sample on dlang.org by Damian Ziemba (nazriel)

2012-07-05 Thread Andrei Alexandrescu
On 7/5/12 12:26 PM, Andrei Alexandrescu wrote: Check this out: on http://dlang.org you can actually click in the code example and edit it, then click Run and pronto, you see the output! Damian is actively working on the UI as I'm writing this. Feel free to chime in with feedback! Updated to a

Re: Editable and runnable code sample on dlang.org by Damian Ziemba (nazriel)

2012-07-05 Thread nazriel
On Thursday, 5 July 2012 at 16:59:33 UTC, Iain Buclaw wrote: On 5 July 2012 17:51, H. S. Teoh hst...@quickfur.ath.cx wrote: On Thu, Jul 05, 2012 at 12:26:01PM -0400, Andrei Alexandrescu wrote: Check this out: on http://dlang.org you can actually click in the code example and edit it, then

Re: std.hash: More questions

2012-07-05 Thread Dmitry Olshansky
On 04-Jul-12 18:58, Johannes Pfau wrote: Code: https://github.com/D-Programming-Language/phobos/pull/646 Docs: http://dl.dropbox.com/u/24218791/d/phobos/std_hash_hash.html http://dl.dropbox.com/u/24218791/d/phobos/std_hash_crc.html http://dl.dropbox.com/u/24218791/d/phobos/std_hash_md.html

Re: Editable and runnable code sample on dlang.org by Damian Ziemba (nazriel)

2012-07-05 Thread nazriel
On Thursday, 5 July 2012 at 19:10:57 UTC, Peter Alexander wrote: Nice. Should probably remove the references to local files when compilation fails. Not very user friendly to see: /home/jail/compileme369.d(14): expression expected, not '}' Would probably suffice just to switch the filename

Re: Editable and runnable code sample on dlang.org by Damian Ziemba (nazriel)

2012-07-05 Thread nazriel
On Thursday, 5 July 2012 at 17:56:34 UTC, Dmitry Olshansky wrote: On 05-Jul-12 20:26, Andrei Alexandrescu wrote: Check this out: on http://dlang.org you can actually click in the code example and edit it, then click Run and pronto, you see the output! Damian is actively working on the UI as

Re: Editable and runnable code sample on dlang.org by Damian Ziemba (nazriel)

2012-07-05 Thread Dmitry Olshansky
On 06-Jul-12 01:28, nazriel wrote: On Thursday, 5 July 2012 at 17:56:34 UTC, Dmitry Olshansky wrote: On 05-Jul-12 20:26, Andrei Alexandrescu wrote: Check this out: on http://dlang.org you can actually click in the code example and edit it, then click Run and pronto, you see the output! Damian

Re: Proposal: takeFront and takeBack

2012-07-05 Thread David Piepgrass
(grain of salt, I'm new to D.) I'd vote for consumeFront being always available, because it's distinctly more convenient to call one function instead of two, especially when you expect that making a copy of front is cheap (e.g. a collection of pointers, numbers or slices). Ranges where

Re: Let's stop parser Hell

2012-07-05 Thread deadalnix
Le 05/07/2012 18:32, Roman D. Boiko a écrit : On Thursday, 5 July 2012 at 16:14:27 UTC, Jacob Carlborg wrote: Original post: http://www.digitalmars.com/d/archives/digitalmars/D/DCT_use_cases_-_draft_168106.html#N168141 OK, fairly complete. Let it be the starting point. Why not put it on

Re: Let's stop parser Hell

2012-07-05 Thread Roman D. Boiko
On Thursday, 5 July 2012 at 22:11:41 UTC, deadalnix wrote: Why not program instead of doing bureaucracy ? To avoid programming things which are not needed or don't fit. I've thrown away several implementations already... time to reflect a little :) But, actually, for DCT I do know what I

Re: Let's stop parser Hell

2012-07-05 Thread deadalnix
Le 05/07/2012 18:28, Jonathan M Davis a écrit : On Thursday, July 05, 2012 18:04:11 Roman D. Boiko wrote: On Thursday, 5 July 2012 at 15:40:53 UTC, Jacob Carlborg wrote: On 2012-07-05 15:08, Roman D. Boiko wrote: Anyway I propose to enumerate major use cases first. Haven't we already done

Re: dfmt - D source code formatter

2012-07-05 Thread Roman D. Boiko
On Thursday, 5 July 2012 at 22:25:15 UTC, Walter Bright wrote: I agree that whatever is inside the comment should be left alone. I was more talking about lining up comment blocks, etc. Why would that be more difficult to do than code formatting? I'm wondering.

Re: dfmt - D source code formatter

2012-07-05 Thread Walter Bright
On 7/5/2012 1:52 PM, Brian Schott wrote: On Thursday, 5 July 2012 at 19:22:56 UTC, Walter Bright wrote: I think that formatting the code is actually rather easy - the hard part will be dealing with the comments in a reasonable way. Eclipse has had a LOT of time and energy put into it, and it

Re: More Front End Vector Support

2012-07-05 Thread Walter Bright
On 7/5/2012 12:55 AM, Iain Buclaw wrote: Fair enough. Only asked as if we do Y and Z, why not X? GCC backend already supported the use of __vector[N] sizes long before D support was added, but then again only less than of a handful of architectures actually __support__ vector operations (as I

Re: More Front End Vector Support

2012-07-05 Thread Mehrdad
On Thursday, 5 July 2012 at 22:28:21 UTC, Walter Bright wrote: I don't think D should do emulation - it should give a compiler error on vector sizes and operations that are not supported. The reason is the user may not expect the (very) slow emulation, and gets no indication of when it

Re: Let's stop parser Hell

2012-07-05 Thread deadalnix
Le 06/07/2012 00:21, Roman D. Boiko a écrit : On Thursday, 5 July 2012 at 22:11:41 UTC, deadalnix wrote: Why not program instead of doing bureaucracy ? To avoid programming things which are not needed or don't fit. I've thrown away several implementations already... time to reflect a little

  1   2   >