Re: Daemonize v0.1 - simple way to create cross-platform daemons

2014-09-27 Thread NCrashed via Digitalmars-d-announce
On Saturday, 27 September 2014 at 03:49:31 UTC, Andrei Alexandrescu wrote: On 8/31/14, 4:27 AM, NCrashed wrote: Finally I've finished library for wrapping applications into daemons or services (Windows). The library hides platform-specific boilerplate behind compile-time API: [snip] I

Re: Mono-D v2.4.9 - Parser fixes

2014-09-27 Thread Piotrek via Digitalmars-d-announce
On Friday, 26 September 2014 at 07:12:23 UTC, Alexander Bothe wrote: On Thursday, 25 September 2014 at 22:02:14 UTC, Piotrek wrote: I was shocked how smoothly Mono-D works compared to DDT. Well maybe, but there's a lot of performance improvement required -- just open std.traits and see what

Re: Daemonize v0.1 - simple way to create cross-platform daemons

2014-09-27 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 9/27/14, 2:23 AM, NCrashed wrote: On Saturday, 27 September 2014 at 03:49:31 UTC, Andrei Alexandrescu wrote: On 8/31/14, 4:27 AM, NCrashed wrote: Finally I've finished library for wrapping applications into daemons or services (Windows). The library hides platform-specific boilerplate

Re: Read-only property without @property

2014-09-27 Thread Daniel Murphy via Digitalmars-d
H. S. Teoh via Digitalmars-d wrote in message news:mailman.1799.1411796077.5783.digitalmar...@puremagic.com... Argh, looks like another incompletely-implemented part of the compiler: void fun() @safe { union U { int p; int* q; } U u; u.p++; // compiles u.q = null; // compiles *u.q++; //

Re: What's blocking DDMD?

2014-09-27 Thread Daniel Murphy via Digitalmars-d
Tourist wrote in message news:ccumfjjyzzjvlfjmy...@forum.dlang.org... Just windows left now. Cool. Is there an open ticket for Windows? Nope.

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-27 Thread Foo via Digitalmars-d
Consider: struct MyRefCounted void opInc(); void opDec(); int x; } MyRefCounted a; a.x = 42; MyRefCounted b = a; b.x = 43; What is a.x after this? Andrei a.x == 42 a.ref_count == 1 (1 for init, +1 for copy, -1 for destruction) b.x == 43 b.ref_count == 1 (only init)

Re: D mention on developer.apple.com

2014-09-27 Thread ponce via Digitalmars-d
On Friday, 26 September 2014 at 18:29:15 UTC, David Gileadi wrote: On 9/26/14, 11:25 AM, Walter Bright wrote: I see the Apple blog did mention D. A glorious exception! Which is odd because Swift doesn't support exception handling :) From what I got on release Swift is quite odd: - regular

Re: [Semi OT] Language for Game Development talk

2014-09-27 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-27 02:47, Manu via Digitalmars-d wrote: Initialisation logic often looks like this, and I buy the value of exceptions in this case. However, I've never successfully implemented it yet though, because the calls that create code like that always seem to be extern-C calls in my

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-27 Thread Dmitry Olshansky via Digitalmars-d
27-Sep-2014 02:51, Andrei Alexandrescu пишет: On 9/26/14, 2:50 PM, Dmitry Olshansky wrote: 24-Sep-2014 18:55, Andrei Alexandrescu пишет: On 9/24/14, 3:31 AM, Dmitry Olshansky wrote: 23-Sep-2014 19:13, Andrei Alexandrescu пишет: On 9/23/14, 12:17 AM, Dmitry Olshansky wrote: In my imagination

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-27 Thread Dmitry Olshansky via Digitalmars-d
27-Sep-2014 12:11, Foo пишет: Consider: struct MyRefCounted void opInc(); void opDec(); int x; } MyRefCounted a; a.x = 42; MyRefCounted b = a; b.x = 43; What is a.x after this? Andrei a.x == 42 a.ref_count == 1 (1 for init, +1 for copy, -1 for destruction) b.x == 43

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-27 Thread Dmitry Olshansky via Digitalmars-d
25-Sep-2014 17:31, Ola Fosheim Grostad пишет: On Monday, 22 September 2014 at 19:58:31 UTC, Dmitry Olshansky wrote: 22-Sep-2014 13:45, Ola Fosheim Grostad пишет: Locking fibers to threads will cost you more than using threadsafe features. One 300ms request can then starve waiting fibers even

Re: Any libunwind experts n da house?

2014-09-27 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-23 19:37, Andrei Alexandrescu wrote: We need a libunwind expert to figure out a good approach for handling exceptions thrown by C++ code into D. BTW, are you only interested in handling C++ exception, or are you interested in handling D exceptions in C++ as well? One ugly hack is

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-27 Thread Dmitry Olshansky via Digitalmars-d
26-Sep-2014 06:49, Ola Fosheim Grostad пишет: Analysis of Go growth / usage. http://redmonk.com/dberkholz/2014/03/18/go-the-emerging-language-of-cloud-infrastructure/ Google was popular last time I heard, so does their language. -- Dmitry Olshansky

