Re: Tokenizing D at compile time?

2011-08-26 Thread Rainer Schuetze
On 26.08.2011 03:08, dsimcha wrote: I'm working on a parallel array ops implementation for std.parallel_algorithm. (For the latest work in progress see https://github.com/dsimcha/parallel_algorithm/blob/master/parallel_algorithm.d ). To make it (somewhat) pretty, I need to be able to tokenize

moving wxd to github

2011-08-26 Thread Anders F Björklund
As part of a necessary rewrite to better support wxWidgets 3.0 and D2, the wxD development is moving from SourceForge (cvs) to GitHub (git). As an interim step the existing source repository has been converted, the details at: http://sourceforge.net/scm/?type=git&group_id=133831 Besides updating

Re: Shared lib support for Linux

2011-08-26 Thread Long Chang
It's been five months since I last ask for dynamic lib support of linux , I want to know when this can be achieved . A rough schedule time will be very help, thank in advance . On 22 March 2011 11:31, Long Chang wrote: > > Hello , > > The DMD will support shared lib for linux in future,  But

Re: Shared lib support for Linux

2011-08-26 Thread bioinfornatics
I have explain here: https://github.com/ldc-developers/ldc/issues/4 how to get shared lib for ldc2 compiler

Re: moving wxd to github

2011-08-26 Thread Marco Leise
Am 26.08.2011, 10:10 Uhr, schrieb Anders F Björklund : I am also stepping down as a maintainer, including the pre-built GDC distribution (gdcwin/gdcgnu/gdcmac) and the Code::Blocks support for D. Hopefully the new wxD project will have better luck of accomplishing a open-source cross-platform G

Re: Optional braces

2011-08-26 Thread bearophile
Walter: Here you are essentially asking for a more global view of the D design, to see if we are using too much "plastic surgery". To have such global view we need to look at many unrelated things. So sorry if this looks like a lot of meat on the fire, there is no other way. > We've already p

Re: Optional braces

2011-08-26 Thread bearophile
> And there are few more special cases where I'd like to see > changes/improvements on (there are other improvements that I'd like to see, > but they aren't special cases): > > 3878 Arguments and attributes with the same name > 4407 Catch wrong argument<->attribute assignments in methods > 5187

Re: Optional braces

2011-08-26 Thread Marco Leise
Am 26.08.2011, 11:32 Uhr, schrieb bearophile : There is one more special case that we plan to disallow, that's not in DMD yet: 5409 Disallow (!x & y) http://d.puremagic.com/issues/show_bug.cgi?id=5409 Is (!x & y) an issue or is it rather people omitting spaces in their code !x&y ? I can't

Re: Optional braces

2011-08-26 Thread bearophile
Marco Leise: > Is (!x & y) an issue or is it rather people omitting spaces in their code > !x&y ? This topic was already discussed in past, in two threads, this one of them: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=135741 The Coccinelle tool has foun

Re: moving wxd to github

2011-08-26 Thread Anders F Björklund
Marco Leise wrote: I am also stepping down as a maintainer, including the pre-built GDC distribution (gdcwin/gdcgnu/gdcmac) and the Code::Blocks support for D. Hopefully the new wxD project will have better luck of accomplishing a open-source cross-platform GUI and IDE for the D programming lang

User defined safety?

2011-08-26 Thread Lutger Blijdestijn
I wonder if anybody has brought up the idea of using or expanding the SafeD features to cover a user-defined kind of safety? Right now, @safe means memory safe and it is defined by the language. However, there are many kinds of safety that benefit from being layered in a manner similar to how s

Re: Shared lib support for Linux

2011-08-26 Thread maarten van damme
wow, been looking for this since a long time, only found for gdc. 2011/8/26 bioinfornatics > I have explain here: https://github.com/ldc-developers/ldc/issues/4 how to > get shared lib for ldc2 compiler >

Re: Optional braces

2011-08-26 Thread Marco Leise
Am 26.08.2011, 13:10 Uhr, schrieb bearophile : Marco Leise: Is (!x & y) an issue or is it rather people omitting spaces in their code !x&y ? This topic was already discussed in past, in two threads, this one of them: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmar

Re: moving wxd to github

2011-08-26 Thread Marco Leise
Am 26.08.2011, 13:47 Uhr, schrieb Anders F Björklund : Marco Leise wrote: That are some good projects you were working on. We've got the precompiled DMD, Eclipse DDT and GtkD, but I would have tried wxWidgets in Code::Blocks with D. And while building GDC from source is possible, the Windows f

