D and C++11 Conference, June 30, 2012, Tütev, Ankara, Turkey

2012-06-12 Thread Ali Çehreli
Date: June 30, 2012 Time: 12:30 Place: Tütev, Ankara Although this conference is in Turkish, I think it is still interesting to the audience here. Thanks to Zafer Çelenk for initiating the effort, to Salih Dinçer and Mert Ataol for volunteering their time as speakers, and Tütev for

Re: D and C++11 Conference, (DATE CORRECTION: June 30), 2012, Tütev, Ankara, Turkey

2012-06-12 Thread Ali Çehreli
On 06/12/2012 12:47 AM, Romain Gérard romain.ger...@erebe.eu wrote: Hi, Could we be able to find videos of the conference after ? Or is it not planned to film it ? Thanks I hope so but I am not sure because I haven't heard anything about it yet and I haven't been to the venue before. Ali

Re: D and C++11 Conference, (DATE CORRECTION: June 30), 2012, Tütev, Ankara, Turkey

2012-06-12 Thread Romain Gérard
On Tuesday, 12 June 2012 at 08:06:33 UTC, Ali Çehreli wrote: On 06/12/2012 12:47 AM, Romain Gérard romain.ger...@erebe.eu wrote: Hi, Could we be able to find videos of the conference after ? Or is it not planned to film it ? Thanks I hope so but I am not sure because I haven't heard

Re: D and C++11 Conference, June 30, 2012, Tütev, Ankara, Turkey

2012-06-12 Thread Dejan Lekic
On Mon, 11 Jun 2012 23:52:43 -0700, Ali Çehreli wrote: Date: June 30, 2012 Time: 12:30 Place: Tütev, Ankara Although this conference is in Turkish, I think it is still interesting to the audience here. Thanks to Zafer Çelenk for initiating the effort, to Salih Dinçer and Mert Ataol for

Re: D and C++11 Conference, June 30, 2012, Tütev, Ankara, Turkey

2012-06-12 Thread Walter Bright
On 6/11/2012 11:52 PM, Ali Çehreli wrote: Date: June 30, 2012 Time: 12:30 Place: Tütev, Ankara Although this conference is in Turkish, I think it is still interesting to the audience here. Thanks to Zafer Çelenk for initiating the effort, to Salih Dinçer and Mert Ataol for volunteering their

Re: libffi-d version 1.1 released

2012-06-12 Thread bioinfornatics
Le lundi 11 juin 2012 à 12:14 +0200, Alex Rønne Petersen a écrit : http://blog.lycus.org/2012/06/libffi-d-version-11-released.html I never actually announced the 1.0 release because I wanted to give the library some time to mature. I believe that version 1.1 is polished and battle-tested,

Re: libgc-d version 1.1 released

2012-06-12 Thread bioinfornatics
Le lundi 11 juin 2012 à 12:22 +0200, Alex Rønne Petersen a écrit : http://blog.lycus.org/2012/06/libgc-d-version-11-released.html As with libffi-d, version 1.0 was never announced here due to letting the library mature a bit first. It should now be ready for actual use (we use it in our

Re: Verification Corner videos, contract programming

2012-06-12 Thread deadalnix
This is awesome. I wonder what is the method used by the compiler to ensure most of the check at compile time. This is really something we can look at to think about D's contracts. Le 08/06/2012 14:57, bearophile a écrit : The Channel9 videos of the The Verification Corner (Microsoft

Re: Porting VisualD to Windows 8 and Visual Studio 11

2012-06-12 Thread Rainer Schuetze
On 6/11/2012 7:57 PM, Roman D. Boiko wrote: On Monday, 11 June 2012 at 17:41:12 UTC, Rainer Schuetze wrote: No. Syntax highlighting is done by the lexer, no (complex) parsing involved. The only case where the parser is consulted (but not waiting for an answer, just using cached information)

Struct type value as template parameter

2012-06-12 Thread Tommi
There seem to be two ways to pass struct type value-parameters to templates, which according to documentation shouldn't be possible. What should I make of this? Should the compiler not allow the following code? (which currently works) struct StructParam { int v; } struct

AST files instead of DI interface files for faster compilation and easier distribution

2012-06-12 Thread timotheecour
There's a current pull request to improve di file generation (https://github.com/D-Programming-Language/dmd/pull/945); I'd like to suggest further ideas. As far as I understand, di interface files try to achieve these conflicting goals: 1) speed up compilation by avoiding having to reparse