Re: D mention on developer.apple.com

2014-09-27 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-27 11:05, ponce wrote: - and no exceptions, just because The Objective-C frameworks by Apple basically never throw exceptions. -- /Jacob Carlborg

Re: [Semi OT] Language for Game Development talk

2014-09-27 Thread via Digitalmars-d
On Friday, 26 September 2014 at 21:19:29 UTC, Walter Bright wrote: I would. The whole point of destructors is to automatically clean up resources when the object goes away, which was (later) dubbed RAII. Yeah, but RAII takes it to the extreme where you create dummy classes that only consist

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-27 Thread via Digitalmars-d
On Saturday, 27 September 2014 at 09:38:35 UTC, Dmitry Olshansky wrote: As usual, structs are value types, so this feature can be mis-used, no two thoughts abouts it. It may need a bit of improvement in user-friendliness, compiler may help there by auto-detecting common misuse. Theoretically

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-27 Thread via Digitalmars-d
On Saturday, 27 September 2014 at 10:23:20 UTC, Marc Schütz wrote: On the other hand, foo() and bar() could want to make copies of the refcounted variable. In this case, we still wouldn't need an inc/dec, but we need a way to express that. The solution is another alias-this-ed method that

Re: Announcing libasync, a cross-platform D event loop

2014-09-27 Thread Dmitry Olshansky via Digitalmars-d
24-Sep-2014 17:13, Etienne пишет: It's finally here: https://github.com/etcimon/libasync We all know how event loops are the foundation of more popular libraries Qt and Nodejs.. we now have a natively compiling async library entirely written in D. This event library was tested on Win32, Linux

Re: Feedback Wanted on Homegrown @nogc WriteLn Alternative

2014-09-27 Thread Andrej Mitrovic via Digitalmars-d
On 9/27/14, H. S. Teoh via Digitalmars-d digitalmars-d@puremagic.com wrote: writefln!...format string here(... /* arguments here */); Mmm, I like this. It would be one of those killer little features to show in a talk. Slide 1: // oops, forgot an %s writefln(%s %s, 1, 2, 3); Slide 2: //

Re: D mention on developer.apple.com

2014-09-27 Thread Michel Fortin via Digitalmars-d
On 2014-09-27 10:02:59 +, Jacob Carlborg d...@me.com said: On 2014-09-27 11:05, ponce wrote: - and no exceptions, just because The Objective-C frameworks by Apple basically never throw exceptions. There's that. Also, remember Walter's fear of ARC in D that would be bloating the

Re: Any libunwind experts n da house?

2014-09-27 Thread IgorStepanov via Digitalmars-d
On Saturday, 27 September 2014 at 09:53:37 UTC, Jacob Carlborg wrote: On 2014-09-23 19:37, Andrei Alexandrescu wrote: We need a libunwind expert to figure out a good approach for handling exceptions thrown by C++ code into D. BTW, are you only interested in handling C++ exception, or are

Re: User-defined opIs

2014-09-27 Thread Marco Leise via Digitalmars-d
I'm against overloading identity checking, too. Instead I would propose to change its definition to make Proxy structs work. The rules are currently: For class objects, identity is defined as the object references are for the same object. Null class objects can be compared with is. For

DMD 2.066 phobos looks broken too... (Was druntime)

2014-09-27 Thread Iain Buclaw via Digitalmars-d
On 26 September 2014 01:32, Martin Nowak via Digitalmars-d digitalmars-d@puremagic.com wrote: On 09/24/2014 11:35 PM, Iain Buclaw via Digitalmars-d wrote: Bonus points, D inline assembly in a nothrow function. Marking asm as throwing by default doesn't make too much sense IMO, because it's

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-27 Thread Dmitry Olshansky via Digitalmars-d
27-Sep-2014 14:23, Marc Schütz schue...@gmx.net пишет: On Saturday, 27 September 2014 at 09:38:35 UTC, Dmitry Olshansky wrote: The good thing w.r.t. to memory about structs - they are themselves already allocated somewhere, and it's only ref-counted payload that is allocated and destroyed in

Dlls on Windows?

2014-09-27 Thread andre via Digitalmars-d
Hi, As far as I know there are some issues with dlls on Windows (D dlls used in D applications) in contrast to linux.There are some (unfinished) pull requests, and some ideas. It would be great if You can give an update on this topic. Maybe the Wiki page for Dlls on Windows can be updated with

Re: What's blocking DDMD?

2014-09-27 Thread Trass3r via Digitalmars-d
https://auto-tester.puremagic.com/?projectid=10 Just windows left now. Looks like a dash is missing? ofmagicport\magicport2.exe magicport\magicport2.d magicport\ast.d magicport\scanner.d magicport\tokens.d magicport\parser.d magicport\dprinter.d magicport\typenames.d magicport\visitor.d

