Re: Array Operations: a[] + b[] etc.

2012-11-23 Thread Walter Bright
On 11/22/2012 10:49 PM, monarch_dodra wrote: I originally opened this some time back, related to opSlice operations not error-ing: http://d.puremagic.com/issues/show_bug.cgi?id=8650 I've since learned to build druntime as non-release, which "fixes" the problem. I don't know if you plan to chang

Re: popFrontExactly?

2012-11-23 Thread Jonathan M Davis
On Friday, November 23, 2012 03:55:21 Kapps wrote: > Is it really that big an issue to have a few more methods than > standard ranges would need? Before it certainly would be annoying > to have to check if the range supported it, use that, and if not > fake it, but now we have UFCS. It would be sim

Re: half datatype?

2012-11-23 Thread Manu
On 23 November 2012 05:03, xenon325 <1...@a.net> wrote: > On Monday, 19 November 2012 at 15:48:23 UTC, Manu wrote: > >> This wouldn't strictly retain half precision though, it would be >> slightly higher precision since the intermediates were full precision >> (which is surely preferable?). >> > >

Array reverse

2012-11-23 Thread bearophile
I've seen a difference in the performance of std.algorithm.reverse applied on an array compared to home-made code, so I have written a little test. Below you see the code, and the asm of the functions, compiled with DMD 2.060, 32 bit (-O -release -inline). Feel free to recompile the code you

Re: popFrontExactly?

2012-11-23 Thread Tobias Pankrath
I think that we'll probably need to add them in this case due to efficiency concerns, but it's not without cost. We don't want too many stray functions doing almost the same thing in Phobos. - Jonathan M Davis Better to have them in phobos instead of every ones own little helper library. An

Re: I'm back

2012-11-23 Thread Regan Heath
On Fri, 23 Nov 2012 07:40:25 -, Jacob Carlborg wrote: On 2012-11-23 00:43, Jonathan M Davis wrote: Or even more likely, no design documentation gets written at all... Example, this post is not threaded correctly for me. Nor for me (Opera 12.11 Win32 Windows7). R -- Using Opera's rev

Re: I'm back

2012-11-23 Thread Regan Heath
On Fri, 23 Nov 2012 07:41:08 -, Jacob Carlborg wrote: On 2012-11-23 05:07, H. S. Teoh wrote: Or any documentation at all. I recall, with a shudder, how one fine day a high-priority Javascript project (high-priority as in, it was due the week before it was given to me) was dumped on my la

Re: Array reverse

2012-11-23 Thread monarch_dodra
On Friday, 23 November 2012 at 09:14:20 UTC, bearophile wrote: I've seen a difference in the performance of std.algorithm.reverse applied on an array compared to home-made code, so I have written a little test. Below you see the code, and the asm of the functions, compiled with DMD 2.060, 32

Re: Array reverse

2012-11-23 Thread Walter Bright
On 11/23/2012 1:14 AM, bearophile wrote: Feel free to recompile the code yourself to see if I have done some mistake :-) You've got array bounds checking turned on for algorithm.reverse, and you avoided that in your code by using unchecked pointers.

Re: DConf 2013 suggestion

2012-11-23 Thread Joseph Rushton Wakeling
On 11/22/2012 11:35 PM, Walter Bright wrote: If people want to submit videos and articles, yes, we can get them published on the conference site. I hadn't thought about a proceedings publication, but perhaps that can be done as an ebook. I'll have a chat to some colleagues about the latter and

Re: D wiki

2012-11-23 Thread Andrej Mitrovic
On 11/21/12, Vladimir Panteleev wrote: > http://dwiki.kimsufi.thecybershadow.net/ Whoever added those icons, they look awesome! It's already much more user-friendly than prowiki.

Re: popFrontExactly?