Re: Mersenne Twister Seeding and UUIDs

2012-06-12 Thread Johannes Pfau
Am Mon, 11 Jun 2012 13:09:26 -0500 schrieb Andrei Alexandrescu seewebsiteforem...@erdani.org: On 6/11/12 12:32 PM, Joseph Rushton Wakeling wrote: On 11/06/12 18:15, Johannes Pfau wrote: Could someone who's familiar with RNGs answer this question? This seems to be important for st.uuid, we

Re: Request for Review: DI Generation Improvements

2012-06-12 Thread timotheecour
mixin Instantiate!(foo,int); Thanks for the syntax tip! You could use cp instead of dmd -H. That won't produce the same output (eg large functions tend to be stripped currently), but I guess the current behavior is relatively useless so it's fine. want you are after. Such a thing could

Re: Mersenne Twister Seeding and UUIDs

2012-06-12 Thread Jens Mueller
Johannes Pfau wrote: Am Mon, 11 Jun 2012 13:09:26 -0500 schrieb Andrei Alexandrescu seewebsiteforem...@erdani.org: On 6/11/12 12:32 PM, Joseph Rushton Wakeling wrote: On 11/06/12 18:15, Johannes Pfau wrote: Could someone who's familiar with RNGs answer this question? This seems to

Re: Mersenne Twister Seeding and UUIDs

2012-06-12 Thread Jonathan M Davis
On Tuesday, June 12, 2012 11:48:11 Jens Mueller wrote: Johannes Pfau wrote: * As seed is a normal function right now, I can't overload it with a template. Is it safe to make the original seed a template as well, so seedRange could be named seed, or would that break the API? What

Re: Mersenne Twister Seeding and UUIDs

2012-06-12 Thread Jens Mueller
Jonathan M Davis wrote: On Tuesday, June 12, 2012 11:48:11 Jens Mueller wrote: Johannes Pfau wrote: * As seed is a normal function right now, I can't overload it with a template. Is it safe to make the original seed a template as well, so seedRange could be named seed, or would

Re: AST files instead of DI interface files for faster compilation and easier distribution

2012-06-12 Thread Tobias Pankrath
Currently .di-files are compiler independent. If this should hold for dib-files, too, we'll need a standard ast structure, won't we?

Re: AST files instead of DI interface files for faster compilation and easier distribution

2012-06-12 Thread Don Clugston
On 12/06/12 11:07, timotheecour wrote: There's a current pull request to improve di file generation (https://github.com/D-Programming-Language/dmd/pull/945); I'd like to suggest further ideas. As far as I understand, di interface files try to achieve these conflicting goals: 1) speed up

Re: AST files instead of DI interface files for faster compilation and easier distribution

2012-06-12 Thread Timon Gehr
On 06/12/2012 12:47 PM, Alex Rønne Petersen wrote: On 12-06-2012 12:23, Tobias Pankrath wrote: Currently .di-files are compiler independent. If this should hold for dib-files, too, we'll need a standard ast structure, won't we? Which is a Good Thing (TM). It would /require/ formalization of

Re: Mersenne Twister Seeding and UUIDs

2012-06-12 Thread Johannes Pfau
Am Tue, 12 Jun 2012 11:48:11 +0200 schrieb Jens Mueller jens.k.muel...@gmx.de: * As seed is a normal function right now, I can't overload it with a template. Is it safe to make the original seed a template as well, so seedRange could be named seed, or would that break the API? What do

Re: Mersenne Twister Seeding and UUIDs

2012-06-12 Thread Johannes Pfau
Am Tue, 12 Jun 2012 13:14:23 +0200 schrieb Johannes Pfau nos...@example.com: Am Tue, 12 Jun 2012 11:48:11 +0200 schrieb Jens Mueller jens.k.muel...@gmx.de: * As seed is a normal function right now, I can't overload it with a template. Is it safe to make the original seed a template

Re: Mersenne Twister Seeding and UUIDs

2012-06-12 Thread Johannes Pfau
Am Mon, 11 Jun 2012 13:09:26 -0500 schrieb Andrei Alexandrescu seewebsiteforem...@erdani.org: We should have the same in std.random. Could anyone please initiate a pull request? Thanks, Andrei https://github.com/D-Programming-Language/phobos/pull/627

Re: std.uuid: Update 3