Why this UDP will not compile?

2014-09-27 Thread d coder via Digitalmars-d
DMD wont compile this. I get an error saying: /tmp/test.d(3): Error: need 'this' for 'foo' of type 'int' Failed: [dmd, -v, -o-, /tmp/test.d, -I/tmp] Is this a bug or is it illegal code? // Regards // Cherry class Foo { int foo = 42; @foo int bar; this(int frop) { foo = frop; } int

Re: [Semi OT] Language for Game Development talk

2014-09-27 Thread Paulo Pinto via Digitalmars-d
Am 26.09.2014 23:32, schrieb Ola Fosheim Grøstad ola.fosheim.grostad+dl...@gmail.com: On Friday, 26 September 2014 at 20:48:20 UTC, Paulo Pinto wrote: I started coding C++ on MS-DOS in 1993 with Turbo C++ 1.0 all the way up to Turbo C++ 1.5 for Windows 3.x. Also used Borland C++ occasionally.

Re: What's blocking DDMD?

2014-09-27 Thread Daniel Murphy via Digitalmars-d
Trass3r wrote in message news:fturaeslxjggkucpr...@forum.dlang.org... Looks like a dash is missing? ofmagicport\magicport2.exe magicport\magicport2.d magicport\ast.d magicport\scanner.d magicport\tokens.d magicport\parser.d magicport\dprinter.d magicport\typenames.d magicport\visitor.d

Re: [Semi OT] Language for Game Development talk

2014-09-27 Thread Sean Kelly via Digitalmars-d
On Saturday, 27 September 2014 at 09:32:19 UTC, Jacob Carlborg wrote: On 2014-09-27 02:47, Manu via Digitalmars-d wrote: Initialisation logic often looks like this, and I buy the value of exceptions in this case. However, I've never successfully implemented it yet though, because the calls

Re: [Semi OT] Language for Game Development talk

2014-09-27 Thread ponce via Digitalmars-d
On Friday, 19 September 2014 at 23:47:06 UTC, Max Klyga wrote: Jonathan Blow just recorded a talk about the needs and ideas for a programming language for game developer. https://www.youtube.com/watch?v=TH9VCN6UkyQ This talk mentions D quite a lot of times. D is mentioned as the most probable

Re: Announcing libasync, a cross-platform D event loop

2014-09-27 Thread Etienne via Digitalmars-d
On 2014-09-27 12:25 AM, Adam Wilson wrote: You mentioned Botan. I already have a C++ = D Wrapper project going over here: https://github.com/ellipticbit/titanium I am working out a bug where the memory corrupts itself when passing data back to D but it works and most of the leg-work is done.

issues.dlang.org is down

2014-09-27 Thread H. S. Teoh via Digitalmars-d
Noticed that this morning, and Ilya noticed that too. Just a quick notice in case whoever the maintainer is, isn't aware of it yet (though he's probably already on it). Here's the error message: Software error: Can't

Re: Announcing libasync, a cross-platform D event loop

2014-09-27 Thread Joakim via Digitalmars-d
On Saturday, 27 September 2014 at 17:06:53 UTC, Etienne wrote: On 2014-09-27 12:25 AM, Adam Wilson wrote: You mentioned Botan. I already have a C++ = D Wrapper project going over here: https://github.com/ellipticbit/titanium I am working out a bug where the memory corrupts itself when

Re: Announcing libasync, a cross-platform D event loop

2014-09-27 Thread Etienne via Digitalmars-d
On 2014-09-27 2:07 PM, Joakim wrote: How long do you think that's going to take? What do you plan to do about ongoing C++ patches added to the original C++ botan version? Maybe developing something like Daniel Murphy's DDMD magicport for botan would save you some time from doing it all

Re: Announcing libasync, a cross-platform D event loop

2014-09-27 Thread Etienne via Digitalmars-d
On 2014-09-27 2:13 PM, Etienne wrote: engine (I have an ASN1 library in the works as well). It's nearly finished, it will allow BER/DER serialization to take place from UDAs and native types at compile-time: https://github.com/globecsys/asn1.d

Re: issues.dlang.org is down

2014-09-27 Thread Brad Roberts via Digitalmars-d
Bugzilla and the auto-tester are back up now. There was a reboot of the system last night (which I expected), but the drive with the mysql db didn't mount properly (which I did not expect). That's fixed now and shouldn't happen again next time the system is rebooted. Sorry about the down

Re: Any libunwind experts n da house?

2014-09-27 Thread Jacob Carlborg via Digitalmars-d
On Saturday, 27 September 2014 at 11:34:32 UTC, IgorStepanov wrote: C++ exception mechanism uses C++ type_info objects. We can inherit object.Throwable from std::exception (through extern(C++) interface), override the what() method, but there are no way to generate C++ type_info for D class

Re: issues.dlang.org is down