2012-11-23 Thread monarch_dodra
On Friday, 23 November 2012 at 08:42:18 UTC, Jonathan M Davis wrote: I think that we'll probably need to add them in this case due to efficiency concerns, but it's not without cost. We don't want too many stray functions doing almost the same thing in Phobos. - Jonathan M Davis I'd say it's

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Joseph Rushton Wakeling
On 11/23/2012 12:15 PM, Gor Gyolchanyan wrote: I'm translating OpenGL headers, taken from opengl.org (glcorearb.h, glext.h, wglext.h, glxext.h) Hasn't there already been some work to translate OpenGL headers ... ? Might be worth taking a look at to see if it can be adapted

Re: Ranges usages

2012-11-23 Thread Timon Gehr
On 11/23/2012 03:01 AM, Jonathan M Davis wrote: On Friday, November 23, 2012 01:52:51 Timon Gehr wrote: On 11/22/2012 11:25 AM, monarch_dodra wrote: On Thursday, 22 November 2012 at 06:52:55 UTC, Rob T wrote: FYI I'm getting these compile errors, must be the compiler flags I'm using? Must b

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Andrej Mitrovic
11/23/12, Gor Gyolchanyan wrote: > I'm going to translate WinAPI headers (all > except DirectX and deprecated, like winsock1) after that. Please see http://dsource.org/projects/bindings/wiki/WindowsApi

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Gor Gyolchanyan
All I could find was some D1-oriented ancient code in one of the dead dsource.org projects. On Fri, Nov 23, 2012 at 3:33 PM, Joseph Rushton Wakeling < joseph.wakel...@webdrake.net> wrote: > On 11/23/2012 12:15 PM, Gor Gyolchanyan wrote: > >> I'm translating OpenGL headers, taken from opengl.org

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Gor Gyolchanyan
That was my first choice when I wanted a sane WinAPI binding, but there are some problems with it: 1. It has some pragma(lib, ...) declarations which aren't being met and which assume some things, that aren't true. 2. It uses version identifiers to determine the, you guessed it, version of Windows

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Gor Gyolchanyan
I hope the deimos folks make a repo soon, so that people can use those modules as soon as possible, because I'll finish translating them today. On Fri, Nov 23, 2012 at 3:33 PM, Joseph Rushton Wakeling < joseph.wakel...@webdrake.net> wrote: > On 11/23/2012 12:15 PM, Gor Gyolchanyan wrote: > >> I'

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Manu
On 23 November 2012 13:15, Gor Gyolchanyan wrote: > I'm translating OpenGL headers, taken from opengl.org (glcorearb.h, > glext.h, wglext.h, glxext.h) and I'm going to translate WinAPI headers (all > except DirectX and deprecated, like winsock1) after that. > > As we all know, the WinAPI binding i

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Gor Gyolchanyan
Good point, but the 32-bit version also must work in order for the new modules to be included in druntime. On Fri, Nov 23, 2012 at 3:47 PM, Manu wrote: > On 23 November 2012 13:15, Gor Gyolchanyan wrote: > >> I'm translating OpenGL headers, taken from opengl.org (glcorearb.h, >> glext.h, wglext

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Andrej Mitrovic
On 11/23/12, Gor Gyolchanyan wrote: > 2. It uses version identifiers to determine the, you guessed it, version of > Windows in question. This is very bad, since it won't compile without at > least some version identifiers and I'm sure we can make the OS version > available at compile-time to obvia

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Mike Parker
On Friday, 23 November 2012 at 11:40:14 UTC, Gor Gyolchanyan wrote: All I could find was some D1-oriented ancient code in one of the dead dsource.org projects. Never seen Derelict? https://github.com/aldacron/Derelict3/

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Gor Gyolchanyan
Derelict doesn't define extern functions and includes tons of code for dynamic loading. It's not a direct translation and since I'm aiming for deimos, I need to make a direct translation. On Fri, Nov 23, 2012 at 3:51 PM, Mike Parker wrote: > On Friday, 23 November 2012 at 11:40:14 UTC, Gor Gyol

Re: D wiki