2012-06-12 Thread Johannes Pfau
Am Mon, 11 Jun 2012 13:12:49 +0200 schrieb Johannes Pfau nos...@example.com: Am Sun, 10 Jun 2012 18:49:03 +0200 schrieb Johannes Pfau nos...@example.com: Am Sat, 09 Jun 2012 21:30:57 +0400 schrieb Dmitry Olshansky dmitry.o...@gmail.com: Code:

Re: AST files instead of DI interface files for faster compilation and easier distribution

2012-06-12 Thread foobar
On Tuesday, 12 June 2012 at 11:09:04 UTC, Don Clugston wrote: On 12/06/12 11:07, timotheecour wrote: There's a current pull request to improve di file generation (https://github.com/D-Programming-Language/dmd/pull/945); I'd like to suggest further ideas. As far as I understand, di interface

Re: Mersenne Twister Seeding and UUIDs

2012-06-12 Thread Joseph Rushton Wakeling
On 11/06/12 19:09, Andrei Alexandrescu wrote: We should have the same in std.random. Could anyone please initiate a pull request? I'll see what I can do. Is it OK to pretty much copy the Boost code, bar D-ifying it a bit? The licence is identical, so this shouldn't be an issue AFAICS.

Re: Mersenne Twister Seeding and UUIDs

2012-06-12 Thread Joseph Rushton Wakeling
On 12/06/12 13:15, Joseph Rushton Wakeling wrote: I'll see what I can do. Is it OK to pretty much copy the Boost code, bar D-ifying it a bit? The licence is identical, so this shouldn't be an issue AFAICS. ... hit Reply before all the other overnight (for me) emails arrived. D'oh. :-\

Re: std.uuid: Update 3

2012-06-12 Thread Dmitry Olshansky
On 12.06.2012 15:46, Johannes Pfau wrote: Am Mon, 11 Jun 2012 13:12:49 +0200 schrieb Johannes Pfaunos...@example.com: Am Sun, 10 Jun 2012 18:49:03 +0200 schrieb Johannes Pfaunos...@example.com: Am Sat, 09 Jun 2012 21:30:57 +0400 schrieb Dmitry Olshanskydmitry.o...@gmail.com: Code:

Re: Rational numbers in D

2012-06-12 Thread Joseph Rushton Wakeling
On 11/06/12 22:43, bearophile wrote: It's not fit for Phobos... What would make it fit?

Re: AST files instead of DI interface files for faster compilation and easier distribution

2012-06-12 Thread Dmitry Olshansky
On 12.06.2012 16:09, foobar wrote: On Tuesday, 12 June 2012 at 11:09:04 UTC, Don Clugston wrote: On 12/06/12 11:07, timotheecour wrote: There's a current pull request to improve di file generation (https://github.com/D-Programming-Language/dmd/pull/945); I'd like to suggest further ideas. As

Re: std.uuid: Update 3

2012-06-12 Thread Tobias Pankrath
There are some references to a nilUUID left and the intro says, that UUIDs default to nil. I'd recommend not to use nil at all and instead talk about an empty UUID or UUID.init. The intro should state that an UUID is empty iff it eqauls UUID.init and that UUID.init is an UUID with all bytes

RandomSample with specified random number generator

2012-06-12 Thread Joseph Rushton Wakeling
Hello all, An interesting challenge with the randomSample functionality in random.d. randomSample takes as input a range, a number of points to sample from that range, and (optionally) a random number generator. It returns a range corresponding to a lazily-calculated sample of the desired

Re: AST files instead of DI interface files for faster compilation and easier distribution

2012-06-12 Thread foobar
On Tuesday, 12 June 2012 at 11:09:04 UTC, Don Clugston wrote: On 12/06/12 11:07, timotheecour wrote: There's a current pull request to improve di file generation (https://github.com/D-Programming-Language/dmd/pull/945); I'd like to suggest further ideas. As far as I understand, di interface

Re: RandomSample with specified random number generator

2012-06-12 Thread Jens Mueller
Joseph Rushton Wakeling wrote: Hello all, An interesting challenge with the randomSample functionality in random.d. randomSample takes as input a range, a number of points to sample from that range, and (optionally) a random number generator. It returns a range corresponding to a

Re: Verification Corner videos, contract programming

2012-06-12 Thread bearophile
deadalnix: I wonder what is the method used by the compiler to ensure most of the check at compile time. It uses Z3 and Boogie: http://rise4fun.com/ Bye, bearophile

Re: RandomSample with specified random number generator

