Re: Array ops give sharing violation under Windows 7 64 bit?

2012-03-25 Thread Walter Bright
On 3/25/2012 2:50 PM, Kagamin wrote: Microsoft has antivirus bundled with windows. Go to security center and see whether Windows Defender is working. Well, I'll be hornswoggled. That did the trick! Defender has a feature where it will to real time scanning of new executables. Apparently, it wa

Re: Poll of the week - How long have you been in the D world?

2012-03-25 Thread James Miller
On 26 March 2012 14:18, dnewbie wrote: > Just out of curiosity, is D attracting new users? Are the old > users running? Place your vote here > http://www.easypolls.net/poll.html?p=4f6fb7e5e4b04f389e5eb66f Looks like a fairly even spread so far, (27 votes). The higher bracket is low, but it is als

Re: How to use D for cross platform development?

2012-03-25 Thread Michel Fortin
On 2012-03-25 15:04:34 +, Jacob Carlborg said: A third option for Objective-C would be to use a fork of DMD that makes it possible to directly interface with Objective-C, just as it's possible with C. I'm not sure of the status of this project but an alpha has been released. It is not u

Poll of the week - How long have you been in the D world?

2012-03-25 Thread dnewbie
Just out of curiosity, is D attracting new users? Are the old users running? Place your vote here http://www.easypolls.net/poll.html?p=4f6fb7e5e4b04f389e5eb66f

Re: Proposal: user defined attributes

