Re: D/Objective-C 64bit

2014-11-01 Thread Jacob Carlborg via Digitalmars-d-announce
On 2014-11-01 01:54, Michel Fortin wrote: I can't remember if this is an oversight or just something that I hadn't got to yet. In my mind this was already done. I did a grep for dealloc and couldn't find anything related. Anyway, the answer is *yes*: the destructor should be mapped to the

Re: D/Objective-C 64bit

2014-11-01 Thread Jacob Carlborg via Digitalmars-d-announce
On 2014-11-01 01:58, Michel Fortin wrote: That said, there are other parts of D/Objective-C that could pose difficulties to existing languages tools, some syntactic (__selector, or this.class to get the metaclass) this.class could perhaps be called this.classof, at least that's valid syntax.

TDPL is Deal of the Day at informit.com!

2014-11-01 Thread Kai Nacke via Digitalmars-d-announce
If you still need a copy of Andrei's great book: http://www.informit.com/deals/ Regards, Kai

Re: Endovena: a dependency injection framework.

2014-11-01 Thread JN via Digitalmars-d-announce
I may be ignorant, can someone explain what's the difference between: Container container; container.register!(IGreeter, Greeter); auto greeter = container.get!IGreeter(); writefln(greeter.greet) and auto greeter = new Greeter(); writefln(greeter.greet) ?

Re: Endovena: a dependency injection framework.

2014-11-01 Thread Gary Willoughby via Digitalmars-d-announce
On Saturday, 1 November 2014 at 16:36:02 UTC, JN wrote: I may be ignorant, can someone explain what's the difference between: Container container; container.register!(IGreeter, Greeter); auto greeter = container.get!IGreeter(); writefln(greeter.greet) and auto greeter = new Greeter();

Re: Endovena: a dependency injection framework.

2014-11-01 Thread JN via Digitalmars-d-announce
On Saturday, 1 November 2014 at 18:54:04 UTC, Gary Willoughby wrote: It's the fundamental way dependency injection containers are used. Instead of having complex dependencies on other resources you can just rely on the container to serve resources as needed. For example if you have a class

Re: Endovena: a dependency injection framework.

2014-11-01 Thread Kagamin via Digitalmars-d-announce
Usually an object receives all needed dependencies with the constructor and thus doesn't need the container itself. Well, either way, it's better to pass one object around instead of ~10 or more.

Re: Blog Post - Reducing vibe.d turnaround time (Part 1 Faster Linking)

2014-11-01 Thread Nordlöw
On Thursday, 30 October 2014 at 01:02:40 UTC, Martin Nowak wrote: https://code.dawg.eu/reducing-vibed-turnaround-time-part-1-faster-linking.html Could you add a reference on how to DUB-build a library as dynamic instead of static library to easy the process for newcomers?

DMD and dub available via chocolatey

2014-11-01 Thread Daniel Jost via Digitalmars-d-announce
From the homepage[1]: Chocolatey is a Machine Package Manager, somewhat like apt-get, but built with Windows in mind. I have added dmd[2] and dub[3] as packages. This means you can do command line installation and have them ready to go in one step. I also made sure to allow users to change

Re: DMD and dub available via chocolatey

2014-11-01 Thread Brad Anderson via Digitalmars-d-announce
On Sunday, 2 November 2014 at 01:52:27 UTC, Daniel Jost wrote: From the homepage[1]: Chocolatey is a Machine Package Manager, somewhat like apt-get, but built with Windows in mind. I have added dmd[2] and dub[3] as packages. This means you can do command line installation and have them ready

Re: toString refactor in druntime

2014-11-01 Thread Jakob Ovrum via Digitalmars-d
On Saturday, 1 November 2014 at 05:27:16 UTC, Jonathan Marler wrote: No need for the extra function, just call: x.toString((outputRange.put)); That doesn't work for a wide variety of possible cases, notably when `put` is a function template or when the code depends on std.range.put or some

Re: toString refactor in druntime

2014-11-01 Thread Walter Bright via Digitalmars-d
On 10/30/2014 8:30 AM, Steven Schveighoffer wrote: This is a typical mechanism that Tango used -- pass in a ref to a dynamic array referencing a stack buffer. If it needed to grow, just update the length, and it moves to the heap. In most cases, the stack buffer is enough. But the idea is to try

module keyword with curly brackets

2014-11-01 Thread tcak via Digitalmars-d
The module declaration, and the name and path of D files do not need to match each other. You include a D file while compiling the project, and module declarations are cared only. Based on above behaviour of design, allowing only one module keyword, and that is on top of D code file seems

Re: 'partial' keyword in C# is very good for project , what's the same thing in D?