2014-09-27 Thread Tourist via Digitalmars-d
On Saturday, 27 September 2014 at 18:08:25 UTC, H. S. Teoh via Digitalmars-d wrote: Noticed that this morning, and Ilya noticed that too. Just a quick notice in case whoever the maintainer is, isn't aware of it yet (though he's probably already on it). Here's the error message:

Re: issues.dlang.org is down

2014-09-27 Thread H. S. Teoh via Digitalmars-d
On Sat, Sep 27, 2014 at 11:31:19AM -0700, Brad Roberts via Digitalmars-d wrote: Bugzilla and the auto-tester are back up now. There was a reboot of the system last night (which I expected), but the drive with the mysql db didn't mount properly (which I did not expect). That's fixed now and

Re: Why this UDP will not compile?

2014-09-27 Thread Marco Leise via Digitalmars-d
Am Sat, 27 Sep 2014 19:19:28 +0530 schrieb d coder via Digitalmars-d digitalmars-d@puremagic.com: DMD wont compile this. I get an error saying: /tmp/test.d(3): Error: need 'this' for 'foo' of type 'int' Failed: [dmd, -v, -o-, /tmp/test.d, -I/tmp] Is this a bug or is it illegal code? //

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-27 Thread Andrei Alexandrescu via Digitalmars-d
On 9/27/14, 1:11 AM, Foo wrote: Consider: struct MyRefCounted void opInc(); void opDec(); int x; } MyRefCounted a; a.x = 42; MyRefCounted b = a; b.x = 43; What is a.x after this? Andrei a.x == 42 a.ref_count == 1 (1 for init, +1 for copy, -1 for destruction) b.x == 43

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-27 Thread Andrei Alexandrescu via Digitalmars-d
On 9/27/14, 2:38 AM, Dmitry Olshansky wrote: Okay it serves no good for me to make these tiny comments while on the go. As usual, structs are value types, so this feature can be mis-used, no two thoughts abouts it. It may need a bit of improvement in user-friendliness, compiler may help there

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-27 Thread Andrei Alexandrescu via Digitalmars-d
On 9/27/14, 2:43 AM, Dmitry Olshansky wrote: Refcounting is process of add(x), and sub(x), and calling destructor should the subtract call report zero. Everything else is in the hands of the creator. I literally have no idea what you are discussing here. -- Andrei

Re: Any libunwind experts n da house?

2014-09-27 Thread Andrei Alexandrescu via Digitalmars-d
On 9/27/14, 2:53 AM, Jacob Carlborg wrote: On 2014-09-23 19:37, Andrei Alexandrescu wrote: We need a libunwind expert to figure out a good approach for handling exceptions thrown by C++ code into D. BTW, are you only interested in handling C++ exception, or are you interested in handling D

Re: issues.dlang.org is down

2014-09-27 Thread Brad Roberts via Digitalmars-d
On 9/27/2014 11:45 AM, H. S. Teoh via Digitalmars-d wrote: On Sat, Sep 27, 2014 at 11:31:19AM -0700, Brad Roberts via Digitalmars-d wrote: Bugzilla and the auto-tester are back up now. There was a reboot of the system last night (which I expected), but the drive with the mysql db didn't mount

Re: issues.dlang.org is down

2014-09-27 Thread Walter Bright via Digitalmars-d
On 9/27/2014 11:45 AM, H. S. Teoh via Digitalmars-d wrote: On Sat, Sep 27, 2014 at 11:31:19AM -0700, Brad Roberts via Digitalmars-d wrote: Bugzilla and the auto-tester are back up now. There was a reboot of the system last night (which I expected), but the drive with the mysql db didn't mount

Re: Any libunwind experts n da house?

2014-09-27 Thread IgorStepanov via Digitalmars-d
On Saturday, 27 September 2014 at 18:33:24 UTC, Jacob Carlborg wrote: On Saturday, 27 September 2014 at 11:34:32 UTC, IgorStepanov wrote: C++ exception mechanism uses C++ type_info objects. We can inherit object.Throwable from std::exception (through extern(C++) interface), override the

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-27 Thread Dmitry Olshansky via Digitalmars-d
27-Sep-2014 23:14, Andrei Alexandrescu пишет: On 9/27/14, 2:38 AM, Dmitry Olshansky wrote: Okay it serves no good for me to make these tiny comments while on the go. As usual, structs are value types, so this feature can be mis-used, no two thoughts abouts it. It may need a bit of improvement

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-27 Thread Dmitry Olshansky via Digitalmars-d
27-Sep-2014 23:15, Andrei Alexandrescu пишет: On 9/27/14, 2:43 AM, Dmitry Olshansky wrote: Refcounting is process of add(x), and sub(x), and calling destructor should the subtract call report zero. Everything else is in the hands of the creator. I literally have no idea what you are

Re: Any libunwind experts n da house?