2012-03-25 Thread Tove
On Sunday, 25 March 2012 at 15:24:18 UTC, Jacob Carlborg wrote: On 2012-03-22 02:23, Tove wrote: mixin(attr(q{struct Foo { @NonSerialized int x; @NonSerialized int y; int z; }})); void main() { auto m = [ __traits(allMembers, Foo) ]; writeln("Normal members of Foo:", m); auto n = [ __traits(a

Re: When do you use templates instead of CTFE?

2012-03-25 Thread Jonathan M Davis
On Monday, March 26, 2012 12:39:36 James Miller wrote: > Often I end up using the same function in CTFE and runtime. That's pretty much the idea behind CTFE in the first place. - Jonathan M Davis

Re: When do you use templates instead of CTFE?

2012-03-25 Thread James Miller
On 26 March 2012 12:35, Jonathan M Davis wrote: > On Sunday, March 25, 2012 17:55:56 Nick Sabalausky wrote: >> Yea, the general rule of thumb is "If you can do it with CTFE, then do so, >> otherwise use templates." > > Generally, you end up having to use templates for stuff that operates on > type

Re: How to use D for cross platform development?

2012-03-25 Thread Kevin Cox
On Mar 25, 2012 7:34 PM, "Jonathan M Davis" wrote: > > On Monday, March 26, 2012 09:55:00 James Miller wrote: > > On 26 March 2012 09:44, Iain Buclaw wrote: > > > A spork of druntime, yes. > > > > A spork? I've never heard that before... > > http://en.wikipedia.org/wiki/Spork > > Not that it has

Re: When do you use templates instead of CTFE?

2012-03-25 Thread Jonathan M Davis
On Sunday, March 25, 2012 17:55:56 Nick Sabalausky wrote: > "Timon Gehr" wrote in message > news:jkkbqv$2pvu$3...@digitalmars.com... > > > On 03/24/2012 07:42 AM, Dan wrote: > >> Since there is CTFE, I keep running into, do I really need this as a > >> template parameter? Why not put this in a co

Re: BitC, Rust, dog food and more

2012-03-25 Thread bcs
On 03/25/2012 12:41 PM, Nick Sabalausky wrote: "Walter Bright" wrote in message news:jknr78$1g8q$1...@digitalmars.com... So why hasn't dmd been subject to all sorts of safety errors (like buffer overruns, uninitialized pointers, etc.)? Because you're cleverly using very D-like C++ ;) Car

Re: How to use D for cross platform development?

2012-03-25 Thread Jonathan M Davis
On Monday, March 26, 2012 09:55:00 James Miller wrote: > On 26 March 2012 09:44, Iain Buclaw wrote: > > A spork of druntime, yes. > > A spork? I've never heard that before... http://en.wikipedia.org/wiki/Spork Not that it has anything to do with software... - Jonathan M Davis

Re: Getting around the non-virtuality of templates

2012-03-25 Thread Simen Kjærås
On Mon, 26 Mar 2012 00:36:08 +0200, Stewart Gordon wrote: I'm coming up against some interesting challenges while porting stuff in my utility library to D2. Firstly, D2 uses opBinary and opOpAssign, rather than the operator-specific op* and op*Assign. While the latter still work, they

Something wrong with dmd's -c command?

2012-03-25 Thread Andrej Mitrovic
Response file: dmd.rsp: compile.d ignored.d main.d parse.d serialize.d types.d util.d xml.d ae\utils\xml.d ae\utils\xmlrpc.d gen\common.d gen\typemaps.d gen\types.d gen\generator.d gen\util.d messagepack\msgpack.d -ofdoxy.exe $ dmd @dmd.rsp OK, exe is built (win32). Now let's try compiling modul

Re: Getting around the non-virtuality of templates

2012-03-25 Thread James Miller
On 26 March 2012 11:36, Stewart Gordon wrote: > I'm coming up against some interesting challenges while porting stuff in my > utility library to D2. > > Firstly, D2 uses opBinary and opOpAssign, rather than the operator-specific > op* and op*Assign.  While the latter still work, they aren't mentio

Re: How to use D for cross platform development?

2012-03-25 Thread Iain Buclaw
On 25 March 2012 21:55, James Miller wrote: > On 26 March 2012 09:44, Iain Buclaw wrote: >> A spork of druntime, yes. > > A spork? I've never heard that before... > It's constantly merged from upstream, however we keep any GDC-specific differences in-house. -- Iain Buclaw *(p < e ? p++ : p) =

Getting around the non-virtuality of templates

2012-03-25 Thread Stewart Gordon
I'm coming up against some interesting challenges while porting stuff in my utility library to D2. Firstly, D2 uses opBinary and opOpAssign, rather than the operator-specific op* and op*Assign. While the latter still work, they aren't mentioned in the current D2 docs. Which would imply that t

Re: When do you use templates instead of CTFE?

2012-03-25 Thread Nick Sabalausky
"Timon Gehr" wrote in message news:jkkbqv$2pvu$3...@digitalmars.com... > On 03/24/2012 07:42 AM, Dan wrote: >> Since there is CTFE, I keep running into, do I really need this as a >> template parameter? Why not put this in a constructor. And so on... >> >> > > You use templates in combination wit

Re: Array ops give sharing violation under Windows 7 64 bit?

2012-03-25 Thread Kagamin
On Saturday, 24 March 2012 at 19:22:03 UTC, Walter Bright wrote: On 3/24/2012 12:18 PM, Xinok wrote: If you have an antivirus, try disabling it before compiling. I have a brand new vanilla install of Windows 7 home premium. Microsoft has antivirus bundled with windows. Go to security center

Re: BitC, Rust, dog food and more

2012-03-25 Thread Nick Sabalausky
"deadalnix" wrote in message news:jko00q$1pif$1...@digitalmars.com... > Le 25/03/2012 22:38, James Miller a écrit : >> On 26 March 2012 08:41, Nick Sabalausky wrote: >>> >>> Because you're cleverly using very D-like C++ ;) >>> >> >> Unsurprising from, you know, the creator of D... >> >> That sai

Re: How to use D for cross platform development?

2012-03-25 Thread James Miller
On 26 March 2012 09:44, Iain Buclaw wrote: > A spork of druntime, yes. A spork? I've never heard that before... -- James Miller

Re: BitC, Rust, dog food and more

2012-03-25 Thread Timon Gehr
On 03/25/2012 10:49 PM, deadalnix wrote: Le 25/03/2012 22:38, James Miller a écrit : On 26 March 2012 08:41, Nick Sabalausky wrote: Because you're cleverly using very D-like C++ ;) Unsurprising from, you know, the creator of D... That said, having a D compiler in D would be cool, simply be

Re: BitC, Rust, dog food and more

2012-03-25 Thread James Miller
On 26 March 2012 09:49, deadalnix wrote: > > ddmd seems to provide a working frontend written in D. I think this project > should be more promoted (eventually become the main d frontend ?). I have seen it, and it looks good. But there are reasons why the DMD front-end is in C++, I think Walter ha

Re: How to use D for cross platform development?

2012-03-25 Thread Iain Buclaw
On 25 March 2012 21:31, Jacob Carlborg wrote: > On 2012-03-25 18:20, Alex Rønne Petersen wrote: > >> About ARM support: That's not strictly true. D on ARM should work fine >> at this point in time if you build druntime/phobos in GDC with >> -fno-section-anchors (there is even some experimental And

Re: BitC, Rust, dog food and more

2012-03-25 Thread deadalnix
Le 25/03/2012 22:38, James Miller a écrit : On 26 March 2012 08:41, Nick Sabalausky wrote: Because you're cleverly using very D-like C++ ;) Unsurprising from, you know, the creator of D... That said, having a D compiler in D would be cool, simply because every language needs a bootstrapped

Re: BitC, Rust, dog food and more

2012-03-25 Thread James Miller
On 26 March 2012 08:41, Nick Sabalausky wrote: > > Because you're cleverly using very D-like C++ ;) > Unsurprising from, you know, the creator of D... That said, having a D compiler in D would be cool, simply because every language needs a bootstrapped compiler :P. Also, their are other argument

Re: How to use D for cross platform development?

2012-03-25 Thread Jacob Carlborg
On 2012-03-25 18:20, Alex Rønne Petersen wrote: About ARM support: That's not strictly true. D on ARM should work fine at this point in time if you build druntime/phobos in GDC with -fno-section-anchors (there is even some experimental Android support). But indeed, no iOS support. Ok, I didn't

Re: BitC, Rust, dog food and more

2012-03-25 Thread Nick Sabalausky
"Walter Bright" wrote in message news:jknr78$1g8q$1...@digitalmars.com... > > So why hasn't dmd been subject to all sorts of safety errors (like buffer > overruns, uninitialized pointers, etc.)? > Because you're cleverly using very D-like C++ ;)

Re: BitC, Rust, dog food and more

2012-03-25 Thread Walter Bright
On 3/25/2012 10:31 AM, bearophile wrote: One more disadvantage of not using D (or a language safer than C/C++) to implement a safe language as D is that the compiler will have many more bugs, so while you program in the implemented language (D) you will find many D compiler bugs. Today I think th

Re: BitC, Rust, dog food and more

2012-03-25 Thread Timon Gehr
On 03/25/2012 07:31 PM, bearophile wrote: ... So we moved to a "monomorphization" scheme for Rust 0.2, which is basically like C++ template instantiation, only without the overhead of reparsing all the code from scratch.< What are doing D/DMD regarding this? D templates do not require rep

BitC, Rust, dog food and more

2012-03-25 Thread bearophile
BitC has tried to become a verified system language, but its author has decided to stop its development because of some problems that he has described in a post. This is a thread of discussions about that post: http://news.ycombinator.com/item?id=3749860 One of the most interesting comments is

Re: std.ffi?

2012-03-25 Thread Jens Mueller
Alex Rønne Petersen wrote: > Hi, > > I implemented a simple binding/wrapper for libffi in D a while > back[1]. We have successfully used this to implement native function > invocation in MCI's IR interpreter. I'm wondering if there is any > interest in making this a standard module in Phobos (std.

Re: Regex performance

2012-03-25 Thread James Blewitt
Hello everyone, I'm the author of the blog post. First of all, thanks so much for the interest in my problem. I had no idea that the D community was so active (a fact that pleases me greatly). A quick update. I've written a small benchmark based on my real code and I'm now getting *signif

std.ffi?

2012-03-25 Thread Alex Rønne Petersen
Hi, I implemented a simple binding/wrapper for libffi in D a while back[1]. We have successfully used this to implement native function invocation in MCI's IR interpreter. I'm wondering if there is any interest in making this a standard module in Phobos (std.ffi or so). If so, I'm willing to

Re: How to use D for cross platform development?

2012-03-25 Thread Alex Rønne Petersen
On 25-03-2012 17:04, Jacob Carlborg wrote: On 2012-03-25 13:12, Bennie Copeland wrote: Hello all. I'm sorry if this has been addressed before. For a little background. I've been studying C++ with the intention of doing cross platform work on Windows, OSX, and eventually iOS and some other mobil

Re: Mono-D@GSoC - Mentor needed

2012-03-25 Thread F i L
Jacob Carlborg wrote: Maybe the C# code go call the D code? The rest of MonoDevelop is written in C#. It's probably easier to interface with the IDE being written in C# and a port to D wouldn't bring anything new. I think it would be great to eventually port Alex's parser to D and make a sta

Re: Mono-D@GSoC - Mentor needed

2012-03-25 Thread Jacob Carlborg
On 2012-03-25 15:41, Armnin Kazmi wrote: I can't really agree here. Lets take the GSOC-List as the list of crucial points about the D language ecosystem which need to be fixed asap. All other stuff is extra and not even close as important. (Don't forget the mono-D plugin is written in C#, hence

Re: Why CTFE I/O would be awesome: No-Build-Tool Custom Build Steps

2012-03-25 Thread Jacob Carlborg
On 2012-03-23 02:12, Nick Sabalausky wrote: (I'm branching this off from "Three Unlikely Successful Features of D") At least one way I think CTFE I/O could be a really big thing: A library could include any custom build steps it needed (or at least pre-build steps) *in* the library itself witho

Re: Proposal: user defined attributes

2012-03-25 Thread Jacob Carlborg
On 2012-03-22 15:31, Artur Skawina wrote: For run-time accessible custom attributes (if those are even necessary), the lib solution wouldn't be much different than a built-in one anyway. artur Accessing the custom attributes at runtime are necessary. Serialization is one example that could t

Re: Proposal: user defined attributes

2012-03-25 Thread Jacob Carlborg
On 2012-03-22 08:17, Manu wrote: By this logic, I might as well stick with C++. It's 'possible' to do everything I need, but it makes my cry myself to sleep at night, and wastes insane amounts of time. Code simplicity and cleanliess on the front end IS important, it makes code reasable, maintain

Re: Proposal: user defined attributes

2012-03-25 Thread Jacob Carlborg
On 2012-03-22 02:23, Tove wrote: mixin(attr(q{struct Foo { @NonSerialized int x; @NonSerialized int y; int z; }})); void main() { auto m = [ __traits(allMembers, Foo) ]; writeln("Normal members of Foo:", m); auto n = [ __traits(allMembers, Foo_Serializable) ]; writeln("Serializable members of

Re: What about putting array.empty in object.d?

2012-03-25 Thread Jacob Carlborg
On 2012-03-21 23:25, Simen Kjærås wrote: I hope you mean canFind!("true")([3, 4, 5]);. canFind!"a" fails for arrays where all elements are 0. Yes. I'm not really familiar with canFind or std.algorithms in general. -- /Jacob Carlborg

Re: How to use D for cross platform development?

2012-03-25 Thread Jacob Carlborg
On 2012-03-25 13:12, Bennie Copeland wrote: Hello all. I'm sorry if this has been addressed before. For a little background. I've been studying C++ with the intention of doing cross platform work on Windows, OSX, and eventually iOS and some other mobile OSes. My plan was to write cross platform

digitalmars-d@puremagic.com

2012-03-25 Thread Ali Çehreli
On 03/25/2012 06:00 AM, Tyro[17] wrote: > I am trying to figure out the cause of my problem in the following post: > > http://forum.dlang.org/thread/qfbugjkrerfboqhvj...@forum.dlang.org Sorry that I missed your question there. :( > and encountered something peculiar about reading strings. Whenev

Re: Use tango.core.Atomic.atomicLoad and atomicStore from Tango

2012-03-25 Thread Lukasz Durniat
Here is code: import Integer = tango.text.convert.Integer; import tango.math.random.Random; import tango.core.Thread; import tango.core.Atomic; class MyThread :Thread { bool* log; this( bool* log ) { super(&run); this.log = log; } void run() {

Re: Mono-D@GSoC - Mentor needed

2012-03-25 Thread Armnin Kazmi
On Saturday, 24 March 2012 at 03:07:10 UTC, dnewbie wrote: On Tuesday, 20 March 2012 at 22:52:13 UTC, James Miller wrote: A bit of a side note, but is there any way that some of this work could be made more standalone, even if somebody else has to take up the work to finish it and make it truly

Re: How to use D for cross platform development?

2012-03-25 Thread Iain Buclaw
On 25 March 2012 13:22, maarten van damme wrote: > Op 25 maart 2012 13:12 schreef Bennie Copeland het > volgende: > >> For linking against C, I can create a DLL in windows, but I can't create >> an .so in linux, and no information at all about OSX. > > > From what I've heard this was a certain bu

digitalmars-d@puremagic.com

2012-03-25 Thread Tyro[17]
I am trying to figure out the cause of my problem in the following post: http://forum.dlang.org/thread/qfbugjkrerfboqhvj...@forum.dlang.org and encountered something peculiar about reading strings. Whenever a distinct terminator is indicated in the input format (ex. " %s@", @ being the

Re: Use tango.core.Atomic.atomicLoad and atomicStore from Tango

2012-03-25 Thread Alex Rønne Petersen
On 25-03-2012 14:49, Lukasz Durniat wrote: Hi, When I use this function in program I have error during compiling proccess, so someone can show me how use(example) it in proper manner - without errors. I try find some samples or documentations but this dont help. Thanks for any help. You know

Use tango.core.Atomic.atomicLoad and atomicStore from Tango

2012-03-25 Thread Lukasz Durniat
Hi, When I use this function in program I have error during compiling proccess, so someone can show me how use(example) it in proper manner - without errors. I try find some samples or documentations but this dont help. Thanks for any help.

Re: How to use D for cross platform development?

2012-03-25 Thread maarten van damme
Op 25 maart 2012 13:12 schreef Bennie Copeland het volgende: > For linking against C, I can create a DLL in windows, but I can't create > an .so in linux, and no information at all about OSX. >From what I've heard this was a certain bug ( http://d.puremagic.com/issues/show_bug.cgi?id=4583) that

How to use D for cross platform development?

2012-03-25 Thread Bennie Copeland
Hello all. I'm sorry if this has been addressed before. For a little background. I've been studying C++ with the intention of doing cross platform work on Windows, OSX, and eventually iOS and some other mobile OSes. My plan was to write cross platform shared libraries for the core functionalit

Re: Using D for Soft Synth development

2012-03-25 Thread Timo Westkämper
Thanks for the advices. I used bcd.gen to create the binding stubs in D. I will make a more lightweight D integration than the lv2-c++-tools. I will post the results on GitHub when simple examples are working.

Re: Array ops give sharing violation under Windows 7 64 bit?

2012-03-25 Thread Don
On 24.03.2012 19:55, Walter Bright wrote: I've been upgrading to a Windows 64 bit box. Running the D test suite, I ran into a very strange problem. Here's the program: --- extern(C) int printf(const char*, ...); int main() { byte[3] a; byte[3] b; byte[3] c; a[] = b[] +