Re: First working Win64 program!

2012-08-15 Thread Paulo Pinto
On Tuesday, 14 August 2012 at 14:41:20 UTC, F i L wrote: [...] Then we'll need to write software simple enough to enjoy micro-managing that software to keep it on task. Can I get it for the offshoring projects I work on? :)

Re: First working Win64 program!

2012-08-15 Thread Jacob Carlborg
On 2012-08-14 23:05, Walter Bright wrote: It does pass them correctly to D functions, just not to C ones if the struct contains a mix of floating and integer types. Ok, so if my structs don't contain any floating point types I will be fine? All other types are ok? Is this in the 2.060

Re: First working Win64 program!

2012-08-15 Thread Paulo Pinto
On Wednesday, 15 August 2012 at 10:28:15 UTC, Jacob Carlborg wrote: On 2012-08-14 23:05, Walter Bright wrote: It does pass them correctly to D functions, just not to C ones if the struct contains a mix of floating and integer types. Ok, so if my structs don't contain any floating point

Re: First working Win64 program!

2012-08-15 Thread David Nadlinger
On Wednesday, 15 August 2012 at 11:15:35 UTC, Paulo Pinto wrote: Does this not required that the D and C compiler are in sync about data layout? Small sizes structs are often kept in registers. Yes, extern(C) is intended to be fully ABI-compatible with the respective C ABI on the host

Re: Wiki4D is down

2012-08-15 Thread Justin C Calvarese
On Tuesday, 14 August 2012 at 22:34:00 UTC, Jesse Phillips wrote: Not really a positive announcement but the beloved wiki site has not been accessible yesterday. http://www.prowiki.org/wiki4d/wiki.cgi?FrontPage I'm posting as an announcement for two reasons. 1. People will likely want to

Re: Wiki4D is down

2012-08-15 Thread Justin C Calvarese
On Tuesday, 14 August 2012 at 22:34:00 UTC, Jesse Phillips wrote: Not really a positive announcement but the beloved wiki site has not been accessible yesterday. http://www.prowiki.org/wiki4d/wiki.cgi?FrontPage Here are alternate URLs that do still work: *

Re: Wiki4D is down

2012-08-15 Thread Justin C Calvarese
On Tuesday, 14 August 2012 at 22:34:00 UTC, Jesse Phillips wrote: Not really a positive announcement but the beloved wiki site has not been accessible yesterday. http://www.prowiki.org/wiki4d/wiki.cgi?FrontPage That URL works now. (Helmut Leitner fixed it.)

Re: D Language and Fortran DLL article

2012-08-15 Thread Michael
I was referring to indentation, i.e. version else version else Without indentation it looks like C++ #if defined that's ugly for me. On Tuesday, 14 August 2012 at 07:32:05 UTC, xenon325 wrote: 3. Some lines of code are outside of main area (like 49, 50). Tested on Opera, FF,

Re: First working Win64 program!

2012-08-15 Thread Walter Bright
On 8/15/2012 3:28 AM, Jacob Carlborg wrote: On 2012-08-14 23:05, Walter Bright wrote: It does pass them correctly to D functions, just not to C ones if the struct contains a mix of floating and integer types. Ok, so if my structs don't contain any floating point types I will be fine? Yes.

Re: First working Win64 program!

2012-08-15 Thread Jacob Carlborg
On 2012-08-15 21:48, Walter Bright wrote: Ok, so if my structs don't contain any floating point types I will be fine? Yes. All other types are ok? Yes. Is this in the 2.060 release Yes. or do I have get the latest sources from github? No. Thank you. -- /Jacob Carlborg

Fighting Wiki Spam (Was: Wiki4D is down)

2012-08-15 Thread Nick Sabalausky
On Wed, 15 Aug 2012 17:58:02 +0200 Justin C Calvarese jccalvares...@gmail.com wrote: If we did go to a new wiki system, I'd like to establish better security to prevent link spam. We could start off with having a small team with write-access and we could liberally grant permission to new team

Re: First working Win64 program!