2014-09-27 Thread IgorStepanov via Digitalmars-d
On Saturday, 27 September 2014 at 19:16:24 UTC, Andrei Alexandrescu wrote: On 9/27/14, 2:53 AM, Jacob Carlborg wrote: On 2014-09-23 19:37, Andrei Alexandrescu wrote: We need a libunwind expert to figure out a good approach for handling exceptions thrown by C++ code into D. BTW, are you only

Re: Any libunwind experts n da house?

2014-09-27 Thread Iain Buclaw via Digitalmars-d
On 27 September 2014 10:53, Jacob Carlborg via Digitalmars-d digitalmars-d@puremagic.com wrote: On 2014-09-23 19:37, Andrei Alexandrescu wrote: We need a libunwind expert to figure out a good approach for handling exceptions thrown by C++ code into D. BTW, are you only interested in

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-27 Thread Andrei Alexandrescu via Digitalmars-d
On 9/27/14, 12:53 PM, Dmitry Olshansky wrote: 27-Sep-2014 23:15, Andrei Alexandrescu пишет: On 9/27/14, 2:43 AM, Dmitry Olshansky wrote: Refcounting is process of add(x), and sub(x), and calling destructor should the subtract call report zero. Everything else is in the hands of the creator.

Re: Any libunwind experts n da house?

2014-09-27 Thread Andrei Alexandrescu via Digitalmars-d
On 9/27/14, 12:53 PM, IgorStepanov wrote: On Saturday, 27 September 2014 at 18:33:24 UTC, Jacob Carlborg wrote: On Saturday, 27 September 2014 at 11:34:32 UTC, IgorStepanov wrote: C++ exception mechanism uses C++ type_info objects. We can inherit object.Throwable from std::exception (through

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-27 Thread Andrei Alexandrescu via Digitalmars-d
On 9/27/14, 12:50 PM, Dmitry Olshansky wrote: 27-Sep-2014 23:14, Andrei Alexandrescu пишет: On 9/27/14, 2:38 AM, Dmitry Olshansky wrote: Okay it serves no good for me to make these tiny comments while on the go. As usual, structs are value types, so this feature can be mis-used, no two

Re: Any libunwind experts n da house?

2014-09-27 Thread IgorStepanov via Digitalmars-d
On Saturday, 27 September 2014 at 20:18:42 UTC, Andrei Alexandrescu wrote: On 9/27/14, 12:53 PM, IgorStepanov wrote: On Saturday, 27 September 2014 at 18:33:24 UTC, Jacob Carlborg wrote: On Saturday, 27 September 2014 at 11:34:32 UTC, IgorStepanov wrote: C++ exception mechanism uses C++

Re: Any libunwind experts n da house?

2014-09-27 Thread IgorStepanov via Digitalmars-d
On Saturday, 27 September 2014 at 20:11:34 UTC, Iain Buclaw via Digitalmars-d wrote: On 27 September 2014 10:53, Jacob Carlborg via Digitalmars-d digitalmars-d@puremagic.com wrote: On 2014-09-23 19:37, Andrei Alexandrescu wrote: We need a libunwind expert to figure out a good approach for

Re: enumerate, and some improvements

2014-09-27 Thread bearophile via Digitalmars-d
-- And I'd like map/filter to accept arrays and associative arrays, and not just functions: void main() { import std.algorithm: map; auto keys = [1, 2, 1, 1, 1]; auto a = [0, 10, 20]; auto r1 = map!(k = a[k])(keys); // OK auto r2 = map!a(keys); // Error

Creeping Bloat in Phobos

2014-09-27 Thread Walter Bright via Digitalmars-d
From time to time, I take a break from bugs and enhancements and just look at what some piece of code is actually doing. Sometimes, I'm appalled. Phobos, for example, should be a lean and mean fighting machine:

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-27 Thread Foo via Digitalmars-d
On Saturday, 27 September 2014 at 19:11:08 UTC, Andrei Alexandrescu wrote: On 9/27/14, 1:11 AM, Foo wrote: Consider: struct MyRefCounted void opInc(); void opDec(); int x; } MyRefCounted a; a.x = 42; MyRefCounted b = a; b.x = 43; What is a.x after this? Andrei a.x == 42

Re: [OT] Re: D mention on developer.apple.com

2014-09-27 Thread Walter Bright via Digitalmars-d
On 9/26/2014 11:34 AM, Steven Schveighoffer wrote: It's really funny how the simplest easiest things, if they solve a common nuisance problem, are treated like amazing inventions. We have a similar situation for one product in our company. We make walk-in cooler controls. After installing our

Re: [Semi OT] Language for Game Development talk

2014-09-27 Thread Walter Bright via Digitalmars-d
On 9/27/2014 9:35 AM, ponce wrote: The sequel: A Programming Language for Games, talk #2 https://www.youtube.com/watch?v=5Nc68IdNKdg Yeah, I watched it. He advocates: * pure functions * local functions * local functions with the same syntax as global functions * safety which defaults to

Re: Creeping Bloat in Phobos