2012-11-23 Thread tn
On Thursday, 22 November 2012 at 14:52:33 UTC, Vladimir Panteleev wrote: On Thursday, 22 November 2012 at 10:41:33 UTC, Andrej Mitrovic wrote: On 11/22/12, r_m_r wrote: I just modified the Main_Page and added the WhySwitch page (content copied from the old wiki: http://www.prowiki.org/wiki4d

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Gor Gyolchanyan
With a little work the bindings worked for me as well, but they aren't fit for druntime. also, they don't aim to preserve the interface as it is. On Fri, Nov 23, 2012 at 3:52 PM, Andrej Mitrovic wrote: > On 11/23/12, Gor Gyolchanyan wrote: > > 2. It uses version identifiers to determine the, y

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Jacob Carlborg
On 2012-11-23 12:15, Gor Gyolchanyan wrote: I'm translating OpenGL headers, taken from opengl.org (glcorearb.h, glext.h, wglext.h, glxext.h) and I'm going to translate WinAPI headers (all except DirectX and deprecated, like winsock1) after that. As we all know, the WinAPI bin

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Mike Parker
On Friday, 23 November 2012 at 11:57:19 UTC, Gor Gyolchanyan wrote: Derelict doesn't define extern functions and includes tons of code for dynamic loading. It's not a direct translation and since I'm aiming for deimos, I need to make a direct translation. Well, I wouldn't call it tons of code

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Gor Gyolchanyan
See my previous posts in this thread regarding those. On Fri, Nov 23, 2012 at 4:07 PM, Jacob Carlborg wrote: > On 2012-11-23 12:15, Gor Gyolchanyan wrote: > >> I'm translating OpenGL headers, taken from opengl.org >> (glcorearb.h, glext.h, wglext.h, glxext.h) and I'm >> >> g

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Gor Gyolchanyan
It'll take more time trying to extract stuff from Derelict, rather then regexp search/replace -ing the headers. There's always a way to statically link. The original headers define extern functions. If the static library doesn't exist yet, it;'s very easy to make and have it dynamically load the s

Re: D wiki

2012-11-23 Thread Jacob Carlborg
On 2012-11-23 12:56, tn wrote: Fix for the font size issue: http://dwiki.kimsufi.thecybershadow.net/User:Tmn/vector.css (Taken from here: http://en.wikipedia.org/wiki/MediaWiki:Common.css) Looks good. -- /Jacob Carlborg

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Andrej Mitrovic
On 11/23/12, Gor Gyolchanyan wrote: > It'll take more time trying to extract stuff from Derelict, rather then > regexp search/replace -ing the headers. You really believe that your regex script is going to do a better job than what Mike has been using and maintaining for years? The same applies t

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Vladimir Panteleev
(Disclosure: I contributed to this project) The Win32 bindings are excellent. I believe your points are invalid. On Friday, 23 November 2012 at 11:43:21 UTC, Gor Gyolchanyan wrote: 1. It has some pragma(lib, ...) declarations which aren't being met and which assume some things, that aren't

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Gor Gyolchanyan
Derelict is not a direct binding it contains lots of tools to automatically load symbols from DLLs and call library initialization and finalization routines. That takes a while to make. Direct translations do not change anything and do not add anything. When done correctly (checked by compiling it)

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Gor Gyolchanyan
I agree, that WinAPI binding from dsource.org is very close to what needs to be in druntime. I'll look into it. That's why I decided to bind the OpenGL headers first (because it needs manual binding more, then WinAPI). Derelict is heavily packed with auxilliary stuff, that makes the everyday use of

Re: Array Operations: a[] + b[] etc.

2012-11-23 Thread Era Scarecrow
On Wednesday, 21 November 2012 at 18:15:51 UTC, Walter Bright wrote: On 11/21/2012 10:02 AM, John Colvin wrote: My vision of how things could work: c = a[] opBinary b[]; should be legal. It should create a new array that is then reference assigned to c. This is not done because it puts excess

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Gor Gyolchanyan
And yes, I've already looked at OpenGL bindings in the same bindings project. They're D1 and OpenGL 2.1 only. On Fri, Nov 23, 2012 at 5:15 PM, Gor Gyolchanyan < gor.f.gyolchan...@gmail.com> wrote: > I agree, that WinAPI binding from dsource.org is very close to what needs > to be in druntime. I'

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Vladimir Panteleev
On Friday, 23 November 2012 at 13:10:56 UTC, Gor Gyolchanyan wrote: I'll look into the opportunity to refactor the dsource.org WinAPI binding, because it's much closer to reality then Derelict. In that case It'll take a few hours to finish (quite fast). Would you suggest me to send a pull reque

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Vladimir Panteleev
On Friday, 23 November 2012 at 13:57:14 UTC, Vladimir Panteleev wrote: If breaking code were not an issue, the best solution would be to make HANDLE a unique, opaque type (like a struct wrapping an intptr_t or void*) - which is exactly how it should be treated. It would need to support assignme

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Gor Gyolchanyan
That's exactly how the original WinAPI does it. All handles are pointers to their own dummy structures. The current druntime WinAPI just aliases all handle types to HANDLE, which is itself an alias to void*. This is very wrong. On Fri, Nov 23, 2012 at 5:58 PM, Vladimir Panteleev < vladi...@thecyb

Re: D wiki

2012-11-23 Thread Vladimir Panteleev
On Friday, 23 November 2012 at 11:56:58 UTC, tn wrote: Fix for the font size issue: http://dwiki.kimsufi.thecybershadow.net/User:Tmn/vector.css (Taken from here: http://en.wikipedia.org/wiki/MediaWiki:Common.css) Applied, thanks.

Re: D wiki

2012-11-23 Thread Jacob Carlborg
On 2012-11-23 15:06, Vladimir Panteleev wrote: Applied, thanks. Looks much better, thanks. -- /Jacob Carlborg

Re: D wiki

2012-11-23 Thread Andrej Mitrovic
On 11/23/12, Jacob Carlborg wrote: > On 2012-11-23 15:06, Vladimir Panteleev wrote: > >> Applied, thanks. > > Looks much better, thanks. > > -- > /Jacob Carlborg > Looks perfect now. Thanks guys.

Re: I'm back

2012-11-23 Thread jerro
On Thursday, 22 November 2012 at 16:05:10 UTC, H. S. Teoh wrote: On Wed, Nov 21, 2012 at 10:10:51PM -0800, Jonathan M Davis wrote: On Friday, November 16, 2012 18:09:44 H. S. Teoh wrote: > On Fri, Nov 16, 2012 at 08:52:39PM -0500, Jonathan M Davis > wrote: [...] > > The problem is that support

Re: I'm back

2012-11-23 Thread jerro
What if we did it so that transient ranges would have to define transient property (as was previously proposed), and isInputRange, isForwardRange and others would get an additional parameter allowTransient. The default value of that argument would be false, so those templates would evaluate to

Re: popFrontExactly?

2012-11-23 Thread Dmitry Olshansky
11/23/2012 9:19 AM, Jonathan M Davis пишет: On Friday, November 23, 2012 03:55:21 Kapps wrote: Is it really that big an issue to have a few more methods than standard ranges would need? Before it certainly would be annoying to have to check if the range supported it, use that, and if not fake it

Re: Array Operations: a[] + b[] etc.

2012-11-23 Thread Dmitry Olshansky
11/23/2012 6:06 AM, John Colvin пишет: On Thursday, 22 November 2012 at 21:37:19 UTC, Dmitry Olshansky wrote: Array ops supposed to be overhead-free loops transparently leveraging SIMD parallelism of modern CPUs. No more and no less. It's like auto-vectorization but it's guaranteed and obvious i

Re: popFrontExactly?

2012-11-23 Thread monarch_dodra
On Friday, 23 November 2012 at 15:48:04 UTC, Dmitry Olshansky wrote: 11/23/2012 9:19 AM, Jonathan M Davis пишет: On Friday, November 23, 2012 03:55:21 Kapps wrote: Is it really that big an issue to have a few more methods than standard ranges would need? Before it certainly would be annoying t

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Dmitry Olshansky
11/23/2012 4:56 PM, Andrej Mitrovic пишет: On 11/23/12, Gor Gyolchanyan wrote: It'll take more time trying to extract stuff from Derelict, rather then regexp search/replace -ing the headers. You really believe that your regex script is going to do a better job than what Mike has been using an

Re: D wiki

2012-11-23 Thread Andrej Mitrovic
On 11/23/12, Andrej Mitrovic wrote: > Looks perfect now. Thanks guys. I think maybe we should do another one of those logo contests (https://github.com/eegg/d-brand) to get a better looking logo for the wiki and dlang.org. I don't really like the current one (anyone else agrees?).

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread David Nadlinger
On Friday, 23 November 2012 at 12:57:01 UTC, Andrej Mitrovic wrote: I'll also say that IMO the concept of Deimos turns out to be a bad idea, and I'm not alone in thinking this. I don't think I agree with you here. The idea of Deimos, i.e. a central repository of "no-fluff" C bindings (which ar

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Paulo Pinto
Am 23.11.2012 15:03, schrieb Gor Gyolchanyan: That's exactly how the original WinAPI does it. All handles are pointers to their own dummy structures. The current druntime WinAPI just aliases all handle types to HANDLE, which is itself an alias to void*. This is very wrong. On Fri, Nov 23, 2012

Re: D wiki

2012-11-23 Thread H. S. Teoh
On Fri, Nov 23, 2012 at 05:19:34PM +0100, Andrej Mitrovic wrote: > On 11/23/12, Andrej Mitrovic wrote: > > Looks perfect now. Thanks guys. > > I think maybe we should do another one of those logo contests > (https://github.com/eegg/d-brand) to get a better looking logo for the > wiki and dlang.or

Re: D wiki

2012-11-23 Thread David Nadlinger
On Friday, 23 November 2012 at 17:24:30 UTC, H. S. Teoh wrote: What about something based off my povray D-man model? D-man? Seriously? ;) David

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Rob T
On Friday, 23 November 2012 at 16:32:17 UTC, David Nadlinger wrote: On Friday, 23 November 2012 at 12:57:01 UTC, Andrej Mitrovic wrote: I'll also say that IMO the concept of Deimos turns out to be a bad idea, and I'm not alone in thinking this. I don't think I agree with you here. The idea of

compiler for ubuntu x86-64

2012-11-23 Thread Mark Morss
Hello to all. I have just purchased a copy of Andrei A's book on D and I'm about halfway through it. I have some projects in mind to which I would like to apply this very interesting language. I am working on an 8-core machine with x86-64 chips and Ubuntu 10.04. Am I right that there is no dm

Re: compiler for ubuntu x86-64

2012-11-23 Thread Adam D. Ruppe
On Friday, 23 November 2012 at 17:56:49 UTC, Mark Morss wrote: Am I right that there is no dmd binary available for my machine?? I only see i386 and amd64 options when I look at the binary download options. amd64 and x86-64 are the same thing, so this should work: http://ftp.digitalmars.com/d

Re: compiler for ubuntu x86-64

2012-11-23 Thread Timon Gehr
On 11/23/2012 06:56 PM, Mark Morss wrote: Hello to all. I have just purchased a copy of Andrei A's book on D and I'm about halfway through it. I have some projects in mind to which I would like to apply this very interesting language. I am working on an 8-core machine with x86-64 chips and Ubun

Re: compiler for ubuntu x86-64

2012-11-23 Thread Jordi Sayol
Al 23/11/12 19:02, En/na Adam D. Ruppe ha escrit: > > I think the source is in the .deb too but I'm not sure (I haven't actually > used it) > deb packages contains druntime and phobos sources just as headers. -- Jordi Sayol

Re: compiler for ubuntu x86-64

2012-11-23 Thread Mark Morss
My thanks to all who answered. Clearly, it was a case of ignorance on my part. I'll download and install the amd64 binary. Concerning "does not execute that well," I should have said, "that fast." My experience with compiled languages has been that depending on the compiler you use, you can

Re: Array Operations: a[] + b[] etc.

2012-11-23 Thread Walter Bright
On 11/23/2012 7:58 AM, Dmitry Olshansky wrote: anyone with the most basic programming and mathematical knowledge can write concise code operating on arrays, taking advantage of the potential speedups while being aware of the pitfalls. People typically are not aware as long as it seems to work.

Re: I'm back

2012-11-23 Thread Jonathan M Davis
On Friday, November 23, 2012 16:34:51 jerro wrote: > > What if we did it so that transient ranges would have to define > > transient property (as was previously proposed), and > > isInputRange, isForwardRange and others would get an additional > > parameter allowTransient. The default value of that

Re: I'm back

2012-11-23 Thread Jonathan M Davis
On Friday, November 23, 2012 08:39:42 Jacob Carlborg wrote: > The threading is not fine on some of your posts in Thunderbird for me. Well, I have no idea what the problem is, and there's nothing that I can do about it. The inner workings of e-mail and newsgroup software are a mystery to me. - J

Re: I'm back

2012-11-23 Thread jerro
It's not worth the extra complication. Every algorithm ever written then has to worry about it (though clearly many outside of Phobos wouldn't bother), and it's yet another thing that anyone writing a range-based function has to take into account. Any function which doesn't take it into account

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Walter Bright
On 11/23/2012 3:46 AM, Gor Gyolchanyan wrote: I hope the deimos folks make a repo soon, so that people can use those modules as soon as possible, because I'll finish translating them today. https://github.com/D-Programming-Deimos/OpenGL