2012-08-15 Thread Walter Bright
On 8/14/2012 2:44 AM, Bernard Helyer wrote: Clearly the solution is to look into cloning technologies. There can be only one.

Re: Yet another incomplete D cryptography library.

2012-08-15 Thread Nvirjskly
I have more stuff working now. Hopefully it will be in a fully usable state soon :)

Re: Unions destructors and GC precision

2012-08-15 Thread Paulo Pinto
On Wednesday, 15 August 2012 at 05:10:02 UTC, Jonathan M Davis wrote: On Wednesday, August 15, 2012 07:02:25 Simen Kjaeraas wrote: On Tue, 14 Aug 2012 22:32:58 +0200, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 8/14/12 3:25 PM, bearophile wrote: D2 doesn't give you that

Re: Unions destructors and GC precision

2012-08-15 Thread Simen Kjaeraas
On Wed, 15 Aug 2012 07:09:40 +0200, Jonathan M Davis jmdavisp...@gmx.com wrote: On Wednesday, August 15, 2012 07:02:25 Simen Kjaeraas wrote: On Tue, 14 Aug 2012 22:32:58 +0200, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 8/14/12 3:25 PM, bearophile wrote: D2 doesn't give

Re: Exception programming difficult

2012-08-15 Thread Paulo Pinto
On Monday, 13 August 2012 at 15:32:45 UTC, Dmitry Olshansky wrote: Back to Java: what is I find strange is the lack of sensible tools to do transactional or exception safe code within the language. No RAII objects or just at least any kludge to reliably register cleanup/rollback, only good old

Re: The review of std.hash package

2012-08-15 Thread Kagamin
On Thursday, 9 August 2012 at 09:59:48 UTC, David Nadlinger wrote: In this case, it needs to work like a reduce algorithm, because it is a reduce algorithm. Need to find a way to make this work. Hash functions are _not_ analogous to reduce(), because the operation performed by reduce() is

Re: The review of std.hash package

2012-08-15 Thread Dmitry Olshansky
On 15-Aug-12 11:41, Kagamin wrote: On Thursday, 9 August 2012 at 09:59:48 UTC, David Nadlinger wrote: In this case, it needs to work like a reduce algorithm, because it is a reduce algorithm. Need to find a way to make this work. Hash functions are _not_ analogous to reduce(), because the

Re: The review of std.hash package

2012-08-15 Thread David Nadlinger
On Wednesday, 15 August 2012 at 07:41:20 UTC, Kagamin wrote: On Thursday, 9 August 2012 at 09:59:48 UTC, David Nadlinger wrote: Hash functions are _not_ analogous to reduce(), because the operation performed by reduce() is stateless, whereas hash functions generally have some internal state.

Re: The review of std.hash package

2012-08-15 Thread Kagamin
On Wednesday, 15 August 2012 at 08:13:27 UTC, Dmitry Olshansky wrote: AFAIK it'a method of HashAlgorithm Object. It's a minor design detail, see the example: the method is called on each file without any explicit preparations and without calls to methods like TransformBlock. That's how

Re: The review of std.hash package

2012-08-15 Thread Kagamin
On Wednesday, 15 August 2012 at 08:17:01 UTC, David Nadlinger wrote: On Wednesday, 15 August 2012 at 07:41:20 UTC, Kagamin wrote: On Thursday, 9 August 2012 at 09:59:48 UTC, David Nadlinger wrote: Hash functions are _not_ analogous to reduce(), because the operation performed by reduce() is

Re: The review of std.hash package

2012-08-15 Thread Dmitry Olshansky
On 15-Aug-12 12:17, Kagamin wrote: On Wednesday, 15 August 2012 at 08:13:27 UTC, Dmitry Olshansky wrote: AFAIK it'a method of HashAlgorithm Object. It's a minor design detail, see the example: the method is called on each file without any explicit preparations and without calls to methods

Re: The review of std.hash package

2012-08-15 Thread Kagamin
On Wednesday, 15 August 2012 at 08:25:51 UTC, Dmitry Olshansky wrote: Brrr. It's how convenience wrapper works :) And I totally expect this to call the same code and keep the same state during the work. E.g. see std.digest.digest functions digest or hexDigest you could call it stateless in

