Re: DDOX search support and new 2.064.2 Phobos docs

2014-01-05 Thread Stephan
On Saturday, 4 January 2014 at 22:42:28 UTC, Namespace wrote: On Saturday, 4 January 2014 at 22:14:24 UTC, Organic Farmer wrote: Would be great to have template constraints back in the docs (see e.g. std.algorithm.all). Indispensable info on templates in and of themselves. Gut gemacht!

Dconf 2014 Submissions - Jan 31 is the deadline!

2014-01-05 Thread Walter Bright
It's the new year, and time is running short on submitting your proposal! http://dconf.org/2014/index.html

Re: D - Unsafe and doomed

2014-01-05 Thread JR
On Saturday, 4 January 2014 at 03:45:22 UTC, Maxim Fomin wrote: Why have you posted this ungrounded Rust advertisement anyway? To spark discussion?

Re: [RFC] I/O and Buffer Range

2014-01-05 Thread Dmitry Olshansky
05-Jan-2014 09:22, Jason White пишет: On Saturday, 4 January 2014 at 13:32:15 UTC, Dmitry Olshansky wrote: IMHO C run-time I/O has no use in D. The amount of work spent on special-casing the non-locking primitives of each C run-time, repeating legacy mistakes (like text mode, codepages and

Re: Windows DMD installer/VisualD still not detecting paths correctly

2014-01-05 Thread Jacob Carlborg
On 2014-01-05 03:38, Manu wrote: On 5 January 2014 12:30, Manu turkey...@gmail.com mailto:turkey...@gmail.com wrote: Hmm, so I jigged it so it's able to find mspdb100.dll, but now link.exe complains: The application was unable to start correctly (0xc07b). That's weird.

Re: GDB Improved D support

2014-01-05 Thread Iain Buclaw
On 5 Jan 2014 02:35, Walter Bright newshou...@digitalmars.com wrote: On 1/3/2014 6:26 AM, Iain Buclaw wrote: Here's the patch against GDB for anyone who wants to review. https://github.com/ibuclaw/gdb/commit/6c187f7250c21a1b3ba2a09942b52ad238397d43 If no one sees anything that seems wrong,

Re: D - Unsafe and doomed

2014-01-05 Thread Andrej Mitrovic
On 1/5/14, Adam D. Ruppe destructiona...@gmail.com wrote: On Saturday, 4 January 2014 at 22:08:59 UTC, Andrej Mitrovic wrote: Here you go: Genius! I'm pretty happy with that, and it can be used for all kinds of range checks following the same pattern. Yeah. I've actually posted about this

Re: [RFC] I/O and Buffer Range

2014-01-05 Thread Jason White
On Sunday, 5 January 2014 at 09:33:46 UTC, Dmitry Olshansky wrote: As an advice I'd suggest to drop the 'Data' part in writeData/readData. It's obvious and adds no extra value. You're right, but it avoids a name clash if it's composed with text writing. write would be used for text and

Re: Windows DMD installer/VisualD still not detecting paths correctly

2014-01-05 Thread Manu
On 5 January 2014 19:50, Jacob Carlborg d...@me.com wrote: On 2014-01-05 03:38, Manu wrote: On 5 January 2014 12:30, Manu turkey...@gmail.com mailto:turkey...@gmail.com wrote: Hmm, so I jigged it so it's able to find mspdb100.dll, but now link.exe complains: The application was

Re: Windows DMD installer/VisualD still not detecting paths correctly

2014-01-05 Thread Rainer Schuetze
On 05.01.2014 03:38, Manu wrote: On 5 January 2014 12:30, Manu turkey...@gmail.com mailto:turkey...@gmail.com wrote: Hmm, so I jigged it so it's able to find mspdb100.dll, but now link.exe complains: The application was unable to start correctly (0xc07b). That's weird.

Re: Windows DMD installer/VisualD still not detecting paths correctly

2014-01-05 Thread Manu
On 5 January 2014 21:23, Rainer Schuetze r.sagita...@gmx.de wrote: On 05.01.2014 03:38, Manu wrote: On 5 January 2014 12:30, Manu turkey...@gmail.com mailto:turkey...@gmail.com wrote: Hmm, so I jigged it so it's able to find mspdb100.dll, but now link.exe complains: The

Re: D - Unsafe and doomed

2014-01-05 Thread Paulo Pinto
On Sunday, 5 January 2014 at 00:49:43 UTC, Organic Farmer wrote: Are there any developers left who can afford to choose their programming language for its expressive power and not for the amount of safety nets it provides. That is why D became my #1 language. Well it depends. On my case, the

Re: [RFC] I/O and Buffer Range

2014-01-05 Thread Dmitry Olshansky
05-Jan-2014 15:08, Jason White пишет: On Sunday, 5 January 2014 at 09:33:46 UTC, Dmitry Olshansky wrote: As an advice I'd suggest to drop the 'Data' part in writeData/readData. It's obvious and adds no extra value. You're right, but it avoids a name clash if it's composed with text writing.

Re: Windows DMD installer/VisualD still not detecting paths correctly

2014-01-05 Thread Rainer Schuetze
On 05.01.2014 12:51, Manu wrote: On 5 January 2014 21:23, Rainer Schuetze r.sagita...@gmx.de mailto:r.sagita...@gmx.de wrote: I guess you are using the latest beta of Visual D, don't you? Actually, I'm using the latest release. What's new in the beta? See here for beta releases with a

Re: D - Unsafe and doomed

2014-01-05 Thread H. S. Teoh
On Sun, Jan 05, 2014 at 07:51:31AM +, digitalmars-d-boun...@puremagic.com wrote: On Sunday, 5 January 2014 at 00:05:46 UTC, Walter Bright wrote: On 1/4/2014 3:04 PM, deadalnix wrote: Because it is an instant crash, Would things going on and a random thing happening randomly later be

Re: D - Unsafe and doomed

2014-01-05 Thread Peter Alexander
On Saturday, 4 January 2014 at 23:04:12 UTC, deadalnix wrote: The list is endless. Why is null special? Because it is an instant crash, because it is not possible to make it safe without runtime check, because it is known to fool optimizer and cause really nasty bugs (typically, a pointer is

Re: D - Unsafe and doomed

2014-01-05 Thread Jacob Carlborg
On 2014-01-05 13:58, Paulo Pinto wrote: Well it depends. On my case, the technology stack is always choosen from the customers. Our freedom to choose is quite limited. One could think that the technology stack is chosen based on the task it should solve. -- /Jacob Carlborg

Re: Hitchikers Guide to Porting Phobos / D Runtime to other architectures

2014-01-05 Thread Joakim
On Tuesday, 3 December 2013 at 02:43:34 UTC, Mike wrote: I agree. Submitted an enhancement here: https://d.puremagic.com/issues/show_bug.cgi?id=11666 What new platform are you porting druntime to? I'm guessing linux/ARM Cortex-M based on your previous posts. Hopefully, I can reuse some

Re: Windows DMD installer/VisualD still not detecting paths correctly

2014-01-05 Thread Manu
On 6 January 2014 00:35, Rainer Schuetze r.sagita...@gmx.de wrote: On 05.01.2014 12:51, Manu wrote: On 5 January 2014 21:23, Rainer Schuetze r.sagita...@gmx.de mailto:r.sagita...@gmx.de wrote: I guess you are using the latest beta of Visual D, don't you? Actually, I'm using the

Re: Windows DMD installer/VisualD still not detecting paths correctly

2014-01-05 Thread Rainer Schuetze
On 05.01.2014 18:10, Manu wrote: On 6 January 2014 00:35, Rainer Schuetze r.sagita...@gmx.de mailto:r.sagita...@gmx.de wrote: On 05.01.2014 12:51, Manu wrote: On 5 January 2014 21:23, Rainer Schuetze r.sagita...@gmx.de mailto:r.sagita...@gmx.de

CapNProto - fast data interchange format and capability-based RPC system

2014-01-05 Thread Guillaume Chatelet
Just to let you know that Kenton Varda an ex-Googler working on Protocol buffer released CapNProto. http://kentonv.github.io/capnproto There are some really nice features like 'Time-traveling RPC' (aka RPC with continuations) that allows several calls server side without paying for the round

Is it possible for the deimos repositories to be added to the dub registry please?

2014-01-05 Thread Gary Willoughby
Is it possible for the deimos[1] repositories to be added to the dub registry[2] please? I'm working on a project that uses the deimos x11 bindings and it would be nice to handle building the project using dub. Also, i won't have to distribute the x11 bindings with my project. [1]:

Re: Is it possible for the deimos repositories to be added to the dub registry please?

2014-01-05 Thread Kelet
On Sunday, 5 January 2014 at 20:48:00 UTC, Gary Willoughby wrote: Is it possible for the deimos[1] repositories to be added to the dub registry[2] please? I'm working on a project that uses the deimos x11 bindings and it would be nice to handle building the project using dub. Also, i won't

Re: Is it possible for the deimos repositories to be added to the dub registry please?

2014-01-05 Thread Kelet
It is also worth noting that specifying git repository URLs rather than being locked into the registry should be added to DUB eventually[1]. Until then, you can always fork it, add a DUB package configuration, and install the package locally or use the complex variant[2] of DUB version

Re: Windows DMD installer/VisualD still not detecting paths correctly

2014-01-05 Thread Walter Bright
On 1/4/2014 6:38 PM, Manu wrote: Walter: Is it possible to completely override sc.ini? What needs to be done to get there? dmd will look for the initialization file sc.ini in the following sequence of directories: 1.current working directory 2.directory specified by the HOME environment

Re: D - Unsafe and doomed

2014-01-05 Thread deadalnix
On Sunday, 5 January 2014 at 00:05:46 UTC, Walter Bright wrote: Because it is an instant crash, Would things going on and a random thing happening randomly later be better? Compile time error is preferable. because it is not possible to make it safe without runtime check, Wrapper

Re: D - Unsafe and doomed

2014-01-05 Thread deadalnix
On Sunday, 5 January 2014 at 00:49:43 UTC, Organic Farmer wrote: Are there any developers left who can afford to choose their programming language for its expressive power and not for the amount of safety nets it provides. That is why D became my #1 language. Safety nets can be provided

Re: D - Unsafe and doomed

2014-01-05 Thread Walter Bright
On 1/5/2014 3:59 PM, deadalnix wrote: because it is known to fool optimizer and cause really nasty bugs (typically, a pointer is dereferenced, so the optimizer assume it isn't null and remove null check after the dereference, and then the dereference is removed as it is dead. I'd like to see a

Re: D - Unsafe and doomed

2014-01-05 Thread deadalnix
On Monday, 6 January 2014 at 00:13:19 UTC, Walter Bright wrote: On 1/5/2014 3:59 PM, deadalnix wrote: because it is known to fool optimizer and cause really nasty bugs (typically, a pointer is dereferenced, so the optimizer assume it isn't null and remove null check after the dereference, and

Re: Can D be Interpreted?

2014-01-05 Thread deadalnix
On Wednesday, 1 January 2014 at 22:44:31 UTC, David Nadlinger wrote: On Wednesday, 1 January 2014 at 10:27:48 UTC, Ola Fosheim Grøstad wrote: Why doesn't D support some kind of partial evaluation instead? With llvm you get to JIT for free, seems to be an overall simpler solution than having an

Re: D - Unsafe and doomed

2014-01-05 Thread Thiez
On Monday, 6 January 2014 at 00:20:59 UTC, deadalnix wrote: void foo(int* ptr) { *ptr; if (ptr is null) { // do stuff } // do stuff. } The code look stupid, but this is quite common after a first pass of optimization/inlining, do end up with something like that when a

Re: D - Unsafe and doomed

2014-01-05 Thread deadalnix
On Monday, 6 January 2014 at 00:43:22 UTC, Thiez wrote: On Monday, 6 January 2014 at 00:20:59 UTC, deadalnix wrote: void foo(int* ptr) { *ptr; if (ptr is null) { // do stuff } // do stuff. } The code look stupid, but this is quite common after a first pass of

Re: phobos dependencies

2014-01-05 Thread Martin Nowak
On 12/20/2013 09:43 PM, Martin Nowak wrote: Couldn't static imports be made lazy without breaking any code? The above example would read. static import std.range. void foo(R)(R range) if (std.range.isForwardRange!R) { } Furthermore selective import can always be made lazily without changing

ARM Cortex-M D Runtime Port

2014-01-05 Thread Mike
On Sunday, 5 January 2014 at 17:07:10 UTC, Joakim wrote: What new platform are you porting druntime to? I'm guessing linux/ARM Cortex-M based on your previous posts. Hopefully, I can reuse some of your work when I try ARM out. I'm porting to an STM32F4

Re: D - Unsafe and doomed

2014-01-05 Thread Walter Bright
On 1/5/2014 4:20 PM, deadalnix wrote: On Monday, 6 January 2014 at 00:13:19 UTC, Walter Bright wrote: I'd still like to see an example, even a contrived one. void foo(int* ptr) { *ptr; if (ptr is null) { // do stuff } // do stuff. } The code look stupid, but

Re: D - Unsafe and doomed

2014-01-05 Thread Ola Fosheim Grøstad
On Sunday, 5 January 2014 at 15:19:15 UTC, H. S. Teoh wrote: Isn't that usually handled by running the webserver itself as a separate process, so that when the child segfaults the parent returns HTTP 501? You can do that. The hard part is how to deal with the other 99 non-offending

Re: D - Unsafe and doomed

2014-01-05 Thread H. S. Teoh
On Sun, Jan 05, 2014 at 06:03:04PM -0800, Walter Bright wrote: On 1/5/2014 4:20 PM, deadalnix wrote: On Monday, 6 January 2014 at 00:13:19 UTC, Walter Bright wrote: I'd still like to see an example, even a contrived one. void foo(int* ptr) { *ptr; if (ptr is null) { //

Graphics Library for D

2014-01-05 Thread Adam Wilson
Hello Fellow D Heads, Recently, I've been working to evaluate the feasibility and reasonability of building out a binding to Cinder in D. And while it is certainly feasible to wrap Cinder, that a binding would be necessarily complex and feel very unnatural in D. So after talking it over

Re: D - Unsafe and doomed

2014-01-05 Thread Walter Bright
On 1/5/2014 7:25 PM, H. S. Teoh wrote: On that note, some time last year I fixed a bug in std.bigint where a division by zero was deliberately triggered with the assumption that it will cause an exception / trap. But it didn't, so the code caused a malfunction further on, since control passed on

Re: D - Unsafe and doomed

2014-01-05 Thread H. S. Teoh
On Mon, Jan 06, 2014 at 02:24:09AM +, digitalmars-d-boun...@puremagic.com wrote: On Sunday, 5 January 2014 at 15:19:15 UTC, H. S. Teoh wrote: Isn't that usually handled by running the webserver itself as a separate process, so that when the child segfaults the parent returns HTTP 501?

Re: Graphics Library for D

2014-01-05 Thread Walter Bright
On 1/5/2014 8:10 PM, Adam Wilson wrote: Recently, I've been working to evaluate the feasibility and reasonability of building out a binding to Cinder in D. For reference, here's what Cinder is: http://libcinder.org/ It's been well received by the C++ community.

Re: std.conv.parse for user defined structs/objects

2014-01-05 Thread H. S. Teoh
On Fri, Dec 27, 2013 at 08:43:25PM +, Ilya Yaroshenko wrote: I've been thinking about this too. It shouldn't be too hard to add this to std.conv (I'd call it fromString, though, by analogy with toString -- parseImpl looks a bit ugly). Is fromString good in case of InputRange? Good

Re: phobos dependencies

2014-01-05 Thread Andrei Alexandrescu
On 1/5/14 5:22 PM, Martin Nowak wrote: On 12/20/2013 09:43 PM, Martin Nowak wrote: Couldn't static imports be made lazy without breaking any code? The above example would read. static import std.range. void foo(R)(R range) if (std.range.isForwardRange!R) { } Furthermore selective import

Re: phobos dependencies

2014-01-05 Thread Andrei Alexandrescu
On 1/5/14 5:22 PM, Martin Nowak wrote: On 12/20/2013 09:43 PM, Martin Nowak wrote: Couldn't static imports be made lazy without breaking any code? The above example would read. static import std.range. void foo(R)(R range) if (std.range.isForwardRange!R) { } Furthermore selective import

Re: phobos dependencies

2014-01-05 Thread Kenji Hara
2014/1/6 Andrei Alexandrescu seewebsiteforem...@erdani.org On 1/5/14 5:22 PM, Martin Nowak wrote: On 12/20/2013 09:43 PM, Martin Nowak wrote: Couldn't static imports be made lazy without breaking any code? The above example would read. static import std.range. void foo(R)(R range) if

Re: Graphics Library for D

2014-01-05 Thread Nick B
On Monday, 6 January 2014 at 04:11:07 UTC, Adam Wilson wrote: Hello Fellow D Heads, Recently, I've been working to evaluate the feasibility and reasonability of building out a binding to Cinder in D. And while it is certainly feasible to wrap Cinder, that a binding would be necessarily

Re: phobos dependencies

2014-01-05 Thread Andrei Alexandrescu
On 1/5/14 8:44 PM, Kenji Hara wrote: Honestly, lazy import (== defer loading module file and running semantic analysis for symbol search) would improve compilation speed for selective imports and static imports, but it would have no merit for basic imports. So precisely, all imports lazy would

Databases daemons

2014-01-05 Thread chuck
My first post. :) I come from a perl background but currently I am looking into transitioning into a compiled language. I am a fan of open software and know of the affinity Gnu has towards the C language, but would like to learn something that is a bit more like what I am used to. I have

Re: Graphics Library for D

2014-01-05 Thread Mike
I'm sure you'll receive no shortage of opinions with such an open invitation, so here's mine: * Please don't make a graphics library that is useful only on PCs. * Please consider more than mouse and keypboard as input devices (e.g. multitouch) * Today is the first I've heard of Cinder, but

Understanding and new language feature proposal

2014-01-05 Thread Sumit Adhikari
The birth and evolution of d language is to provide a modern and better alternative to C++! If I look at C++ then C++ is a systems programming language. The use cases of C++ is OS and embedded systems writing. Why? C++ claims to extract last drop out of HW. If I look correctly rarely C++ is

Re: [RFC] I/O and Buffer Range

2014-01-05 Thread Jason White
On Sunday, 5 January 2014 at 13:30:59 UTC, Dmitry Olshansky wrote: I my view text implies something like: void write(const(char)[]); size_t read(char[]); And binary would be: void write(const(ubyte)[]); size_t read(ubyte[]); Should not clash. Those would do the same thing for either text

Re: Graphics Library for D

2014-01-05 Thread Adam Wilson
On Sun, 05 Jan 2014 20:58:11 -0800, Nick B nick.barbal...@gmail.com wrote: On Monday, 6 January 2014 at 04:11:07 UTC, Adam Wilson wrote: Hello Fellow D Heads, Recently, I've been working to evaluate the feasibility and reasonability of building out a binding to Cinder in D. And while it

Re: phobos dependencies

2014-01-05 Thread H. S. Teoh
On Sun, Jan 05, 2014 at 09:22:09PM -0800, Andrei Alexandrescu wrote: On 1/5/14 8:44 PM, Kenji Hara wrote: Honestly, lazy import (== defer loading module file and running semantic analysis for symbol search) would improve compilation speed for selective imports and static imports, but it would

Re: phobos dependencies

2014-01-05 Thread Kenji Hara
2014/1/6 Andrei Alexandrescu seewebsiteforem...@erdani.org On 1/5/14 8:44 PM, Kenji Hara wrote: Honestly, lazy import (== defer loading module file and running semantic analysis for symbol search) would improve compilation speed for selective imports and static imports, but it would have no

Re: phobos dependencies

2014-01-05 Thread Walter Bright
On 1/5/2014 9:22 PM, Andrei Alexandrescu wrote: On 1/5/14 8:44 PM, Kenji Hara wrote: Honestly, lazy import (== defer loading module file and running semantic analysis for symbol search) would improve compilation speed for selective imports and static imports, but it would have no merit for

Re: phobos dependencies

2014-01-05 Thread Andrei Alexandrescu
On 1/5/14 10:31 PM, Walter Bright wrote: On 1/5/2014 9:22 PM, Andrei Alexandrescu wrote: On 1/5/14 8:44 PM, Kenji Hara wrote: Honestly, lazy import (== defer loading module file and running semantic analysis for symbol search) would improve compilation speed for selective imports and static

Re: Graphics Library for D

2014-01-05 Thread Adam Wilson
On Sun, 05 Jan 2014 21:32:54 -0800, Mike n...@none.com wrote: I'm sure you'll receive no shortage of opinions with such an open invitation, so here's mine: * Please don't make a graphics library that is useful only on PCs. That's the plan. However at this point D only works on x86 so it's

Re: Graphics Library for D

2014-01-05 Thread Adam Wilson
On Sun, 05 Jan 2014 20:17:22 -0800, Walter Bright newshou...@digitalmars.com wrote: On 1/5/2014 8:10 PM, Adam Wilson wrote: Recently, I've been working to evaluate the feasibility and reasonability of building out a binding to Cinder in D. For reference, here's what Cinder is:

Re: ARM Cortex-M D Runtime Port

2014-01-05 Thread Joakim
On Monday, 6 January 2014 at 01:32:09 UTC, Mike wrote: On Sunday, 5 January 2014 at 17:07:10 UTC, Joakim wrote: What new platform are you porting druntime to? I'm guessing linux/ARM Cortex-M based on your previous posts. Hopefully, I can reuse some of your work when I try ARM out. I'm

Re: Graphics Library for D

2014-01-05 Thread ilya-stromberg
On Monday, 6 January 2014 at 04:11:07 UTC, Adam Wilson wrote: - Aurora is not a GUI library. Aurora is intended as a creative graphics programming library in the same concept as Cinder. This means that it will be much closer to game's graphics engine, in terms of design and capability, than a

Re: Graphics Library for D

2014-01-05 Thread Joakim
On Monday, 6 January 2014 at 04:17:21 UTC, Walter Bright wrote: On 1/5/2014 8:10 PM, Adam Wilson wrote: Recently, I've been working to evaluate the feasibility and reasonability of building out a binding to Cinder in D. For reference, here's what Cinder is: http://libcinder.org/ It's been

Re: D - Unsafe and doomed

2014-01-05 Thread Organic Farmer
On Saturday, 4 January 2014 at 22:08:59 UTC, Andrej Mitrovic wrote: On 1/4/14, Adam D. Ruppe destructiona...@gmail.com wrote: The big thing people have asked for before is Object foo; if(auto obj = checkNull(foo)) { obj == NotNull!Object } else { // foo is null } and i haven't figured

Re: D - Unsafe and doomed

2014-01-05 Thread Organic Farmer
* correct: whether obj converts to true or false

Re: Graphics Library for D

2014-01-05 Thread Adam Wilson
On Sun, 05 Jan 2014 23:25:38 -0800, ilya-stromberg ilya-stromberg-2...@yandex.ru wrote: On Monday, 6 January 2014 at 04:11:07 UTC, Adam Wilson wrote: - Aurora is not a GUI library. Aurora is intended as a creative graphics programming library in the same concept as Cinder. This means that

Re: Graphics Library for D

2014-01-05 Thread Adam Wilson
On Sun, 05 Jan 2014 23:30:24 -0800, Joakim joa...@airpost.net wrote: On Monday, 6 January 2014 at 04:17:21 UTC, Walter Bright wrote: On 1/5/2014 8:10 PM, Adam Wilson wrote: Recently, I've been working to evaluate the feasibility and reasonability of building out a binding to Cinder in D.

Re: How do I choose the correct primative?

2014-01-05 Thread TheFlyingFiddle
On Sunday, 5 January 2014 at 06:31:38 UTC, Jake Thomas wrote: And got 86,421 lines of assembly!! I expected a load instruction to load whatever was at loadMe's location into r0 (the return register) and not much else. Maybe 10 lines - tops - due to compiler fluffiness. I got about 8,641 times

Re: Prevent Garbage Collector

2014-01-05 Thread Jacob Carlborg
On 2014-01-05 01:17, Jeroen Bollen wrote: Also a somewhat unrelated question, variables in D get initialized by default, do they also when you define them right after? Something like: int[] iryy = new int[](50); // Will the array elements be initialized to 0? Yes, have a look at:

Re: Is it possible to handle 'magic' property assignments a'la PHP?

2014-01-05 Thread Philippe Sigaud
On Sat, Jan 4, 2014 at 10:08 PM, H. S. Teoh hst...@quickfur.ath.cx wrote: Of course, these are arguably clever hacks than true, properly-motivated examples, but still, they exemplify what Andrei meant when he said that the power of opDispatch is largely still unexplored territory. As Adam

Re: Simplest way to create an array from an associative array which its contains keys and values?

2014-01-05 Thread bearophile
Andrej Mitrovic: However the [k, aa[k]] expression will allocate an array for each key you iterate over regardless if you use join or joiner. I posted a solution with only, hope that works. :) Perhaps the s suffix (to define fixed-sized arrays) could avoid that problem: string[] r =

Re: Is it possible to handle 'magic' property assignments a'la PHP?

2014-01-05 Thread TheFlyingFiddle
Another simple example that have helped me tremendously when debugging OpenGL calls. A simple dispatcher that checks glGetError after every call. struct GL { auto opDispatch(string name, Args...)(Args args) { enum glName = gl ~ name; mixin(format( static

Re: Simplest way to create an array from an associative array which its contains keys and values?

2014-01-05 Thread Philippe Sigaud
On Sat, Jan 4, 2014 at 1:08 AM, Ali Çehreli acehr...@yahoo.com wrote: 3) The member rangeFront is needed because Tuple does not have opIndex for dynamic indexes. I can do range.front[0] but I cannot do range.front[currentIndex]. Is there any plan to add indexing on runtime indices to Tuple?

Re: Simplest way to create an array from an associative array which its contains keys and values?

2014-01-05 Thread Timon Gehr
On 01/05/2014 03:55 PM, Philippe Sigaud wrote: Is there any plan to add indexing on runtime indices to Tuple? It can be done, by generating a specific runtime opIndex for Tuple, if the types held in the tuple have a common type. It would override the current index operator.

Re: VC linker - unresolved external symbols - runtime

2014-01-05 Thread Palmic
Replying to myself: In my case at lease, I don't think it's a bug... I have just used the build tool binary that comes with the DWinProgramming samples, added a new folder with my source in the Samples directory, and the tool managed to build it properly... I will now look at the souces of

Re: Is it possible to handle 'magic' property assignments a'la PHP?

2014-01-05 Thread Artur Skawina
On 01/05/14 15:36, TheFlyingFiddle wrote: Another simple example that have helped me tremendously when debugging OpenGL calls. A simple dispatcher that checks glGetError after every call. struct GL { auto opDispatch(string name, Args...)(Args args) { enum glName = gl ~

Shared library extern (C) variables

2014-01-05 Thread Mineko
I keep getting mixed results searching for this. :\ Just as the title says, is it safe to extern (C) variables? Something like this: extern (C) auto foo = 800; And then call that from another program? Also, just because this has been bugging me for a while.. Is export broken, or it it not

Re: VC linker - unresolved external symbols - runtime

2014-01-05 Thread Erik van Velzen
It works if you recompile phobos64.lib So it seems the standard DMD 2.064.2 download comes with an outdated version of phobos64.lib which is out of sync with the included source code.

Re: VC linker - unresolved external symbols - runtime

2014-01-05 Thread Erik van Velzen
@Palmic the DWinProgramming samples use the overload Runtime.initialize(ExceptionHandler) Which gives a warning that it is deprecated and you should use this overload instead: Runtime.initialize() But this is not compiled in phobos64.lib, while it is included in the source code. So the

Re: Shared library extern (C) variables

2014-01-05 Thread Jeremy DeHaan
On Sunday, 5 January 2014 at 18:22:54 UTC, Mineko wrote: I keep getting mixed results searching for this. :\ Just as the title says, is it safe to extern (C) variables? Something like this: extern (C) auto foo = 800; And then call that from another program? Also, just because this has been

Re: VC linker - unresolved external symbols - runtime

2014-01-05 Thread FreeSlave
On Sunday, 5 January 2014 at 19:05:58 UTC, Erik van Velzen wrote: @Palmic the DWinProgramming samples use the overload Runtime.initialize(ExceptionHandler) Which gives a warning that it is deprecated and you should use this overload instead: Runtime.initialize() But this is not compiled in

Re: Shared library extern (C) variables

2014-01-05 Thread Mineko
On Sunday, 5 January 2014 at 19:08:44 UTC, Jeremy DeHaan wrote: On Sunday, 5 January 2014 at 18:22:54 UTC, Mineko wrote: I keep getting mixed results searching for this. :\ Just as the title says, is it safe to extern (C) variables? Something like this: extern (C) auto foo = 800; And then

Re: VC linker - unresolved external symbols - runtime

2014-01-05 Thread Erik van Velzen
Filed under installer https://d.puremagic.com/issues/show_bug.cgi?id=11871 You could add the linux thing as a comment if you're sure it's the same issue.

Re: Shared library extern (C) variables

2014-01-05 Thread FreeSlave
On Sunday, 5 January 2014 at 18:22:54 UTC, Mineko wrote: I keep getting mixed results searching for this. :\ Just as the title says, is it safe to extern (C) variables? Something like this: extern (C) auto foo = 800; And then call that from another program? Also, just because this has been

Re: Shared library extern (C) variables

2014-01-05 Thread Mineko
On Sunday, 5 January 2014 at 19:47:46 UTC, FreeSlave wrote: Some code snippets of what you try to do would help. Maybe this example explain you something: //mod.d extern(C) int foo = 42; void changeFoo(int val) { foo = val; } //main.d import std.stdio; import mod; int main() {

Re: VC linker - unresolved external symbols - runtime

2014-01-05 Thread FreeSlave
On Sunday, 5 January 2014 at 19:30:46 UTC, Erik van Velzen wrote: Filed under installer https://d.puremagic.com/issues/show_bug.cgi?id=11871 You could add the linux thing as a comment if you're sure it's the same issue. Well, I'm not sure this is same. I explored something new to me and

libphobos.so and loading libraries at runtime

2014-01-05 Thread FreeSlave
import core.runtime; int main() { Runtime.loadLibrary(does not care); Runtime.unloadLibrary(null); return 0; } When I try to compile this code with 'dmd main.d', I get errors main.o: In function `_D4core7runtime7Runtime17__T11loadLibraryZ11loadLibraryFxAaZPv':

Re: Shared library extern (C) variables

2014-01-05 Thread Jeremy DeHaan
On Sunday, 5 January 2014 at 19:55:50 UTC, Mineko wrote: On Sunday, 5 January 2014 at 19:47:46 UTC, FreeSlave wrote: Some code snippets of what you try to do would help. Maybe this example explain you something: //mod.d extern(C) int foo = 42; void changeFoo(int val) { foo = val; }

dirEntries throws exception on broken symlinks

2014-01-05 Thread dennis
I a using dirEntries to list recursively build a list of all files in all subdirectories but dirEntries is throwing an exception when it encounters a broken link. I want just report the exception, then ignore the broken link and then continue processing the rest of the dir's and files. Do I

Re: Shared library extern (C) variables

2014-01-05 Thread TheFlyingFiddle
On Sunday, 5 January 2014 at 19:55:50 UTC, Mineko wrote: Ahh I appreciate it, but I already have that part down and good. :) I was wondering about how to use export correctly, I apologize for not being clear. Also I'll keep in mind the __gshared, never even knew about it. Export is

Re: Is it possible to handle 'magic' property assignments a'la PHP?

2014-01-05 Thread TheFlyingFiddle
On Sunday, 5 January 2014 at 17:17:27 UTC, Artur Skawina wrote: While 'void' is not a first class type in D, there /is/ a special case for returning 'void' from functions - so all of the above can simply be written as: struct gl { static auto ref opDispatch(string name, Args...)(Args

Re: dirEntries throws exception on broken symlinks

2014-01-05 Thread FreeSlave
You must not cast base class to derived class, when you don't know actual type (and even if you know exact type it's still bad practice to cast instance of more generic type to more specific one). Use multiple catch statements instead: catch(FileException o) { //handle FileException }

Re: Is it possible to handle 'magic' property assignments a'la PHP?

2014-01-05 Thread Philippe Sigaud
On Sun, Jan 5, 2014 at 5:18 PM, Jacob Carlborg d...@me.com wrote: Just for the record. In Rails, that's the old, now discourage, Rails 2 syntax. I didn't know that, thanks. I read it during the holidays in Martin Fowler's book on DSL, but indeed that book is from 2005, IIRC. In Rails 3 and

Re: Simplest way to create an array from an associative array which its contains keys and values?

2014-01-05 Thread Philippe Sigaud
On Sun, Jan 5, 2014 at 4:49 PM, Timon Gehr timon.g...@gmx.ch wrote: On 01/05/2014 03:55 PM, Philippe Sigaud wrote: Is there any plan to add indexing on runtime indices to Tuple? It can be done, by generating a specific runtime opIndex for Tuple, if the types held in the tuple have a common

Implicitly converting a newly allocated array to immutable

2014-01-05 Thread Meta
The following doesn`t work: immutable(string[]) strArr = new string[](10); But I feel that it probably should work. I know we have assumeUnique, but I remember awhile ago that some work was done toward making the result of unique expressions (like those using new) implicitly convertible to

Re: Implicitly converting a newly allocated array to immutable

2014-01-05 Thread Ali Çehreli
On 01/05/2014 05:19 PM, Meta wrote: The following doesn`t work: immutable(string[]) strArr = new string[](10); A pure function is a workaround. The return value of a pure function is implicitly convertible to immutable: pure string[] foo() { return new string[](10); } void main() {

Re: dirEntries throws exception on broken symlinks

2014-01-05 Thread dennis
On Sunday, 5 January 2014 at 21:33:56 UTC, FreeSlave wrote: You must not cast base class to derived class, when you don't know actual type (and even if you know exact type it's still bad practice to cast instance of more generic type to more specific one). Use multiple catch statements

[Issue 11849] Recursive enum causes segfault

2014-01-05 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11849 --- Comment #6 from github-bugzi...@puremagic.com 2014-01-05 00:11:27 PST --- Commits pushed to master at https://github.com/D-Programming-Language/dmd

[Issue 11863] std.conv.to!string(int/uint, radix) returns incorrect string

2014-01-05 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11863 --- Comment #3 from monarchdo...@gmail.com 2014-01-05 00:10:54 PST --- (In reply to comment #2) Hmm, with -allinst switch, OP code runs successfully in Windows (Both -m32 and -m64). I *thought* I had tried that, but I must have gotten it

[Issue 7683] the attribute has not been correctly inferred in either the constructor or nested function.

2014-01-05 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=7683 Denis Shelomovskij verylonglogin@gmail.com changed: What|Removed |Added Status|NEW

[Issue 1566] Nested template issue

2014-01-05 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=1566 Denis Shelomovskij verylonglogin@gmail.com changed: What|Removed |Added CC|

[Issue 11863] std.conv.to!string(int/uint, radix) returns incorrect string

2014-01-05 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11863 --- Comment #4 from Kenji Hara k.hara...@gmail.com 2014-01-05 00:29:47 PST --- (In reply to comment #2) Hmm, with -allinst switch, OP code runs successfully in Windows (Both -m32 and -m64). Instead of -allinst, -release also suppresses the

  1   2   >