2014-09-27 Thread Peter Alexander via Digitalmars-d
On Saturday, 27 September 2014 at 20:57:53 UTC, Walter Bright wrote: From time to time, I take a break from bugs and enhancements and just look at what some piece of code is actually doing. Sometimes, I'm appalled. Me too, and yes it can be appalling. It's pretty bad for even simple range

Re: [Semi OT] Language for Game Development talk

2014-09-27 Thread H. S. Teoh via Digitalmars-d
On Sat, Sep 27, 2014 at 02:51:14PM -0700, Walter Bright via Digitalmars-d wrote: [...] The only interesting thing is he describes a way that functions (and blocks) can specify what global data they access, and then have the compiler issue errors for accessing any other global data. He has a

Re: Creeping Bloat in Phobos

2014-09-27 Thread H. S. Teoh via Digitalmars-d
On Sat, Sep 27, 2014 at 09:59:17PM +, Peter Alexander via Digitalmars-d wrote: On Saturday, 27 September 2014 at 20:57:53 UTC, Walter Bright wrote: From time to time, I take a break from bugs and enhancements and just look at what some piece of code is actually doing. Sometimes, I'm

Re: Creeping Bloat in Phobos

2014-09-27 Thread Brad Roberts via Digitalmars-d
What we're seeing here is pretty much the same problem that early c++ suffered from: abstraction penalty. It took years of work to help overcome it, both from the compiler and the library. Not having trivial functions inlined and optimized down through standard techniques like dead store

Re: Creeping Bloat in Phobos

2014-09-27 Thread Walter Bright via Digitalmars-d
On 9/27/2014 2:59 PM, Peter Alexander wrote: On Saturday, 27 September 2014 at 20:57:53 UTC, Walter Bright wrote: From time to time, I take a break from bugs and enhancements and just look at what some piece of code is actually doing. Sometimes, I'm appalled. Me too, and yes it can be

Re: [Semi OT] Language for Game Development talk

2014-09-27 Thread bearophile via Digitalmars-d
Walter Bright: * local functions with the same syntax as global functions * safety which defaults to off All of which D does right now. It could be nice to have a syntax like lambdas for small struct/class methods: https://issues.dlang.org/show_bug.cgi?id=7176 struct Foo { int

Re: Creeping Bloat in Phobos

2014-09-27 Thread H. S. Teoh via Digitalmars-d
On Sat, Sep 27, 2014 at 03:26:35PM -0700, Walter Bright via Digitalmars-d wrote: On 9/27/2014 2:59 PM, Peter Alexander wrote: On Saturday, 27 September 2014 at 20:57:53 UTC, Walter Bright wrote: From time to time, I take a break from bugs and enhancements and just look at what some piece of

Re: Creeping Bloat in Phobos

2014-09-27 Thread bearophile via Digitalmars-d
Walter Bright: import std.algorithm, std.stdio; int main(string[] args) { return cast(int)args.map!(a.length).reduce!a+b(); } Here's what LDC produces (with -O -inline -release -noboundscheck) Part of this particular case problem is not a compiler optimizer weakness, but that autodecode

Re: Creeping Bloat in Phobos

2014-09-27 Thread Walter Bright via Digitalmars-d
On 9/27/2014 3:26 PM, Brad Roberts via Digitalmars-d wrote: What we're seeing here is pretty much the same problem that early c++ suffered from: abstraction penalty. It took years of work to help overcome it, both from the compiler and the library. Not having trivial functions inlined and

Re: Any libunwind experts n da house?

2014-09-27 Thread Iain Buclaw via Digitalmars-d
On 27 Sep 2014 21:35, IgorStepanov via Digitalmars-d digitalmars-d@puremagic.com wrote: On Saturday, 27 September 2014 at 20:11:34 UTC, Iain Buclaw via Digitalmars-d wrote: On 27 September 2014 10:53, Jacob Carlborg via Digitalmars-d digitalmars-d@puremagic.com wrote: On 2014-09-23 19:37,

Re: Creeping Bloat in Phobos

2014-09-27 Thread Brad Roberts via Digitalmars-d
On 9/27/2014 3:54 PM, Walter Bright via Digitalmars-d wrote: On 9/27/2014 3:26 PM, Brad Roberts via Digitalmars-d wrote: What we're seeing here is pretty much the same problem that early c++ suffered from: abstraction penalty. It took years of work to help overcome it, both from the compiler

Re: [Semi OT] Language for Game Development talk

2014-09-27 Thread Walter Bright via Digitalmars-d
On 9/27/2014 3:30 PM, bearophile wrote: Walter Bright: * local functions with the same syntax as global functions * safety which defaults to off All of which D does right now. It could be nice to have a syntax like lambdas for small struct/class methods:

Re: Creeping Bloat in Phobos

2014-09-27 Thread Walter Bright via Digitalmars-d
On 9/27/2014 3:52 PM, bearophile wrote: There is no char auto decoding in this program, right? Notice the calls to autodecoding 'front' in the assembler dump.