2014-11-01 Thread tcak via Digitalmars-d
On Wednesday, 29 October 2014 at 07:41:41 UTC, FrankLike wrote: Hello,everyone, I've written some projects in C#,find the 'partial' keyword is very userful,which lets the auto codes in another single file,my codes are very easy to update. But what the same thing in D? Thank you,every one.

bug in assigning to dynamic array element

2014-11-01 Thread ketmar via Digitalmars-d
Hello. let's run this code: struct Info { size_t[] list; } size_t saveIt (ref Info info, size_t count) { if (count 1) return 666; size_t idx = info.list.length; info.list.length = idx+count; foreach (; 0..count) { info.list[idx] = saveIt(info, count-1); //!!!

Re: tail const ?

2014-11-01 Thread Dicebot via Digitalmars-d
http://dlang.org/phobos/std_typecons.html#.Rebindable

Re: module keyword with curly brackets

2014-11-01 Thread bearophile via Digitalmars-d
tcak: Is there any VERY SPECIAL reason behind that limitation? What advantages gives removing that limitation? Is the price in increased complexity worth paying? Bye, bearophile

Re: module keyword with curly brackets

2014-11-01 Thread ketmar via Digitalmars-d
On Sat, 01 Nov 2014 09:24:46 + bearophile via Digitalmars-d digitalmars-d@puremagic.com wrote: tcak: Is there any VERY SPECIAL reason behind that limitation? What advantages gives removing that limitation? Is the price in increased complexity worth paying? nested modules, like in

Re: Program logic bugs vs input/environmental errors

2014-11-01 Thread Dicebot via Digitalmars-d
On Friday, 31 October 2014 at 21:33:22 UTC, H. S. Teoh via Digitalmars-d wrote: Again, you're using a different definition of component. I see no justified reasoning why process can be considered such component ad anything else cannot. In practice it is completely dependent on system design

Re: module keyword with curly brackets

2014-11-01 Thread Paulo Pinto via Digitalmars-d
Am 01.11.2014 um 10:29 schrieb ketmar via Digitalmars-d: On Sat, 01 Nov 2014 09:24:46 + bearophile via Digitalmars-d digitalmars-d@puremagic.com wrote: tcak: Is there any VERY SPECIAL reason behind that limitation? What advantages gives removing that limitation? Is the price in

Re: module keyword with curly brackets

2014-11-01 Thread ketmar via Digitalmars-d
On Sat, 01 Nov 2014 11:04:32 +0100 Paulo Pinto via Digitalmars-d digitalmars-d@puremagic.com wrote: Am 01.11.2014 um 10:29 schrieb ketmar via Digitalmars-d: On Sat, 01 Nov 2014 09:24:46 + bearophile via Digitalmars-d digitalmars-d@puremagic.com wrote: tcak: Is there any VERY

Re: module keyword with curly brackets

2014-11-01 Thread Jonathan M Davis via Digitalmars-d
On Saturday, November 01, 2014 07:52:38 tcak via Digitalmars-d wrote: The module declaration, and the name and path of D files do not need to match each other. You include a D file while compiling the project, and module declarations are cared only. Based on above behaviour of design,

Re: bug in assigning to dynamic array element

2014-11-01 Thread ketmar via Digitalmars-d
filled bugreport for this: https://issues.dlang.org/show_bug.cgi?id=13670

Re: What IDE/EDITOR do you use for D?

2014-11-01 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, October 29, 2014 19:38:14 dan via Digitalmars-d wrote: What IDE/EDITOR do you use for D? What plugins if you use Vim? I Use gvim with most of the GUI elements turned off (I'm just trying to get a window for it separate from the console, which is why I don't use vim). The only thing

Re: Program logic bugs vs input/environmental errors

2014-11-01 Thread Kagamin via Digitalmars-d
On Friday, 31 October 2014 at 21:33:22 UTC, H. S. Teoh via Digitalmars-d wrote: You're using a different definition of component. System granularity is decided by the designer. You either allow people design their systems or force your design on them, if you do both, you contradict yourself.

Re: Program logic bugs vs input/environmental errors

2014-11-01 Thread Kagamin via Digitalmars-d
On Friday, 31 October 2014 at 21:06:49 UTC, H. S. Teoh via Digitalmars-d wrote: This does not mean that process isolation is a silver bullet -- I never said any such thing. But made it sound that way: The only failsafe solution is to have multiple redundant processes, so when one process

Re: Program logic bugs vs input/environmental errors

2014-11-01 Thread Kagamin via Digitalmars-d
On Wednesday, 29 October 2014 at 21:23:00 UTC, Walter Bright wrote: In any case, if the programmer knows than assert error is restricted to a particular domain, and is recoverable, and wants to recover from it, use enforce(), not assert(). But all that does is working around the assert's