Re: The review of std.hash package

2012-08-15 Thread David Nadlinger
On Wednesday, 15 August 2012 at 08:45:35 UTC, Kagamin wrote: I just pointed out, that possibly stateful implementation doesn't prevent stateless interface. Can one even say that the implementation is stateful given just a stateless interface? And our point is that such an interface is trivial

Re: The review of std.hash package

2012-08-15 Thread RivenTheMage
On Wednesday, 8 August 2012 at 16:47:35 UTC, Johannes Pfau wrote: std.hash.digest doesn't sound too bad. We could have std.hash.func (or a better named module ;-) for general hash functions later. Three basic types of hash functions are: 1) Hash - for fast searching and indexing in data

Re: The review of std.hash package

2012-08-15 Thread David Nadlinger
On Wednesday, 15 August 2012 at 08:49:26 UTC, RivenTheMage wrote: Three basic types of hash functions are: 1) Hash - for fast searching and indexing in data structures 2) Checksum - detects the accidental errors in files, archives, streams 3) Message digest code - prevents the intentional

Re: The review of std.hash package

2012-08-15 Thread RivenTheMage
On Wednesday, 15 August 2012 at 08:55:30 UTC, David Nadlinger wrote: Why? 1) might have a different interface than the others, but 2) and 3) only differ in their cryptological properties, the interface will likely be just the same – or what are you thinking about? David The only

Re: The review of std.hash package

2012-08-15 Thread RivenTheMage
Another example is a systematic error-correcting codes. The only difference between them and checksums is the ability to correct errors, not just detect them. CRC or MD5 can be viewed as systematic code with zero error-correcting ability. Should we mix Reed-Solomon codes and MD5 in one module? I

Re: finish function for output ranges

2012-08-15 Thread Mehrdad
On Saturday, 11 August 2012 at 23:29:57 UTC, Andrei Alexandrescu wrote: This assumes the hash overloads operator +. Wouldn't ~ be a better choice?

Re: finish function for output ranges

2012-08-15 Thread Joseph Rushton Wakeling
On 13/08/12 01:08, Joseph Rushton Wakeling wrote: What about a start() method? Was this a daft question? :-)

Re: Exception programming difficult

2012-08-15 Thread Mehrdad
On Tuesday, 14 August 2012 at 23:21:32 UTC, Mehrdad wrote: Or even better: auto joiner(RoR, Separator)(RoR r, Separator sep) throws(auto); That way it's easy enough for the programmer to make the compiler shut up (it's certainly easier than swallowing the exception), while allowing

Re: Unions destructors and GC precision

2012-08-15 Thread bearophile
Paulo Pinto: Same thing about unions, as you wouldn't know which pointer/reference is the active one without some kind of tagging. But with a standard method like activeField the tagging doesn't need to be explicit. Bye, bearophile

Re: finish function for output ranges

2012-08-15 Thread Andrei Alexandrescu
On 8/15/12 6:27 AM, Mehrdad wrote: On Saturday, 11 August 2012 at 23:29:57 UTC, Andrei Alexandrescu wrote: This assumes the hash overloads operator +. Wouldn't ~ be a better choice? I think neither would be a good choice. Andrei

Re: The review of std.hash package

2012-08-15 Thread José Armando García Sancio
On Wed, Aug 15, 2012 at 2:40 AM, RivenTheMage riven-m...@id.ru wrote: Another example is a systematic error-correcting codes. The only difference between them and checksums is the ability to correct errors, not just detect them. CRC or MD5 can be viewed as systematic code with zero

Re: The review of std.hash package

2012-08-15 Thread ReneSac
On Wednesday, 15 August 2012 at 14:36:00 UTC, José Armando García Sancio wrote: Some people's point is that MD5 was consider a cryptographic digest function 16 years ago. It is not consider cryptographically secure today. So why make any design assumption today on how the landscape will look

Re: The review of std.hash package