2012-06-12 Thread Joseph Rushton Wakeling
On 12/06/12 13:46, Jens Mueller wrote: Probably I'm not seeing the issue auto sample3 = randomSample(iota(0, 100), 5, Random(unpredictableSeed)); writeln(sample3); auto sample4 = randomSample(iota(0, 100), 5, Random(unpredictableSeed)); writeln(sample4); auto sample5 = randomSample(iota(0,

Re: RandomSample with specified random number generator

2012-06-12 Thread Jens Mueller
Joseph Rushton Wakeling wrote: On 12/06/12 13:46, Jens Mueller wrote: Probably I'm not seeing the issue auto sample3 = randomSample(iota(0, 100), 5, Random(unpredictableSeed)); writeln(sample3); auto sample4 = randomSample(iota(0, 100), 5, Random(unpredictableSeed)); writeln(sample4);

Re: RandomSample with specified random number generator

2012-06-12 Thread Joseph Rushton Wakeling
On 12/06/12 14:28, Jens Mueller wrote: ... and you'll get out each time the same values. (Or instead of a newly-defined generator you could just use rndGen as in my code examples.) Of course. But this behavior is clear from the documentation. Did it surprise you? Passing a rng by value is

Re: Verification Corner videos, contract programming

2012-06-12 Thread deadalnix
Le 12/06/2012 14:55, bearophile a écrit : deadalnix: I wonder what is the method used by the compiler to ensure most of the check at compile time. It uses Z3 and Boogie: http://rise4fun.com/ Bye, bearophile OK, but how does that work internally :D Some example are straightforward, but

Re: AST files instead of DI interface files for faster compilation and easier distribution

2012-06-12 Thread Jacob Carlborg
On 2012-06-12 14:09, foobar wrote: This is a solved problem since the 80's (E.g. Pascal units). Per Adam's post, the issue is tied to DMD's use of OMF/optlink which we all would like to get rid of anyway. Once we're in proper COFF land, couldn't we just store the required metadata (binary AST?)

Re: Verification Corner videos, contract programming

2012-06-12 Thread bearophile
deadalnix: OK, but how does that work internally :D http://research.microsoft.com/en-us/um/redmond/projects/z3/ In that page there are links to papers too. Bye, bearophile

Re: AST files instead of DI interface files for faster compilation and easier distribution

2012-06-12 Thread deadalnix
Le 12/06/2012 12:23, Tobias Pankrath a écrit : Currently .di-files are compiler independent. If this should hold for dib-files, too, we'll need a standard ast structure, won't we? We need it anyway at some point. AST macro is another example. It would also greatly simplify compiler writing

Re: RandomSample with specified random number generator

2012-06-12 Thread Jens Mueller
Joseph Rushton Wakeling wrote: On 12/06/12 14:28, Jens Mueller wrote: ... and you'll get out each time the same values. (Or instead of a newly-defined generator you could just use rndGen as in my code examples.) Of course. But this behavior is clear from the documentation. Did it surprise

Re: AST files instead of DI interface files for faster compilation and easier distribution

2012-06-12 Thread deadalnix
Le 12/06/2012 14:39, foobar a écrit : Another related question - AFAIK the LLVM folks did/are doing work to make their implementation less platform-depended. Could we leverage this in ldc to store LLVM bit code as D libs which still retain enough info for the compiler to replace header files?

Re: Verification Corner videos, contract programming

2012-06-12 Thread deadalnix
Le 12/06/2012 15:52, bearophile a écrit : deadalnix: OK, but how does that work internally :D http://research.microsoft.com/en-us/um/redmond/projects/z3/ In that page there are links to papers too. Bye, bearophile Thank you very much. I was turning endlessly in the website without

Re: Verification Corner videos, contract programming

2012-06-12 Thread Tobias Pankrath
Thank you very much. I was turning endlessly in the website without finding that. I now have some stuffs to read. As far as I can tell, Z3 is an SMT solver (Satisfiability Modulo Theories), which is a SAT Solver an steroids.

Re: std.uuid: Update 3

2012-06-12 Thread Johannes Pfau
Am Tue, 12 Jun 2012 14:24:15 +0200 schrieb Tobias Pankrath tob...@pankrath.net: There are some references to a nilUUID left and the intro says, that UUIDs default to nil. I'd recommend not to use nil at all and instead talk about an empty UUID or UUID.init. The intro should state that an

Re: std.uuid: Update 3