Programming Language for Games, part 3

2014-11-01 Thread bearophile via Digitalmars-d
Third part of the A Programming Language for Games, by Jonathan Blow: https://www.youtube.com/watch?v=UTqZNujQOlA Discussions: http://www.reddit.com/r/programming/comments/2kxi89/jonathan_blow_a_programming_language_for_games/ His language seems to disallow comparisons of different types:

Re: bug in assigning to dynamic array element

2014-11-01 Thread anonymous via Digitalmars-d
On Saturday, 1 November 2014 at 09:03:42 UTC, ketmar via Digitalmars-d wrote: as i can guess, the bug is in evaluating left part of '=' operation before the right part. I don't know how D defines this, and I couldn't find anything but a forum discussion [1] (which I didn't read all of). But

Re: bug in assigning to dynamic array element

2014-11-01 Thread via Digitalmars-d
If it's indeed caused by evaluation (which seems likely), then it's not a bug. All expressions are supposed to be evaluated from left to right.

Re: bug in assigning to dynamic array element

2014-11-01 Thread ketmar via Digitalmars-d
On Sat, 01 Nov 2014 11:43:11 + via Digitalmars-d digitalmars-d@puremagic.com wrote: If it's indeed caused by evaluation (which seems likely), then it's not a bug. All expressions are supposed to be evaluated from left to right. this *IS* a bug. either compiler should error on this, or it

Re: bug in assigning to dynamic array element

2014-11-01 Thread Iain Buclaw via Digitalmars-d
On 1 November 2014 11:31, anonymous via Digitalmars-d digitalmars-d@puremagic.com wrote: On Saturday, 1 November 2014 at 09:03:42 UTC, ketmar via Digitalmars-d wrote: as i can guess, the bug is in evaluating left part of '=' operation before the right part. I don't know how D defines this,

Re: bug in assigning to dynamic array element

2014-11-01 Thread ketmar via Digitalmars-d
On Sat, 01 Nov 2014 11:31:51 + anonymous via Digitalmars-d digitalmars-d@puremagic.com wrote: I don't know how D defines this, and I couldn't find anything but a forum discussion [1] (which I didn't read all of). But unless it's explicitly stated that the right-hand side is evaluated

Re: bug in assigning to dynamic array element

2014-11-01 Thread anonymous via Digitalmars-d
On Saturday, 1 November 2014 at 11:50:34 UTC, ketmar via Digitalmars-d wrote: this *IS* a bug. either compiler should error on this, or it shouldn't modify random memory. imagine the situation when old array contents not only collected by GC, but that memory was allocated to something

Re: bug in assigning to dynamic array element

2014-11-01 Thread Iain Buclaw via Digitalmars-d
On 1 November 2014 11:56, ketmar via Digitalmars-d digitalmars-d@puremagic.com wrote: On Sat, 01 Nov 2014 11:31:51 + anonymous via Digitalmars-d digitalmars-d@puremagic.com wrote: I don't know how D defines this, and I couldn't find anything but a forum discussion [1] (which I didn't read

Re: bug in assigning to dynamic array element

2014-11-01 Thread ketmar via Digitalmars-d
On Sat, 01 Nov 2014 11:55:53 + anonymous via Digitalmars-d digitalmars-d@puremagic.com wrote: On Saturday, 1 November 2014 at 11:50:34 UTC, ketmar via Digitalmars-d wrote: this *IS* a bug. either compiler should error on this, or it shouldn't modify random memory. imagine the

Re: bug in assigning to dynamic array element

2014-11-01 Thread ketmar via Digitalmars-d
On Sat, 1 Nov 2014 12:01:04 + Iain Buclaw via Digitalmars-d digitalmars-d@puremagic.com wrote: On 1 November 2014 11:56, ketmar via Digitalmars-d digitalmars-d@puremagic.com wrote: On Sat, 01 Nov 2014 11:31:51 + anonymous via Digitalmars-d digitalmars-d@puremagic.com wrote: I

Re: bug in assigning to dynamic array element

2014-11-01 Thread ketmar via Digitalmars-d
On Sat, 1 Nov 2014 12:01:04 + Iain Buclaw via Digitalmars-d digitalmars-d@puremagic.com wrote: On 1 November 2014 11:56, ketmar via Digitalmars-d digitalmars-d@puremagic.com wrote: On Sat, 01 Nov 2014 11:31:51 + anonymous via Digitalmars-d digitalmars-d@puremagic.com wrote: I

Re: bug in assigning to dynamic array element

2014-11-01 Thread Iain Buclaw via Digitalmars-d
On 1 November 2014 09:03, ketmar via Digitalmars-d digitalmars-d@puremagic.com wrote: Hello. let's run this code: info.list[idx] = saveIt(info, count-1); //!!! You could use: emplace(info.list[idx], saveIt(info, count-1));

Re: toString refactor in druntime

2014-11-01 Thread Dicebot via Digitalmars-d
On Saturday, 1 November 2014 at 07:02:03 UTC, Walter Bright wrote: On 10/30/2014 8:30 AM, Steven Schveighoffer wrote: This is a typical mechanism that Tango used -- pass in a ref to a dynamic array referencing a stack buffer. If it needed to grow, just update the length, and it moves to the

Re: bug in assigning to dynamic array element

2014-11-01 Thread ketmar via Digitalmars-d
On Sat, 1 Nov 2014 12:34:50 + Iain Buclaw via Digitalmars-d digitalmars-d@puremagic.com wrote: On 1 November 2014 09:03, ketmar via Digitalmars-d digitalmars-d@puremagic.com wrote: Hello. let's run this code: info.list[idx] = saveIt(info, count-1); //!!! You could use:

Re: toString refactor in druntime

2014-11-01 Thread Jonathan Marler via Digitalmars-d
On Saturday, 1 November 2014 at 06:04:56 UTC, Jakob Ovrum wrote: On Saturday, 1 November 2014 at 05:27:16 UTC, Jonathan Marler wrote: No need for the extra function, just call: x.toString((outputRange.put)); That doesn't work for a wide variety of possible cases, notably when `put` is a

Re: bug in assigning to dynamic array element

2014-11-01 Thread Iain Buclaw via Digitalmars-d
On 1 November 2014 12:39, ketmar via Digitalmars-d digitalmars-d@puremagic.com wrote: On Sat, 1 Nov 2014 12:34:50 + Iain Buclaw via Digitalmars-d digitalmars-d@puremagic.com wrote: On 1 November 2014 09:03, ketmar via Digitalmars-d digitalmars-d@puremagic.com wrote: Hello. let's run

Re: module keyword with curly brackets

2014-11-01 Thread tcak via Digitalmars-d
On Saturday, 1 November 2014 at 10:04:23 UTC, Paulo Pinto wrote: Am 01.11.2014 um 10:29 schrieb ketmar via Digitalmars-d: A few languages have nested packages. Quite usefull for implementation packages. Beware of Wirth's quest for simplicity, even Go is a quite powerful in regards to

Re: toString refactor in druntime

2014-11-01 Thread Jonathan Marler via Digitalmars-d
On Saturday, 1 November 2014 at 12:31:15 UTC, Dicebot wrote: On Saturday, 1 November 2014 at 07:02:03 UTC, Walter Bright wrote: On 10/30/2014 8:30 AM, Steven Schveighoffer wrote: This is a typical mechanism that Tango used -- pass in a ref to a dynamic array referencing a stack buffer. If it

Re: bug in assigning to dynamic array element

2014-11-01 Thread ketmar via Digitalmars-d
On Sat, 1 Nov 2014 12:58:26 + Iain Buclaw via Digitalmars-d digitalmars-d@puremagic.com wrote: Or how about: Every side effect is evaluated LTR. So whatever you do, don't have LHS-altering side-effects on the RHS. It may be over the top to explain simply that it is questionable and

Re: module keyword with curly brackets

2014-11-01 Thread ketmar via Digitalmars-d
On Sat, 01 Nov 2014 13:04:57 + tcak via Digitalmars-d digitalmars-d@puremagic.com wrote: My biggest concern is that just to collect similar things together (mostly small things), I have to create another new file which makes me feel grrr. if they are so similar, put them in one module.

Re: toString refactor in druntime

2014-11-01 Thread Manu via Digitalmars-d
On 31 October 2014 01:30, Steven Schveighoffer via Digitalmars-d digitalmars-d@puremagic.com wrote: On 10/28/14 7:06 PM, Manu via Digitalmars-d wrote: On 28 October 2014 22:51, Steven Schveighoffer via Digitalmars-d digitalmars-d@puremagic.com wrote: On 10/27/14 8:01 PM, Manu via

Compiling with -m64 on Windows uses wrong link location

2014-11-01 Thread Josh via Digitalmars-d
I have Visual Studio 2012 and Windows SDK for Windows 8.1 installed. I then used the DMD installer, which appears to have correctly found them: ; Windows installer replaces the following lines with the actual paths

Re: Programming Language for Games, part 3

2014-11-01 Thread via Digitalmars-d
On Saturday, 1 November 2014 at 11:31:32 UTC, bearophile wrote: Third part of the A Programming Language for Games, by Jonathan Blow: https://www.youtube.com/watch?v=UTqZNujQOlA Thanks for the link. I only have time to skim it, but I think the region-based allocation that he was concerned

Re: module keyword with curly brackets

2014-11-01 Thread Dicebot via Digitalmars-d
On Saturday, 1 November 2014 at 13:04:58 UTC, tcak wrote: My biggest concern is that just to collect similar things together (mostly small things), I have to create another new file which makes me feel grrr. I am afraid you need to get used to it because it is fundamental design

Re: toString refactor in druntime

2014-11-01 Thread Manu via Digitalmars-d
On 1 November 2014 05:06, via Digitalmars-d digitalmars-d@puremagic.com wrote: On Friday, 31 October 2014 at 19:04:29 UTC, Walter Bright wrote: On 10/27/2014 12:42 AM, Benjamin Thaut wrote: I'm planning on doing a pull request for druntime which rewrites every toString function within

Re: toString refactor in druntime

2014-11-01 Thread Manu via Digitalmars-d
On 31 October 2014 06:15, Steven Schveighoffer via Digitalmars-d digitalmars-d@puremagic.com wrote: On 10/30/14 2:53 PM, Jonathan Marler wrote: Before we start ripping apart our existing APIs, can we show that the performance is really going to be so bad? I know virtual calls have a bad

Re: std.experimental.logger formal review round 3

2014-11-01 Thread Dicebot via Digitalmars-d
Bringing this back to the first page

Re: bug in assigning to dynamic array element

2014-11-01 Thread Iain Buclaw via Digitalmars-d
On 1 November 2014 13:05, ketmar via Digitalmars-d digitalmars-d@puremagic.com wrote: On Sat, 1 Nov 2014 12:58:26 + Iain Buclaw via Digitalmars-d digitalmars-d@puremagic.com wrote: Or how about: Every side effect is evaluated LTR. So whatever you do, don't have LHS-altering side-effects

Re: module keyword with curly brackets

2014-11-01 Thread Nicolas Sicard via Digitalmars-d
On Saturday, 1 November 2014 at 10:32:48 UTC, Jonathan M Davis via Digitalmars-d wrote: On Saturday, November 01, 2014 07:52:38 tcak via Digitalmars-d wrote: The module declaration, and the name and path of D files do not need to match each other. You include a D file while compiling the

Re: module keyword with curly brackets

2014-11-01 Thread ketmar via Digitalmars-d
On Sat, 01 Nov 2014 14:03:50 + Nicolas Sicard via Digitalmars-d digitalmars-d@puremagic.com wrote: What's the reason why the module keyword was introduced in the first place? The package and module hierarchy could have been deduced from the directory and file hierarchy, as it is the case

Re: module keyword with curly brackets

2014-11-01 Thread Mike via Digitalmars-d
On Saturday, 1 November 2014 at 07:52:39 UTC, tcak wrote: The module declaration, and the name and path of D files do not need to match each other. You include a D file while compiling the project, and module declarations are cared only. Based on above behaviour of design, allowing only one

Re: bug in assigning to dynamic array element

2014-11-01 Thread ketmar via Digitalmars-d
On Sat, 1 Nov 2014 13:56:49 + Iain Buclaw via Digitalmars-d digitalmars-d@puremagic.com wrote: So your only solution is to pre-allocate the ptr in the GC to prevent the .ptr from moving because it has been reallocated to another area to accommodate growth. if this will be left as is, the

Re: bug in assigning to dynamic array element

2014-11-01 Thread Iain Buclaw via Digitalmars-d
On 1 November 2014 14:19, ketmar via Digitalmars-d digitalmars-d@puremagic.com wrote: On Sat, 1 Nov 2014 13:56:49 + Iain Buclaw via Digitalmars-d digitalmars-d@puremagic.com wrote: if such assigns will be forbidden for any arrays... this is even worse. what? your shiny language can't do

Re: module keyword with curly brackets

2014-11-01 Thread Dicebot via Digitalmars-d
On Saturday, 1 November 2014 at 14:03:51 UTC, Nicolas Sicard wrote: What's the reason why the module keyword was introduced in the first place? The package and module hierarchy could have been deduced from the directory and file hierarchy, as it is the case in Python, IIRC. The search rules

Re: module keyword with curly brackets

2014-11-01 Thread Dicebot via Digitalmars-d
On Saturday, 1 November 2014 at 14:18:53 UTC, Mike wrote: I find this, and the fact that packages and modules map directly to directories and files, to be an arbitrary limitation as well. It is not necessary but it results in elegant mapping. I wish it pushed harder for module == namespace

Re: module keyword with curly brackets

2014-11-01 Thread Nicolas Sicard via Digitalmars-d
On Saturday, 1 November 2014 at 14:40:16 UTC, Dicebot wrote: On Saturday, 1 November 2014 at 14:03:51 UTC, Nicolas Sicard wrote: What's the reason why the module keyword was introduced in the first place? The package and module hierarchy could have been deduced from the directory and file

Re: bug in assigning to dynamic array element

2014-11-01 Thread ketmar via Digitalmars-d
On Sat, 1 Nov 2014 14:44:54 + Iain Buclaw via Digitalmars-d digitalmars-d@puremagic.com wrote: You can clearly see the 'list.length' though. You can't possibly go off the assumption that if you grow the size of a dynamic array, it's area in memory won't be relocated. i don't even want to

Re: Program logic bugs vs input/environmental errors

2014-11-01 Thread H. S. Teoh via Digitalmars-d
On Sat, Nov 01, 2014 at 10:52:31AM +, Kagamin via Digitalmars-d wrote: On Friday, 31 October 2014 at 21:06:49 UTC, H. S. Teoh via Digitalmars-d wrote: This does not mean that process isolation is a silver bullet -- I never said any such thing. But made it sound that way: The only

Re: Program logic bugs vs input/environmental errors

2014-11-01 Thread H. S. Teoh via Digitalmars-d
On Sat, Nov 01, 2014 at 09:38:23AM +, Dicebot via Digitalmars-d wrote: On Friday, 31 October 2014 at 21:33:22 UTC, H. S. Teoh via Digitalmars-d wrote: Again, you're using a different definition of component. I see no justified reasoning why process can be considered such component ad

Re: Program logic bugs vs input/environmental errors

2014-11-01 Thread via Digitalmars-d
On Saturday, 1 November 2014 at 15:02:53 UTC, H. S. Teoh via Digitalmars-d wrote: I never said component == process. All I said was that at the OS level, at least with current OSes, processes are the smallest unit that is decoupled from each other. If you go below that level of granularity,

Re: module keyword with curly brackets

2014-11-01 Thread Dicebot via Digitalmars-d
On Saturday, 1 November 2014 at 14:48:33 UTC, Nicolas Sicard wrote: On Saturday, 1 November 2014 at 14:40:16 UTC, Dicebot wrote: On Saturday, 1 November 2014 at 14:03:51 UTC, Nicolas Sicard wrote: What's the reason why the module keyword was introduced in the first place? The package and

Re: Compiling with -m64 on Windows uses wrong link location

2014-11-01 Thread Rainer Schuetze via Digitalmars-d
On 01.11.2014 14:25, Josh wrote: I have Visual Studio 2012 and Windows SDK for Windows 8.1 installed. I then used the DMD installer, which appears to have correctly found them: ; Windows installer replaces the

Re: Program logic bugs vs input/environmental errors

2014-11-01 Thread Walter Bright via Digitalmars-d
On 11/1/2014 3:35 AM, Kagamin wrote: No misunderstanding, I think that Walter's idea is good, just not always practical, and that real critical systems don't work the way he describes, they make more complicated tradeoffs. My ideas are what are implemented on airplanes. I didn't originate

std.concurrency.Generator yieldAll?

2014-11-01 Thread bearophile via Digitalmars-d
Now in Phobos there is std.concurrency.Generator. In Python they added yield from for various reasons: http://legacy.python.org/dev/peps/pep-0380/ One of the reasons is performance: Using a specialised syntax opens up possibilities for optimisation when there is a long chain of generators.

Re: toString refactor in druntime

2014-11-01 Thread David Nadlinger via Digitalmars-d
On Saturday, 1 November 2014 at 12:31:15 UTC, Dicebot wrote: It is not the same thing as ref/out buffer argument. We have been running ping-pong comments about it for a several times now. All std.internal.scopebuffer does is reducing heap allocation count at cost of stack consumption (and

Re: std.concurrency.Generator yieldAll?

2014-11-01 Thread Sean Kelly via Digitalmars-d
I see generators as being somewhat like opApply in terms of how they're written. So a single generator would recurve across the entire tree. Allocating a new generator per node isn't going to be very efficient, even if we optimize for that case.

Re: Programming Language for Games, part 3

2014-11-01 Thread Paulo Pinto via Digitalmars-d
Am 01.11.2014 um 12:31 schrieb bearophile: Third part of the A Programming Language for Games, by Jonathan Blow: https://www.youtube.com/watch?v=UTqZNujQOlA Discussions: http://www.reddit.com/r/programming/comments/2kxi89/jonathan_blow_a_programming_language_for_games/ His language seems to

Re: module keyword with curly brackets

2014-11-01 Thread Nicolas Sicard via Digitalmars-d
On Saturday, 1 November 2014 at 15:32:22 UTC, Dicebot wrote: On Saturday, 1 November 2014 at 14:48:33 UTC, Nicolas Sicard wrote: On Saturday, 1 November 2014 at 14:40:16 UTC, Dicebot wrote: On Saturday, 1 November 2014 at 14:03:51 UTC, Nicolas Sicard wrote: What's the reason why the module

Re: std.experimental.logger formal review round 3

2014-11-01 Thread David Nadlinger via Digitalmars-d
There is still a critical issue with std.experimental.logger that would prevent it from being merged right now: The abuse of @trusted all over the code. For example, the following piece of code compiles with burner/logger@c87e1032: --- import std.experimental.logger.core; struct Dangerous {

Re: toString refactor in druntime

2014-11-01 Thread Walter Bright via Digitalmars-d
On 11/1/2014 5:31 AM, Dicebot wrote: On Saturday, 1 November 2014 at 07:02:03 UTC, Walter Bright wrote: On 10/30/2014 8:30 AM, Steven Schveighoffer wrote: This is a typical mechanism that Tango used -- pass in a ref to a dynamic array referencing a stack buffer. If it needed to grow, just

Re: toString refactor in druntime

2014-11-01 Thread Walter Bright via Digitalmars-d
On 11/1/2014 10:04 AM, David Nadlinger wrote: Agreed. Its API also has severe safety problems. Way overblown. And it's nothing that druntime developers cannot handle easily. druntime is full of system programming.

Re: D wrapper classes leak memory. Next steps?

2014-11-01 Thread Marco Leise via Digitalmars-d
Am Fri, 31 Oct 2014 13:16:15 + schrieb eles e...@eles.com: On Friday, 31 October 2014 at 10:06:51 UTC, Ola Fosheim Grøstad wrote: On Friday, 31 October 2014 at 09:58:41 UTC, ketmar via Digitalmars-d wrote: if you have something concrete in mind, write ER or forum post, so we can

Re: toString refactor in druntime

2014-11-01 Thread Walter Bright via Digitalmars-d
On 11/1/2014 6:35 AM, Manu via Digitalmars-d wrote: I'd say that I'd be nervous to see druntime chockers full of templates...? What's a chocker? Why would templates make you nervous? They're not C++ templates!

Re: std.experimental.logger formal review round 3

2014-11-01 Thread Dicebot via Digitalmars-d
On Saturday, 1 November 2014 at 17:35:37 UTC, David Nadlinger wrote: There is still a critical issue with std.experimental.logger that would prevent it from being merged right now: The abuse of @trusted all over the code. For example, the following piece of code compiles with

Re: Compiling with -m64 on Windows uses wrong link location

2014-11-01 Thread Josh via Digitalmars-d
On Saturday, 1 November 2014 at 16:22:33 UTC, Rainer Schuetze wrote: On 01.11.2014 14:25, Josh wrote: I have Visual Studio 2012 and Windows SDK for Windows 8.1 installed. I then used the DMD installer, which appears to have correctly found them:

Re: Programming Language for Games, part 3

2014-11-01 Thread Walter Bright via Digitalmars-d
On 11/1/2014 4:31 AM, bearophile wrote: His language seems to disallow comparisons of different types: void main() { int x = 10; assert(x == 10.0); // Refused. } More than that, he disallows mixing different integer types, even if no truncation would occur. I like the part

Re: Programming Language for Games, part 3

2014-11-01 Thread Walter Bright via Digitalmars-d
On 11/1/2014 4:31 AM, bearophile wrote: Third part of the A Programming Language for Games, by Jonathan Blow: https://www.youtube.com/watch?v=UTqZNujQOlA Jonathan is reinventing D with a somewhat different syntax. Some points on the video: * The defer statement works pretty much exactly

Re: module keyword with curly brackets

2014-11-01 Thread Daniel Murphy via Digitalmars-d
bearophile wrote in message news:aghnzoieibfgivzxa...@forum.dlang.org... What advantages gives removing that limitation? Multi-module single-file test cases! Is the price in increased complexity worth paying? I doubt it.

Re: Programming Language for Games, part 3

2014-11-01 Thread bearophile via Digitalmars-d
Walter Bright: * for over an array in D: foreach (it; results) ... D is better here, because it doesn't introduce magically named variables. * D does the check function thing using compile time function execution to check template arguments. This is not nearly enough. I have

Re: Programming Language for Games, part 3

2014-11-01 Thread via Digitalmars-d
On Saturday, 1 November 2014 at 17:17:34 UTC, Paulo Pinto wrote: Another trend, which I find positive, is how many people are now (finally!) assuming that C widespread into the industry was after all not that good, in terms of bugs/line of code. Now we need another 30 years until D, Rust,

Re: Programming Language for Games, part 3

2014-11-01 Thread Walter Bright via Digitalmars-d
On 11/1/2014 1:33 PM, bearophile wrote: Walter Bright: D is better here, because it doesn't introduce magically named variables. I agree that the implicit variable is not good. * D does the check function thing using compile time function execution to check template arguments. This is not

Re: module keyword with curly brackets

2014-11-01 Thread Walter Bright via Digitalmars-d
On 11/1/2014 6:31 AM, Dicebot wrote: I am afraid you need to get used to it because it is fundamental design decision of D module system and quite a feature on its own. Lot of files == awesome. Cramming lots of code into one source file made abundant sense on floppy disk systems, because

Re: Programming Language for Games, part 3

2014-11-01 Thread Paulo Pinto via Digitalmars-d
Am 01.11.2014 um 22:20 schrieb Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= ola.fosheim.grostad+dl...@gmail.com: On Saturday, 1 November 2014 at 17:17:34 UTC, Paulo Pinto wrote: Another trend, which I find positive, is how many people are now (finally!) assuming that C widespread into the industry was

Re: module keyword with curly brackets

2014-11-01 Thread Walter Bright via Digitalmars-d
On 11/1/2014 7:40 AM, Dicebot wrote: I see no reason to put module declarations in single level projects with no packages. Sometimes it can be handy to have a module name different from a file name, especially when trying to track down a bug, but this is rare.

Re: Programming Language for Games, part 3

2014-11-01 Thread bearophile via Digitalmars-d
Walter Bright: I know you've suggested extensive data flow analysis, The static enum (and related ideas) I've suggested require no flow analysis. Compile time checking can only be done on compile time arguments (obviously) and template functions can arbitrarily check compile time

Re: Programming Language for Games, part 3

2014-11-01 Thread Paulo Pinto via Digitalmars-d
Am 01.11.2014 um 23:23 schrieb Paulo Pinto: Am 01.11.2014 um 22:20 schrieb Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= ola.fosheim.grostad+dl...@gmail.com: On Saturday, 1 November 2014 at 17:17:34 UTC, Paulo Pinto wrote: Another trend, which I find positive, is how many people are now (finally!)

Re: Programming Language for Games, part 3

2014-11-01 Thread bearophile via Digitalmars-d
Paulo Pinto: - arrays were bound checked (just use a compiler flags and dataflow to remove them like any sane language) D removes very little bound checks. No data flow is used for this. - enums were strong typed D enums are only half strongly typed. - had namespaces or real modules

Re: D wrapper classes leak memory. Next steps?

2014-11-01 Thread ketmar via Digitalmars-d
On Sat, 1 Nov 2014 19:10:15 +0100 Marco Leise via Digitalmars-d digitalmars-d@puremagic.com wrote: - reference counted object (doesn't exist in D) but it exists! and with a size of machine pointer! i swear it exists, i'm using it! signature.asc Description: PGP signature

Re: Programming Language for Games, part 3

2014-11-01 Thread Paulo Pinto via Digitalmars-d
Am 01.11.2014 um 23:32 schrieb bearophile: Paulo Pinto: - arrays were bound checked (just use a compiler flags and dataflow to remove them like any sane language) D removes very little bound checks. No data flow is used for this. - enums were strong typed D enums are only half strongly

Re: Programming Language for Games, part 3

2014-11-01 Thread via Digitalmars-d
On Saturday, 1 November 2014 at 22:50:27 UTC, Paulo Pinto wrote: However JVM/.NET languages with a grain of C++ salt for JNI/PInvoke, are what my employer and our customers care about, so I can't justify to our customers any alternatives. I don't think anyone would say that C/C++ would be

Re: 'dmd' is not recognized as an internal or external command

2014-11-01 Thread Teak via Digitalmars-d
On Tuesday, 15 April 2014 at 13:59:31 UTC, Capture_A_Lag wrote: I don't know what I have done, but everything works good now. Thanks everybody for help! Hi, Im having the same problem you had trying to run a d language project...I keep getting the following error Build started: Project:

Re: Programming Language for Games, part 3

2014-11-01 Thread via Digitalmars-d
On Saturday, 1 November 2014 at 23:04:04 UTC, Ola Fosheim Grøstad wrote: I see some clear benefits with browsers/javascript's ability to compile directly to machine language on the fly. Just see what the demo scene are doing with code generators. So yeah, the code is slower, but perhaps not

Re: std.experimental.logger formal review round 3

2014-11-01 Thread Jakob Ovrum via Digitalmars-d
On Saturday, 1 November 2014 at 17:35:37 UTC, David Nadlinger wrote: There is still a critical issue with std.experimental.logger that would prevent it from being merged right now: The abuse of @trusted all over the code. Thank you. I was afraid I'd have to harp on it for the fourth time...

  1   2   >