Re: Creeping Bloat in Phobos

2014-09-27 Thread Walter Bright via Digitalmars-d
On 9/27/2014 3:59 PM, Brad Roberts via Digitalmars-d wrote: Look at Peter's example, it's better for this, I believe. Why isn't empty being inlined? That's a tiny little function with a lot of impact. It's the autodecode'ing front(), which is a fairly complex function.

Re: Creeping Bloat in Phobos

2014-09-27 Thread bearophile via Digitalmars-d
H. S. Teoh: If we can get Andrei on board, I'm all for killing off autodecoding. Killing auto-decoding for std.algorithm functions will break most of my D2 code... perhaps we can do that in a D3 language. Bye, bearophile

Re: Creeping Bloat in Phobos

2014-09-27 Thread Peter Alexander via Digitalmars-d
On Saturday, 27 September 2014 at 23:04:00 UTC, Walter Bright wrote: On 9/27/2014 3:52 PM, bearophile wrote: There is no char auto decoding in this program, right? Notice the calls to autodecoding 'front' in the assembler dump. I think you're imagining things Walter! There's no

Program logic bugs vs input/environmental errors

2014-09-27 Thread Walter Bright via Digitalmars-d
This issue comes up over and over, in various guises. I feel like Yosemite Sam here: https://www.youtube.com/watch?v=hBhlQgvHmQ0 In that vein, Exceptions are for either being able to recover from input/environmental errors, or report them to the user of the application. When I say They

Re: Creeping Bloat in Phobos

2014-09-27 Thread David Nadlinger via Digitalmars-d
On Saturday, 27 September 2014 at 23:00:20 UTC, Brad Roberts via Digitalmars-d wrote: Look at Peter's example, it's better for this, I believe. Why isn't empty being inlined? That's a tiny little function with a lot of impact. This is most likely due to an issue with how the new DMD

Re: [Semi OT] Language for Game Development talk

2014-09-27 Thread bearophile via Digitalmars-d
Walter Bright: It could be nice to have a syntax like lambdas for small struct/class methods: https://issues.dlang.org/show_bug.cgi?id=7176 struct Foo { int bar(int x) pure { return x * x; } } Becomes something like:: struct Foo { int bar = (int x) pure = x * x; } I see no gain

Messaging

2014-09-27 Thread Peter Alexander via Digitalmars-d
Just had an unfortunate exchange on Twitter https://twitter.com/bitshifternz/status/515998608009601024 Him: isn't D garbage collected? That would make it a non-starter for me. Me: it's optional. malloc/free are available and we'll have allocators soon that can hook into std lib. Him: if

Re: Creeping Bloat in Phobos

2014-09-27 Thread H. S. Teoh via Digitalmars-d
On Sat, Sep 27, 2014 at 11:00:16PM +, bearophile via Digitalmars-d wrote: H. S. Teoh: If we can get Andrei on board, I'm all for killing off autodecoding. Killing auto-decoding for std.algorithm functions will break most of my D2 code... perhaps we can do that in a D3 language. [...]

Re: Program logic bugs vs input/environmental errors