2012-06-12 Thread Johannes Pfau
Am Tue, 12 Jun 2012 16:15:48 +0400 schrieb Dmitry Olshansky dmitry.o...@gmail.com: Judging by the swift rate of fixes and keeping in mind that it's only ~1.5 KLOC with abundance of unit tests I'm tempted to suggest the following. Let's trim the review time span a bit, so that review ends

Re: valid uses of shared

2012-06-12 Thread deadalnix
Le 08/06/2012 01:51, Steven Schveighoffer a écrit : 2. shared value types. 2. You can have value type on heap. Or value types that point to shared data.

Re: RandomSample with specified random number generator

2012-06-12 Thread Joseph Rushton Wakeling
On 12/06/12 14:58, Jens Mueller wrote: Right. These are inconsistent. This should be fixed. Can't we just use a default argument like auto randomSample(R, Random)(R r, size_t n, Random gen = Random(unpredictableSeed)); Currently the documentation does not even state what is difference between

Re: AST files instead of DI interface files for faster compilation and easier distribution

2012-06-12 Thread Adam Wilson
On Tue, 12 Jun 2012 06:46:44 -0700, Jacob Carlborg d...@me.com wrote: On 2012-06-12 14:09, foobar wrote: This is a solved problem since the 80's (E.g. Pascal units). Per Adam's post, the issue is tied to DMD's use of OMF/optlink which we all would like to get rid of anyway. Once we're in

Re: Request for Review: DI Generation Improvements

2012-06-12 Thread Adam Wilson
On Tue, 12 Jun 2012 02:16:19 -0700, timotheecour thelastmamm...@gmail.com wrote: mixin Instantiate!(foo,int); Thanks for the syntax tip! You could use cp instead of dmd -H. That won't produce the same output (eg large functions tend to be stripped currently), but I guess the current

Re: AST files instead of DI interface files for faster compilation and easier distribution

2012-06-12 Thread Timon Gehr
On 06/12/2012 03:54 PM, deadalnix wrote: Le 12/06/2012 12:23, Tobias Pankrath a écrit : Currently .di-files are compiler independent. If this should hold for dib-files, too, we'll need a standard ast structure, won't we? We need it anyway at some point. Plain D code is already a perfectly

Re: std.uuid: Update 3

2012-06-12 Thread Dmitry Olshansky
On 12.06.2012 18:18, Johannes Pfau wrote: Am Tue, 12 Jun 2012 16:15:48 +0400 schrieb Dmitry Olshanskydmitry.o...@gmail.com: Judging by the swift rate of fixes and keeping in mind that it's only ~1.5 KLOC with abundance of unit tests I'm tempted to suggest the following. Let's trim the review

Re: AST files instead of DI interface files for faster compilation and easier distribution

2012-06-12 Thread Walter Bright
On 6/12/2012 2:07 AM, timotheecour wrote: There's a current pull request to improve di file generation (https://github.com/D-Programming-Language/dmd/pull/945); I'd like to suggest further ideas. As far as I understand, di interface files try to achieve these conflicting goals: 1) speed up

Template Interface

