Re: DUnit: Advanced unit testing toolkit.

2013-09-29 Thread Gary Willoughby
Updated DUnit with some refactored code and started to implement a results module.

dunit 0.7.0 released

2013-09-29 Thread linkrope
https://github.com/linkrope/dunit/tree/v0.7.0 The xUnit testing framework for D is used in production for one year now. The latest changes are: - added XML test reporting in JUnitReport format - dub support - changed @Ignore to @Ignore(reason to skip the test) - added assertOp together with

Using emplace leading to memory corruption

2013-09-29 Thread d coder
Greetings I am trying to use emplace and it is seemingly leading to memory corruption. Before I file a bug on DMD Buzilla, I want to find out if I am doing something wrong or if it is a known issue. I am using a linux box and this testcase is freaky -- if I comment out either line 20 or line 24,

Re: SteamOS, games programming, and D

2013-09-29 Thread Manu
On 28 September 2013 00:43, Joseph Rushton Wakeling joseph.wakel...@webdrake.net wrote: Hello all, So, what with the new SteamOS/SteamBox announcement ... http://store.steampowered.com/**livingroom/SteamOS/http://store.steampowered.com/livingroom/SteamOS/

Re: Using emplace leading to memory corruption

2013-09-29 Thread monarch_dodra
On Sunday, 29 September 2013 at 07:03:30 UTC, d coder wrote: Greetings I am trying to use emplace and it is seemingly leading to memory corruption. Before I file a bug on DMD Buzilla, I want to find out if I am doing something wrong or if it is a known issue. I am using a linux box and this

GCD and Fedora

2013-09-29 Thread Russel Winder
For reasons I can't quite remember, I am having a period of Fedora 19 instead of Debian Unstable. This brings into sharp relief that GDC is not in RPM Fusion. It should be. Ditto DMD and LDC. Not to mention Vibe.d, etc., etc. Is anyone else interested in getting D technologies into Fedora 19 (and

Re: SteamOS, games programming, and D

2013-09-29 Thread Manu
On 29 September 2013 01:20, Benjamin Thaut c...@benjamin-thaut.de wrote: Am 28.09.2013 12:06, schrieb evilrat: On Saturday, 28 September 2013 at 08:25:22 UTC, Benjamin Thaut wrote: Am 27.09.2013 16:43, schrieb Joseph Rushton Wakeling: Also a graphical debugger is usually the base

Re: Front-end release.NEXT

2013-09-29 Thread Jacob Carlborg
On 2013-09-28 21:37, Dicebot wrote: I thought it is a temporary limitation (I am very interested in loading D plugins from C/C++ programs). Are there any fundamental issues that prevent it? It's the usual issues, which have been mentioned many times before: * Exception handling tables * TLS

Re: Using emplace leading to memory corruption

2013-09-29 Thread Andrej Mitrovic
On 9/29/13, d coder dlang.co...@gmail.com wrote: assert(size is 32); // 35 I'd file this call as a separate bug as well..

Re: Front-end release.NEXT