2012-08-15 Thread Dmitry Olshansky
On 15-Aug-12 12:45, Kagamin wrote: On Wednesday, 15 August 2012 at 08:25:51 UTC, Dmitry Olshansky wrote: Brrr. It's how convenience wrapper works :) And I totally expect this to call the same code and keep the same state during the work. E.g. see std.digest.digest functions digest or

Re: Exception programming difficult

2012-08-15 Thread SomeDude
On Sunday, 12 August 2012 at 04:36:22 UTC, Jonathan M Davis wrote: On Saturday, August 11, 2012 21:27:43 Walter Bright wrote: Anyhow, that article is why D does not have exception specifications. Also, please note that C++ dropped exception specifications. Though it should be noted that

Re: Exception programming difficult

2012-08-15 Thread SomeDude
On Sunday, 12 August 2012 at 06:22:37 UTC, Marco Leise wrote: I read both articles and while Bruce Eckel's text read a bit like repeated swallow exception to avoid reams of code I found the interview insightful. Both aren't entirely negative on checked exceptions and Hejlsberg actually wants

Re: Exception programming difficult

2012-08-15 Thread SomeDude
On Monday, 13 August 2012 at 08:00:33 UTC, Nathan M. Swan wrote: On Sunday, 12 August 2012 at 03:02:50 UTC, Marco Leise wrote: I just got a bit frustrated and wanted to say that I like working with Exceptions in Java a lot more. I don't. When writing a simple command line program, when

Re: Ubuntu 12.04 and DMD 2.060

2012-08-15 Thread Ivan Trombley
On Tuesday, 7 August 2012 at 00:12:55 UTC, Alex Rønne Petersen wrote: Hi, Has anyone managed to get the 2.060 .deb working on Ubuntu 12.04? On all 12.04 systems I have access to, all D programs consistently segmentation fault in gc_init(). I'm having the same issue.

Re: Possible throws syntax

