Re: ddox documentation generator

2012-10-08 Thread Sönke Ludwig
Am 10/7/2012 11:33 PM, schrieb Nick Sabalausky: Server overloaded? Trying to connect to 'vibed.org' just hangs (without actually timing out, at least not yet). Yeah.. it always has to happen when something gets announced and at night (running for months without any problem). The proxy process

Re: ddox documentation generator

2012-10-08 Thread Sönke Ludwig
Am 10/8/2012 9:29 AM, schrieb Sönke Ludwig: Am 10/7/2012 11:33 PM, schrieb Nick Sabalausky: Server overloaded? Trying to connect to 'vibed.org' just hangs (without actually timing out, at least not yet). Yeah.. it always has to happen when something gets announced and at night (running for

Re: Remus

2012-10-08 Thread Namespace
On Sunday, 7 October 2012 at 20:54:28 UTC, Tove wrote: On Sunday, 7 October 2012 at 19:41:30 UTC, Jacob Carlborg wrote: On 2012-10-07 19:32, Namespace wrote: amazing, good work...! what license is this under, is it allowed to be used commercially? LGPL or zlib (but then with copyleft as

Re: ddox documentation generator

2012-10-08 Thread Sönke Ludwig
Am 10/8/2012 9:29 AM, schrieb Sönke Ludwig: Am 10/7/2012 11:33 PM, schrieb Nick Sabalausky: Server overloaded? Trying to connect to 'vibed.org' just hangs (without actually timing out, at least not yet). Yeah.. it always has to happen when something gets announced and at night (running for

Re: SQL working [ was Re: The sorry state of the D stack? ]

2012-10-08 Thread Jacob Carlborg
On 2012-10-07 21:53, denizzzka wrote: So, I do not know is it possible to make a universal interface. And why it may need in real life? ActiveRecord provides a universal interface for all databases. But you can't do all things with a fancy DSL. Sometimes you need to drop down to raw SQL if

Re: Preliminary submission - std.rational and std.typelist

2012-10-08 Thread Simen Kjaeraas
On 2012-44-08 06:10, Arlen arlen...@gmx.com wrote: On Sat, Oct 6, 2012 at 1:32 PM, Dmitry Olshansky dmitry.o...@gmail.com wrote: Cool, does it work with BigInt? No it doesn't work with BigInt, but I did look into it today briefly. There are issues with BigInt that I'm not sure what to do

Re: SQL working [ was Re: The sorry state of the D stack? ]

2012-10-08 Thread Jacob Carlborg
On 2012-10-07 18:54, Joseph Rushton Wakeling wrote: On 10/07/2012 10:55 AM, Russel Winder wrote: Why only PostgreSQL. Shouldn't it also work with MySQL, Oracle, DB2, PervasiveSQL, SQLite3, etc.? I don't have sufficient experience with SQL to be able to really make a judgement here, but is

Re: SQL working [ was Re: The sorry state of the D stack? ]

2012-10-08 Thread Paulo Pinto
On Sunday, 7 October 2012 at 20:05:22 UTC, denizzzka wrote: On Sunday, 7 October 2012 at 17:06:31 UTC, Joseph Rushton Wakeling wrote: On 10/07/2012 10:55 AM, Russel Winder wrote: Why only PostgreSQL. Shouldn't it also work with MySQL, Oracle, DB2, PervasiveSQL, SQLite3, etc.? I don't have

Re: Preliminary submission - std.rational and std.typelist

2012-10-08 Thread H. S. Teoh
On Mon, Oct 08, 2012 at 09:08:57AM +0200, Simen Kjaeraas wrote: On 2012-44-08 06:10, Arlen arlen...@gmx.com wrote: On Sat, Oct 6, 2012 at 1:32 PM, Dmitry Olshansky dmitry.o...@gmail.com wrote: Cool, does it work with BigInt? No it doesn't work with BigInt, but I did look into it today

Re: Preliminary submission - std.rational and std.typelist

2012-10-08 Thread H. S. Teoh
On Sun, Oct 07, 2012 at 01:15:50PM +0400, Dmitry Olshansky wrote: [...] Just define method with this signature: void toString(scope void delegate(const(char)[]) sink) And bingo! It's used in all of formatting stuff like write(f)(ln), format, formattedWrite etc. e.g. before posting I

Re: Feature request: extending comma operator's functionality

2012-10-08 Thread Don Clugston
On 05/10/12 18:58, H. S. Teoh wrote: On Fri, Oct 05, 2012 at 05:23:40PM +0200, Don Clugston wrote: [...] My feeling is that do{}while() is a fairly useless concept, and this is part of the reason. In my experience genuine do-while loops are extremely rare, and it only takes a slight change to

Re: object states

2012-10-08 Thread simendsjo
On Sunday, 7 October 2012 at 20:46:09 UTC, Henning Pohl wrote: On Sunday, 7 October 2012 at 20:18:15 UTC, Ali Çehreli wrote: Sounds good. Thanks. You haven't mentioned the invariant keyword, so perhaps you are not aware of that feature? http://dlang.org/class.html#Invariant

Re: SQL working [ was Re: The sorry state of the D stack? ]

2012-10-08 Thread simendsjo
On Sunday, 7 October 2012 at 22:08:45 UTC, Nick Sabalausky wrote: Not necessarily: Steve Teale's mysqln is a native D MySQL driver that connects to the DB server directly and bypasses MySQL's official client lib entirely. Teale has inexplicably disappeared off the face of the internet, but

Re: SQL working [ was Re: The sorry state of the D stack? ]

2012-10-08 Thread denizzzka
On Monday, 8 October 2012 at 07:35:13 UTC, Paulo Pinto wrote: On Sunday, 7 October 2012 at 20:05:22 UTC, denizzzka wrote: On Sunday, 7 October 2012 at 17:06:31 UTC, Joseph Rushton Wakeling wrote: On 10/07/2012 10:55 AM, Russel Winder wrote: Why only PostgreSQL. Shouldn't it also work with

Re: SpanMode uses incorrect terminology (breadth)

2012-10-08 Thread Mehrdad
On Tuesday, 18 September 2012 at 15:19:08 UTC, Andrei Alexandrescu wrote: On 9/18/12 10:25 AM, David Piepgrass wrote: Actually I prefer breadth-first search when searching the file system. When I search an entire volume, inevitably the (depth-first) search gets stuck in a few giant, deep

Re: object states

2012-10-08 Thread Henning Pohl
On Monday, 8 October 2012 at 08:53:39 UTC, simendsjo wrote: You can create a wrapper struct that includes an invariant: import std.stdio; struct Image { int width; void doSomething() { } void modifiesWidth() { --width; } } void func(Image img) {

Re: RFC: DConf 2013

2012-10-08 Thread Iain Buclaw
On 7 October 2012 22:41, mist n...@none.none wrote: On Monday, 1 October 2012 at 16:25:12 UTC, Andrei Alexandrescu wrote: The project is not live, it will be within a few days. In the spirit of having the community actively participate, I'm making this as transparent as it gets. Please

Re: DMD 2.060

2012-10-08 Thread Aziz K.
On Sun, 07 Oct 2012 12:39:59 +0200, Walter Bright newshou...@digitalmars.com wrote: A list of relevant bugzilla entries would be illuminating. There's a regression in 2.060 which affects my project. Was first reported here: http://d.puremagic.com/issues/show_bug.cgi?id=4192 The

Windows DLLs and TLS

2012-10-08 Thread Jakob Ovrum
I have a bug in one of my programs that I find particularly hard to reduce. I am writing a Windows DLL plugin for the IRC chat client HexChat (aka XChat). Problem is, all TLS variables, regardless of type, appear to be initialized to complete rubbish values. Reading them does not cause an

Re: SQL working [ was Re: The sorry state of the D stack? ]

2012-10-08 Thread Paulo Pinto
On Monday, 8 October 2012 at 10:26:35 UTC, denizzzka wrote: On Monday, 8 October 2012 at 07:35:13 UTC, Paulo Pinto wrote: On Sunday, 7 October 2012 at 20:05:22 UTC, denizzzka wrote: On Sunday, 7 October 2012 at 17:06:31 UTC, Joseph Rushton Wakeling wrote: On 10/07/2012 10:55 AM, Russel Winder

Re: Windows DLLs and TLS

2012-10-08 Thread Paulo Pinto
On Monday, 8 October 2012 at 11:44:28 UTC, Jakob Ovrum wrote: I have a bug in one of my programs that I find particularly hard to reduce. I am writing a Windows DLL plugin for the IRC chat client HexChat (aka XChat). Problem is, all TLS variables, regardless of type, appear to be initialized

Re: Windows DLLs and TLS

2012-10-08 Thread Jakob Ovrum
On Monday, 8 October 2012 at 11:55:24 UTC, Paulo Pinto wrote: On Monday, 8 October 2012 at 11:44:28 UTC, Jakob Ovrum wrote: I have a bug in one of my programs that I find particularly hard to reduce. I am writing a Windows DLL plugin for the IRC chat client HexChat (aka XChat). Problem is,

Re: Running test suites under Windows 7

2012-10-08 Thread Regan Heath
On Sat, 06 Oct 2012 13:05:32 +0100, Walter Bright newshou...@digitalmars.com wrote: On 10/6/2012 2:25 AM, Paulo Pinto wrote: On the other hand it can lead to such scenarios if the applications are not properly coded to work with file locking mechanisms. Both Optlink and Windows link

Re: Preliminary submission - std.rational and std.typelist

2012-10-08 Thread Aziz K.
On Mon, 08 Oct 2012 09:28:37 +0200, H. S. Teoh hst...@quickfur.ath.cx wrote: I'd like to chime in to state that I'd love to have Rational support BigInt. If necessary, use an arbitrary-width floating point format for floating point conversions (BigFloat?). Incidentally, I would very much

Re: Windows DLLs and TLS

2012-10-08 Thread Paulo Pinto
On Monday, 8 October 2012 at 12:00:00 UTC, Jakob Ovrum wrote: On Monday, 8 October 2012 at 11:55:24 UTC, Paulo Pinto wrote: On Monday, 8 October 2012 at 11:44:28 UTC, Jakob Ovrum wrote: I have a bug in one of my programs that I find particularly hard to reduce. I am writing a Windows DLL

Re: Windows DLLs and TLS

2012-10-08 Thread Jakob Ovrum
On Monday, 8 October 2012 at 15:52:12 UTC, Paulo Pinto wrote: Sorry, just thought it might be helpful. No, I'm sorry, I shouldn't have replied in the tone that I did. I truly appreciate the help.

Re: Preliminary submission - std.rational and std.typelist

2012-10-08 Thread Arlen
On Mon, Oct 8, 2012 at 2:08 AM, Simen Kjaeraas simen.kja...@gmail.com wrote: On 2012-44-08 06:10, Arlen arlen...@gmx.com wrote: 1. To convert a BigInt to floating-point one needs to convert it to the built-in integer types first. If you go beyond the limits of the built-in types (long),

Re: SQL working [ was Re: The sorry state of the D stack? ]

2012-10-08 Thread BLM768
I've been thinking about writing an interface inspired by ActiveRecord. It would probably be relatively simple and lightweight, but it should be enough for simple REST applications, and the interface would (hopefully) be extremely nice to use. Of course, with all the other projects I want to

What is the case against a struct post-blit default constructor?

2012-10-08 Thread Malte Skarupke
So this has been brought up many times (http://www.digitalmars.com/d/archives/digitalmars/D/Struct_no-arg_constructor_173172.html http://www.digitalmars.com/d/archives/digitalmars/D/learn/Default_constructor_for_structs_20997.html

Re: Windows DLLs and TLS

2012-10-08 Thread Regan Heath
It is also (apparently) possible to load a DLL without using LoadLibrary: http://www.codeproject.com/Tips/430684/Loading-Win32-DLLs-manually-without-LoadLibrary Lets hope XChat is not doing anything quite that crazy.. R

Re: Windows DLLs and TLS

2012-10-08 Thread Regan Heath
On Mon, 08 Oct 2012 12:26:29 +0100, Jakob Ovrum jakobov...@gmail.com wrote: I have a bug in one of my programs that I find particularly hard to reduce. I am writing a Windows DLL plugin for the IRC chat client HexChat (aka XChat). Problem is, all TLS variables, regardless of type, appear

Re: Windows DLLs and TLS

2012-10-08 Thread Rainer Schuetze
On 10/8/2012 1:26 PM, Jakob Ovrum wrote: I have a bug in one of my programs that I find particularly hard to reduce. I am writing a Windows DLL plugin for the IRC chat client HexChat (aka XChat). Problem is, all TLS variables, regardless of type, appear to be initialized to complete rubbish

Re: Windows DLLs and TLS

2012-10-08 Thread Denis Shelomovskij
08.10.2012 15:26, Jakob Ovrum пишет: I have a bug in one of my programs that I find particularly hard to reduce. I am writing a Windows DLL plugin for the IRC chat client HexChat (aka XChat). Problem is, all TLS variables, regardless of type, appear to be initialized to complete rubbish values.

Re: The sorry state of the D stack?

2012-10-08 Thread Brad Anderson
On Sun, Oct 7, 2012 at 10:39 AM, jerro a...@a.com wrote: Isn't part of the problem that no one can get ahold of the person who runs it? At least, that's what I remember being discussed previously. It was my understanding that that's why we've never been able to get dsource cleaned up or

[OT] Re: Windows DLLs and TLS

2012-10-08 Thread Denis Shelomovskij
08.10.2012 21:47, Rainer Schuetze пишет: Implicite TLS for dynamically loaded DLLs is not supported by XP or Sever 2003, so druntime contains a fix to simulate it. (The workaround has the drawback that the DLL cannot be unloaded anymore.) I'm just speculating, maybe something goes wrong with

Re: Windows DLLs and TLS

2012-10-08 Thread Jakob Ovrum
On Monday, 8 October 2012 at 17:20:03 UTC, Regan Heath wrote: Could XChat be loading your dll using: http://msdn.microsoft.com/en-us/library/windows/desktop/ms684179(v=vs.85).aspx and the flag DONT_RESOLVE_DLL_REFERENCES, or similar. To debug, I would write a debug file using *C* IO functions

Re: Windows DLLs and TLS

2012-10-08 Thread Jakob Ovrum
On Monday, 8 October 2012 at 18:05:31 UTC, Rainer Schuetze wrote: What OS are you running? Implicite TLS for dynamically loaded DLLs is not supported by XP or Sever 2003, so druntime contains a fix to simulate it. (The workaround has the drawback that the DLL cannot be unloaded anymore.) I'm

Re: Windows DLLs and TLS

2012-10-08 Thread Denis Shelomovskij
08.10.2012 22:35, Jakob Ovrum пишет: On Monday, 8 October 2012 at 18:05:31 UTC, Rainer Schuetze wrote: What OS are you running? Implicite TLS for dynamically loaded DLLs is not supported by XP or Sever 2003, so druntime contains a fix to simulate it. (The workaround has the drawback that the

Re: Windows DLLs and TLS

2012-10-08 Thread Jakob Ovrum
On Monday, 8 October 2012 at 19:19:58 UTC, Denis Shelomovskij wrote: As I said, give us a runnable failing test suite. I am working on it, but as I said, it's proving very difficult to replicate outside the XChat environment. I'll try to produce a reduced plugin though. As you are

Re: Windows DLLs and TLS

2012-10-08 Thread Denis Shelomovskij
08.10.2012 23:06, Jakob Ovrum пишет: On Monday, 8 October 2012 at 19:19:58 UTC, Denis Shelomovskij wrote: As I said, give us a runnable failing test suite. I am working on it, but as I said, it's proving very difficult to replicate outside the XChat environment. I'll try to produce a reduced

Re: core.simd woes

2012-10-08 Thread Iain Buclaw
On 7 October 2012 13:12, Manu turkey...@gmail.com wrote: On 5 October 2012 14:46, Iain Buclaw ibuc...@ubuntu.com wrote: On 5 October 2012 11:28, Manu turkey...@gmail.com wrote: On 3 October 2012 16:40, Iain Buclaw ibuc...@ubuntu.com wrote: On 3 October 2012 02:31, jerro a...@a.com wrote:

Re: [OT] Re: Windows DLLs and TLS

2012-10-08 Thread Rainer Schuetze
On 10/8/2012 8:13 PM, Denis Shelomovskij wrote: 08.10.2012 21:47, Rainer Schuetze пишет: Implicite TLS for dynamically loaded DLLs is not supported by XP or Sever 2003, so druntime contains a fix to simulate it. (The workaround has the drawback that the DLL cannot be unloaded anymore.) I'm

Re: Preliminary submission - std.rational and std.typelist

2012-10-08 Thread Ellery Newcomer
On 10/08/2012 07:56 AM, Aziz K. wrote: Incidentally, I would very much need a BigFloat class/struct, written in D and independent of any C library. I'm trying to write one myself, but it seems to be rather tricky. Could this be implemented in a short amount of time by someone with more

Re: core.simd woes

2012-10-08 Thread Manu
On 8 October 2012 23:05, Iain Buclaw ibuc...@ubuntu.com wrote: On 7 October 2012 13:12, Manu turkey...@gmail.com wrote: On 5 October 2012 14:46, Iain Buclaw ibuc...@ubuntu.com wrote: On 5 October 2012 11:28, Manu turkey...@gmail.com wrote: On 3 October 2012 16:40, Iain Buclaw

Re: core.simd woes

2012-10-08 Thread F i L
Iain Buclaw wrote: I fixed them again. https://github.com/D-Programming-GDC/GDC/commit/9402516e0b07031e841a15849f5dc94ae81dccdc#L4R1201 float a = 1, b = 2, c = 3, d = 4; float4 f = [a,b,c,d]; === movss -16(%rbp), %xmm0 movss -12(%rbp), %xmm1 Nice, not even DMD can do

Re: core.simd woes

2012-10-08 Thread Iain Buclaw
On 8 October 2012 22:18, Manu turkey...@gmail.com wrote: On 8 October 2012 23:05, Iain Buclaw ibuc...@ubuntu.com wrote: On 7 October 2012 13:12, Manu turkey...@gmail.com wrote: On 5 October 2012 14:46, Iain Buclaw ibuc...@ubuntu.com wrote: On 5 October 2012 11:28, Manu turkey...@gmail.com

Re: What is the case against a struct post-blit default constructor?

2012-10-08 Thread F i L
+1 to all of that. If the only issue is performance, I think the best solution is just to Document with a warning against using default constructors in performance critical structs.

Re: core.simd woes

2012-10-08 Thread Manu
On 9 October 2012 00:18, F i L witte2...@gmail.com wrote: Iain Buclaw wrote: I fixed them again. https://github.com/D-**Programming-GDC/GDC/commit/**

Re: core.simd woes

2012-10-08 Thread Iain Buclaw
On 8 October 2012 22:18, F i L witte2...@gmail.com wrote: Iain Buclaw wrote: I fixed them again. https://github.com/D-Programming-GDC/GDC/commit/9402516e0b07031e841a15849f5dc94ae81dccdc#L4R1201 float a = 1, b = 2, c = 3, d = 4; float4 f = [a,b,c,d]; === movss -16(%rbp),

Re: core.simd woes

2012-10-08 Thread Manu
On 9 October 2012 00:29, Iain Buclaw ibuc...@ubuntu.com wrote: On 8 October 2012 22:18, Manu turkey...@gmail.com wrote: On 8 October 2012 23:05, Iain Buclaw ibuc...@ubuntu.com wrote: On 7 October 2012 13:12, Manu turkey...@gmail.com wrote: On 5 October 2012 14:46, Iain Buclaw

Re: core.simd woes

2012-10-08 Thread Manu
On 9 October 2012 00:29, Iain Buclaw ibuc...@ubuntu.com wrote: On 8 October 2012 22:18, Manu turkey...@gmail.com wrote: On 8 October 2012 23:05, Iain Buclaw ibuc...@ubuntu.com wrote: On 7 October 2012 13:12, Manu turkey...@gmail.com wrote: On 5 October 2012 14:46, Iain Buclaw

Re: core.simd woes

2012-10-08 Thread Manu
On 9 October 2012 00:30, Iain Buclaw ibuc...@ubuntu.com wrote: On 8 October 2012 22:18, F i L witte2...@gmail.com wrote: Iain Buclaw wrote: I fixed them again. https://github.com/D-Programming-GDC/GDC/commit/9402516e0b07031e841a15849f5dc94ae81dccdc#L4R1201 float a = 1, b = 2,

Re: core.simd woes

2012-10-08 Thread Iain Buclaw
On 8 October 2012 22:34, Manu turkey...@gmail.com wrote: On 9 October 2012 00:30, Iain Buclaw ibuc...@ubuntu.com wrote: On 8 October 2012 22:18, F i L witte2...@gmail.com wrote: Iain Buclaw wrote: I fixed them again.

Re: Preliminary submission - std.rational and std.typelist

2012-10-08 Thread bearophile
Arlen: Yes, std.math.abs and std.numeric.gcd are very easy to implement for BigInt, Don doesn't agree regarding the gcd. To compute the gcd efficiently on large numbers you need not easy algorithms. See: http://d.puremagic.com/issues/show_bug.cgi?id=7102 Bye, bearophile

Avoiding some template bloat?

2012-10-08 Thread bearophile
Maybe someone someday will want to implement two Phobos printing functions usable like this: writecfln!%d %s(10, hello); writecf!%d %s(10, hello); They accept a format string as template argument (format strings are often compile-time constants and sometimes they are computable on the fly at

Re: DMD 2.060

2012-10-08 Thread Ben Davis
On 07/10/2012 11:39, Walter Bright wrote: On 10/7/2012 3:12 AM, Alex Rønne Petersen wrote: On 07-10-2012 11:11, Russel Winder wrote: Any news on the regressions relating to threads in the 2.059 → 2.060 change? Is a 2.061 with fixes pending? I'm still not clear on what these regressions are?

Re: Struct polymorphism?

2012-10-08 Thread Era Scarecrow
Error: function expected before (), not 'this.polyBase.opDispatch!(orig)' I think this is a compiler bug. It complains about calling opDispatch, however it doesn't complain if you explicitly call 'this'. Should adding 'this' be required? I am using the -property switch so it's a little more

Re: Avoiding some template bloat?

2012-10-08 Thread bearophile
(if necessary slicing the fixed sized matrix into a dynamic array of dynamic arrays). It's not hard to convert a fixed sized matrix into this run-time value that requires no templating on the sizes and requires no slicing and no heap allocations inside the template function that performs

Re: Will the D GC be awesome?

2012-10-08 Thread Ben Davis
On 06/10/2012 04:03, Chad J wrote: Try to do array slicing in Java or C#. You probably won't be able to do it. You'll get string /copies/ and this will incur heap allocations in the GC heap. Those languages /need/ good garbage collection to be performant because they abuse the poor GC

Re: core.simd woes

2012-10-08 Thread David Nadlinger
On Monday, 8 October 2012 at 20:23:50 UTC, Iain Buclaw wrote: float a = 1, b = 2, c = 3, d = 4; float4 f = [a,b,c,d]; === movss -16(%rbp), %xmm0 movss -12(%rbp), %xmm1 The obligatory me too post: LDC turns --- import core.simd; struct T { float a, b, c, d;

Re: core.simd woes

2012-10-08 Thread F i L
Iain Buclaw wrote: I'm refusing to implement any intrinsic that is tied to a specific architecture. I see. So the __builtin_ia32_***() functions in gcc.builtins are architecture agnostic? I couldn't find much documentation about them on the web. Do you have any references you could pass on?

Re: core.simd woes

2012-10-08 Thread Iain Buclaw
On 9 October 2012 00:38, F i L witte2...@gmail.com wrote: Iain Buclaw wrote: I'm refusing to implement any intrinsic that is tied to a specific architecture. I see. So the __builtin_ia32_***() functions in gcc.builtins are architecture agnostic? I couldn't find much documentation about

Re: core.simd woes

2012-10-08 Thread David Nadlinger
On Monday, 8 October 2012 at 21:36:08 UTC, F i L wrote: Iain Buclaw wrote: float a = 1, b = 2, c = 3, d = 4; float4 f = [a,b,c,d]; === movss -16(%rbp), %xmm0 movss -12(%rbp), %xmm1 Nice, not even DMD can do this yet. Can these changes be pushed upstream? No, the actual

Re: Will the D GC be awesome?

2012-10-08 Thread Era Scarecrow
On Thursday, 4 October 2012 at 05:33:21 UTC, Walter Bright wrote: On 10/3/2012 2:26 PM, DypthroposTheImposter wrote: * OpCmp returning an int is fugly I r sad How else would you return a 3 state value? Via enums. enum CmpValues { lessThan = -1, equal = 0, greaterThan = 1} But then

Re: Preliminary submission - std.rational and std.typelist

2012-10-08 Thread Arlen
On Mon, Oct 8, 2012 at 4:37 PM, bearophile bearophileh...@lycos.com wrote: Arlen: Yes, std.math.abs and std.numeric.gcd are very easy to implement for BigInt, Don doesn't agree regarding the gcd. To compute the gcd efficiently on large numbers you need not easy algorithms. See:

Re: Struct polymorphism?

2012-10-08 Thread Era Scarecrow
On Sunday, 7 October 2012 at 10:04:57 UTC, Era Scarecrow wrote: What are the possibilities of struct polymorphism? What would be the issues with it? What if we wanted to use it in a limited sense? Currently I'm experimenting with it since classes are too bulky for what I need, yet I really

Re: Avoiding some template bloat?

2012-10-08 Thread Philippe Sigaud
On Tue, Oct 9, 2012 at 12:13 AM, bearophile bearophileh...@lycos.com wrote: Maybe someone someday will want to implement two Phobos printing functions usable like this: writecfln!%d %s(10, hello); writecf!%d %s(10, hello); They accept a format string as template argument (format strings are

Re: Any sample for DFL library?

2012-10-08 Thread Lubos Pintes
No, win32 only. It didn't seem relevant in first post, but I am screen reader user and GTK is totally inaccessible / unusable on Windows. Dňa 7. 10. 2012 21:18 Michael wrote / napísal(a): gtkD ?

Re: Any sample for DFL library?

2012-10-08 Thread Lubos Pintes
Thank you. Dňa 7. 10. 2012 21:26 Andrej Mitrovic wrote / napísal(a): On 10/7/12, Lubos Pintes lubos.pin...@gmail.com wrote: Hi, There are at least two interesting GUI libraries for Windows: DGUI and DFL. But there seems to be no sample code for DFL. Does someone have any samples for DFL? And

Re: Any sample for DFL library?

2012-10-08 Thread Lubos Pintes
I fixed that for myself after checkout, it only needed some cast(WNDPROC) etc. on some places. Don't know however if it doesn't have another problems, I ran some random samples and from screen reader's point of view, it worked fine. (besides owner-drawn labels, which are not so fine. :-))

Unicode encodings and string literals

2012-10-08 Thread Lubos Pintes
Hi, I am playing with samples from Petzold's Programming Windows converted by Andrej Mitrovic. Many thanks, Andrej. :-) My question is about string conversion. There is a function in virtually every sample named toUTF16z, which if I understand properly, converts string to UTF-16, so that they

Re: Unicode encodings and string literals

2012-10-08 Thread Jacob Carlborg
On 2012-10-08 10:06, Lubos Pintes wrote: Hi, I am playing with samples from Petzold's Programming Windows converted by Andrej Mitrovic. Many thanks, Andrej. :-) My question is about string conversion. There is a function in virtually every sample named toUTF16z, which if I understand properly,

Growing multidimensional dynamic arrays

2012-10-08 Thread KillerSponge
Hi all, This seems like something that should be possible: how do I grow multidimensional arrays? I want something like this: struct X{ ... }; X*[][] listOfLists; foreach ( x ; otherListOfX ) { if ( newListForArbitraryReason ) { listOfLists ~= new X*[]; } listOfLists[$] ~= x;

CFTE+DevIL=?

2012-10-08 Thread Zhenya
Hi! I need to load some textures for my game,but I woud like to do it in compile time. I know that CTFE imposes restrictions on functions.So can I execute some DevIL(Derelict3) functions?

Re: Growing multidimensional dynamic arrays

2012-10-08 Thread Ali Çehreli
On 10/08/2012 06:12 AM, KillerSponge wrote: Hi all, This seems like something that should be possible: how do I grow multidimensional arrays? I want something like this: struct X{ ... }; X*[][] listOfLists; foreach ( x ; otherListOfX ) { if ( newListForArbitraryReason ) { listOfLists ~= new

Re: CFTE+DevIL=?

2012-10-08 Thread Piotr Szturmaj
Zhenya wrote: Hi! I need to load some textures for my game,but I woud like to do it in compile time. I know that CTFE imposes restrictions on functions.So can I execute some DevIL(Derelict3) functions? CTFE can only evaluate D functions that have their bodies available. It means that external

Re: Growing multidimensional dynamic arrays

2012-10-08 Thread KillerSponge
On Monday, 8 October 2012 at 13:56:00 UTC, Ali Çehreli wrote: I don't see the need for 'new' nor the use of a pointer, so I will not use them (yet): :) import std.stdio; struct X { int i; } void main() { X[][] listOfLists; auto otherListOfX = [ X(1), X(2), X(3) ]; auto

Re: Struct polymorphism?

2012-10-08 Thread Era Scarecrow
Perhaps someone can help explain this mystery. I've got a working system, except when it's coming to an unknown function inside my structs. Perhaps to note opDispatch is added via a mixin template, not sure if that makes a difference. Error: function expected before (), not

Re: ddoc - documenting private variables

2012-10-08 Thread Charles Hixson
On 10/07/2012 12:33 PM, Adam D. Ruppe wrote: On Sunday, 7 October 2012 at 19:36:39 UTC, Charles Hixson wrote: FWIW, I have absolutely NO knowledge of JSON, except that it's something to do with web pages (well, and it's a language or possibly a library). I haven't actually used that project

Re: CFTE+DevIL=?

2012-10-08 Thread Jacob Carlborg
On 2012-10-08 15:24, Zhenya wrote: Hi! I need to load some textures for my game,but I woud like to do it in compile time. I know that CTFE imposes restrictions on functions.So can I execute some DevIL(Derelict3) functions? What you can do is importing the textures into the executable, at

VisualD: Is keyboard navigation in project properties broken?

2012-10-08 Thread Lubos Pintes
Hi, I installed VisualD, together with VS Shell, because I have only express versions of VS 2008 on my system, win 7 64 bit. As a screen reader user, I heavily depend on keyboard. I successfully set up a testing project, dependend on windows api bindings. I needed to set a version identifier,

Re: Using inout in delegates

2012-10-08 Thread Timon Gehr
On 10/05/2012 04:09 PM, Ali Çehreli wrote: ... This workaround makes the compiler happy: void foo (inout(int)[] arr) { auto a = (inout int) { auto b = arr[0]; }; } But probably not what you want. :/ IIRC, inout has bugs and incomplete implementation. I think this should be in the bug

Re: Struct polymorphism?

2012-10-08 Thread Era Scarecrow
On Monday, 8 October 2012 at 15:23:58 UTC, Era Scarecrow wrote: Error: function expected before (), not 'this.polyBase.opDispatch!(orig)' I think this is a compiler bug. It complains about calling opDispatch, however it doesn't complain if you explicitly call 'this'. Should adding 'this'

Re: Struct polymorphism?

2012-10-08 Thread Ali Çehreli
On 10/08/2012 03:19 PM, Era Scarecrow wrote: On Monday, 8 October 2012 at 15:23:58 UTC, Era Scarecrow wrote: Error: function expected before (), not 'this.polyBase.opDispatch!(orig)' I think this is a compiler bug. It complains about calling opDispatch, however it doesn't complain if you

Re: Struct polymorphism?

2012-10-08 Thread Era Scarecrow
On Monday, 8 October 2012 at 22:57:04 UTC, Ali Çehreli wrote: I don't know all of the design decisions behind opDispatch, but I would be happier to have to type this. when inside the struct. Otherwise, any struct that defined opDispatch would miss out on compiler's static name checking. What

Re: CFTE+DevIL=?

2012-10-08 Thread Mike Parker
On Monday, 8 October 2012 at 18:07:49 UTC, Jacob Carlborg wrote: On 2012-10-08 15:24, Zhenya wrote: Hi! I need to load some textures for my game,but I woud like to do it in compile time. I know that CTFE imposes restrictions on functions.So can I execute some DevIL(Derelict3) functions?

Re: std.algorithm.skipOver broken / misbehaving?

2012-10-08 Thread Jesse Phillips
On Friday, 5 October 2012 at 08:53:22 UTC, Era Scarecrow wrote: Mmmm glancing at the notes again, maybe I misread it and it only skips if the beginning equals, rather than if it contains... Kinda annoying since it sounds like what I wanted would work... Pretty sure the semantics you want

[Issue 8779] New: std.zlib.UnCompress needs a way to detect end-of-stream

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8779 Summary: std.zlib.UnCompress needs a way to detect end-of-stream Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity:

[Issue 8780] New: std.traits.ReturnType of overloaded functions

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8780 Summary: std.traits.ReturnType of overloaded functions Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2

[Issue 8780] std.traits.ReturnType of overloaded functions

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8780 --- Comment #1 from luka8088 luka8...@owave.net 2012-10-08 03:44:04 PDT --- module program; import std.stdio; import std.traits; class a {} class b {} int f1 (a o) { return 1; } string f1 (b o) { return 2; } void main () { a a1 = new a();

[Issue 8780] std.traits.ReturnType of overloaded functions

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8780 --- Comment #2 from luka8088 luka8...@owave.net 2012-10-08 04:04:34 PDT --- I am sorry for such bad description but it seems to me that there are multiple bugs here and I am not sure where the problem is - or even if there is one. Free free to

[Issue 8782] D lexer do not understand unicode char … for variadic

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8782 --- Comment #1 from bioinfornatics bioinfornat...@gmail.com 2012-10-08 04:32:24 PDT --- (In reply to comment #0) D lexer do not understand unicode char … for variadic. from some keayboard layout is faster to write … than ...

[Issue 7065] align() refused for struct defined inside functions

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7065 --- Comment #2 from github-bugzi...@puremagic.com 2012-10-08 04:44:27 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd

[Issue 6534] const struct definition inside functions too

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6534 yebblies yebbl...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 7065] align() refused for struct defined inside functions

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7065 yebblies yebbl...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 6534] const struct definition inside functions too

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6534 --- Comment #6 from github-bugzi...@puremagic.com 2012-10-08 04:44:21 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd

[Issue 7172] nested class with additional attributes is not supported

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7172 yebblies yebbl...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 8782] D lexer do not understand unicode char … for variadic

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8782 bearophile_h...@eml.cc changed: What|Removed |Added CC||bearophile_h...@eml.cc ---

[Issue 6174] Initialize const fixed-size array in constructor

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6174 --- Comment #9 from Kenji Hara k.hara...@gmail.com 2012-10-08 05:35:43 PDT --- (In reply to comment #8) Is this expected? Do you want me to put this in a new bug report? struct Foo { int[1] bar; } const Foo[1] foos; static this() {

[Issue 8773] [CTFE] foreach ref element doesn't work well at compile time.

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

  1   2   >