2013-09-29 Thread Dicebot
On Saturday, 28 September 2013 at 20:17:24 UTC, Iain Buclaw wrote: On 28 September 2013 21:02, Dicebot pub...@dicebot.lv wrote: On Saturday, 28 September 2013 at 19:53:16 UTC, Iain Buclaw wrote: I thought it is a temporary limitation (I am very interested in loading D plugins from C/C++

Re: Using emplace leading to memory corruption

2013-09-29 Thread Andrej Mitrovic
On 9/29/13, monarch_dodra monarchdo...@gmail.com wrote: Remember though that when emplacing a class over some memory, you must account for any extra alignment (though that doesn't seem to be a problem here). emplace does do a check for misalignment this internally with the testEmplaceChunk

Re: Front-end release.NEXT

2013-09-29 Thread Dicebot
On Sunday, 29 September 2013 at 09:23:16 UTC, Jacob Carlborg wrote: It's the usual issues, which have been mentioned many times before: * Exception handling tables * TLS data * GC roots * Module infos * Basically anything the runtime needs to collect from the running executable/shared

Re: GCD and Fedora

2013-09-29 Thread Dicebot
AFAIK bioinfornatics did maintain some of those but he has resigned: http://forum.dlang.org/post/iubckqnyflchqdorg...@forum.dlang.org

Re: Using emplace leading to memory corruption

2013-09-29 Thread Andrej Mitrovic
On 9/29/13, d coder dlang.co...@gmail.com wrote: _foo = emplace!(Foo)(mem); // 40 I get a more interesting stack trace if I don't assign the result to _foo: object.Error: Access Violation object.Error: Access Violation 0x0041C977

Re: SteamOS, games programming, and D

2013-09-29 Thread Mike Parker
On 9/29/2013 7:11 PM, Mike Parker wrote: On 9/29/2013 5:00 PM, Manu wrote: Reliable library bindings: OpenGL SDL OpenAL Have you tried the bindings in Derelict? The latest can be found in DerelictOrg[1]: DerelictAL, DerelictGL3 and DerelictSDL2 (which includes bindings for

Re: SteamOS, games programming, and D

2013-09-29 Thread Mike Parker
On 9/29/2013 5:00 PM, Manu wrote: Reliable library bindings: OpenGL SDL OpenAL Have you tried the bindings in Derelict? The latest can be found in DerelictOrg[1]: DerelictAL, DerelictGL3 and DerelictSDL2 (which includes bindings for SDL2_image/mixer/net/ttf). Is there anything

Re: Front-end release.NEXT

2013-09-29 Thread Iain Buclaw
On Sep 29, 2013 10:45 AM, Dicebot pub...@dicebot.lv wrote: On Saturday, 28 September 2013 at 20:17:24 UTC, Iain Buclaw wrote: On 28 September 2013 21:02, Dicebot pub...@dicebot.lv wrote: On Saturday, 28 September 2013 at 19:53:16 UTC, Iain Buclaw wrote: I thought it is a temporary

Re: GDC and Fedora

2013-09-29 Thread Russel Winder
On Sun, 2013-09-29 at 11:47 +0200, Dicebot wrote: AFAIK bioinfornatics did maintain some of those but he has resigned: http://forum.dlang.org/post/iubckqnyflchqdorg...@forum.dlang.org It would be great if the build framework for these were in Git or Mercurial repositories so that others

Re: Using emplace leading to memory corruption

2013-09-29 Thread monarch_dodra
On Sunday, 29 September 2013 at 09:46:04 UTC, Andrej Mitrovic wrote: On 9/29/13, monarch_dodra monarchdo...@gmail.com wrote: Remember though that when emplacing a class over some memory, you must account for any extra alignment (though that doesn't seem to be a problem here). emplace does

Re: Using emplace leading to memory corruption

2013-09-29 Thread monarch_dodra
On Sunday, 29 September 2013 at 08:21:34 UTC, monarch_dodra wrote: I didn't see anything obviously wrong with your code. Did some more toying around. I did notice an issue in emplace, but nothing that would explain what you are observing. By replacing your block with: //

Re: std.rational?

2013-09-29 Thread Joseph Rushton Wakeling
On 28/09/13 15:56, MrSmith wrote: This code fails: rational(0, 1) * rational(1, 1); object.Error: Integer Divide by Zero 0x00408228 in int std.rational.gcf!(int, int).gcf(int, int) at C:\rational\rational.d(878) 0x0040820A in int std.rational.gcf!(int, int).gcf(int, int) at

Re: SteamOS, games programming, and D

2013-09-29 Thread Manu
On 29 September 2013 20:11, Mike Parker aldac...@gmail.com wrote: On 9/29/2013 5:00 PM, Manu wrote: Reliable library bindings: OpenGL SDL OpenAL Have you tried the bindings in Derelict? The latest can be found in DerelictOrg[1]: DerelictAL, DerelictGL3 and DerelictSDL2 (which

Re: std.rational?

2013-09-29 Thread John Colvin
On Saturday, 28 September 2013 at 11:29:25 UTC, Dmitry Olshansky wrote: 28-Sep-2013 15:11, Joseph Rushton Wakeling пишет: On 27/09/13 20:20, Walter Bright wrote: On 9/27/2013 6:47 AM, Joseph Rushton Wakeling wrote: [...] Sounds like we have a new champion! Thanks, Joseph! I feel more like

Re: SteamOS, games programming, and D

2013-09-29 Thread Mike Parker
On 9/29/2013 8:25 PM, Manu wrote: Cool, I haven't tried them. I have my own bindings. If I were looking for those binding's, I wouldn't find them there. If they're solid, they should be extracted and put somewhere really common... which does lead me to wonder, where is that exactly? I've

Re: SteamOS, games programming, and D

2013-09-29 Thread Dicebot
On Sunday, 29 September 2013 at 11:25:33 UTC, Manu wrote: Last time I checked, there isn't even a standard D lib path in linux... I roll with /usr/include/d2/, but that doesn't seem to be a universally accepted location. In general it is up to maintainer in given distro to decide this.

Re: SteamOS, games programming, and D

2013-09-29 Thread Manu
On 29 September 2013 21:55, Mike Parker aldac...@gmail.com wrote: On 9/29/2013 8:25 PM, Manu wrote: Cool, I haven't tried them. I have my own bindings. If I were looking for those binding's, I wouldn't find them there. If they're solid, they should be extracted and put somewhere really

Re: Using emplace leading to memory corruption

2013-09-29 Thread lomereiter
You didn't tell GC that the allocated memory contains pointers to GC'd data. Therefore, it thinks that the class members can be freed, which is not the case. Adding lines import core.memory; GC.addRange(tmp, size); resolves the problem. You must also call GC.removeRange(tmp) when you will

Re: SteamOS, games programming, and D

2013-09-29 Thread Dicebot
On Sunday, 29 September 2013 at 12:18:37 UTC, Manu wrote: Where does dub put it? I think there's value in knowing that I can find C headers in /usr/include, I want that for D too. There are the two directories /var/lib/dub/ and ~/.dub/ where it installs source packages (more or less just a

Re: SteamOS, games programming, and D

2013-09-29 Thread Dicebot
P.S. I want to add that I am quite willing to collaborate with any suggestion regarding packaging that will help to make Arch Linux first class D development distro, including game dev concerns.

Re: SteamOS, games programming, and D

2013-09-29 Thread Mike Parker
On 9/29/2013 9:18 PM, Manu wrote: Okay, fair enough. So they're not intrinsically associated with Derelict in any way then? You mean DerelictGL and friends? Yes, they are. DerelictOrg is the new Derelict. I'm steadily migrating the packages from Derelict3. Once I'm done, Derelict3 will be

Re: SteamOS, games programming, and D

2013-09-29 Thread Manu
On 29 September 2013 22:38, Dicebot pub...@dicebot.lv wrote: On Sunday, 29 September 2013 at 12:18:37 UTC, Manu wrote: Where does dub put it? I think there's value in knowing that I can find C headers in /usr/include, I want that for D too. There are the two directories /var/lib/dub/ and

Re: Using emplace leading to memory corruption

2013-09-29 Thread Andrei Alexandrescu
On 9/29/13 5:29 AM, lomereiter wrote: You didn't tell GC that the allocated memory contains pointers to GC'd data. Therefore, it thinks that the class members can be freed, which is not the case. Adding lines import core.memory; GC.addRange(tmp, size); resolves the problem. You must also call

Re: SteamOS, games programming, and D

2013-09-29 Thread Dicebot
On Sunday, 29 September 2013 at 12:57:43 UTC, Manu wrote: Sure, it'd be /usr/local/include for dub packages. It'd be nice to see D libs end up in the package manager at some time in the future... incorporated into -dev packages? /var/lib is standard path for such internal package data and,

Re: SteamOS, games programming, and D

2013-09-29 Thread David Nadlinger
On Sunday, 29 September 2013 at 13:04:24 UTC, Dicebot wrote: Having dub itself in repos is very important though (btw https://aur.archlinux.org/packages/dub/ lacks 3 votes for inclusion ;)) 2. ;) David

Re: Using emplace leading to memory corruption

2013-09-29 Thread d coder
I tried that and it still crashes. I don't think that's the problem. Puneet, the code looks legit, please file a bug report. Thanks for confirming. http://d.puremagic.com/issues/show_bug.cgi?id=11139 Regards - Puneet

Re: SteamOS, games programming, and D

2013-09-29 Thread Vova616
I'm new to D and I found Derelict pretty fast and already got a small working demo, also using dub is awesome. MonoD and VisualD are good, could be better though. Debugging is ok but I'm used to println/logging so I don't care. I had hard time compiling ldc (windows) but we are talking about

Re: std.rational?

2013-09-29 Thread MrSmith
use -debug -gc

Re: review queue: next?

2013-09-29 Thread ilya-stromberg
On Wednesday, 11 September 2013 at 09:14:59 UTC, Robert Schadek wrote: On 09/10/2013 03:45 PM, Dicebot wrote: done and done (the design of my logger is based on what I distilled from the old discussion) Thanks! You will be next after Brian then (pardon me for wanting std.d.lexer so much

Re: review queue: next?

2013-09-29 Thread Dicebot
On Sunday, 29 September 2013 at 14:58:17 UTC, ilya-stromberg wrote: It looks like we finished review of std.d.lexer. Do you have any plans to start review for Robert Schadek's std.logger? Brian has made several quick fixes/modifications and I am expecting that either second review or final

Re: [RFC] - mysql-native rewrite

2013-09-29 Thread Gary Willoughby
On Saturday, 28 September 2013 at 16:39:27 UTC, simendsjo wrote: I'm very uncertain about several aspects of my design: * Class vs. struct * Returned values from MySQL - e.g. should SELECT TRUE return long as it does in MySQL, or should we interpret it as bool * Probably a lot I don't remember

Re: [RFC] - mysql-native rewrite

2013-09-29 Thread simendsjo
On Sunday, 29 September 2013 at 15:26:19 UTC, Gary Willoughby wrote: On Saturday, 28 September 2013 at 16:39:27 UTC, simendsjo wrote: I'm very uncertain about several aspects of my design: * Class vs. struct * Returned values from MySQL - e.g. should SELECT TRUE return long as it does in

Re: Front-end release.NEXT

2013-09-29 Thread Jacob Carlborg
On 2013-09-29 12:25, Iain Buclaw wrote: - Though I can't be sure because I don't know what it is actually doing other than creating some custom bracketed segment (Really??? Is this truly necessary? That's about as useful as having a separate calling convention just for one language. Oh

Re: SteamOS, games programming, and D

2013-09-29 Thread evilrat
On Sunday, 29 September 2013 at 14:30:29 UTC, Vova616 wrote: Overall I like D more than C#/Go/C++ when game developing. I think a library like XNA/SFML/Cocos2d/etc would bring some game developers to D. but sfml is available within derelict, and there is also sdl and glfw. o_O

Re: SteamOS, games programming, and D

2013-09-29 Thread Vova616
On Sunday, 29 September 2013 at 16:40:48 UTC, evilrat wrote: On Sunday, 29 September 2013 at 14:30:29 UTC, Vova616 wrote: Overall I like D more than C#/Go/C++ when game developing. I think a library like XNA/SFML/Cocos2d/etc would bring some game developers to D. but sfml is available

Re: Front-end release.NEXT

2013-09-29 Thread Iain Buclaw
On 29 September 2013 17:28, Jacob Carlborg d...@me.com wrote: On 2013-09-29 12:25, Iain Buclaw wrote: - Though I can't be sure because I don't know what it is actually doing other than creating some custom bracketed segment (Really??? Is this truly necessary? That's about as useful as having

Re: SteamOS, games programming, and D

2013-09-29 Thread Dicebot
On Sunday, 29 September 2013 at 13:20:49 UTC, David Nadlinger wrote: On Sunday, 29 September 2013 at 13:04:24 UTC, Dicebot wrote: Having dub itself in repos is very important though (btw https://aur.archlinux.org/packages/dub/ lacks 3 votes for inclusion ;)) 2. ;) David 11 total now ^_^

Re: [RFC] - mysql-native rewrite

2013-09-29 Thread Gary Willoughby
On Sunday, 29 September 2013 at 15:42:10 UTC, simendsjo wrote: I don't think it's that simple in this case. When I implement lazy fetching, both methods have it's advantages and disadvantages. MySQL doesn't allow multiplexing on a connection. This means a command must complete before issuing

Re: Front-end release.NEXT

2013-09-29 Thread Joseph Rushton Wakeling
On 29/09/13 12:25, Iain Buclaw wrote: Not following dmd's way of doing things is nothing new however... I don't understand why the solution wasn't (or couldn't be) designed from the start to work with all three D compilers. Can anyone offer an explanation?

Re: std.rational?

2013-09-29 Thread Joseph Rushton Wakeling
On 29/09/13 16:46, MrSmith wrote: use -debug -gc Nope, I still get just the floating point exception message.

Re: std.rational?

2013-09-29 Thread Joseph Rushton Wakeling
On Saturday, 28 September 2013 at 11:11:33 UTC, Joseph Rushton Wakeling wrote: On 27/09/13 20:20, Walter Bright wrote: On 9/27/2013 6:47 AM, Joseph Rushton Wakeling wrote: [...] Sounds like we have a new champion! Thanks, Joseph! I feel more like a cheerleader than a champion -- David did

Re: std.rational?

2013-09-29 Thread Walter Bright
On 9/28/2013 4:11 AM, Joseph Rushton Wakeling wrote: On 27/09/13 20:20, Walter Bright wrote: On 9/27/2013 6:47 AM, Joseph Rushton Wakeling wrote: [...] Sounds like we have a new champion! Thanks, Joseph! I feel more like a cheerleader than a champion -- David did all the hard work! ;-)

Re: SteamOS, games programming, and D

2013-09-29 Thread Joseph Rushton Wakeling
On Saturday, 28 September 2013 at 13:27:16 UTC, Paulo Pinto wrote: Am 28.09.2013 15:22, schrieb deadalnix: On Friday, 27 September 2013 at 15:36:28 UTC, Joseph Rushton Wakeling wrote: On 27/09/13 17:27, Paulo Pinto wrote: Be better than Unity. I take it you mean Unity3D the game engine,

Re: std.rational?

2013-09-29 Thread Andrei Alexandrescu
On 9/29/13 11:44 AM, Joseph Rushton Wakeling wrote: On Saturday, 28 September 2013 at 11:11:33 UTC, Joseph Rushton Wakeling wrote: On 27/09/13 20:20, Walter Bright wrote: On 9/27/2013 6:47 AM, Joseph Rushton Wakeling wrote: [...] Sounds like we have a new champion! Thanks, Joseph! I feel

Re: std.rational?

2013-09-29 Thread Andrej Mitrovic
On 9/29/13, Joseph Rushton Wakeling joseph.wakel...@webdrake.net wrote: Slightly bad news -- today I slipped and fell quite heavily on my right shoulder. The hospital tells me there's nothing wrong that a couple of days' ice + painkillers won't fix, but proper two-handed typing is a bit

Re: SteamOS, games programming, and D

2013-09-29 Thread Dicebot
On Sunday, 29 September 2013 at 18:48:52 UTC, Joseph Rushton Wakeling wrote: You're missing a bit of history here. Deadalnix is The Only Person In The Universe Who Genuinely Likes Gnome 3.0. I am The Only Person In The Universe Who Genuinely Likes Unity. He is not alone ;)

Re: std.rational?

2013-09-29 Thread John Colvin
On Sunday, 29 September 2013 at 18:44:08 UTC, Joseph Rushton Wakeling wrote: On Saturday, 28 September 2013 at 11:11:33 UTC, Joseph Rushton Wakeling wrote: On 27/09/13 20:20, Walter Bright wrote: On 9/27/2013 6:47 AM, Joseph Rushton Wakeling wrote: [...] Sounds like we have a new champion!

Re: Front-end release.NEXT

2013-09-29 Thread Jacob Carlborg
On 2013-09-29 19:57, Joseph Rushton Wakeling wrote: I don't understand why the solution wasn't (or couldn't be) designed from the start to work with all three D compilers. Can anyone offer an explanation? I think Walter picked an easy solution that he know would work. I don't think he knew

Re: Front-end release.NEXT

2013-09-29 Thread Iain Buclaw
On 29 September 2013 20:12, Jacob Carlborg d...@me.com wrote: On 2013-09-29 19:57, Joseph Rushton Wakeling wrote: I don't understand why the solution wasn't (or couldn't be) designed from the start to work with all three D compilers. Can anyone offer an explanation? I think Walter picked

Re: Front-end release.NEXT

2013-09-29 Thread Iain Buclaw
On 29 September 2013 18:57, Joseph Rushton Wakeling joseph.wakel...@webdrake.net wrote: On 29/09/13 12:25, Iain Buclaw wrote: Not following dmd's way of doing things is nothing new however... I don't understand why the solution wasn't (or couldn't be) designed from the start to work with

Re: std.rational?

2013-09-29 Thread MrSmith
On Sunday, 29 September 2013 at 17:59:23 UTC, Joseph Rushton Wakeling wrote: On 29/09/13 16:46, MrSmith wrote: use -debug -gc Nope, I still get just the floating point exception message. I've used for this compilation the following command: dmd -property -debug -gc rational.d test.d

Re: std.rational?

2013-09-29 Thread John Colvin
On Sunday, 29 September 2013 at 11:03:46 UTC, Joseph Rushton Wakeling wrote: On 28/09/13 15:56, MrSmith wrote: This code fails: rational(0, 1) * rational(1, 1); object.Error: Integer Divide by Zero 0x00408228 in int std.rational.gcf!(int, int).gcf(int, int) at

Re: std.rational?

2013-09-29 Thread John Colvin
On Sunday, 29 September 2013 at 21:14:09 UTC, John Colvin wrote: On Sunday, 29 September 2013 at 11:03:46 UTC, Joseph Rushton Wakeling wrote: On 28/09/13 15:56, MrSmith wrote: This code fails: rational(0, 1) * rational(1, 1); object.Error: Integer Divide by Zero 0x00408228

Can we please kill the hyphenator already?

2013-09-29 Thread Andrej Mitrovic
We're literally having new people coming in to IRC every day saying they can't read the D documentation because of hyphenator completely blocking the website (before the browser forces it to stop loading). If Andrei still wants it in, fine, but re-add it **later** once it's fixed or implemented

Re: Front-end release.NEXT

2013-09-29 Thread David Nadlinger
On Sunday, 29 September 2013 at 19:24:40 UTC, Iain Buclaw wrote: My biggest pet peeve is probably how dmd treats va_arg a totally inconsistent way across each platform dmd supports. In comparison gdc handles va_arg in one way, and it is identical across each platform supported (and platforms

Re: std.rational?

2013-09-29 Thread H. S. Teoh
On Sat, Sep 28, 2013 at 03:56:26PM +0200, MrSmith wrote: This code fails: rational(0, 1) * rational(1, 1); object.Error: Integer Divide by Zero [...] https://github.com/WebDrake/Rational/pull/1 T -- Bare foot: (n.) A device for locating thumb tacks on the floor.

Re: Can we please kill the hyphenator already?

2013-09-29 Thread H. S. Teoh
On Sun, Sep 29, 2013 at 11:59:48PM +0200, Andrej Mitrovic wrote: We're literally having new people coming in to IRC every day saying they can't read the D documentation because of hyphenator completely blocking the website (before the browser forces it to stop loading). If Andrei still wants

Re: Can we please kill the hyphenator already?

2013-09-29 Thread Dicebot
On Sunday, 29 September 2013 at 22:25:03 UTC, H. S. Teoh wrote: Wait, didn't somebody already merge the pull to kill off the hyphenator? Did it get re-introduced unilaterally without discussion? T Did web-site actually get updated since that pull?

Re: Can we please kill the hyphenator already?

2013-09-29 Thread Kiith-Sa
On Sunday, 29 September 2013 at 22:00:02 UTC, Andrej Mitrovic wrote: We're literally having new people coming in to IRC every day saying they can't read the D documentation because of hyphenator completely blocking the website (before the browser forces it to stop loading). If Andrei still

Re: Can we please kill the hyphenator already?

2013-09-29 Thread H. S. Teoh
On Mon, Sep 30, 2013 at 12:29:20AM +0200, Dicebot wrote: On Sunday, 29 September 2013 at 22:25:03 UTC, H. S. Teoh wrote: Wait, didn't somebody already merge the pull to kill off the hyphenator? Did it get re-introduced unilaterally without discussion? T Did web-site actually get updated

Re: Can we please kill the hyphenator already?

2013-09-29 Thread Andrei Alexandrescu
On 9/29/13 3:23 PM, H. S. Teoh wrote: On Sun, Sep 29, 2013 at 11:59:48PM +0200, Andrej Mitrovic wrote: We're literally having new people coming in to IRC every day saying they can't read the D documentation because of hyphenator completely blocking the website (before the browser forces it to

ctrl+c and destructors

2013-09-29 Thread Adam D. Ruppe
Is there anything we can do to automatically clean up if the user hits ctrl+c on Linux? I just had my system get messed up because I was allocating shared memory with the X server, which was released in the destructor... but that never got called because I killed the program with ctrl+c.

Re: ctrl+c and destructors

2013-09-29 Thread H. S. Teoh
On Mon, Sep 30, 2013 at 03:48:07AM +0200, Adam D. Ruppe wrote: Is there anything we can do to automatically clean up if the user hits ctrl+c on Linux? I just had my system get messed up because I was allocating shared memory with the X server, which was released in the destructor... but

Re: Can we please kill the hyphenator already?

2013-09-29 Thread Andrei Alexandrescu
On 9/29/13 4:02 PM, H. S. Teoh wrote: On Mon, Sep 30, 2013 at 12:29:20AM +0200, Dicebot wrote: On Sunday, 29 September 2013 at 22:25:03 UTC, H. S. Teoh wrote: Wait, didn't somebody already merge the pull to kill off the hyphenator? Did it get re-introduced unilaterally without discussion? T

algorithm API design question

2013-09-29 Thread Andrei Alexandrescu
I need a function that finds a run of length k of elements equal to x in a range r, and I presume such a simple yet nontrivial algorithm (a dozen-liner) should be part of std.algorithm. This raises an interesting question - what form should the API have. I see three options: 1. The existing

Re: John Carmack on Eclipse performance

2013-09-29 Thread Ziad Hatahet
On Fri, Sep 27, 2013 at 5:50 AM, PauloPinto pj...@progtools.org wrote: Doom, http://www.youtube.com/watch?**v=1PhArSujR_Ahttp://www.youtube.com/watch?v=1PhArSujR_A I thought it was Wolfenstein 3D

Re: Can we please kill the hyphenator already?

2013-09-29 Thread Jonathan M Davis
On Monday, September 30, 2013 00:29:20 Dicebot wrote: On Sunday, 29 September 2013 at 22:25:03 UTC, H. S. Teoh wrote: Wait, didn't somebody already merge the pull to kill off the hyphenator? Yes, I merged it. Did web-site actually get updated since that pull? I don't think so. IIRC, it's

Re: SteamOS, games programming, and D

2013-09-29 Thread Jonathan M Davis
On Sunday, September 29, 2013 21:02:33 Dicebot wrote: On Sunday, 29 September 2013 at 18:48:52 UTC, Joseph Rushton Wakeling wrote: You're missing a bit of history here. Deadalnix is The Only Person In The Universe Who Genuinely Likes Gnome 3.0. I am The Only Person In The Universe Who

Re: SteamOS, games programming, and D

2013-09-29 Thread evilrat
On Monday, 30 September 2013 at 04:40:41 UTC, Jonathan M Davis wrote: On Sunday, September 29, 2013 21:02:33 Dicebot wrote: On Sunday, 29 September 2013 at 18:48:52 UTC, Joseph Rushton Wakeling wrote: You're missing a bit of history here. Deadalnix is The Only Person In The Universe Who

Re: SteamOS, games programming, and D

2013-09-29 Thread Nick Sabalausky
On Mon, 30 Sep 2013 06:46:31 +0200 evilrat evilrat...@gmail.com wrote: On Monday, 30 September 2013 at 04:40:41 UTC, Jonathan M Davis wrote: On Sunday, September 29, 2013 21:02:33 Dicebot wrote: On Sunday, 29 September 2013 at 18:48:52 UTC, Joseph Rushton Wakeling wrote: You're

Learning D - first steps and best practices

2013-09-29 Thread Stefan Larsson
Hello, I have started my journey to learn D after using C/C++ and Python for many years. I am studying the book The D-Programming Language by Andrei Alexandrescu and I have tried to search the D-newsgroups for proper advice without success and I am humbly seeking enlightenment in the

Re: Learning D - first steps and best practices

2013-09-29 Thread Jonathan M Davis
On Sunday, September 29, 2013 09:13:26 Stefan Larsson wrote: Hello, I have started my journey to learn D after using C/C++ and Python for many years. I am studying the book The D-Programming Language by Andrei Alexandrescu and I have tried to search the D-newsgroups for proper advice

Re: Learning D - first steps and best practices

2013-09-29 Thread Michael
http://dlang.org/dstyle.html ))) DUB like other tools have a standard directory layout to accelerate a build process/configuration. DStyle and other guide lines are general recommendations only. If you have better style/case, you can describe and use it.

Phobos - pure, const, safe, nothrow

2013-09-29 Thread simendsjo
What is the status of adding these annotations to phobos? It's difficult to use these until phobos gets them. E.g. to! and format is not pure.

Re: Phobos - pure, const, safe, nothrow

2013-09-29 Thread monarch_dodra
On Sunday, 29 September 2013 at 09:00:56 UTC, simendsjo wrote: What is the status of adding these annotations to phobos? It's difficult to use these until phobos gets them. E.g. to! and format is not pure. Most of phobos is templated, meaning it relies on inference. These functions are

Re: Learning D - first steps and best practices

2013-09-29 Thread Stefan Larsson
On 2013-09-29 07:49:08 +, Jonathan M Davis said: On Sunday, September 29, 2013 09:13:26 Stefan Larsson wrote: Hello, I have started my journey to learn D after using C/C++ and Python for many years. I am studying the book The D-Programming Language by Andrei Alexandrescu and I have tried

Re: dmd -D == ouch!!

2013-09-29 Thread Joseph Rushton Wakeling
On 28/09/13 15:38, Damien wrote: From The D Programming Language by Andrei Alexandrescu: If you forget about --main, don't worry; the linker will fluently and baroquely remind you of that in its native language, encrypted Klingon. If you ever forget why we all love Andrei, a quick read of his

Re: Linking Trouble (Linux)

2013-09-29 Thread 1100110
https://xkcd.com/979/ Please. You are somebodies hero.

'pp' for D?

2013-09-29 Thread linkrope
I want to pretty-print the representation of a value of a generic type T. In Ruby, I would use 'pp': value = 'hello' pp value # prints hello - with quotes! value = 42 pp value # prints 42 Now, value.to!string eliminates the quotes, should value be of type string. As a

Re: Server is not active?

2013-09-29 Thread ollie
On Sun, 29 Sep 2013 03:47:27 +0200, wagtail wrote: When my server and client are on the same machine,these succeed. If I try communicating with other machine via global network,it do not work. IP of my server which you say above should set to server side? When you instantiate your

Struct literals bug ?

2013-09-29 Thread andrea9940
I think that I found a bug in the initialization of a struct. This program throws a.v.y != 0 but all assert should pass... (I'm using the latest dmd version available) Code: http://pastebin.com/VHQP8DaE

Re: Struct literals bug ?

2013-09-29 Thread John Colvin
On Sunday, 29 September 2013 at 16:36:22 UTC, andrea9940 wrote: I think that I found a bug in the initialization of a struct. This program throws a.v.y != 0 but all assert should pass... (I'm using the latest dmd version available) Code: http://pastebin.com/VHQP8DaE I'm not sure what the

Re: Struct literals bug ?

2013-09-29 Thread andrea9940
Thanks for the answer, I will use the aliases; however I just tried my code on codepad and surprising it worked without errors http://codepad.org/hp0YxIi7

Re: Struct literals bug ?

2013-09-29 Thread monarch_dodra
On Sunday, 29 September 2013 at 17:35:33 UTC, andrea9940 wrote: Thanks for the answer, I will use the aliases; however I just tried my code on codepad and surprising it worked without errors http://codepad.org/hp0YxIi7 I think there is a bug in there somewhere though: // struct V{

Re: 'pp' for D?

2013-09-29 Thread monarch_dodra
On Sunday, 29 September 2013 at 14:31:15 UTC, linkrope wrote: As a workaround, I put the value into an array to make use of the undocumented function formatElement: %(%s%).format([value]) That seems excessive. What happened to format(`%s`, s) or format(\%s\, s) or text('', s, '')?

Re: Struct literals bug ?

2013-09-29 Thread John Colvin
On Sunday, 29 September 2013 at 18:01:01 UTC, monarch_dodra wrote: On Sunday, 29 September 2013 at 17:35:33 UTC, andrea9940 wrote: Thanks for the answer, I will use the aliases; however I just tried my code on codepad and surprising it worked without errors http://codepad.org/hp0YxIi7 I

Re: ieeeFlags are not getting set.

2013-09-29 Thread Manfred Nowak
Damien wrote: is not a D bug I cannot reproduce your problem. Giving 10^38 and 10 as parameters the lol is output correctly. -manfred

Trouble creating bidirectional range

2013-09-29 Thread Martin Drasar
Hi, I have upgraded to dmd 2.063.2 and have some troubles making my custom bidirectional range work (it used to). In fact, even this code fails on assert and I am not really sure why... import std.range; struct MyRange(T) { private: T[] data; public: T front() @property { return

Re: Trouble creating bidirectional range

2013-09-29 Thread Andrej Mitrovic
On Sunday, 29 September 2013 at 20:37:13 UTC, Martin Drasar wrote: static assert(is(typeof(tmp.save) == MyRange!string)); You should call it like this: static assert(is(typeof(tmp.save()) == MyRange!string));

Re: Trouble creating bidirectional range

2013-09-29 Thread Andrej Mitrovic
On Sunday, 29 September 2013 at 20:42:20 UTC, Andrej Mitrovic wrote: On Sunday, 29 September 2013 at 20:37:13 UTC, Martin Drasar wrote: static assert(is(typeof(tmp.save) == MyRange!string)); You should call it like this: static assert(is(typeof(tmp.save()) == MyRange!string)); Btw, as for

Re: Trouble creating bidirectional range

2013-09-29 Thread Martin Drasar
On 29.9.2013 22:45, Andrej Mitrovic wrote: On Sunday, 29 September 2013 at 20:42:20 UTC, Andrej Mitrovic wrote: On Sunday, 29 September 2013 at 20:37:13 UTC, Martin Drasar wrote: static assert(is(typeof(tmp.save) == MyRange!string)); You should call it like this: static

  1   2   >