Re: popFrontExactly?

2012-11-23 Thread Jonathan M Davis
On Friday, November 23, 2012 17:01:04 monarch_dodra wrote: > You could ask the question the other way around: Why would you > pop a certain amount of elements, if you don't even know your > range actually *holds* that many elements? Why do you even need > the safeguard in the first place? It would

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Walter Bright
On 11/23/2012 5:10 AM, Gor Gyolchanyan wrote: If the only problem with Deimos is the speed at which libraries end up there, why not make the review process more loose and allow the code to be submitted and then fixed as necessary? It would be much more useful, then just having nothing at all. I

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Gor Gyolchanyan
Thank you!!! On Sat, Nov 24, 2012 at 1:15 AM, Walter Bright wrote: > On 11/23/2012 3:46 AM, Gor Gyolchanyan wrote: > >> I hope the deimos folks make a repo soon, so that people can use those >> modules >> as soon as possible, because I'll finish translating them today. >> > > https://github.com/

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Walter Bright
On 11/23/2012 5:57 AM, Vladimir Panteleev wrote: There might be some incompatibilities, for example due to how the HANDLE type is declared. In C, you can use either 0 or NULL as a parameter to a function accepting an integer or pointer. In D, you cannot. IIRC, some types were declared differently

Re: I'm back