2012-08-15 Thread Dmitry Olshansky
On 12-Aug-12 07:28, Marco Leise wrote: Am Sun, 12 Aug 2012 05:02:25 +0200 schrieb Marco Leise marco.le...@gmx.de: ---D- /** * Receives a response from the server. * * Some explanation of what * the function does in detail. * * Params: *response = receives the whole response

Re: The review of std.hash package

2012-08-15 Thread José Armando García Sancio
On Wed, Aug 15, 2012 at 8:11 AM, ReneSac renedu...@yahoo.com.br wrote: Note that in the Python passlib, there is no mention to CRC, FNV, ROT13, etc. Their place is different. Thats because it is a password module and nobody or a small percentage of the population uses CRC for password digest.

D language as script through JVM

2012-08-15 Thread Alexey Egorov
I love D Language, I think this is my favorite language. But this love is love through distance - i wrote only one program to try D in action. This language is not popular at the moment, i still have no any people near me who uses it. But now i searching the perfect language for scripting

Re: The review of std.hash package

2012-08-15 Thread RivenTheMage
On Wednesday, 15 August 2012 at 19:38:34 UTC, José Armando García Sancio wrote: Thats because it is a password module and nobody or a small percentage of the population uses CRC for password digest. In turn, that's because CRC is not not a crytographic hash and not suited for password hashing

Re: The review of std.hash package

2012-08-15 Thread RivenTheMage
On Thursday, 16 August 2012 at 03:02:59 UTC, RivenTheMage wrote: ushort num = 1234; auto hash1 = hash!((a 20) ^ (a 12) ^ (a 7) ^ (a 4) ^ a)(str); // indexing hash I forgot that this case is already covered by reduce!(...)

Re: Sudoku Py / C++11 / D?

2012-08-15 Thread Era Scarecrow
On Tuesday, 14 August 2012 at 22:31:16 UTC, bearophile wrote: http://www.reddit.com/r/cpp/comments/y6gwk/norvigs_python_sudoku_solver_ported_to_c11/ http://nonchalantlytyped.net/blog/2012/08/13/sudoku-solver-in-c11/ His C++11 port is 316 lines long: https://gist.github.com/3345676 How many

Re: Sudoku Py / C++11 / D?

2012-08-15 Thread Ed McCardell
On 08/15/2012 03:01 AM, Era Scarecrow wrote: Not Golfed? I don't recognize that term. I don't see the python source off hand, but I don't understand python anyways. It refers to code golf, where you try to solve a problem with the smallest program possible (one-letter variable names, no

Re: Sudoku Py / C++11 / D?

2012-08-15 Thread Chris Nicholson-Sauls
On Tuesday, 14 August 2012 at 22:31:16 UTC, bearophile wrote: http://www.reddit.com/r/cpp/comments/y6gwk/norvigs_python_sudoku_solver_ported_to_c11/ http://nonchalantlytyped.net/blog/2012/08/13/sudoku-solver-in-c11/ His C++11 port is 316 lines long: https://gist.github.com/3345676 How many

Re: Sudoku Py / C++11 / D?

2012-08-15 Thread bearophile
Era Scarecrow: I don't see the python source off hand, The original Python code: http://norvig.com/sudopy.shtml Bye, bearophile

Global variables read at compile time?

2012-08-15 Thread Stefan
Hi there, I'm having trouble getting the following code to compile: import std.stdio; string a = a; string b = a; void main() { writeln(b); } DMD spits out the error test.d(4): Error: variable a cannot be read at compile time. Is there any way to tell the compiler I want b evaluated at

Re: Global variables read at compile time?

2012-08-15 Thread RommelVR
On Wednesday, 15 August 2012 at 13:36:26 UTC, Stefan wrote: Hi there, I'm having trouble getting the following code to compile: import std.stdio; string a = a; string b = a; void main() { writeln(b); } DMD spits out the error test.d(4): Error: variable a cannot be read at compile time.

Re: Global variables read at compile time?

2012-08-15 Thread d_follower
On Wednesday, 15 August 2012 at 13:36:26 UTC, Stefan wrote: Hi there, I'm having trouble getting the following code to compile: import std.stdio; string a = a; string b = a;// line 4 void main() { writeln(b); // line 8 } DMD spits out the error test.d(4): Error: variable a

Re: Global variables read at compile time?

2012-08-15 Thread Jesse Phillips
On Wednesday, 15 August 2012 at 13:36:26 UTC, Stefan wrote: Hi there, I'm having trouble getting the following code to compile: import std.stdio; string a = a; string b = a; void main() { writeln(b); } DMD spits out the error test.d(4): Error: variable a cannot be read at compile time.

Re: Global variables read at compile time?

2012-08-15 Thread Andrej Mitrovic
On 8/15/12, d_follower d_follo...@fakemail.com wrote: I don't really know why, but it seems that you can only initialize globals with constants. That's what the static constructor is for: http://dlang.org/class.html#StaticConstructor http://dlang.org/class.html#SharedStaticConstructor

Re: Reading a csv file

2012-08-15 Thread Andrew
On Tue, 14 Aug 2012 06:27:19 +0200, Jesse Phillips wrote: On Monday, 13 August 2012 at 18:49:55 UTC, Nathan M. Swan wrote: Without the -property switch, you can use non-@property functions as if they were @property. This is supposed to eventually be deprecated, so I try to not do this. To

Re: Optional extra return value? Multiple return values with auto?

2012-08-15 Thread ReneSac
On Wednesday, 15 August 2012 at 01:22:41 UTC, Era Scarecrow wrote: On Wednesday, 15 August 2012 at 00:37:32 UTC, ReneSac wrote: And my last question of my first post: I can't use auto for the out values right? An enhancement proposal like this would be compatible with D? I would say No.

Re: Sudoku Py / C++11 / D?

2012-08-15 Thread ixid
Could you supply your code? Which one are you using as the hardest? If you're solving the 1400 second one in 12 seconds that's very impressive, I can't get it below 240 seconds.

Re: Global variables read at compile time?

2012-08-15 Thread Justin Whear
On Wed, 15 Aug 2012 15:36:24 +0200, Stefan wrote: Hi there, I'm having trouble getting the following code to compile: import std.stdio; string a = a; string b = a; void main() { writeln(b); } DMD spits out the error test.d(4): Error: variable a cannot be read at compile

Re: Global variables read at compile time?

2012-08-15 Thread Ali Çehreli
On 08/15/2012 06:55 AM, d_follower wrote: On Wednesday, 15 August 2012 at 13:41:10 UTC, RommelVR wrote: Make a an enum, const or otherwise immutable. I don't think you understood the question. I thought RommelVR did understand the question. Try this: import std.stdio; enum a = a; string b

Re: where is parameterNames?

2012-08-15 Thread David Nadlinger
On Tuesday, 14 August 2012 at 16:06:33 UTC, Jacob Carlborg wrote: https://github.com/jacob-carlborg/orange/blob/master/orange/util/Reflection.d#L29 Related: https://github.com/D-Programming-Language/phobos/blob/master/std/traits.d#L510 David

Re: Global variables read at compile time?

2012-08-15 Thread Leandro Motta Barros
Another option is to use module constructors, as shown below. (But somehow this all looks a bit fishy for me...) LMB import std.stdio; string a = a; string b; static this() { b = a; } void main() { writeln(b); } On Wed, Aug 15, 2012 at 11:03 AM, d_follower

Question on Octal

2012-08-15 Thread Michael
Hi all, I have just read Walter's article about octals on Dr. Dobb's. As a newbie, I tried to create one myself. template octal(int n) { int toOct(int x) {...} enum octal = toOct(n); } void main() { import std.stdio : writeln; writeln(octal!10); } I

Re: Question on Octal

2012-08-15 Thread Jonathan M Davis
On Wednesday, August 15, 2012 19:49:53 Michael wrote: Hi all, I have just read Walter's article about octals on Dr. Dobb's. As a newbie, I tried to create one myself. template octal(int n) { int toOct(int x) {...} enum octal = toOct(n); } void main() { import std.stdio : writeln;

Re: Reading a csv file

2012-08-15 Thread Jesse Phillips
On Wednesday, 15 August 2012 at 15:13:09 UTC, Andrew wrote: Ah, understood. My thanks. I'll probably start using the -property switch just to avoid accidentally getting in the habit of using a deprecated feature. Note, another form discussion has pointed out that -property is horribly

Re: Sudoku Py / C++11 / D?

2012-08-15 Thread Era Scarecrow
On Wednesday, 15 August 2012 at 15:39:26 UTC, ixid wrote: Could you supply your code? Which one are you using as the hardest? If you're solving the 1400 second one in 12 seconds that's very impressive, I can't get it below 240 seconds. 1400 seconds? Well my CPU is a quad-core 3.2Ghz, but

Re: where is parameterNames?

2012-08-15 Thread Philippe Sigaud
On Wed, Aug 15, 2012 at 6:46 PM, David Nadlinger s...@klickverbot.at wrote: On Tuesday, 14 August 2012 at 16:06:33 UTC, Jacob Carlborg wrote: https://github.com/jacob-carlborg/orange/blob/master/orange/util/Reflection.d#L29 Related:

Re: Sudoku Py / C++11 / D?

2012-08-15 Thread Era Scarecrow
On Wednesday, 15 August 2012 at 15:39:26 UTC, ixid wrote: Could you supply your code? Which one are you using as the hardest? If you're solving the 1400 second one in 12 seconds that's very impressive, I can't get it below 240 seconds. Expanded to 225 lines after comments and refactoring for

Re: Sudoku Py / C++11 / D?

2012-08-15 Thread Jonathan M Davis
On Wednesday, August 15, 2012 21:14:07 Era Scarecrow wrote: I have made a C version a while back that solves any sudoku puzzle in 1/8th of a second. The code for that though was considerably longer and involved several forms of pattern matching and detecting how to solve the puzzle before it

Re: Sudoku Py / C++11 / D?

2012-08-15 Thread Era Scarecrow
On Wednesday, 15 August 2012 at 20:28:19 UTC, Jonathan M Davis wrote: Brute force is so fast that there's no really any point in trying to solve it any other way except for the challenge of doing so. I answered a question on this using D at codegolf.stackexchange.com a while back:

Re: Sudoku Py / C++11 / D?

2012-08-15 Thread ixid
On Wednesday, 15 August 2012 at 20:13:10 UTC, Era Scarecrow wrote: On Wednesday, 15 August 2012 at 15:39:26 UTC, ixid wrote: Could you supply your code? Which one are you using as the hardest? If you're solving the 1400 second one in 12 seconds that's very impressive, I can't get it below 240

Re: Sudoku Py / C++11 / D?

2012-08-15 Thread bearophile
Jonathan M Davis: and the code is lightning fast. It would probably have to be tweaked to match whatever Bearophile's code does though as far is input goes (I haven't looked at the code that he linked to). It also makes no attempt at being compact (e.g. it actually checks the command line

Re: Sudoku Py / C++11 / D?

2012-08-15 Thread bearophile
Jonathan M Davis: It would probably have to be tweaked to match whatever Bearophile's code does though as far is input goes (I haven't looked at the code that he linked to). And the original Python code is not mine, it's from the AI researcher Peter Norvig :-) Bye, bearophile

Re: Sudoku Py / C++11 / D?

2012-08-15 Thread Timon Gehr
On 08/15/2012 12:31 AM, bearophile wrote: http://www.reddit.com/r/cpp/comments/y6gwk/norvigs_python_sudoku_solver_ported_to_c11/ http://nonchalantlytyped.net/blog/2012/08/13/sudoku-solver-in-c11/ His C++11 port is 316 lines long: https://gist.github.com/3345676 How many lines for a (not

Re: Sudoku Py / C++11 / D?

2012-08-15 Thread Era Scarecrow
On Wednesday, 15 August 2012 at 22:38:58 UTC, ixid wrote: How many solutions do you find for that one? Don't know, it actually just stops after finding the first one. Modifying it to give all possible outputs wouldn't be too hard... So far having it running it's found over 23k+ combinations

Re: Sudoku Py / C++11 / D?

2012-08-15 Thread Era Scarecrow
On Thursday, 16 August 2012 at 01:05:20 UTC, Era Scarecrow wrote: So far having it running it's found over 23k+ combinations after about 3 minutes. Unless I introduced a bug... Now I'll have to speed it up to make sure and won't take an afternoon to calculate.

Re: Sudoku Py / C++11 / D?

2012-08-15 Thread ixid
This is my attempt at a D solver, it's a pretty direct translation of a C++ version I wrote but it's a lot slower in D, around 1/4 the speed sadly, 2x because of the compiler I think and 2x because in C++ I can use proper bitfields which seem to give another 2x speed up (halving the size of

Re: Sudoku Py / C++11 / D?

2012-08-15 Thread ixid
Hmm, sorry odd things have happened to the formatting. Visual D's spacing doesn't seem to work very well outside of itself.

Re: Sudoku Py / C++11 / D?

2012-08-15 Thread maarten van damme
solving sudoku's well too : http://dpaste.dzfl.pl/903e34b5 I have one question though, how can you make it find all possible solutions? 2012/8/16, Era Scarecrow rtcv...@yahoo.com: On Thursday, 16 August 2012 at 01:05:20 UTC, Era Scarecrow wrote: So far having it running it's found over 23k+

Re: Question on Octal

2012-08-15 Thread Simen Kjaeraas
On Wed, 15 Aug 2012 20:07:59 +0200, Jonathan M Davis jmdavisp...@gmx.com wrote: 1) The specification is clear that the if the template has only one member and the member has the same name with the template's, the member is implicitly referred to in the instantiation. The template octal has

Re: Question on Octal

2012-08-15 Thread Jonathan M Davis
On Thursday, August 16, 2012 06:14:23 Simen Kjaeraas wrote: On Wed, 15 Aug 2012 20:07:59 +0200, Jonathan M Davis jmdavisp...@gmx.com wrote: 1) The specification is clear that the if the template has only one member and the member has the same name with the template's, the member is

[Issue 4082] nothrow main() can throw

2012-08-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4082 --- Comment #2 from Marco Leise marco.le...@gmx.de 2012-08-15 01:06:15 PDT --- Since it all applies to FuncDeclaration::semantic3(...), I'll add this case: void b(Test t) nothrow { } struct Test { ~this() { throw new

[Issue 4082] nothrow main() can throw

2012-08-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4082 --- Comment #3 from Marco Leise marco.le...@gmx.de 2012-08-15 02:12:57 PDT --- It also happens when I add a switch statement and the goto is a 'goto case ...'. It seems the BEgoto flag has a viral effect. I'll try to fix it. int x;

[Issue 4082] nothrow main() can throw

2012-08-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4082 --- Comment #4 from Marco Leise marco.le...@gmx.de 2012-08-15 03:05:26 PDT --- Ok I think I have fixed it. The original case was due to try-finally-statements not checking their finally section for thrown exceptions. And the goto made it so

[Issue 8547] New: Pure Functions Compilation - Not consistent errors

2012-08-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8547 Summary: Pure Functions Compilation - Not consistent errors Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2

[Issue 8547] Pure Functions Compilation - Not consistent errors

2012-08-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8547 --- Comment #1 from Daniel Cousens daniel...@bigpond.com 2012-08-15 04:55:41 PDT --- To be clear, an error was expected for both, not just one. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are

[Issue 8548] New: relocation R_X86_64_32 against can not be used when making a shared object

2012-08-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8548 Summary: relocation R_X86_64_32 against can not be used when making a shared object Product: D Version: D2 Platform: All OS/Version: All Status: NEW

[Issue 8549] New: Bad error message with const methods

2012-08-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8549 Summary: Bad error message with const methods Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: diagnostic Severity: normal

[Issue 8550] New: std.container.InlinedArray

2012-08-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8550 Summary: std.container.InlinedArray Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos

[Issue 6946] Compile-time flags generator

2012-08-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6946 Marco Leise marco.le...@gmx.de changed: What|Removed |Added CC||marco.le...@gmx.de

[Issue 8530] Float types default initializers doesn't work in class

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

[Issue 8550] std.container.InlinedArray

2012-08-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8550 Daniel Cousens daniel...@bigpond.com changed: What|Removed |Added CC|

[Issue 1759] Closures and With Statements

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

[Issue 8551] New: Endless Split

2012-08-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8551 Summary: Endless Split Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: major Priority: P2 Component: Phobos

[Issue 8530] Float types default initializers doesn't work in class

2012-08-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8530 --- Comment #4 from Daniel Kozak kozz...@gmail.com 2012-08-15 07:29:25 PDT --- (In reply to comment #3) (In reply to comment #2) (In reply to comment #1) If you want to check for NaN, then use std.math.isNaN. As I understand it, there

[Issue 8548] relocation R_X86_64_32 against can not be used when making a shared object

2012-08-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8548 Maxim Fomin ma...@maxim-fomin.ru changed: What|Removed |Added CC||ma...@maxim-fomin.ru

[Issue 8548] relocation R_X86_64_32 against can not be used when making a shared object

2012-08-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8548 --- Comment #2 from wbr...@gmail.com 2012-08-15 08:09:12 PDT --- dmd.2.060.zip dmd2/linux/bin64/dmd import std.stdio; void main(string[] args) { writeln(hello world); writefln(args.length = %d, args.length); foreach (index, arg;

[Issue 8530] Float types default initializers doesn't work in class

2012-08-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8530 Iain Buclaw ibuc...@ubuntu.com changed: What|Removed |Added CC||ibuc...@ubuntu.com

[Issue 3309] `Traits` : function parameters name

2012-08-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3309 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 8550] std.container.InlinedArray

2012-08-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8550 Dmitry Olshansky dmitry.o...@gmail.com changed: What|Removed |Added CC|

[Issue 8384] std.conv.to should allow conversion between any pair of string/wstring/dstring/char*/wchar*/dchar*

2012-08-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8384 --- Comment #9 from Vladimir Panteleev thecybersha...@gmail.com 2012-08-15 13:24:08 PDT --- Another case of confusion due to format treating C strings as pointers: http://stackoverflow.com/q/11975353/21501 I still think that the current

  1   2   >