Re: User defined safety?

2011-08-26 Thread Adam Ruppe
My pet feature request could do this too. User defined attributes combined with a list of functions called by a function. === @custom("mysafe") void foo() {} void bar() {} @custom("mysafe") void main() { foo(); bar(); } CheckCustomSafety!("mysafe", main); template CheckCustomSafety(strin

Re: moving wxd to github

2011-08-26 Thread Anders F Björklund
Marco Leise wrote: Would have ? Well, you can still use the existing stuff* for D(1). It was mostly that focus has shifted to D2, since four years ago... I updated most of it for better 64-bit support last year, and there was a new Code::Blocks 10.05 but that was about it for development. When

Re: User defined safety?

2011-08-26 Thread Timon Gehr
On 08/26/2011 02:38 PM, Adam Ruppe wrote: My pet feature request could do this too. User defined attributes combined with a list of functions called by a function. === @custom("mysafe") void foo() {} void bar() {} @custom("mysafe") void main() { foo(); bar(); } CheckCustomSafety!("mys

Re: Optional braces

2011-08-26 Thread Andrei Alexandrescu
On 8/25/11 9:13 PM, Walter Bright wrote: On 8/25/2011 6:30 PM, Andrei Alexandrescu wrote: On 8/25/11 6:10 PM, Walter Bright wrote: On 8/25/2011 6:04 PM, Nick Sabalausky wrote: Oh god no, don't ban that. I *like* to do that sort of thing: Unusual, but legitimate. I think I'll shelve the idea.

Re: Optional braces

2011-08-26 Thread Steven Schveighoffer
On Fri, 26 Aug 2011 11:03:21 -0400, Andrei Alexandrescu wrote: It's a legitimate concern, and there's no right response to it. My point is that the argument is weak and caving to it would be a mistake. In essence Nick claims he can't be bothered to change: if (long_expression_one) if (lo

Re: moving wxd to github

2011-08-26 Thread Andrej Mitrovic
Do you mean you're stepping down as the maintainer of wxd, or just the GDC/CodeBlocks stuff? wxWidgets look very interesting to me, lots of documentation available from what I can tell. Plus it seems it's easy to grab a device context out of a wxWidget frame, so I could use Cairo with that (e.g. h

Re: Optional braces

2011-08-26 Thread Andrei Alexandrescu
On 8/26/11 8:48 AM, Steven Schveighoffer wrote: On Fri, 26 Aug 2011 11:03:21 -0400, Andrei Alexandrescu wrote: It's a legitimate concern, and there's no right response to it. My point is that the argument is weak and caving to it would be a mistake. In essence Nick claims he can't be bothered

Re: Optional braces

2011-08-26 Thread Andrej Mitrovic
I've used this a few times: foreach (dir; dirs) foreach (string file; dirEntries(dir, SpanMode.shallow)) { if (file.isFile) // do something.. } And I only use this in short loops like this. It's more compact, I dislike having to create too much indentation. I don't see what banning t

Re: Optional braces

2011-08-26 Thread bearophile
Andrej Mitrovic: > I don't see what banning this buys us. That's not banned. Bye, bearophile

Re: Optional braces

2011-08-26 Thread Andrej Mitrovic
On 8/26/11, bearophile wrote: > Andrej Mitrovic: > >> I don't see what banning this buys us. > > That's not banned. > > Bye, > bearophile > Ok, I thought this was included.

Re: Optional braces

2011-08-26 Thread bearophile
Marco Leise: > Does your enhancement include other operators like '&&' or is it > practically just for the 'check if flag is disabled' case? My enhancement request regards just a narrow case. (But the actual implementation of it may add some other related cases, I don't know). Bye, bearophil

Re: Optional braces

2011-08-26 Thread Adam Ruppe
> we might as well get rid of the semicolon as well. You can have my semicolons when you pry them from my cold, dead hands.

Re: moving wxd to github

2011-08-26 Thread Andrej Mitrovic
*correction: It's not just the samples, it's the library code too. I don't understand, why the blank lines?

Re: moving wxd to github

2011-08-26 Thread Andrej Mitrovic
I can see the problem now. The code uses CR followed by CRLF on every line. This was probably some kind of unix -> windows EOL conversion bug. Either CRLF or CR's should be killed (personally I'm ok with unix endlines).

Re: Optional braces

2011-08-26 Thread bearophile
Andrej Mitrovic: > Ok, I thought this was included. It wasn't included in my original enhancement request. But now I don't exactly know what situations Andrei wants to disallow. Bye, bearophile

Re: Optional braces

2011-08-26 Thread Andrej Mitrovic
On 8/26/11, Adam Ruppe wrote: >> we might as well get rid of the semicolon as well. > > You can have my semicolons when you pry them from my cold, dead hands. > I'd kill them (the semicolons, not your hands :p) in places they're not needed anymore. And we already have that in struct, class, enum

Re: Optional braces

2011-08-26 Thread Rainer Schuetze
On 26.08.2011 17:03, Andrei Alexandrescu wrote: On 8/25/11 9:13 PM, Walter Bright wrote: But I worry that we might wind up tarting up the language with too many a boatload of them, to the point where it becomes a confusing mass. At what point should Meg Ryan stop with the plastic surgery? :-)

Re: Tokenizing D at compile time?

2011-08-26 Thread dsimcha
== Quote from Rainer Schuetze (r.sagita...@gmx.de)'s article > The lexer used by Visual D is also CTFE capable: > http://www.dsource.org/projects/visuald/browser/trunk/vdc/lexer.d > As Timon pointed out, it will separate into D tokens, not the more > combined elements in your array. > Here's my sma

Re: moving wxd to github

2011-08-26 Thread Anders F Björklund
Andrej Mitrovic wrote: I can see the problem now. The code uses CR followed by CRLF on every line. This was probably some kind of unix -> windows EOL conversion bug. Either CRLF or CR's should be killed (personally I'm ok with unix endlines). The code uses CRLF, must be some kind of bug with y

Re: moving wxd to github

2011-08-26 Thread Anders F Björklund
Andrej Mitrovic wrote: Do you mean you're stepping down as the maintainer of wxd, or just the GDC/CodeBlocks stuff? All three. Mostly wxD, but also the others - not using. I'll leave it up as-is, but won't be adding D2 features. --anders

Re: Optional braces

2011-08-26 Thread Jakob Ovrum
On 2011/08/27 1:52, Andrej Mitrovic wrote: Of course they're still needed in other places, but to be honest I'm tired of "found foo, expected bla" errors due to missing semicolons. You can have both semi-colons and nice error messages if you put some effort into the parser. Clang manages this

Re: moving wxd to github

2011-08-26 Thread Anders F Björklund
I can see the problem now. The code uses CR followed by CRLF on every line. This was probably some kind of unix -> windows EOL conversion bug. Either CRLF or CR's should be killed (personally I'm ok with unix endlines). The code uses CRLF, must be some kind of bug with your git setup - looks "OK