2014-09-27 Thread bearophile via Digitalmars-d
Walter Bright: As for the programmer wanting to know where the message missing } came from, grep -r dmd/src/*.c missing } works nicely. I do that sort of thing all the time. It really isn't a problem. grep is not useful for the purposes explained in issue 13543 because the file name

Re: Any libunwind experts n da house?

2014-09-27 Thread Andrei Alexandrescu via Digitalmars-d
On 9/27/14, 1:31 PM, IgorStepanov wrote: No, that for throwing from C++ into D: for catch an exception, we should pass type_info object to special C++ runtime function. C++ runtime determines, can throwed object type can be casted to asked type, and if yes - allow catch it and do catcher code.

Re: Creeping Bloat in Phobos

2014-09-27 Thread Walter Bright via Digitalmars-d
On 9/27/2014 4:06 PM, Peter Alexander wrote: On Saturday, 27 September 2014 at 23:04:00 UTC, Walter Bright wrote: On 9/27/2014 3:52 PM, bearophile wrote: There is no char auto decoding in this program, right? Notice the calls to autodecoding 'front' in the assembler dump. I think you're

Re: Program logic bugs vs input/environmental errors

2014-09-27 Thread Walter Bright via Digitalmars-d
On 9/27/2014 4:33 PM, bearophile wrote: Walter Bright: As for the programmer wanting to know where the message missing } came from, grep -r dmd/src/*.c missing } works nicely. I do that sort of thing all the time. It really isn't a problem. grep is not useful for the purposes explained

Re: Program logic bugs vs input/environmental errors

2014-09-27 Thread H. S. Teoh via Digitalmars-d
On Sat, Sep 27, 2014 at 04:42:18PM -0700, Walter Bright via Digitalmars-d wrote: On 9/27/2014 4:33 PM, bearophile wrote: Walter Bright: As for the programmer wanting to know where the message missing } came from, grep -r dmd/src/*.c missing } works nicely. I do that sort of thing

Re: [Semi OT] Language for Game Development talk

2014-09-27 Thread Walter Bright via Digitalmars-d
On 9/27/2014 4:20 PM, bearophile wrote: Walter Bright: It could be nice to have a syntax like lambdas for small struct/class methods: https://issues.dlang.org/show_bug.cgi?id=7176 struct Foo { int bar(int x) pure { return x * x; } } Becomes something like:: struct Foo { int bar =

Re: Program logic bugs vs input/environmental errors

2014-09-27 Thread bearophile via Digitalmars-d
Walter Bright: Even if that is what you wanted, you won't get that from FileException, as it will only show file/lines emanating from calls inside std.file, not from higher level callers. Can't we use the template arguments like __LINE__ to offer the line of code in the IO function in user

Re: Creeping Bloat in Phobos

2014-09-27 Thread Andrei Alexandrescu via Digitalmars-d
On 9/27/14, 3:40 PM, H. S. Teoh via Digitalmars-d wrote: If we can get Andrei on board, I'm all for killing off autodecoding. That's rather vague; it's unclear what would replace it. -- Andrei

Re: Creeping Bloat in Phobos

2014-09-27 Thread Andrei Alexandrescu via Digitalmars-d
On 9/27/14, 1:57 PM, Walter Bright wrote: To scrape the barnacles off, I've filed: https://issues.dlang.org/show_bug.cgi?id=13541 https://issues.dlang.org/show_bug.cgi?id=13542 https://issues.dlang.org/show_bug.cgi?id=13543 https://issues.dlang.org/show_bug.cgi?id=13544 I'm sure there's much

Re: Creeping Bloat in Phobos

2014-09-27 Thread Andrei Alexandrescu via Digitalmars-d
On 9/27/14, 3:54 PM, Walter Bright wrote: Again, this accumulation of barnacles is not a failure of the optimizer. It's a failure of adding gee-gaws to the source code without checking their effect. The Go project has something nice set up - easy-to-run benchmarks that are part of the

Re: Creeping Bloat in Phobos

2014-09-27 Thread Andrei Alexandrescu via Digitalmars-d
On 9/27/14, 4:02 PM, Walter Bright wrote: On 9/27/2014 3:59 PM, Brad Roberts via Digitalmars-d wrote: Look at Peter's example, it's better for this, I believe. Why isn't empty being inlined? That's a tiny little function with a lot of impact. It's the autodecode'ing front(), which is a

Re: Creeping Bloat in Phobos

2014-09-27 Thread deadalnix via Digitalmars-d
On Saturday, 27 September 2014 at 22:11:39 UTC, H. S. Teoh via Digitalmars-d wrote: I vaguely recall somebody mentioning a while back that range-based code is poorly optimized because compilers weren't designed to recognize such patterns before. I wonder if there are ways for the compiler to

Re: Program logic bugs vs input/environmental errors

2014-09-27 Thread Walter Bright via Digitalmars-d
On 9/27/2014 4:55 PM, H. S. Teoh via Digitalmars-d wrote: My take on this, is that uncaught exceptions are a program bug. Not to me. Custom messages would be better, but the exception message should be serviceable. Uncaught exceptions (which ideally should only be Errors, not Exceptions)

Re: DQuick a GUI Library (prototype)

2014-09-27 Thread Ivan via Digitalmars-d
On Tuesday, 20 Augu2013 at 21:22:48 UTC, Flamaros wrote: I want to share a short presentation of the project I am working on with friends. It's a prototype of a GUI library written in D. This pdf contains our vision of what the project would be. Samples are directly extracted from our

Re: Program logic bugs vs input/environmental errors

2014-09-27 Thread Timon Gehr via Digitalmars-d
On 09/28/2014 02:40 AM, Walter Bright wrote: On 9/27/2014 4:55 PM, H. S. Teoh via Digitalmars-d wrote: My take on this, is that uncaught exceptions are a program bug. Not to me. ... It is not worth fixing if a program terminates with a stack trace?

Re: Program logic bugs vs input/environmental errors

2014-09-27 Thread Walter Bright via Digitalmars-d
On 9/27/2014 4:59 PM, bearophile wrote: Walter Bright: Even if that is what you wanted, you won't get that from FileException, as it will only show file/lines emanating from calls inside std.file, not from higher level callers. Can't we use the template arguments like __LINE__ to offer the

Re: [Semi OT] Language for Game Development talk

2014-09-27 Thread Timon Gehr via Digitalmars-d
On 09/28/2014 01:55 AM, Walter Bright wrote: On 9/27/2014 4:20 PM, bearophile wrote: Walter Bright: It could be nice to have a syntax like lambdas for small struct/class methods: https://issues.dlang.org/show_bug.cgi?id=7176 struct Foo { int bar(int x) pure { return x * x; } } Becomes

  1   2   >