2012-06-12 Thread Nathan M. Swan
When writing a generic function which takes an unknown type, the signature is written like so: void fun(L)(L l) if (isList!L); While writing a generic interface is written like so: template isList(L) { enum bool isList = is(typeof( (inout int _dummy=0) { L l; if

Re: AST files instead of DI interface files for faster compilation and easier distribution

2012-06-12 Thread Adam Wilson
On Tue, 12 Jun 2012 05:23:16 -0700, Dmitry Olshansky dmitry.o...@gmail.com wrote: On 12.06.2012 16:09, foobar wrote: On Tuesday, 12 June 2012 at 11:09:04 UTC, Don Clugston wrote: On 12/06/12 11:07, timotheecour wrote: There's a current pull request to improve di file generation

Re: RandomSample with specified random number generator

2012-06-12 Thread Jens Mueller
Joseph Rushton Wakeling wrote: On 12/06/12 14:58, Jens Mueller wrote: Right. These are inconsistent. This should be fixed. Can't we just use a default argument like auto randomSample(R, Random)(R r, size_t n, Random gen = Random(unpredictableSeed)); Currently the documentation does not

Re: AST files instead of DI interface files for faster compilation and easier distribution

2012-06-12 Thread Dmitry Olshansky
On 12.06.2012 22:47, Adam Wilson wrote: On Tue, 12 Jun 2012 05:23:16 -0700, Dmitry Olshansky dmitry.o...@gmail.com wrote: On 12.06.2012 16:09, foobar wrote: On Tuesday, 12 June 2012 at 11:09:04 UTC, Don Clugston wrote: On 12/06/12 11:07, timotheecour wrote: There's a current pull request to

Re: RandomSample with specified random number generator

2012-06-12 Thread jerro
Yes, I'll agree with you. But I don't know about others. It'll be nice if others share their opinion such that your efforts won't be wasted. That code was mostly written by Andrei and David. Jens I, for one, agree that this: auto randomSample(R, Random)(R r, size_t n, Random gen =

static switch

2012-06-12 Thread cal
Does a switch statement acting on a template parameter act just like a chain of static if-else's? That is, does it just generate the code for the matching case? enum E { A, B, C } class Blah(E param) { void foo() { switch(param) { case(E.A) : blah; case(E.B) :

Re: Ddoc inheritance

2012-06-12 Thread Jacob Carlborg
On 2012-06-12 04:20, Ary Manzana wrote: I believe no special comment is needed for this. If you override a method without commenting it it should retain the original comment. If you do comment it, it should take that new comment. Sounds like a good idea. I wonder though, if a special comment

Re: Ddoc inheritance

2012-06-12 Thread Alex Rønne Petersen
On 12-06-2012 08:29, Jacob Carlborg wrote: On 2012-06-12 04:20, Ary Manzana wrote: I believe no special comment is needed for this. If you override a method without commenting it it should retain the original comment. If you do comment it, it should take that new comment. Sounds like a good

Code-File structure

2012-06-12 Thread Henrik Valter Vogelius Hansson
Hi! I'm new to D and trying everything out. Got the basics down which are very straightforward and similar to other languages. My professional background is primarily in C/C++-variants and Ruby if it helps. I have a problem with how modules, packages and files work. I don't really know how

Windows program instant crash: no messages.

2012-06-12 Thread Nekroze
Hello. I am trying to make a wrapper to use the DarkGDK 3d game engine for windows with D and i am doing rather well so far. I have just gotten it to successfully compile however the resulting exe instantly crashes and outputs nothing at all even though the very first command in WinMain is

Re: Using C macros without massive rewrites

2012-06-12 Thread Johannes Pfau
Am Tue, 12 Jun 2012 06:15:38 +0200 schrieb Alex Rønne Petersen a...@lycus.org: On 12-06-2012 04:20, Charles McAnany wrote: Hi, all. I'm studying Kerrisk's The Linux Programming Interface for fun. The book is written in C, and I thought it would be fun to do the exercises in D. My problem

Re: Windows program instant crash: no messages.

2012-06-12 Thread Dmitry Olshansky
On 12.06.2012 11:17, Nekroze wrote: Hello. I am trying to make a wrapper to use the DarkGDK 3d game engine for windows with D and i am doing rather well so far. I have just gotten it to successfully compile however the resulting exe instantly crashes and outputs nothing at all even though the

Re: static switch

2012-06-12 Thread Dmitry Olshansky
On 12.06.2012 10:13, cal wrote: Does a switch statement acting on a template parameter act just like a chain of static if-else's? That is, does it just generate the code for the matching case? enum E { A, B, C } class Blah(E param) { void foo() { switch(param) { case(E.A) : blah; case(E.B) :

Re: Windows program instant crash: no messages.

2012-06-12 Thread Andrew Wiley
On Tue, Jun 12, 2012 at 1:32 AM, Dmitry Olshansky dmitry.o...@gmail.com wrote: On 12.06.2012 11:17, Nekroze wrote: Hello. I am trying to make a wrapper to use the DarkGDK 3d game engine for windows with D and i am doing rather well so far. I have just gotten it to successfully compile however

Re: Windows program instant crash: no messages.

2012-06-12 Thread Andrew Wiley
On Tue, Jun 12, 2012 at 1:50 AM, Andrew Wiley wiley.andre...@gmail.com wrote: On Tue, Jun 12, 2012 at 1:32 AM, Dmitry Olshansky dmitry.o...@gmail.com wrote: On 12.06.2012 11:17, Nekroze wrote: Hello. I am trying to make a wrapper to use the DarkGDK 3d game engine for windows with D and i am

Re: Windows program instant crash: no messages.

2012-06-12 Thread Nekroze
On Tuesday, 12 June 2012 at 09:03:43 UTC, Andrew Wiley wrote: On Tue, Jun 12, 2012 at 1:50 AM, Andrew Wiley wiley.andre...@gmail.com wrote: On Tue, Jun 12, 2012 at 1:32 AM, Dmitry Olshansky dmitry.o...@gmail.com wrote: On 12.06.2012 11:17, Nekroze wrote: Hello. I am trying to make a wrapper

Re: bitfields - Default values?

2012-06-12 Thread Era Scarecrow
On Tuesday, 5 June 2012 at 00:17:08 UTC, bearophile wrote: Era Scarecrow: The documentation for bitfields doesn't go into detail if you can put any default values into it. Can you? I think you can't. See: http://d.puremagic.com/issues/show_bug.cgi?id=4425 Bye, bearophile K, I think I have

Re: Using C macros without massive rewrites

2012-06-12 Thread Andrej Mitrovic
On 6/12/12, Johannes Pfau nos...@example.com wrote: But for simple macros, gcc -E -dM can be useful. gcc -E -dM '/usr/include/sys/types.h' This could be useful for me, thanks. More options: http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Preprocessor-Options.html

Idea: writeln and file functions that return the data passed to them

2012-06-12 Thread ixid
Perhaps there is already a way to do this. With the UFCS one tends to make elegant chains of statements, it would be useful to have writeln and file functions that can easily be dropped in the middle of such chains without having to alter the lay out of one's program. Rather than returning

Re: Idea: writeln and file functions that return the data passed to them

2012-06-12 Thread Dmitry Olshansky
On 12.06.2012 16:12, ixid wrote: Perhaps there is already a way to do this. With the UFCS one tends to make elegant chains of statements, it would be useful to have writeln and file functions that can easily be dropped in the middle of such chains without having to alter the lay out of one's

Re: bitfields - Default values?

2012-06-12 Thread bearophile
Era Scarecrow: struct defs { mixin(bitfields_D!( bitfields!( //borrowed from std.bitmanip bool, b, 1, uint, i, 3, short, s, 4), i=2, s=5)); } Are you able to support a syntax like: struct defs { mixin(bitfields!( bool, b, 1, uint, i=2, 3,

Re: static switch

2012-06-12 Thread bearophile
cal: Does a switch statement acting on a template parameter act just like a chain of static if-else's? That is, does it just generate the code for the matching case? See: http://d.puremagic.com/issues/show_bug.cgi?id=6921 Bye, bearophile

Re: Windows program instant crash: no messages.

2012-06-12 Thread Nekroze
OK, another update to the original download link. I have gotten initDarkGDK to pass and it gets all the way down to handing the screen over to DarkGDK using the wrapper function dbOpenScreen but fails after that. I guess then my problem is in the wrapper function or in the actual template

Re: bitfields - Default values?

2012-06-12 Thread Dmitry Olshansky
On 12.06.2012 17:05, bearophile wrote: Era Scarecrow: Are you able to support a syntax like: struct defs { mixin(bitfields!( bool, b, 1, uint, i=2, 3, short, s=5, 4)); } Or iff bitfields is a mixin template: struct defs { mixin bitfields!( bool, b, 1, uint, i=2, 3,

Re: bitfields - Default values?

2012-06-12 Thread Era Scarecrow
On Tuesday, 12 June 2012 at 13:05:26 UTC, bearophile wrote: Era Scarecrow: struct defs { mixin(bitfields_D!( bitfields!( //borrowed from std.bitmanip bool, b, 1, uint, i, 3, short, s, 4), i=2, s=5)); } Are you able to support a syntax like: struct defs {

Re: static switch

2012-06-12 Thread cal
On Tuesday, 12 June 2012 at 08:35:44 UTC, Dmitry Olshansky wrote: It doesn't. It's easy to check anyway. Not for me :) I just saw that it worked, and wondered if it worked statically. Thanks!

From number of seconds in a day to a formatted time string

2012-06-12 Thread TJB
I am working with some financial data that comes in binary files. It has two fields in particular that I am trying to convert to human readable formats. The first is a date string like 20060621, which I am able to work with just fine. But then it has a field called ttim, which is the number of

Re: From number of seconds in a day to a formatted time string

2012-06-12 Thread Jonathan M Davis
On Tuesday, June 12, 2012 19:28:38 TJB wrote: I am working with some financial data that comes in binary files. It has two fields in particular that I am trying to convert to human readable formats. The first is a date string like 20060621, which I am able to work with just fine. But then it

Re: bitfields - Default values?

2012-06-12 Thread Era Scarecrow
On Tuesday, 12 June 2012 at 15:51:31 UTC, Era Scarecrow wrote: On Tuesday, 12 June 2012 at 13:05:26 UTC, bearophile wrote: Are you able to support a syntax like: struct defs { mixin(bitfields!( bool, b, 1, uint, i=2, 3, short, s=5, 4)); } That does look cleaner and better IMO.

Re: Code-File structure

2012-06-12 Thread Francois Chabot
On Tuesday, 12 June 2012 at 07:04:15 UTC, Henrik Valter Vogelius Hansson wrote: Hi! I'm new to D and trying everything out. Got the basics down which are very straightforward and similar to other languages. My professional background is primarily in C/C++-variants and Ruby if it helps. I

Re: From number of seconds in a day to a formatted time string

2012-06-12 Thread TJB
On Tuesday, 12 June 2012 at 17:40:40 UTC, Jonathan M Davis wrote: On Tuesday, June 12, 2012 19:28:38 TJB wrote: I am working with some financial data that comes in binary files. It has two fields in particular that I am trying to convert to human readable formats. The first is a date string

Re: Code-File structure

2012-06-12 Thread Henrik Valter Vogelius Hansson
On Tuesday, 12 June 2012 at 18:07:45 UTC, Francois Chabot wrote: On Tuesday, 12 June 2012 at 07:04:15 UTC, Henrik Valter Vogelius Hansson wrote: Hi! I'm new to D and trying everything out. Got the basics down which are very straightforward and similar to other languages. My professional

Does D have high-performance sockets

2012-06-12 Thread D Day
Are there any implementations of this anywhere for D? I really only care about the windows platform - and have considered writing this myself with IOCP and std.socket, but I figure someone else must have already done something similar?

Re: Code-File structure

2012-06-12 Thread Nathan M. Swan
On Tuesday, 12 June 2012 at 07:04:15 UTC, Henrik Valter Vogelius Hansson wrote: Hi! I'm new to D and trying everything out. Got the basics down which are very straightforward and similar to other languages. My professional background is primarily in C/C++-variants and Ruby if it helps. I

[Issue 5354] formatValue: range templates introduce 3 bugs related to class struct cases

2012-06-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5354 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|ASSIGNED|RESOLVED

[Issue 8229] string literals are not zero-terminated during CTFE

2012-06-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8229 Don clugd...@yahoo.com.au changed: What|Removed |Added CC||clugd...@yahoo.com.au ---

[Issue 5082] delegate alias parameters are silently accepted inside structs. limits most of std.algorithm, etc.

2012-06-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5082 --- Comment #2 from github-bugzi...@puremagic.com 2012-06-12 09:59:35 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/dmd

[Issue 8194] Function cannot access frame even though all I requested was the type

2012-06-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8194 --- Comment #2 from github-bugzi...@puremagic.com 2012-06-12 09:59:43 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/dmd

[Issue 8194] Function cannot access frame even though all I requested was the type

2012-06-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8194 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 5082] delegate alias parameters are silently accepted inside structs. limits most of std.algorithm, etc.

2012-06-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5082 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 7585] functions in templates inferred as delegate

2012-06-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7585 --- Comment #9 from github-bugzi...@puremagic.com 2012-06-12 10:06:25 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd

[Issue 8229] string literals are not zero-terminated during CTFE

2012-06-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8229 --- Comment #2 from timon.g...@gmx.ch 2012-06-12 10:55:45 PDT --- (In reply to comment #1) This behaviour is intentional. Pointer operations are strictly checked in CTFE. It's the same as doing int n = 0; char c = [n]; which

[Issue 8232] New: Segmentation fault in rt_finalize_gc()

2012-06-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8232 Summary: Segmentation fault in rt_finalize_gc() Product: D Version: D2 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2

[Issue 8198] Nested lambda inference doesn't work

2012-06-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8198 --- Comment #2 from github-bugzi...@puremagic.com 2012-06-12 11:43:25 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd

[Issue 8198] Nested lambda inference doesn't work

2012-06-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8198 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 4364] ICE(class.c) compiling a struct def named 'Object' followed by a class definition

2012-06-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4364 --- Comment #4 from github-bugzi...@puremagic.com 2012-06-12 15:58:47 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd

  1   2   >