Re: moving wxd to github

2011-08-26 Thread Andrej Mitrovic
On 8/26/11, Anders F Björklund wrote: > The code uses CRLF, must be some kind of bug with your > git setup - looks "OK" from here (with the ^M that is). Sorry I've downloaded the tarball, not the git repo. The git repo doesn't have these problems, thanks.

Re: moving wxd to github

2011-08-26 Thread Andrej Mitrovic
s/tarball/zip file The zipped source has the duplicate newlines, but that probably doesn't show up based on what editor you use. But anyway, the git version works fine.

Re: moving wxd to github

2011-08-26 Thread Andrej Mitrovic
When I try to build via DMC's make I get: D:\dev\projects\wxd>make cd wxc make Error on line 181: can't read makefile '/build/msw/config.dmc' I don't see a build folder anywhere. Are these build instructions outdated on http://wxd.sourceforge.net/#installation ?

Re: Optional braces

2011-08-26 Thread Andrej Mitrovic
Cool stuff! DMD is almost there but it reports the line number of whatever comes next, even if there was only whitespace, e.g.: void main() { int foo = 2 } <- error line here instead of above

Algorithms and slices

2011-08-26 Thread Mafi
The algorithms in std.algorithm are great. They operate the same on arrays/slices and generic ranges. But they return their own range-types. Often this ok but sometimes you need a T[]. You may say to just use array() but this allocates a new array! I think you sometimes want to get a slice to

Re: Algorithms and slices

2011-08-26 Thread Timon Gehr
On 08/26/2011 08:24 PM, Mafi wrote: The algorithms in std.algorithm are great. They operate the same on arrays/slices and generic ranges. But they return their own range-types. Often this ok but sometimes you need a T[]. You may say to just use array() but this allocates a new array! I think you