2012-11-23 Thread Jonathan M Davis
On Friday, November 23, 2012 22:13:17 jerro wrote: > > It's not worth the extra complication. Every algorithm ever > > written then has > > to worry about it (though clearly many outside of Phobos > > wouldn't bother), and > > it's yet another thing that anyone writing a range-based > > function ha

Broken newsgroup threading, again (was: Re: I'm back)

2012-11-23 Thread Jeff Nowakowski
On 11/22/2012 06:36 PM, H. S. Teoh wrote: The threading is fine in my MUA (mutt); I think somebody mentioned some time ago that Mailman is inserting/substituting message IDs where it shouldn't, which causes things to break. I'm not sure exactly what or where, though. Yes, it is the "puremagic"

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Gor Gyolchanyan
in WinAPI each type of handle has it's own type. in Druntime it's all aliased to void*. It currently doesn't match WinAPI. On Sat, Nov 24, 2012 at 1:21 AM, Walter Bright wrote: > On 11/23/2012 5:57 AM, Vladimir Panteleev wrote: > >> There might be some incompatibilities, for example due to how t

Re: Broken newsgroup threading, again (was: Re: I'm back)

2012-11-23 Thread Vladimir Panteleev
On Friday, 23 November 2012 at 21:37:54 UTC, Jeff Nowakowski wrote: On 11/22/2012 06:36 PM, H. S. Teoh wrote: The threading is fine in my MUA (mutt); I think somebody mentioned some time ago that Mailman is inserting/substituting message IDs where it shouldn't, which causes things to break. I

Re: Broken newsgroup threading, again (was: Re: I'm back)

2012-11-23 Thread Vladimir Panteleev
On Friday, 23 November 2012 at 21:42:02 UTC, Vladimir Panteleev wrote: Yes, it is the "puremagic" mail-to-news gateway. Here's the explanation for the last time this problem was discussed: http://forum.dlang.org/post/jo2c5s$f1$1...@digitalmars.com It's about time to "fix it or fuck it" with Ma

Re: D wiki

2012-11-23 Thread H. S. Teoh
On Fri, Nov 23, 2012 at 06:26:52PM +0100, David Nadlinger wrote: > On Friday, 23 November 2012 at 17:24:30 UTC, H. S. Teoh wrote: > >What about something based off my povray D-man model? > > D-man? Seriously? ;) [...] Why not? Java had Duke, so D has D-Man. :) T -- Caffeine underflow. Brain d

Re: externally imposed conditional compilation

2012-11-23 Thread Peter Alexander
On Friday, 23 November 2012 at 11:38:31 UTC, Gor Gyolchanyan wrote: What's the best/standard way translating this to D? One way is to use import expressions: import std.stdio; import std.conv; enum value = import("value").to!int(); void main() { static if (value < 100)

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Rob T
On Friday, 23 November 2012 at 21:15:00 UTC, Walter Bright wrote: On 11/23/2012 3:46 AM, Gor Gyolchanyan wrote: I hope the deimos folks make a repo soon, so that people can use those modules as soon as possible, because I'll finish translating them today. https://github.com/D-Programming-Deim

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Gor Gyolchanyan
Sent a pull request for the C headers and fully translated glcorearb.d. On Sat, Nov 24, 2012 at 2:08 AM, Rob T wrote: > On Friday, 23 November 2012 at 21:15:00 UTC, Walter Bright wrote: > >> On 11/23/2012 3:46 AM, Gor Gyolchanyan wrote: >> >>> I hope the deimos folks make a repo soon, so that p

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Jonathan M Davis
On Friday, November 23, 2012 15:15:41 Gor Gyolchanyan wrote: > As we all know, the WinAPI binding in druntime as well as the static > libraries of WinAPI, which come with DMD are in horrendous state. I am not all that well acquainted with all of the issues involved with the Win32 API, so I'm prob

ICE when breaking outer loop from switch statement

2012-11-23 Thread H. S. Teoh
Stumbled into this today: http://d.puremagic.com/issues/show_bug.cgi?id=9068 A workaround is to put the loop in its own function and do a return instead of "break X". Or an uglier workaround is to use a boolean flag checked right after the switch statement. In my case, I didn't have much

Re: ICE when breaking outer loop from switch statement

2012-11-23 Thread Timon Gehr
On 11/24/2012 01:16 AM, H. S. Teoh wrote: Stumbled into this today: http://d.puremagic.com/issues/show_bug.cgi?id=9068 A workaround is to put the loop in its own function and do a return instead of "break X". Or an uglier workaround is to use a boolean flag checked right after the switc

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Vladimir Panteleev
On Friday, 23 November 2012 at 21:21:49 UTC, Walter Bright wrote: On 11/23/2012 5:57 AM, Vladimir Panteleev wrote: There might be some incompatibilities, for example due to how the HANDLE type is declared. In C, you can use either 0 or NULL as a parameter to a function accepting an integer or p

Re: externally imposed conditional compilation

2012-11-23 Thread Vladimir Panteleev
On Friday, 23 November 2012 at 22:20:39 UTC, Gor Gyolchanyan wrote: I thing another way is to have the entire module a template and instantiate that template with necessary parameters. Although that means one has to have an additional namespace. Mixin the template into the module scope? http:

Re: Broken newsgroup threading, again

2012-11-23 Thread Jeff Nowakowski
On 11/23/2012 04:46 PM, Vladimir Panteleev wrote: I know how to work around this problem (subscribe to both the mailing list and newsgroup, and store both Message-IDs). I just need to allocate some time to work on the forum again. Hopefully around the end of the month. Sorry, I assumed you wer

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Walter Bright
On 11/23/2012 2:08 PM, Rob T wrote: On Friday, 23 November 2012 at 21:15:00 UTC, Walter Bright wrote: On 11/23/2012 3:46 AM, Gor Gyolchanyan wrote: I hope the deimos folks make a repo soon, so that people can use those modules as soon as possible, because I'll finish translating them today. h

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Rob T
On Saturday, 24 November 2012 at 01:52:41 UTC, Walter Bright wrote: On 11/23/2012 2:08 PM, Rob T wrote: Will the library "etc" bindings (curl, sqlite3, zlib) be moved over to separate repos for Deimos? Probably not. I don't know what the plan is for etc, or the what the reasoning is behind

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Walter Bright
On 11/23/2012 6:13 PM, Rob T wrote: On Saturday, 24 November 2012 at 01:52:41 UTC, Walter Bright wrote: On 11/23/2012 2:08 PM, Rob T wrote: Will the library "etc" bindings (curl, sqlite3, zlib) be moved over to separate repos for Deimos? Probably not. I don't know what the plan is for etc,

Re: externally imposed conditional compilation

2012-11-23 Thread Vladimir Panteleev
On Saturday, 24 November 2012 at 05:55:49 UTC, Gor Gyolchanyan wrote: In case of WinAPI itself, which takes a dozen of preprocessor definitions, would you like a WinAPI binding, where you need to mix in the WinAPI? I believe the bindings on dsource use a sensible solution. It is similar to wh

Re: popFrontExactly?

2012-11-23 Thread Mehrdad
I wouldn't mind also adding a popFrontApproximately() =P

Re: popFrontExactly?

2012-11-23 Thread Jonathan M Davis
On Saturday, November 24, 2012 07:43:26 Mehrdad wrote: > I wouldn't mind also adding a popFrontApproximately() > > =P So, what's it do? Randomly pick a number close to the number that you give it and try to pop that many? :) - Jonathan M Davis

Re: popFrontExactly?

2012-11-23 Thread Mehrdad
On Saturday, 24 November 2012 at 06:50:43 UTC, Jonathan M Davis wrote: On Saturday, November 24, 2012 07:43:26 Mehrdad wrote: I wouldn't mind also adding a popFrontApproximately() =P So, what's it do? Randomly pick a number close to the number that you give it and try to pop that many? :)

Re: WinAPI for druntime and OpenGL for deimos.

2012-11-23 Thread Walter Bright
On 11/23/2012 5:06 PM, Vladimir Panteleev wrote: On Friday, 23 November 2012 at 21:21:49 UTC, Walter Bright wrote: On 11/23/2012 5:57 AM, Vladimir Panteleev wrote: There might be some incompatibilities, for example due to how the HANDLE type is declared. In C, you can use either 0 or NULL as a

Re: Command Line Order + Linker Errors

2012-11-23 Thread Rainer Schuetze
On 10/29/2012 9:56 PM, dsimcha wrote: I'm running into some inexplicable linker errors when trying to compile a project. I've tried two command lines to compile the project that I thought were equivalent except for the names of the output files: // emptymain.d: void main(){} // test.d: unitt