Re: moving wxd to github

2011-08-26 Thread Anders F Björklund
Andrej Mitrovic wrote: When I try to build via DMC's make I get: D:\dev\projects\wxd>make cd wxc make Error on line 181: can't read makefile '/build/msw/config.dmc' I don't see a build folder anywhere. Are these build instructions outdated on http://wxd.sourceforge.net/#installation ? If you

Re: Algorithms and slices

2011-08-26 Thread Dmitry Olshansky
On 26.08.2011 22:24, Mafi wrote: The algorithms in std.algorithm are great. They operate the same on arrays/slices and generic ranges. But they return their own range-types. Often this ok but sometimes you need a T[]. You may say to just use array() but this allocates a new array! I think you som

Web browser

2011-08-26 Thread jdrewsen
Hi, I seem to remember that someone not too long ago mentioned he was working on a web browser written in D as a pet project. I cannot locate that post. Does anyone remember this and maybe have a link to the project by chance? Thanks Jonas

Re: Web browser

2011-08-26 Thread Adam D. Ruppe
jdrewsen wrote: > I seem to remember that someone not too long ago mentioned he was > working on a web browser written in D as a pet project. I started one, but haven't had a chance to come back to it since that first weekend. It does not currently compile since I've changed the libraries without

Re: Web browser

2011-08-26 Thread Nick Sabalausky
"jdrewsen" wrote in message news:j38su2$evo$1...@digitalmars.com... > Hi, > > I seem to remember that someone not too long ago mentioned he was > working on a web browser written in D as a pet project. I cannot locate > that post. Does anyone remember this and maybe have a link to the proje

Re: Algorithms and slices

2011-08-26 Thread Ali Çehreli
On Fri, 26 Aug 2011 20:24:43 +0200, Mafi wrote: > The algorithms in std.algorithm are great. They operate the same on > arrays/slices and generic ranges. But they return their own range-types. > Often this ok but sometimes you need a T[]. I have a feeling that std.range.inputRangeObject() will be

Re: Algorithms and slices

2011-08-26 Thread Jonathan M Davis
On Friday, August 26, 2011 11:49 Timon Gehr wrote: > On 08/26/2011 08:24 PM, Mafi wrote: > > The algorithms in std.algorithm are great. They operate the same on > > arrays/slices and generic ranges. But they return their own range-types. > > Often this ok but sometimes you need a T[]. You may say t

Re: Optional braces

2011-08-26 Thread kennytm
"Steven Schveighoffer" wrote: > Hm... the only problem I see with simply disallowing if(a) if(b) is this: > > if(a) > while(condition) > if(b) > statement; > else // oops! this goes with if(b) > statement; > > Or would this be disallowed as well? This could not be combined into a

Re: Optional braces

2011-08-26 Thread bearophile
kennytm: > I've created a patch* for dangling else checking. I have not yet compiled and tried your code, but from what I see all the design decisions you have taken are good, including the error message (I think it doesn't need to contain "dangling else" because that's a different thing), the

Re: SQLite Wrapper?

2011-08-26 Thread Andrej Mitrovic
FYI I just bumped into this 10 minutes ago: https://github.com/bayun/SQLite3-D/ I don't know the quality of code or how well it works though.

Re: SQLite Wrapper?

2011-08-26 Thread Jesse Phillips
dsimcha Wrote: > I was looking through the Phobos source code and was reminded that > there's an SQLite binding in there now. Is there a wrapper for this in > the works/in the review queue? Andrej found the wrapper. This was the place the bindings came from. As for a wrapper in Phobos, I figu

bug covering other bug

2011-08-26 Thread Mariusz Gliwiński
Hey, firstly - i'm sorry that i'm not posting it directly to bugtracker but i highly care about this issue. So, on my Linux x64 dmd 2.53 & 2.54, while hunting another bug (i already highly doubt it's my) - i've found this one: private import std.stdio; class T { @property {

Re: bug covering other bug

2011-08-26 Thread bearophile
Mariusz G.: > So, on my Linux x64 dmd 2.53 & 2.54, while hunting another bug (i already > highly doubt it's my) - i've found this one: I can't reproduce the problem on 2.055head on 32 bit Windows. DMD 64 bit is relatively recent, it contains several bugs still. > Another problem i'm searching

Re: bug covering other bug

2011-08-26 Thread Andrej Mitrovic
Bear, you keep creating new threads when you reply to other peoples posts..

[OT] Threading (Was: bug covering other bug)

2011-08-26 Thread Vladimir Panteleev
On Sat, 27 Aug 2011 05:44:24 +0300, Andrej Mitrovic wrote: Bear, you keep creating new threads when you reply to other peoples posts.. My newsreader (Opera) threads Bearophile's posts fine. Let's have a look: Marius' post has: Message-ID: Bearophile's post has: Message-ID: References:

Re: [OT] Threading (Was: bug covering other bug)

2011-08-26 Thread Andrej Mitrovic
I'm using gmail.

Re: [OT] Threading (Was: bug covering other bug)

2011-08-26 Thread Vladimir Panteleev
On Sat, 27 Aug 2011 06:51:03 +0300, Andrej Mitrovic wrote: I'm using gmail. That's not very helpful. If you post the e-mail headers for Mariusz' and bearophile's posts, as you received them, it'd probably be possible to point out whether the problem is with Gmail or the mailing list ga

Re: [OT] Threading (Was: bug covering other bug)

2011-08-26 Thread Andrej Mitrovic
Mariusz Gliwiński: http://codepad.org/9uZf3E1N bearophile: http://codepad.org/j84TLFC8 It happens 90% of the time when bear replies.

Re: [OT] Threading (Was: bug covering other bug)

2011-08-26 Thread Vladimir Panteleev
On Sat, 27 Aug 2011 07:08:45 +0300, Andrej Mitrovic wrote: Mariusz Gliwiński: http://codepad.org/9uZf3E1N bearophile: http://codepad.org/j84TLFC8 It happens 90% of the time when bear replies. That doesn't mean it's his fault. I think I see the problem: 1. Mariusz posts via the mailing-li

Re: [OT] Threading (Was: bug covering other bug)

2011-08-26 Thread Brad Roberts
On Friday, August 26, 2011 9:29:47 PM, Vladimir Panteleev wrote: > On Sat, 27 Aug 2011 07:08:45 +0300, Andrej Mitrovic > wrote: > >> Mariusz Gliwiński: http://codepad.org/9uZf3E1N >> bearophile: http://codepad.org/j84TLFC8 >> >> It happens 90% of the time when bear replies. > > That doesn't mea

Re: [OT] Threading (Was: bug covering other bug)

2011-08-26 Thread Vladimir Panteleev
On Sat, 27 Aug 2011 07:44:16 +0300, Brad Roberts wrote: I don't think the mailing list software is what's at fault. There's _tons_ of people who use it, myself included obviously. If it was a general problem with the list software (mailman, probably the most popular list management software

Re: [OT] Threading (Was: bug covering other bug)

2011-08-26 Thread Jérôme M. Berger
Vladimir Panteleev wrote: > On Sat, 27 Aug 2011 07:44:16 +0300, Brad Roberts > wrote: > >> I don't think the mailing list software is what's at fault. There's >> _tons_ of people who use it, myself included obviously. If it was a >> general problem with the list software (mailman, probably the

Re: bug covering other bug

2011-08-26 Thread Mariusz Gliwiński
bearophile wrote: > Mariusz G.: > >> So, on my Linux x64 dmd 2.53 & 2.54, while hunting another bug (i already >> highly doubt it's my) - i've found this one: > > I can't reproduce the problem on 2.055head on 32 bit Windows. > DMD 64 bit is relatively recent, it contains several bugs still. More

Re: [OT] Threading (Was: bug covering other bug)

2011-08-26 Thread Brad Roberts
On 8/26/2011 10:29 PM, Vladimir Panteleev wrote: > On Sat, 27 Aug 2011 07:44:16 +0300, Brad Roberts wrote: > >> I don't think the mailing list software is what's at fault. There's >> _tons_ of people who use it, myself included obviously. If it was a >> general problem with the list software (m

Re: [OT] Threading (Was: bug covering other bug)

2011-08-26 Thread Vladimir Panteleev
On Sat, 27 Aug 2011 09:01:21 +0300, Brad Roberts wrote: On 8/26/2011 10:29 PM, Vladimir Panteleev wrote: On Sat, 27 Aug 2011 07:44:16 +0300, Brad Roberts wrote: I don't think the mailing list software is what's at fault. There's _tons_ of people who use it, myself included obviously.